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.CategoryTheory.Category.Preorder |
| 2 | import Mathlib.CategoryTheory.Limits.HasLimits |
| 3 | import Mathlib.Data.Set.Lattice.Bounded |
| 4 | import Mathlib.Data.Set.Lattice.Disjoint |
| 5 | import Mathlib.Data.Set.Lattice.Image |
| 6 | import Mathlib.Data.Set.Lattice.Indexed |
| 7 | import Mathlib.Data.Set.Lattice.Order |
| 8 | |
| 9 | /-! # Increasing Subset Colimit -/ |
| 10 | |
| 11 | namespace OAI.Topology.Euclidean.IncreasingSubsetColimit.Globalization |
| 12 | |
| 13 | noncomputable section |
| 14 | |
| 15 | /-! |
| 16 | # Colimits over an increasing union of indexing subsets |
| 17 | |
| 18 | The construction uses the actual restrictions of a diagram on a preorder. |
| 19 | The universal property is proved by placing any two indices in a common |
| 20 | stage. It applies to compact-support diagrams once compact containment in |
| 21 | one member of an increasing open cover has been established. |
| 22 | -/ |
| 23 | |
| 24 | open _root_.CategoryTheory _root_.CategoryTheory.Limits |
| 25 | |
| 26 | universe v u |
| 27 | |
| 28 | variable {P : Type} [Preorder P] {C : Type u} [Category.{v} C] |
| 29 | [HasColimitsOfSize.{0, 0} C] |
| 30 | |
| 31 | set_option backward.isDefEq.respectTransparency false |
| 32 | |
| 33 | /-- Restrict a diagram to the indicated subset of its actual preorder of indices. -/ |
| 34 | def subsetDiagram (F : P ⥤ C) (T : Set P) : T ⥤ C := |
| 35 | (Subtype.mono_coe (· ∈ T)).functor ⋙ F |
| 36 | |
| 37 | /-- The identity on underlying indices for an inclusion of subsets. -/ |
| 38 | def subsetInclusion {S T : Set P} (h : S ⊆ T) : S ⥤ T where |
| 39 | obj p := ⟨p.val, h p.property⟩ |
| 40 | map f := homOfLE (leOfHom f) |
| 41 | |
| 42 | /-- Enlarge the allowed subset of indices in the actual colimit. -/ |
| 43 | def subsetColimitMap (F : P ⥤ C) {S T : Set P} (h : S ⊆ T) : |
| 44 | colimit (subsetDiagram F S) ⟶ colimit (subsetDiagram F T) := |
| 45 | colimit.pre (subsetDiagram F T) (subsetInclusion h) |
| 46 | |
| 47 | @[reassoc (attr := simp)] |
| 48 | theorem subsetColimitMap_ι (F : P ⥤ C) {S T : Set P} (h : S ⊆ T) (p : S) : |
| 49 | colimit.ι (subsetDiagram F S) p ≫ subsetColimitMap F h = |
| 50 | colimit.ι (subsetDiagram F T) ⟨p.val, h p.property⟩ := |
| 51 | colimit.ι_pre (subsetDiagram F T) (subsetInclusion h) p |
| 52 | |
| 53 | @[simp] |
| 54 | theorem subsetColimitMap_id (F : P ⥤ C) (T : Set P) : |
| 55 | subsetColimitMap F (Set.Subset.refl T) = 𝟙 _ := by |
| 56 | apply colimit.hom_ext |
| 57 | intro p |
| 58 | simp |
| 59 | |
| 60 | @[reassoc (attr := simp)] |
| 61 | theorem subsetColimitMap_comp (F : P ⥤ C) {S T V : Set P} |
| 62 | (h : S ⊆ T) (h' : T ⊆ V) : |
| 63 | subsetColimitMap F h ≫ subsetColimitMap F h' = subsetColimitMap F (h.trans h') := by |
| 64 | apply colimit.hom_ext |
| 65 | intro p |
| 66 | simp |
| 67 | |
| 68 | /-- The map from a restricted colimit to the full diagram's colimit. -/ |
| 69 | def subsetColimitToAmbient (F : P ⥤ C) (T : Set P) : |
| 70 | colimit (subsetDiagram F T) ⟶ colimit F := |
| 71 | colimit.pre F (Subtype.mono_coe (· ∈ T)).functor |
| 72 | |
| 73 | @[reassoc (attr := simp)] |
| 74 | theorem subsetColimitToAmbient_ι (F : P ⥤ C) (T : Set P) (p : T) : |
| 75 | colimit.ι (subsetDiagram F T) p ≫ subsetColimitToAmbient F T = |
| 76 | colimit.ι F p.val := |
| 77 | colimit.ι_pre F (Subtype.mono_coe (· ∈ T)).functor p |
| 78 | |
| 79 | @[reassoc (attr := simp)] |
| 80 | theorem subsetColimitMap_toAmbient (F : P ⥤ C) {S T : Set P} (h : S ⊆ T) : |
| 81 | subsetColimitMap F h ≫ subsetColimitToAmbient F T = subsetColimitToAmbient F S := by |
| 82 | apply colimit.hom_ext |
| 83 | intro p |
| 84 | simp |
| 85 | |
| 86 | /-- First form the colimit over each member of an increasing sequence of subsets. -/ |
| 87 | def increasingSubsetDiagram (F : P ⥤ C) (S : ℕ → Set P) (hS : Monotone S) : ℕ ⥤ C where |
| 88 | obj n := colimit (subsetDiagram F (S n)) |
| 89 | map f := subsetColimitMap F (hS (leOfHom f)) |
| 90 | map_id n := subsetColimitMap_id F (S n) |
| 91 | map_comp f g := (subsetColimitMap_comp F (hS (leOfHom f)) (hS (leOfHom g))).symm |
| 92 | |
| 93 | /-- Its actual cocone into the full colimit. -/ |
| 94 | def increasingSubsetCocone (F : P ⥤ C) (S : ℕ → Set P) (hS : Monotone S) : |
| 95 | Cocone (increasingSubsetDiagram F S hS) where |
| 96 | pt := colimit F |
| 97 | ι := |
| 98 | { app n := subsetColimitToAmbient F (S n) |
| 99 | naturality _ _ f := by |
| 100 | change subsetColimitMap F _ ≫ subsetColimitToAmbient F _ = _ ≫ 𝟙 _ |
| 101 | rw [subsetColimitMap_toAmbient, Category.comp_id] } |
| 102 | |
| 103 | variable {F : P ⥤ C} {S : ℕ → Set P} {hS : Monotone S} |
| 104 | |
| 105 | /-- A cocone on the increasing sequence assigns a map to each represented index. -/ |
| 106 | def increasingSubsetStageMap (s : Cocone (increasingSubsetDiagram F S hS)) |
| 107 | (n : ℕ) (p : S n) : F.obj p.val ⟶ s.pt := |
| 108 | colimit.ι (subsetDiagram F (S n)) p ≫ s.ι.app n |
| 109 | |
| 110 | theorem increasingSubsetStageMap_le (s : Cocone (increasingSubsetDiagram F S hS)) |
| 111 | {i j : ℕ} (hij : i ≤ j) (p : S i) : |
| 112 | increasingSubsetStageMap s j ⟨p.val, hS hij p.property⟩ = |
| 113 | increasingSubsetStageMap s i p := by |
| 114 | unfold increasingSubsetStageMap |
| 115 | rw [← subsetColimitMap_ι_assoc F (hS hij) p] |
| 116 | congr 1 |
| 117 | exact s.w (homOfLE hij) |
| 118 | |
| 119 | /-- Different containing stages give the same map. -/ |
| 120 | theorem increasingSubsetStageMap_eq (s : Cocone (increasingSubsetDiagram F S hS)) |
| 121 | {i j : ℕ} {p : P} (hi : p ∈ S i) (hj : p ∈ S j) : |
| 122 | increasingSubsetStageMap s i ⟨p, hi⟩ = increasingSubsetStageMap s j ⟨p, hj⟩ := by |
| 123 | rw [← increasingSubsetStageMap_le s (Nat.le_max_left i j) ⟨p, hi⟩, |
| 124 | ← increasingSubsetStageMap_le s (Nat.le_max_right i j) ⟨p, hj⟩] |
| 125 | |
| 126 | /-- The stage maps respect every actual order morphism once both indices are represented. -/ |
| 127 | @[reassoc] |
| 128 | theorem increasingSubsetStageMap_naturality |
| 129 | (s : Cocone (increasingSubsetDiagram F S hS)) {i j : ℕ} {p q : P} |
| 130 | (hi : p ∈ S i) (hj : q ∈ S j) (f : p ⟶ q) : |
| 131 | F.map f ≫ increasingSubsetStageMap s j ⟨q, hj⟩ = |
| 132 | increasingSubsetStageMap s i ⟨p, hi⟩ := by |
| 133 | rw [← increasingSubsetStageMap_le s (Nat.le_max_right i j) ⟨q, hj⟩, |
| 134 | ← increasingSubsetStageMap_le s (Nat.le_max_left i j) ⟨p, hi⟩] |
| 135 | let p' : S (max i j) := ⟨p, hS (Nat.le_max_left i j) hi⟩ |
| 136 | let q' : S (max i j) := ⟨q, hS (Nat.le_max_right i j) hj⟩ |
| 137 | change (subsetDiagram F (S (max i j))).map (homOfLE (leOfHom f) : p' ⟶ q') ≫ |
| 138 | colimit.ι _ q' ≫ s.ι.app _ = colimit.ι _ p' ≫ s.ι.app _ |
| 139 | rw [colimit.w_assoc] |
| 140 | |
| 141 | variable (F S hS) |
| 142 | |
| 143 | /-- Maps from a cocone on the sequence descend to every index in the covered diagram. -/ |
| 144 | def increasingSubsetDescCocone (hcover : ∀ p, ∃ n, p ∈ S n) |
| 145 | (s : Cocone (increasingSubsetDiagram F S hS)) : Cocone F where |
| 146 | pt := s.pt |
| 147 | ι := |
| 148 | { app p := increasingSubsetStageMap s (Classical.choose (hcover p)) |
| 149 | ⟨p, Classical.choose_spec (hcover p)⟩ |
| 150 | naturality p q f := by |
| 151 | change F.map f ≫ _ = _ ≫ 𝟙 _ |
| 152 | rw [Category.comp_id] |
| 153 | exact increasingSubsetStageMap_naturality s _ _ f } |
| 154 | |
| 155 | theorem increasingSubsetDescCocone_app (hcover : ∀ p, ∃ n, p ∈ S n) |
| 156 | (s : Cocone (increasingSubsetDiagram F S hS)) (n : ℕ) (p : S n) : |
| 157 | (increasingSubsetDescCocone F S hS hcover s).ι.app p.val = |
| 158 | increasingSubsetStageMap s n p := |
| 159 | increasingSubsetStageMap_eq s _ p.property |
| 160 | |
| 161 | /-- An increasing union containing every index computes the original colimit. -/ |
| 162 | def increasingSubsetIsColimit (hcover : ∀ p, ∃ n, p ∈ S n) : |
| 163 | IsColimit (increasingSubsetCocone F S hS) where |
| 164 | desc s := colimit.desc F (increasingSubsetDescCocone F S hS hcover s) |
| 165 | fac s n := by |
| 166 | apply colimit.hom_ext |
| 167 | intro p |
| 168 | change colimit.ι (subsetDiagram F (S n)) p ≫ |
| 169 | subsetColimitToAmbient F (S n) ≫ _ = _ |
| 170 | rw [subsetColimitToAmbient_ι_assoc, colimit.ι_desc, |
| 171 | increasingSubsetDescCocone_app] |
| 172 | rfl |
| 173 | uniq s m hm := by |
| 174 | apply colimit.hom_ext (F := F) |
| 175 | intro p |
| 176 | obtain ⟨n, hp⟩ := hcover p |
| 177 | rw [colimit.ι_desc, increasingSubsetDescCocone_app F S hS hcover s n ⟨p, hp⟩] |
| 178 | change colimit.ι F p ≫ m = colimit.ι (subsetDiagram F (S n)) ⟨p, hp⟩ ≫ s.ι.app n |
| 179 | rw [← subsetColimitToAmbient_ι F (S n) ⟨p, hp⟩, Category.assoc] |
| 180 | exact congrArg (fun f => colimit.ι (subsetDiagram F (S n)) ⟨p, hp⟩ ≫ f) (hm n) |
| 181 | |
| 182 | /-- The resulting canonical comparison of the iterated colimit with the full one. -/ |
| 183 | def increasingSubsetColimitIso (hcover : ∀ p, ∃ n, p ∈ S n) : |
| 184 | colimit (increasingSubsetDiagram F S hS) ≅ colimit F := |
| 185 | (colimit.isColimit _).coconePointUniqueUpToIso (increasingSubsetIsColimit F S hS hcover) |
| 186 | |
| 187 | @[reassoc (attr := simp)] |
| 188 | theorem increasingSubsetColimitIso_ι (hcover : ∀ p, ∃ n, p ∈ S n) (n : ℕ) : |
| 189 | colimit.ι (increasingSubsetDiagram F S hS) n ≫ |
| 190 | (increasingSubsetColimitIso F S hS hcover).hom = |
| 191 | subsetColimitToAmbient F (S n) := |
| 192 | IsColimit.comp_coconePointUniqueUpToIso_hom _ _ n |
| 193 | |
| 194 | /-- The same sequence has a cocone into any containing subset of the original indices. -/ |
| 195 | def increasingSubsetTargetCocone (T : Set P) (hST : ∀ n, S n ⊆ T) : |
| 196 | Cocone (increasingSubsetDiagram F S hS) where |
| 197 | pt := colimit (subsetDiagram F T) |
| 198 | ι := |
| 199 | { app n := subsetColimitMap F (hST n) |
| 200 | naturality _ _ f := by |
| 201 | change subsetColimitMap F _ ≫ subsetColimitMap F _ = _ ≫ 𝟙 _ |
| 202 | rw [subsetColimitMap_comp, Category.comp_id] } |
| 203 | |
| 204 | /-- Descend to the actual restriction to a covered target subset. -/ |
| 205 | def increasingSubsetTargetDescCocone (T : Set P) (hcover : ∀ p ∈ T, ∃ n, p ∈ S n) |
| 206 | (s : Cocone (increasingSubsetDiagram F S hS)) : Cocone (subsetDiagram F T) where |
| 207 | pt := s.pt |
| 208 | ι := |
| 209 | { app p := increasingSubsetStageMap s (Classical.choose (hcover p.val p.property)) |
| 210 | ⟨p.val, Classical.choose_spec (hcover p.val p.property)⟩ |
| 211 | naturality p q f := by |
| 212 | change F.map (homOfLE (leOfHom f)) ≫ _ = _ ≫ 𝟙 _ |
| 213 | rw [Category.comp_id] |
| 214 | exact increasingSubsetStageMap_naturality s _ _ (homOfLE (leOfHom f)) } |
| 215 | |
| 216 | theorem increasingSubsetTargetDescCocone_app (T : Set P) |
| 217 | (hcover : ∀ p ∈ T, ∃ n, p ∈ S n) (s : Cocone (increasingSubsetDiagram F S hS)) |
| 218 | (n : ℕ) (p : S n) (hp : p.val ∈ T) : |
| 219 | (increasingSubsetTargetDescCocone F S hS T hcover s).ι.app ⟨p.val, hp⟩ = |
| 220 | increasingSubsetStageMap s n p := |
| 221 | increasingSubsetStageMap_eq s _ p.property |
| 222 | |
| 223 | /-- An increasing sequence covering a target subset computes its restricted colimit. -/ |
| 224 | def increasingSubsetTargetIsColimit (T : Set P) (hST : ∀ n, S n ⊆ T) |
| 225 | (hcover : ∀ p ∈ T, ∃ n, p ∈ S n) : |
| 226 | IsColimit (increasingSubsetTargetCocone F S hS T hST) where |
| 227 | desc s := colimit.desc _ (increasingSubsetTargetDescCocone F S hS T hcover s) |
| 228 | fac s n := by |
| 229 | apply colimit.hom_ext |
| 230 | intro p |
| 231 | change colimit.ι (subsetDiagram F (S n)) p ≫ subsetColimitMap F (hST n) ≫ _ = _ |
| 232 | rw [subsetColimitMap_ι_assoc, colimit.ι_desc, |
| 233 | increasingSubsetTargetDescCocone_app] |
| 234 | rfl |
| 235 | uniq s m hm := by |
| 236 | apply colimit.hom_ext (F := subsetDiagram F T) |
| 237 | intro p |
| 238 | obtain ⟨n, hp⟩ := hcover p.val p.property |
| 239 | rw [colimit.ι_desc, |
| 240 | increasingSubsetTargetDescCocone_app F S hS T hcover s n ⟨p.val, hp⟩ p.property] |
| 241 | change colimit.ι (subsetDiagram F T) p ≫ m = |
| 242 | colimit.ι (subsetDiagram F (S n)) ⟨p.val, hp⟩ ≫ s.ι.app n |
| 243 | rw [← subsetColimitMap_ι F (hST n) ⟨p.val, hp⟩, Category.assoc] |
| 244 | exact congrArg (fun f => colimit.ι (subsetDiagram F (S n)) ⟨p.val, hp⟩ ≫ f) (hm n) |
| 245 | |
| 246 | /-- Canonical comparison with the colimit on a covered target subset. -/ |
| 247 | def increasingSubsetTargetColimitIso (T : Set P) (hST : ∀ n, S n ⊆ T) |
| 248 | (hcover : ∀ p ∈ T, ∃ n, p ∈ S n) : |
| 249 | colimit (increasingSubsetDiagram F S hS) ≅ colimit (subsetDiagram F T) := |
| 250 | (colimit.isColimit _).coconePointUniqueUpToIso |
| 251 | (increasingSubsetTargetIsColimit F S hS T hST hcover) |
| 252 | |
| 253 | @[reassoc (attr := simp)] |
| 254 | theorem increasingSubsetTargetColimitIso_ι (T : Set P) (hST : ∀ n, S n ⊆ T) |
| 255 | (hcover : ∀ p ∈ T, ∃ n, p ∈ S n) (n : ℕ) : |
| 256 | colimit.ι (increasingSubsetDiagram F S hS) n ≫ |
| 257 | (increasingSubsetTargetColimitIso F S hS T hST hcover).hom = |
| 258 | subsetColimitMap F (hST n) := |
| 259 | IsColimit.comp_coconePointUniqueUpToIso_hom _ _ n |
| 260 | |
| 261 | end |
| 262 | |
| 263 | end OAI.Topology.Euclidean.IncreasingSubsetColimit.Globalization |