kernel-Nat.lor_zero_right
- Kind
- kernel-term
- Status
- checked
Supports: lor(m, 0) = m
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- lor_zero_right 2>/dev/null | grep -Ec '^Nat\.lor_zero_right[[: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. Unlike `lor_zero_left`, `lor m 0 = m` is not `refl` at symbolic `m` -- the outer `Nat.rec` on the fuel (which is `m` itself) is stuck until `m`'s constructor shape is exposed -- so the proof is by induction on `m`. Both the base and step case close by `Eq.refl`, with the induction hypothesis unused in the step: the `n = 0` guard is tested OUTERMOST in `lorAux`'s succ case (unchanged from `landAux`'s guard order -- see `nat_prelude::lor`'s module doc), so `beq n 0` reduces to `true` by delta+iota alone and the outer `bool_select_nat` selects the "return `m`" branch immediately, collapsing the whole term to `m` regardless of the (possibly symbolic) fuel predecessor, without forcing the untaken branch where the real recursive step lives. `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\.lor_zero_right[[:space:]]` (verified exactly 1 row).