Identifier
F:ml430-int-gcd-eq-gcd-ab-63005aef
Proof route
kernel-lean
External status
proved
Axiom footprint
Empty

Recorded description

The proposition declared as `Int.gcd_eq_gcd_ab` in the pinned Mathlib v4.30 source.

Formal statement
∀ (x y : ℤ), ↑(x.gcd y) = x * x.gcdA y + y * x.gcdB y

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. Multiplication on the integers Multiplication distributes over Multiplying by negative one is Multiplying an integer by one o Current fact Mathlib v4.30 source propositio Mathlib v4.30 source propositio Mathlib v4.30 source propositio Mathlib v4.30 source propositio
4 direct dependencies 4 direct dependents

Evidence

kernel-Int.gcd_eq_gcd_ab_witnesses

Kind
kernel-term
Status
checked

Supports: The proposition declared as `Int.gcd_eq_gcd_ab` in the pinned Mathlib v4.30 source, at the named computable witnesses.

Checker command
cargo test -p axeyum-lean-kernel --lib int_prelude::
Evidence notes

`Int.gcd_eq_gcd_ab_witnesses` in `crates/axeyum-lean-kernel/src/int_prelude/bezout_witnesses.rs`. The name differs from Mathlib's `Int.gcd_eq_gcd_ab` only because THIS prelude already owned that name for the strictly weaker EXISTENTIAL form (`∀ a b, ∃ u v, ofNat (gcd a b) = a*u + b*v`, `int_prelude/gcd.rs`), which `crt.rs` and `modinv.rs` consume; the statement here is Mathlib's verbatim. The witnesses are genuine `Definition`s that return data: `Nat.xgcdAux` is the extended Euclidean recursion, structural on a FUEL argument rather than `WellFounded` (whose equation-compiler route carries `propext`/`Quot.sound`), with a trailing `Bool` selecting which coefficient to return so one recursion carries the pair. `Nat.xgcdAux_sound` is the induction on the fuel with both `m` and `n` generalized in the motive; `Int.gcdA`/`Int.gcdB` are Mathlib's signed definitions and the lift is a four-branch `Int.rec` case split.

footprint-Int.gcd_eq_gcd_ab_witnesses

Kind
exhaustive-enumeration
Status
checked

Supports: axiom_footprint: [] -- this theorem's trusted closure is empty

Checker command
test "$(cargo run --release -q -p axeyum-lean-kernel --example theorem_axiom_footprint -- Int.gcd_eq_gcd_ab_witnesses 2>/dev/null | grep -xFc $'integer\tInt.gcd_eq_gcd_ab_witnesses\t0\t')" -ge 1
Evidence notes

The matched row is `integer<TAB>Int.gcd_eq_gcd_ab_witnesses<TAB>0<TAB>` with an EMPTY trailing footprint column, so a nonzero footprint or an absent declaration both give a count of 0 and fail. `grep -xF` with `$'...'` puts real tabs in the pattern before grep sees them -- do not rewrite this as `grep -E '\t'`, which GNU grep reads as a literal `t`. Run `--release`: in debug, building the full constructed environment stack-overflows, which is a resource limit and not a fact about this theorem.

compute-Int.gcdA-Int.gcdB

Kind
witness-replay
Status
checked

Supports: `Int.gcdA` and `Int.gcdB` are computable `Definition`s whose values satisfy the identity numerically, in all four sign branches.

Checker command
test "$(cargo test -p axeyum-lean-kernel --lib int_prelude::int_prelude_tests::int_gcd_ab_compute_in_every_sign_branch 2>&1 | grep -c 'test result: ok. 1 passed')" -ge 1
Evidence notes

The theorem alone does NOT pin the algorithm down -- some pair of coefficients satisfies Bézout for any correct gcd, so a transposed selector or an off-by-one fuel would still type-check. This evaluates `Int.gcdA x y` and `Int.gcdB x y` to normal form against hand-computed answers at (3,2), (-3,2), (3,-2), (-3,-2), (0,5), (-4,6), then evaluates `x*gcdA + y*gcdB` and compares against the gcd. It is also the right shape of checker for a CONSTRUCTION: a theorem inventory reports zero rows for a `Definition` and cannot assert one exists. Matching `1 passed` rather than the exit status is deliberate -- a mistyped filter runs zero tests and exits 0.

Provenance

{
  "date": "2026-08-28",
  "established_by": "the `int-bezout-witnesses` lane, by constructing the extended Euclidean algorithm and re-deriving Bézout for it",
  "source": "statement-only extraction of `Int.gcd_eq_gcd_ab` from Mathlib v4.30.0; no proof value was exposed",
  "prior_art": [
    {
      "who": "the Mathlib contributors",
      "what": "the theorem declaration `Int.gcd_eq_gcd_ab`",
      "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"
    }
  ]
}