kernel-Nat.ldiff_three_five
- Kind
- kernel-term
- Status
- checked
Supports: ldiff(3, 5) = 2
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- ldiff_three_five 2>/dev/null | grep -Ec '^Nat\.ldiff_three_five[[: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. `3 = 0b011`, `5 = 0b101`, `3 &~ 5 = 0b010 = 2` (keep m's bits where n's are clear: bit 0 of m is cleared by bit 0 of n, bit 1 of m survives since bit 1 of n is clear); every numeral is concrete, so the fuel recursion, the div/mod halving, and the per-bit `if (n%2)=0 then (m%2) else 0` (via `Nat.beq` + `bool_select_nat`) all reduce fully and the proof is `Eq.refl`. Deliberately discriminating against `F:nat-land-three-five`'s `3 &&& 5 = 1` (a wrong-way per-bit step reusing the AND/product combinator cannot pass both facts' checkers at once), and paired with `F:nat-ldiff-five-three`'s `5 &~ 3 = 4` -- the same two operands swapped, producing a DIFFERENT answer, since `ldiff` is not commutative. `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_three_five[[:space:]]` (verified exactly 1 row).