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.Algebra.BigOperators.Fin |
| 2 | |
| 3 | /-! # Count Selection -/ |
| 4 | |
| 5 | namespace OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Bounded.CountSelection |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | /-! A prescribed number of objects can be selected from finitely many |
| 10 | bins whenever the sum of their capacities is large enough. -/ |
| 11 | open scoped BigOperators |
| 12 | |
| 13 | theorem exists_bounded_counts_with_sum {n : ℕ} (a : Fin n → ℕ) (k : ℕ) |
| 14 | (hk : k ≤ ∑ i, a i) : ∃ b : Fin n → ℕ, (∀ i, b i ≤ a i) ∧ ∑ i, b i = k := by |
| 15 | induction n generalizing k with |
| 16 | | zero => |
| 17 | have hk0 : k = 0 := by simpa using hk |
| 18 | exact ⟨a, fun _ => le_rfl, by simp [hk0]⟩ |
| 19 | | succ n ih => |
| 20 | let c := min (a 0) k |
| 21 | have htail : k - c ≤ ∑ i : Fin n, a i.succ := by |
| 22 | rw [Fin.sum_univ_succ] at hk |
| 23 | dsimp [c] |
| 24 | omega |
| 25 | obtain ⟨b, hb, hsum⟩ := ih (fun i => a i.succ) (k - c) htail |
| 26 | refine ⟨Fin.cons c b, ?_, ?_⟩ |
| 27 | · intro i |
| 28 | refine Fin.cases ?_ (fun j => ?_) i |
| 29 | · exact min_le_left _ _ |
| 30 | · exact hb j |
| 31 | · rw [Fin.sum_univ_succ] |
| 32 | change c + ∑ i, b i = k |
| 33 | rw [hsum] |
| 34 | exact Nat.add_sub_of_le (min_le_right _ _) |
| 35 | |
| 36 | end |
| 37 | |
| 38 | end OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Bounded.CountSelection |