Hodge conjecture: the CM case in Lean, read and discussed
OpenAI's Lean proof of the Hodge conjecture for CM abelian varieties: rerun it, read its statement, and keep the open questions with their sources. The conjecture is open

| 1 | import Mathlib.NumberTheory.Padics.PadicIntegers |
| 2 | import Mathlib.Data.Nat.Factorization.Basic |
| 3 | |
| 4 | /-! # Padic Away Rationals -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.HodgeConjecture.CMExtraction.PadicAwayRationals.TestTransport |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! A rational number integral at every prime other than q has a |
| 11 | denominator cleared by a power of q. -/ |
| 12 | |
| 13 | open scoped Classical |
| 14 | |
| 15 | variable (q : ℕ) [Fact q.Prime] |
| 16 | |
| 17 | theorem rational_integral_away_iff (r : ℚ) : |
| 18 | (∀ (p : ℕ) [Fact p.Prime], p ≠ q → ‖(r : Padic p)‖ ≤ 1) ↔ |
| 19 | ∃ n : ℕ, ∃ z : ℤ, (z : ℚ) = (q : ℚ) ^ n * r := by |
| 20 | constructor |
| 21 | · intro h |
| 22 | have hden : r.den.primeFactors ⊆ q.primeFactors := by |
| 23 | intro p hp |
| 24 | have hp' := Nat.prime_of_mem_primeFactors hp |
| 25 | have hpd := Nat.dvd_of_mem_primeFactors hp |
| 26 | have hpq : p = q := by |
| 27 | by_contra hpq |
| 28 | let : Fact p.Prime := ⟨hp'⟩ |
| 29 | have hc : p.Coprime r.den := PadicInt.norm_natCast_eq_one_iff.mp |
| 30 | (PadicInt.isUnit_iff.mp (PadicInt.isUnit_den r (h p hpq))) |
| 31 | exact (hp'.coprime_iff_not_dvd.mp hc) hpd |
| 32 | subst p |
| 33 | exact Nat.mem_primeFactors.mpr ⟨Fact.out, dvd_refl _, (Fact.out : q.Prime).ne_zero⟩ |
| 34 | obtain ⟨n, hn⟩ := (Nat.exists_dvd_pow_iff r.den_ne_zero (Fact.out : q.Prime).ne_zero).mpr hden |
| 35 | obtain ⟨k, hk⟩ := hn |
| 36 | refine ⟨n, (k : ℤ) * r.num, ?_⟩ |
| 37 | have hpow : (q : ℚ) ^ n = (r.den : ℚ) * (k : ℚ) := by exact_mod_cast hk |
| 38 | rw [hpow, Int.cast_mul, Int.cast_natCast, mul_right_comm, mul_comm (r.den : ℚ) r, |
| 39 | Rat.mul_den_eq_num, mul_comm] |
| 40 | · rintro ⟨n, z, hz⟩ p hp hpq |
| 41 | have hcop : p.Coprime q := (Nat.coprime_primes (Fact.out : p.Prime) (Fact.out : q.Prime)).mpr hpq |
| 42 | have hqnorm : ‖(q : Padic p)‖ = 1 := Padic.norm_natCast_eq_one_iff.mpr hcop |
| 43 | have he : (z : Padic p) = (q : Padic p) ^ n * (r : Padic p) := by exact_mod_cast hz |
| 44 | have hb := Padic.norm_int_le_one (p := p) z |
| 45 | rw [he, norm_mul, norm_pow, hqnorm, one_pow, one_mul] at hb |
| 46 | exact hb |
| 47 | |
| 48 | end |
| 49 | |
| 50 | end OAI.AlgebraicGeometry.HodgeConjecture.CMExtraction.PadicAwayRationals.TestTransport |