kernel-Nat.descFactorial_succ
- Kind
- kernel-term
- Status
- checked
Supports: n.descFactorial (k+1) = (n - k) * n.descFactorial k
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- descFactorial_succ 2>/dev/null | grep -Ec '^Nat\.descFactorial_succ[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits this theorem through the trusted `Kernel::add_declaration` gate, which re-checks the proof term against the stated type. `Nat.descFactorial n (succ k)` iota-reduces (via `NatOps::define_binary`'s recursor application) directly to `(n - k) * descFactorial n k` -- the proof is `Eq.refl`, no rewrite. `n - k` is Lean's own `Nat.sub` (truncating), matching Mathlib's `Nat.descFactorial (n : ℕ) : ℕ → ℕ | 0 => 1 | k + 1 => (n - k) * descFactorial n k` argument order exactly. `nat_theorem_inventory` exits non-zero for a name that does not exist, and `grep -Ec` consumes the pipe and the count is tested, so the exit status depends on what the run found.