Identifier
F:ml430-nat-dist-comm-1fa29a04
Proof route
kernel-lean
External status
proved
Axiom footprint
Empty

Recorded description

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

Formal statement
∀ (n m : ℕ), n.dist m = m.dist n

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. Mathlib v4.30 source propositio Current fact Mathlib v4.30 source propositio Mathlib v4.30 source propositio
1 direct dependencies 2 direct dependents

Evidence

kernel-Nat.dist_comm

Kind
kernel-term
Status
checked

Supports: ∀ (n m : ℕ), n.dist m = m.dist n

Checker command
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).

compute-Nat.dist_comm

Kind
kernel-term
Status
checked

Supports: dist(3,5) = dist(5,3) = 2, and BOTH symbolically (free n,m) and at this concrete, non-symmetric pair -- covered by nat_prelude_tests::dist_theorems_apply_at_free_variables_and_concrete_instances and dist_evaluates_correctly.

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

`dist_theorems_apply_at_free_variables_and_concrete_instances` applies `dist_comm` at a genuinely free `(n, m)` pushed into an explicit `LocalContext` and confirms the inferred type is `Eq (dist n m) (dist m n)`, not merely that SOME type-checks. `dist_evaluates_correctly` confirms `dist 3 5` and `dist 5 3` both reduce to `2` and NOT to `0` (the value a dropped-reverse-subtraction bug would give).

footprint-Nat.dist_comm

Kind
exhaustive-enumeration
Status
checked

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

Checker command
cargo run -q --release -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.dist_comm`'s footprint by [].

Provenance

{
  "date": "2026-08-30",
  "established_by": "lane draw9-first-theorems, reconciled against pre-existing nat_prelude/dist.rs",
  "source": "statement-only extraction of `Nat.dist_comm` from Mathlib v4.30.0; no proof value was exposed",
  "prior_art": [
    {
      "who": "the Mathlib contributors",
      "what": "the theorem declaration `Nat.dist_comm`",
      "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"
    }
  ]
}