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

Recorded description

For every natural a, b, c: xor(xor(a, b), c) equals xor(a, xor(b, c)).

Formal statement
theorem Nat.xor_assoc : ((x0 : AxNat) -> ((x1 : AxNat) -> ((x2 : AxNat) -> Eq.{1} AxNat (AxNat.xor (AxNat.xor x0 x1) x2) (AxNat.xor x0 (AxNat.xor x1 x2)))))

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. a bit of xor m n is the per-bit two naturals with the same bits Current fact Mathlib v4.30 source propositio
2 direct dependencies 1 direct dependents

Evidence

kernel-Nat.xor_assoc

Kind
kernel-term
Status
checked

Supports: Nat.xor_assoc 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_assoc 2>/dev/null | grep -Ec '^Nat\.xor_assoc[[: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_assoc

Kind
kernel-term
Status
checked

Supports: At the discriminating concrete triple (a, b, c) = (1, 2, 4) (three non-overlapping bits), both xor(xor(1,2),4) and xor(1,xor(2,4)) def-eq to 7, and the theorem's conclusion does NOT def-eq to the negative control 6; and the theorem re-derives against a genuinely free (a, b, c) triple, not merely a concrete instance.

Checker command
cargo test -p axeyum-lean-kernel --lib nat_prelude::nat_prelude_tests::xor_assoc_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. (1, 2, 4) is chosen because its bits do not overlap, so both associations compute to the same non-trivial value (7) rather than degenerating to 0, giving the negative control (6) something to discriminate against.

footprint-Nat.xor_assoc

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-algebra",
  "source": "theorem name and canonical type read directly via nat_theorem_inventory, which prints render_lean of the admitted type."
}