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.Finset.Preimage |
| 2 | import Mathlib.Order.Hom.WithTopBot |
| 3 | import OAI.AlgebraicGeometry.HilbertScheme.Presentations.Cech.VariableEmbedding |
| 4 | |
| 5 | /-! # Added Coordinate Finsets -/ |
| 6 | |
| 7 | namespace OAI.AlgebraicGeometry.HilbertScheme.Presentations.AddedCoordinateFinsets.ProjectiveCech |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | /-! Finite faces and Čech signs after adjoining one least coordinate. -/ |
| 12 | |
| 13 | universe u v |
| 14 | |
| 15 | variable {σ : Type u} [LinearOrder σ] |
| 16 | |
| 17 | def retainedCoordinates (s : Finset σ) : Finset (WithBot σ) := s.map Function.Embedding.coeWithBot |
| 18 | |
| 19 | def addedCoordinateFace (s : Finset σ) : Finset (WithBot σ) := insert ⊥ (retainedCoordinates s) |
| 20 | |
| 21 | def removeAddedCoordinate (s : Finset (WithBot σ)) : Finset σ := |
| 22 | s.preimage Function.Embedding.coeWithBot Function.Embedding.coeWithBot.injective.injOn |
| 23 | |
| 24 | omit [LinearOrder σ] in |
| 25 | theorem bot_not_mem_retainedCoordinates (s : Finset σ) : (⊥ : WithBot σ) ∉ retainedCoordinates s := by |
| 26 | intro h |
| 27 | obtain ⟨i, _, hi⟩ := Finset.mem_map.mp h |
| 28 | exact WithBot.coe_ne_bot hi |
| 29 | |
| 30 | omit [LinearOrder σ] in |
| 31 | theorem card_retainedCoordinates (s : Finset σ) : (retainedCoordinates s).card = s.card := Finset.card_map _ |
| 32 | |
| 33 | theorem card_addedCoordinateFace (s : Finset σ) : (addedCoordinateFace s).card = s.card + 1 := by |
| 34 | rw [addedCoordinateFace, Finset.card_insert_of_notMem (bot_not_mem_retainedCoordinates s), card_retainedCoordinates] |
| 35 | |
| 36 | theorem addedCoordinateFace_erase_bot (s : Finset σ) : (addedCoordinateFace s).erase ⊥ = retainedCoordinates s := |
| 37 | Finset.erase_insert (bot_not_mem_retainedCoordinates s) |
| 38 | |
| 39 | theorem addedCoordinateFace_erase_coe (s : Finset σ) (i : σ) : |
| 40 | (addedCoordinateFace s).erase (i : WithBot σ) = addedCoordinateFace (s.erase i) := by |
| 41 | simp only [addedCoordinateFace, retainedCoordinates] |
| 42 | rw [Finset.erase_insert_of_ne (Ne.symm WithBot.coe_ne_bot), Finset.map_erase] |
| 43 | rfl |
| 44 | |
| 45 | theorem retainedCoordinates_removeAddedCoordinate (s : Finset (WithBot σ)) : |
| 46 | retainedCoordinates (removeAddedCoordinate s) = s.erase ⊥ := by |
| 47 | apply Finset.ext |
| 48 | intro i |
| 49 | by_cases hi : i = ⊥ |
| 50 | · subst i |
| 51 | simp only [bot_not_mem_retainedCoordinates, Finset.notMem_erase] |
| 52 | · obtain ⟨a, rfl⟩ := WithBot.ne_bot_iff_exists.mp hi |
| 53 | simp [retainedCoordinates, removeAddedCoordinate, Finset.mem_map] |
| 54 | |
| 55 | theorem addedCoordinateFace_representation (s : Finset (WithBot σ)) (hs : ⊥ ∈ s) : |
| 56 | addedCoordinateFace (removeAddedCoordinate s) = s := by |
| 57 | rw [addedCoordinateFace, retainedCoordinates_removeAddedCoordinate, Finset.insert_erase hs] |
| 58 | |
| 59 | theorem retainedCoordinates_representation (s : Finset (WithBot σ)) (hs : ⊥ ∉ s) : |
| 60 | retainedCoordinates (removeAddedCoordinate s) = s := by |
| 61 | rw [retainedCoordinates_removeAddedCoordinate, Finset.erase_eq_of_notMem hs] |
| 62 | |
| 63 | theorem removeAddedCoordinate_addedCoordinateFace (s : Finset σ) : |
| 64 | removeAddedCoordinate (addedCoordinateFace s) = s := by |
| 65 | apply Finset.ext |
| 66 | intro i |
| 67 | simp [removeAddedCoordinate, addedCoordinateFace, retainedCoordinates, Finset.mem_map] |
| 68 | |
| 69 | def addedCoordinateFaceEmbedding : Finset σ ↪ Finset (WithBot σ) where |
| 70 | toFun := addedCoordinateFace |
| 71 | inj' s t h := (removeAddedCoordinate_addedCoordinateFace s).symm.trans |
| 72 | ((congrArg removeAddedCoordinate h).trans (removeAddedCoordinate_addedCoordinateFace t)) |
| 73 | |
| 74 | theorem mem_range_addedCoordinateFace (s : Finset (WithBot σ)) : |
| 75 | s ∈ Set.range (addedCoordinateFaceEmbedding (σ := σ)) ↔ ⊥ ∈ s := by |
| 76 | constructor |
| 77 | · rintro ⟨t, rfl⟩ |
| 78 | exact Finset.mem_insert_self _ _ |
| 79 | · intro h |
| 80 | exact ⟨removeAddedCoordinate s, addedCoordinateFace_representation s h⟩ |
| 81 | |
| 82 | theorem addedCoordinateFace_sdiff (s t : Finset σ) : |
| 83 | addedCoordinateFace t \ addedCoordinateFace s = retainedCoordinates (t \ s) := by |
| 84 | change insert ⊥ (retainedCoordinates t) \ insert ⊥ (retainedCoordinates s) = _ |
| 85 | rw [Finset.insert_sdiff_insert, Finset.sdiff_insert_of_notMem (bot_not_mem_retainedCoordinates t)] |
| 86 | exact (Finset.map_sdiff t s).symm |
| 87 | |
| 88 | theorem addedCoordinateFace_subset {s t : Finset σ} (h : s ⊆ t) : |
| 89 | addedCoordinateFace s ⊆ addedCoordinateFace t := |
| 90 | Finset.insert_subset_insert ⊥ (Finset.map_subset_map.mpr h) |
| 91 | |
| 92 | variable (R : Type v) [CommRing R] |
| 93 | |
| 94 | theorem alternatingSign_added_bot (s : Finset σ) : Cech.Signs.ProjectiveCech.alternatingSign R (addedCoordinateFace s) ⊥ = 1 := by |
| 95 | simp [Cech.Signs.ProjectiveCech.alternatingSign] |
| 96 | |
| 97 | theorem alternatingSign_added_coe (s : Finset σ) (i : σ) : |
| 98 | Cech.Signs.ProjectiveCech.alternatingSign R (addedCoordinateFace s) (i : WithBot σ) = -Cech.Signs.ProjectiveCech.alternatingSign R s i := by |
| 99 | rw [addedCoordinateFace, Cech.Signs.ProjectiveCech.alternatingSign_insert_lt R (bot_not_mem_retainedCoordinates s) (WithBot.bot_lt_coe i)] |
| 100 | congr 1 |
| 101 | exact Cech.VariableEmbedding.ProjectiveCech.alternatingSign_map R WithBot.coeOrderHom s i |
| 102 | |
| 103 | end |
| 104 | |
| 105 | end OAI.AlgebraicGeometry.HilbertScheme.Presentations.AddedCoordinateFinsets.ProjectiveCech |