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.Order.Fin.Basic |
| 2 | import Mathlib.Order.Hom.WithTopBot |
| 3 | import Mathlib.Logic.Equiv.Fin.Basic |
| 4 | |
| 5 | /-! # Endpoint Orders -/ |
| 6 | |
| 7 | namespace OAI.AlgebraicGeometry.HilbertScheme.Presentations.Finite.EndpointOrders |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | /-! Ordered finite variable sets with one coordinate adjoined at either endpoint. -/ |
| 12 | |
| 13 | def finSuccWithBotEquiv (n : ℕ) : Fin (n + 1) ≃ WithBot (Fin n) := finSuccEquiv n |
| 14 | |
| 15 | theorem finSuccWithBotEquiv_zero (n : ℕ) : finSuccWithBotEquiv n 0 = ⊥ := finSuccEquiv_zero |
| 16 | |
| 17 | theorem finSuccWithBotEquiv_succ (n : ℕ) (i : Fin n) : finSuccWithBotEquiv n i.succ = (i : WithBot (Fin n)) := |
| 18 | finSuccEquiv_succ i |
| 19 | |
| 20 | def finSuccWithBotOrderIso (n : ℕ) : Fin (n + 1) ≃o WithBot (Fin n) where |
| 21 | __ := finSuccWithBotEquiv n |
| 22 | map_rel_iff' := by |
| 23 | intro a b |
| 24 | refine Fin.cases ?_ (fun i => ?_) a |
| 25 | · rw [finSuccWithBotEquiv_zero] |
| 26 | simp |
| 27 | · refine Fin.cases ?_ (fun j => ?_) b |
| 28 | · rw [finSuccWithBotEquiv_succ, finSuccWithBotEquiv_zero] |
| 29 | simp |
| 30 | · rw [finSuccWithBotEquiv_succ, finSuccWithBotEquiv_succ, WithBot.coe_le_coe, Fin.succ_le_succ_iff] |
| 31 | |
| 32 | def finSuccWithTopEquiv (n : ℕ) : Fin (n + 1) ≃ WithTop (Fin n) := finSuccEquivLast |
| 33 | |
| 34 | theorem finSuccWithTopEquiv_last (n : ℕ) : finSuccWithTopEquiv n (Fin.last n) = ⊤ := finSuccEquivLast_last |
| 35 | |
| 36 | theorem finSuccWithTopEquiv_castSucc (n : ℕ) (i : Fin n) : |
| 37 | finSuccWithTopEquiv n i.castSucc = (i : WithTop (Fin n)) := finSuccEquivLast_castSucc i |
| 38 | |
| 39 | def finSuccWithTopOrderIso (n : ℕ) : Fin (n + 1) ≃o WithTop (Fin n) where |
| 40 | __ := finSuccWithTopEquiv n |
| 41 | map_rel_iff' := by |
| 42 | intro a b |
| 43 | refine Fin.lastCases ?_ (fun i => ?_) a |
| 44 | · refine Fin.lastCases ?_ (fun j => ?_) b |
| 45 | · rw [finSuccWithTopEquiv_last] |
| 46 | simp |
| 47 | · rw [finSuccWithTopEquiv_last, finSuccWithTopEquiv_castSucc] |
| 48 | simp |
| 49 | · refine Fin.lastCases ?_ (fun j => ?_) b |
| 50 | · rw [finSuccWithTopEquiv_castSucc, finSuccWithTopEquiv_last] |
| 51 | simp |
| 52 | exact (Fin.castSucc_lt_last i).le |
| 53 | · rw [finSuccWithTopEquiv_castSucc, finSuccWithTopEquiv_castSucc, |
| 54 | WithTop.coe_le_coe, Fin.castSucc_le_castSucc_iff] |
| 55 | |
| 56 | end |
| 57 | |
| 58 | end OAI.AlgebraicGeometry.HilbertScheme.Presentations.Finite.EndpointOrders |