Identifier
F:ml430-nat-lt-xor-cases-c43a1e85
Proof route
kernel-lean
External status
proved
Axiom footprint
Empty

Recorded description

The proposition declared as `Nat.lt_xor_cases` in the pinned Mathlib v4.30 source.

Formal statement
∀ {a b c : ℕ}, a < b ^^^ c → a ^^^ c < b ∨ a ^^^ b < c

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 nonzero natural has a highest <= on the naturals is transitiv < on the naturals is irreflexiv [generated] kernel theorem Nat. bit-i disagreement plus agreeme a bit of xor m n is the per-bit xor is associative xor a b != 0 iff a != b Current fact
10 direct dependencies 0 direct dependents Graph shows the first 8 on each side.

Evidence

kernel-Nat.lt_xor_cases

Kind
kernel-term
Status
checked

Supports: ∀ {a b c : ℕ}, a < b ^^^ c → a ^^^ c < b ∨ a ^^^ b < c

Checker command
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- lt_xor_cases 2>/dev/null | grep -Ec '^Nat\.lt_xor_cases[[:space:]]')" -ge 1
Evidence notes

`build_nat_prelude` admits `Nat.lt_xor_cases` (`nat_prelude/xor_trichotomy.rs`, `declare_lt_xor_cases`) through the trusted `Kernel::add_declaration` gate, on the first real kernel-check attempt (only Rust-level compile errors needed fixing first). This is the last of the four pieces `docs/plan/status/260-nat-lt-xor-cases.md` named (`testBit_xor`, `exists_most_significant_bit`, `lt_of_testBit`, `xor_assoc`/`xor_xor_cancel_left`/`_right`/`xor_ne_zero_iff` -- see `depends_on`), composed via the auxiliary theorem `Nat.xor_trichotomy` (same file) following Mathlib's own proof route (`Mathlib/Data/Nat/Bitwise.lean`, pinned commit `c5ea00351c28e24afc9f0f84379aa41082b1188f`, read directly). `nat_theorem_inventory` exits non-zero for a name that does not exist, and the anchored `grep -Ec` count (tested `-ge 1`, never piped into `grep -q`) requires the admitted declaration to actually be printed with the exact rendered name.

compute-Nat.lt_xor_cases

Kind
kernel-term
Status
checked

Supports: At the discriminating instance (a, b, c) = (0, 2, 3) (h : Lt 0 (xor 2 3) = Lt 0 1), the conclusion Or (Lt (xor 0 3) 2) (Lt (xor 0 2) 3) = Or (Lt 3 2) (Lt 2 3) is checked -- Lt 3 2 is false and Lt 2 3 is true, so the RIGHT disjunct must hold, discriminating the two branches -- with a negative control asserting the disjuncts are not swappable; and the theorem re-derives against a genuinely free (a, b, c) triple with a free hypothesis fvar, confirming the declared shape (hypothesis order, which disjunct is which).

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

The same test also checks the auxiliary `Nat.xor_trichotomy` at (a, b, c) = (1, 2, 4), where all three disjuncts of `Or (Lt 6 1) (Or (Lt 5 2) (Lt 3 4))` are genuinely discriminating (exactly the third holds).

footprint-Nat.lt_xor_cases

Kind
exhaustive-enumeration
Status
checked

Supports: axiom_footprint: [] -- the Nat prelude's trusted surface is empty

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

`nat_axiom_inventory --require-axiom-free nat` enumerates the built Nat environment and exits non-zero unless it admits no Axiom, Opaque or Quotient declaration (measured: axiom=0 opaque=0 quotient=0). A theorem cannot depend on a trusted declaration the environment does not contain, so an empty trusted surface bounds `Nat.lt_xor_cases`'s own footprint by []. `nat_prelude_tests::every_nat_declaration_is_checked_and_axiom_free` additionally checks this theorem's own `Kernel::axiom_footprint` directly, by name, in-tree.

Provenance

{
  "date": "2026-08-18",
  "established_by": "not established in this ledger",
  "source": "statement-only extraction of `Nat.lt_xor_cases` from Mathlib v4.30.0; no proof value was exposed",
  "prior_art": [
    {
      "who": "the Mathlib contributors",
      "what": "the theorem declaration `Nat.lt_xor_cases`",
      "where": "mathlib4 commit c5ea00351c28e24afc9f0f84379aa41082b1188f (v4.30.0)",
      "year": 2026,
      "attribution": "the proposition was read from the pinned statement-only inventory; the proof term and tactic trace were not consulted"
    }
  ]
}