kernel-Nat.bit_true
- Kind
- kernel-term
- Status
- checked
Supports: bit(true, n) = 2*n + 1
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- bit_true 2>/dev/null | grep -Ec '^Nat\.bit_true[[: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.bit b n` is stated `add (mul 2 n) (cond b 1 0)`; at `b = true`, `cond true 1 0` iota-reduces to `1 = succ zero`, and `Nat.add`'s successor case (`add x (succ j) ≡ succ (add x j)`) collapses the sum to `succ (mul 2 n)` -- the same normal form the RHS `add (mul 2 n) 1` itself reduces to. The proof is `Eq.refl`; the kernel closes it by delta+iota alone, no case-split combinator and no induction. `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. The anchor `^Nat\.bit_true[[:space:]]` matters here for the same reason as the sibling `bit_false` fact -- `bit_true` is not itself a prefix of another declared name in this build, but the anchor keeps the checker robust if one is added later.