kernel-Nat.add_eq_one_iff
- Kind
- kernel-term
- Status
- checked
Supports: ∀ {m n : ℕ}, m + n = 1 ↔ m = 0 ∧ n = 1 ∨ m = 1 ∧ n = 0
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- add_eq_one_iff 2>/dev/null | grep -Ec '^Nat\.add_eq_one_iff[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits `Nat.add_eq_one_iff` through the trusted `Kernel::add_declaration` gate, declared in `nat_prelude/add_basics.rs`. Declared by `declare_add_eq_lit_iff(d, p, p.add_eq_one_iff, 1)`, the shared helper this fact's group closes through -- see the `add_eq_two_iff`/`add_eq_three_iff` evidence for the construction (bounding `m <= k` via `le_add_right`, then `lt_or_eq_of_le`/`le_of_lt_succ` down to 0). `nat_theorem_inventory`'s rendered type is `(x0,x1:AxNat)->Iff (Eq (add x0 x1) 1) (Or (And (Eq x0 0) (Eq x1 1)) (And (Eq x0 1) (Eq x1 0)))`, matching this fact's `formal.statement`. `nat_theorem_inventory` exits non-zero for a name that does not exist, and the `grep -c` count (tested `-ge 1`, not piped into `grep -q`) requires the admitted declaration to actually be printed. Verified both ways: the real name greps to a count `-ge 1`; grepping a made-up name (`Nat.add_eq_one_iff_bogus`) greps to `0`.