Identifier
F:nat-sumrange-const
Proof route
kernel-lean
External status
proved
Axiom footprint
Empty

Recorded description

Summing the constant `c` over `[0, n)` gives `mul c n`. The ORIENTATION is forced by the kernel rather than chosen: `Nat.mul` recurses on its RIGHT argument, so `mul c (succ j)` reduces to `add (mul c j) c`, which is exactly what `sumRange (fun _ => c) (succ j)` reduces to. The mirrored `mul n c` is equally TRUE (`Nat.mul` commutes) and is NOT provable by this proof term -- a mutation stating it is refused by the trusted gate with a TypeMismatch. Proved by induction on `n`, one congruence per step, no lemma outside the two definitions' own reduction rules.

Formal statement
theorem Nat.sumRange_const : ((x0 : AxNat) -> ((x1 : AxNat) -> Eq.{1} AxNat (AxNat.sumRange (fun (x2 : AxNat) => x0) x1) (AxNat.mul x0 x1)))

Dependencies

The graph shows direct ledger edges. Follow a node to open its artifact page.

Direct dependencies appear to the left. The current fact is in the center. Facts that depend directly on it appear to the right. Current fact A rectangle of lattice points, Summing over a finite set past Fubini for finite sums over the
0 direct dependencies 3 direct dependents

Evidence

kernel-Nat.sumRange_const

Kind
kernel-term
Status
checked

Supports: Nat.sumRange_const is admitted by the trusted kernel gate with the type recorded in formal.statement.

Checker command
cargo run -q --release -p axeyum-lean-kernel --example theorem_dependency_inventory -- Nat.sumRange_const 2>/dev/null | grep -cE '^Nat\.sumRange_const[[:space:]]'
Evidence notes

Two independent failure modes, so the exit status depends on the finding rather than on the run completing: theorem_dependency_inventory exits non-zero when a NAMED filter matches nothing, and grep -c exits 1 printing 0 when the anchored line is absent. Run both ways for this declaration: the real name prints 1 and exits 0, a one-letter misspelling prints 0 and exits 1. Anchored with [[:space:]], never \t -- in a scripted (GNU) grep \t is a literal t. grep -c rather than grep -q, which would SIGPIPE the producer under pipefail. --release is MANDATORY: this tool builds creal/complex/cpoint, which overflow the default debug thread stack. Pass ONE name per invocation: this tool silently keeps only the FIRST name argument.

footprint-Nat.sumRange_const

Kind
exhaustive-enumeration
Status
checked

Supports: axiom_footprint: [] -- the Nat prelude's trusted surface is empty, which bounds Nat.sumRange_const.

Checker command
cargo run -q --release -p axeyum-lean-kernel --example nat_axiom_inventory -- --require-axiom-free nat
Evidence notes

--require-axiom-free exits non-zero when the named prelude's trusted surface (Axiom + Opaque + Quotient) is not empty, and errors rather than silently passing for a prelude the run never built. A declaration cannot depend on a trusted declaration the environment does not contain, so an empty nat surface bounds every declaration in it. This is a whole-prelude bound, not a per-declaration measurement; the per-declaration figure is the footprint column of kernel_declaration_projection, measured 0 for this row. Measured 2026-08-31: `ok: nat trusted surface = 0`.

Provenance

{
  "date": "2026-08-31",
  "curation": "curated",
  "established_by": "axeyum-lean-kernel build_nat_prelude (crates/axeyum-lean-kernel/src/nat_prelude/lattice_count.rs)",
  "source": "formal.statement, axiom_footprint and depends_on are taken verbatim from `cargo run -q --release -p axeyum-lean-kernel --example kernel_declaration_projection`, whose TSV rows are (prelude, kind, display name, axiom-footprint size, direct type declarations, direct declarations, direct theorems, Kernel::render_lean(declaration.ty())). depends_on is the direct-theorem column intersected with this ledger's registered facts. Nothing about the statement was hand transcribed; title, statement and the evidence notes were authored (lane quadratic-reciprocity, ADR-1260)."
}