Characterization of good pairs
Provedgpy_goodPair_iff_compatible_and_coprimenumber-theory
A support pair is good at a coordinate if and only if it is compatible and some witness of the joint divisibility system has coprime to the combined modulus . The forward direction packages the compatibility of good pairs with the witness itself; the backward direction is the definition of goodness. Formalization Note: goodness and compatibility are both written out in Mathlib terms, with no local definitions.
Preamble
import Mathlib open Classical
Formal statement
theorem gpy_goodPair_iff_compatible_and_coprime {k : ℕ} {h d e : Fin k → ℕ}
{i : Fin k} :
(∃ w, (∀ j, Nat.lcm (d j) (e j) ∣ w + h j) ∧
Nat.Coprime (w + h i)
(Finset.lcm Finset.univ (fun j => Nat.lcm (d j) (e j)))) ↔
(∀ i ∈ Finset.univ, ∀ j ∈ Finset.univ,
h i ≡ h j [MOD Nat.gcd (Nat.lcm (d i) (e i)) (Nat.lcm (d j) (e j))]) ∧
∃ w, (∀ j, Nat.lcm (d j) (e j) ∣ w + h j) ∧
Nat.Coprime (w + h i)
(Finset.lcm Finset.univ (fun j => Nat.lcm (d j) (e j))) := by sorrySource
GPY first-moment comparison, formalized from Mathlib (compatible pairs, good pairs, and the singular sum)