kernel-Nat.descFactorial_of_lt
- Kind
- kernel-term
- Status
- checked
Supports: n < k -> n.descFactorial k = 0
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- descFactorial_of_lt 2>/dev/null | grep -Ec '^Nat\.descFactorial_of_lt[[: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. Proved by induction on `k` (with `n` held fixed, no generalization needed inside the motive): `k = 0` is vacuous (`n < 0` is impossible, `Nat.not_lt_zero`); `k = succ j` splits `n < succ j` (via `le_of_lt_succ`) into `n < j` or `n = j` (via `lt_or_eq_of_le`) -- the first case chains the induction hypothesis through `mul_zero`, the second substitutes `j := n` (`Eq.rec`) into a goal computed once via `sub_self` then `zero_mul`. This is the definition's highest-risk seam: `Nat.sub` truncates rather than going negative, so a wrong argument order in the recursion step would still type-check and would only show up as a wrong VALUE, never a kernel rejection -- this theorem proves the truncation boundary rather than merely asserting it. `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.