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.Data.Nat.Prime.Basic |
| 2 | import Mathlib.Tactic |
| 3 | |
| 4 | /-! # Prime Depth -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Level.PrimeDepth |
| 7 | |
| 8 | /-! Every level at least three contains either an odd prime or the square of two, at the depth needed by prime-order congruence inflation. -/ |
| 9 | |
| 10 | theorem level_exists_prime_depth (N : ℕ) (hN : 3 ≤ N) : |
| 11 | ∃ q r : ℕ, q.Prime ∧ 0 < r ∧ r + 2 ≤ r * q ∧ q ^ r ∣ N := by |
| 12 | by_cases h4 : 4 ∣ N |
| 13 | · exact ⟨2, 2, by decide, by decide, by decide, h4⟩ |
| 14 | · by_cases h2 : 2 ∣ N |
| 15 | · obtain ⟨m, hm⟩ := h2 |
| 16 | have hm1 : m ≠ 1 := by intro he; rw [he] at hm; omega |
| 17 | obtain ⟨q, hq, hqm⟩ := Nat.exists_prime_and_dvd hm1 |
| 18 | have hq2 : q ≠ 2 := by |
| 19 | intro he |
| 20 | rw [he] at hqm |
| 21 | obtain ⟨t, ht⟩ := hqm |
| 22 | apply h4 |
| 23 | refine ⟨t, ?_⟩ |
| 24 | rw [hm, ht] |
| 25 | omega |
| 26 | have hq3 : 3 ≤ q := by have := hq.two_le; omega |
| 27 | have hmN : m ∣ N := ⟨2, hm.trans (Nat.mul_comm 2 m)⟩ |
| 28 | exact ⟨q, 1, hq, by decide, by omega, by simpa only [pow_one] using hqm.trans hmN⟩ |
| 29 | · obtain ⟨q, hq, hqN⟩ := Nat.exists_prime_and_dvd (show N ≠ 1 by omega) |
| 30 | have hq2 : q ≠ 2 := by intro he; exact h2 (he ▸ hqN) |
| 31 | have hq3 : 3 ≤ q := by have := hq.two_le; omega |
| 32 | exact ⟨q, 1, hq, by decide, by omega, by simpa only [pow_one] using hqN⟩ |
| 33 | |
| 34 | end OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Level.PrimeDepth |