kernel-Nat.dist_comm
- Kind
- kernel-term
- Status
- checked
Supports: ∀ (n m : ℕ), n.dist m = m.dist n
test "$(cargo run -q --release -p axeyum-lean-kernel --example nat_theorem_inventory -- dist_comm 2>/dev/null | grep -Ec '^Nat\.dist_comm[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits `Nat.dist_comm` through the trusted `Kernel::add_declaration` gate (`nat_prelude/dist.rs`), proved by `add_comm` on the two truncated subtractions -- `dist n m` and `dist m n` are definitionally `add(sub n m, sub m n)` and `add(sub m n, sub n m)`, so commutativity of `dist` is exactly commutativity of `add` applied to those two terms. `nat_theorem_inventory`'s rendered type `((x0:AxNat)->((x1:AxNat)->Eq.{1} AxNat (AxNat.dist x0 x1) (AxNat.dist x1 x0)))` matches this fact's `formal.statement`. Anchored with `^Nat\.dist_comm[[:space:]]` so a sibling name cannot satisfy this row; `nat_theorem_inventory` exits non-zero for a name that does not exist and `grep -Ec` consumes the pipe so the tested count decides the exit status. Run `--release` -- the debug build of this inventory example SIGABRTs on stack depth (unrelated to this proof).