Identifier
F:nat-xor-ne-zero-iff
Proof route
kernel-lean
External status
Not recorded
Axiom footprint
Empty

Recorded description

For every natural a, b: xor(a, b) is not equal to 0 if and only if a is not equal to b.

Formal statement
theorem Nat.xor_ne_zero_iff : ((x0 : AxNat) -> ((x1 : AxNat) -> Iff (Not (Eq.{1} AxNat (AxNat.xor x0 x1) AxNat.zero)) (Not (Eq.{1} AxNat x0 x1))))

Dependencies

The graph shows direct ledger edges. Follow a node to open its artifact page.

Direct dependencies appear to the left. The current fact is in the center. Facts that depend directly on it appear to the right. two naturals with the same bits <= is preserved by successor on [generated] kernel theorem Nat. [generated] kernel theorem Nat. a bit of xor m n is the per-bit Current fact Mathlib v4.30 source propositio
5 direct dependencies 1 direct dependents

Evidence

kernel-Nat.xor_ne_zero_iff

Kind
kernel-term
Status
checked

Supports: Nat.xor_ne_zero_iff is admitted by the trusted kernel gate with the type recorded in formal.statement.

Checker command
cargo run -q --release -p axeyum-lean-kernel --example nat_theorem_inventory -- xor_ne_zero_iff 2>/dev/null | grep -Ec '^Nat\.xor_ne_zero_iff[[:space:]]'
Evidence notes

`build_nat_prelude` admits this theorem only through the trusted `Kernel::add_declaration` gate, which re-checks the proof term against the stated type. `nat_theorem_inventory` exits non-zero for a name that does not exist, and `grep -Ec` consumes the pipe so the tested count (expected >= 1) decides the exit status, never `grep -q` under pipefail. Anchored with `[[:space:]]`, never a literal tab, per this ledger's own grep-dialect gotcha. `--release` is mandatory: this tool builds `creal`/`complex`/`cpoint`, which overflow the default debug thread stack.

compute-Nat.xor_ne_zero_iff

Kind
kernel-term
Status
checked

Supports: At the discriminating concrete pair (a, b) = (3, 5), xor(3, 5) def-eq's to 6, so Not (Eq (xor 3 5) 0) is genuinely inhabited (via Nat.succ_ne_zero at 5, since succ 5 def-eq's to 6); the Iff.mp direction lands on Not (Eq 3 5) (and NOT on the negative control Not (Eq 3 3)), and the Iff.mpr direction lands back on Not (Eq (xor 3 5) 0). The theorem also re-derives against a genuinely free (a, b) pair, not merely a concrete instance.

Checker command
cargo test -p axeyum-lean-kernel --lib nat_prelude::nat_prelude_tests::xor_ne_zero_iff_applies_at_a_concrete_discriminating_instance_and_symbolically
Evidence notes

A concrete instantiation alone can hide a defect a symbolic build exposes (and vice versa), so both are checked. (3, 5) is chosen because xor(3,5)=6 is neither operand, giving the negative control (Eq 3 3) something to discriminate against, and because Nat.succ_ne_zero at 5 supplies a genuine, cheap proof of Not (Eq (xor 3 5) 0) without needing a separate numeral-inequality lemma.

footprint-Nat.xor_ne_zero_iff

Kind
instance-pin
Status
checked

Supports: axiom_footprint: [] -- the Nat environment admits no trusted declaration

Checker command
cargo run -q --release -p axeyum-lean-kernel --example nat_axiom_inventory -- --require-axiom-free nat
Evidence notes

Reports `nat: axiom=0 opaque=0 quotient=0 total_trusted=0`, over the FULL trusted surface rather than `Declaration::Axiom` alone. The enumeration is per-environment, not per-theorem; it bounds this theorem's footprint because a proof cannot depend on a trusted declaration the environment does not contain.

Provenance

{
  "date": "2026-08-29",
  "established_by": "axeyum-lean-kernel build_nat_prelude, lane nat-xor-ne-zero",
  "source": "theorem name and canonical type read directly via nat_theorem_inventory, which prints render_lean of the admitted type."
}