kernel-Nat.add_factorial_le_factorial_add
- Kind
- kernel-term
- Status
- checked
Supports: ∀ (i : ℕ) {n : ℕ}, 1 ≤ n → i + n.factorial ≤ (i + n).factorial
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- add_factorial_le_factorial_add 2>/dev/null | /usr/bin/grep -Ec '^Nat\.add_factorial_le_factorial_add[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits `Nat.add_factorial_le_factorial_add` through the trusted `Kernel::add_declaration` gate, declared in new module `nat_prelude/add_factorial_le.rs`. Proved by induction on `i` (`n` and the `1 <= n` hypothesis held fixed): base case (`i=0`) needs `zero_add` on both occurrences (`Nat.add` recurses on its RIGHT argument, so `add(zero,x)` is stuck for symbolic `x`); the step case needs `succ_add` on both occurrences plus one arithmetic fact (`1 <= (j+n)*(j+n)!`, from `one_le_mul`/`one_le_factorial`/`n <= j+n` via `le_add_right`+`add_comm`+the hypothesis via `le_trans`) fed through `add_le_add_left` -- the `factorial(succ x) = mul(factorial x, succ x)` unfold costs no lemma at all, since `factorial_succ` is itself proved by `Eq.refl` (`defs.rs`) and `mul` recurses right same as `add`, so the kernel accepts the assembled term by defeq at the final check (the same technique `divisibility.rs`'s existing `factorial_lt_of_lt` uses). `nat_theorem_inventory`'s rendered type is `((x0 : AxNat) -> ((x1 : AxNat) -> ((x2 : AxNat.le (AxNat.succ AxNat.zero) x1) -> AxNat.le (AxNat.add x0 (AxNat.factorial x1)) (AxNat.factorial (AxNat.add x0 x1)))))`, matching this fact's `formal.statement`. The `-ge 1` count-based test (not `grep -q`) requires the admitted declaration to actually be printed; grepping a made-up name greps to `0`.