kernel-Nat.ldiff_zero_left
- Kind
- kernel-term
- Status
- checked
Supports: ldiff(0, n) = 0
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- ldiff_zero_left 2>/dev/null | grep -Ec '^Nat\.ldiff_zero_left[[: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, so producing this row at all is a machine-checked proof. `Nat.ldiff m n := Nat.ldiffAux m m n` (fuel `m`); at `m = 0` the outer `Nat.rec` on the fuel argument is already at its base case, which is `ldiffAux`'s constant-`0` row (the SAME shape `Nat.land` uses, not `Nat.lor`'s corrected `n`-returning row -- see `nat_prelude::ldiff`'s module doc for why: `m` is both the fuel-sized operand AND `ldiff`'s absorbing-zero operand, `ldiff 0 n = 0` for every `n`, so ignoring the leftover `n`-argument is exactly as safe as it is for `land`), so `ldiffAux 0 0 n` iota-reduces directly to `0` regardless of `n`'s shape -- the proof is `Eq.refl`, no induction and no case-split combinator. `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. Anchored with `^Nat\.ldiff_zero_left[[:space:]]` (verified exactly 1 row) so a future sibling name sharing the `ldiff_zero_left` prefix cannot inflate the count.