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

Recorded description

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

Formal statement
theorem Nat.xor_xor_cancel_left : ((x0 : AxNat) -> ((x1 : AxNat) -> Eq.{1} AxNat (AxNat.xor x0 (AxNat.xor x0 x1)) 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. a bit of xor m n is the per-bit Current fact Mathlib v4.30 source propositio xor(xor(a, b), b) = a
4 direct dependencies 2 direct dependents

Evidence

kernel-Nat.xor_xor_cancel_left

Kind
kernel-term
Status
checked

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

Kind
kernel-term
Status
checked

Supports: At the discriminating concrete pair (a, b) = (3, 5), xor(3, xor(3, 5)) def-eq's to 5 (xor(3,5)=6, xor(3,6)=5), and the theorem's conclusion does NOT def-eq to the negative control 4; and the theorem 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_xor_cancel_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 (4) something to discriminate against. This single test also covers F:nat-xor-xor-cancel-right's compute evidence (same fixture, same discriminating pair).

footprint-Nat.xor_xor_cancel_left

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