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 |
| 2 | |
| 3 | /-! # Forms -/ |
| 4 | |
| 5 | namespace OAI.AlgebraicGeometry.Comparison.Betti.Algebraic.Forms |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | /-! |
| 10 | # Algebraic differential forms by generators and relations |
| 11 | |
| 12 | A generator `(a₀, …, aₙ)` denotes `a₀ da₁ ∧ … ∧ daₙ`. The relations |
| 13 | are complex multilinearity, the Leibniz rule, vanishing differentials of |
| 14 | constants, and alternation, together with their exterior derivatives. |
| 15 | The differential sends this generator to `(1, a₀, …, aₙ)`. |
| 16 | |
| 17 | These are algebraic constructions on a complex algebra. No Betti spaces or |
| 18 | comparison assertion enter their definitions. |
| 19 | -/ |
| 20 | |
| 21 | open _root_.CategoryTheory |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | variable (A : Type u) [CommRing A] [Algebra ℂ A] |
| 26 | |
| 27 | abbrev RawForm (n : ℕ) := (Fin (n + 1) → A) →₀ ℂ |
| 28 | |
| 29 | def symbol {n : ℕ} (a : Fin (n + 1) → A) : RawForm A n := |
| 30 | Finsupp.single a 1 |
| 31 | |
| 32 | def rawDifferential (n : ℕ) : RawForm A n →ₗ[ℂ] RawForm A (n + 1) := |
| 33 | Finsupp.lmapDomain ℂ ℂ (fun a : Fin (n + 1) → A => Fin.cons (1 : A) a) |
| 34 | |
| 35 | omit [Algebra ℂ A] in |
| 36 | @[simp] |
| 37 | theorem rawDifferential_symbol {n : ℕ} (a : Fin (n + 1) → A) : |
| 38 | rawDifferential A n (symbol A a) = symbol A (Fin.cons 1 a) := by |
| 39 | simp [rawDifferential, symbol] |
| 40 | |
| 41 | /-- The defining algebraic relations, closed under exterior differentiation. -/ |
| 42 | inductive FormRelation : (n : ℕ) → RawForm A n → Prop |
| 43 | | add (n : ℕ) (a : Fin (n + 1) → A) (i : Fin (n + 1)) (x y : A) : |
| 44 | FormRelation n |
| 45 | (symbol A (Function.update a i (x + y)) - |
| 46 | symbol A (Function.update a i x) - symbol A (Function.update a i y)) |
| 47 | | smul (n : ℕ) (a : Fin (n + 1) → A) (i : Fin (n + 1)) (c : ℂ) (x : A) : |
| 48 | FormRelation n |
| 49 | (symbol A (Function.update a i (c • x)) - |
| 50 | c • symbol A (Function.update a i x)) |
| 51 | | leibniz (n : ℕ) (a : Fin (n + 1) → A) (i : Fin n) (x y : A) : |
| 52 | FormRelation n |
| 53 | (symbol A (Function.update a i.succ (x * y)) - |
| 54 | symbol A (Function.update (Function.update a 0 (a 0 * x)) i.succ y) - |
| 55 | symbol A (Function.update (Function.update a 0 (a 0 * y)) i.succ x)) |
| 56 | | constant (n : ℕ) (a : Fin (n + 1) → A) (i : Fin n) (c : ℂ) : |
| 57 | FormRelation n (symbol A (Function.update a i.succ (algebraMap ℂ A c))) |
| 58 | | alternating (n : ℕ) (a : Fin (n + 1) → A) (i j : Fin n) |
| 59 | (hij : i ≠ j) (ha : a i.succ = a j.succ) : |
| 60 | FormRelation n (symbol A a) |
| 61 | | differential {n : ℕ} {r : RawForm A n} (hr : FormRelation n r) : |
| 62 | FormRelation (n + 1) (rawDifferential A n r) |
| 63 | |
| 64 | def relations (n : ℕ) : Submodule ℂ (RawForm A n) := |
| 65 | Submodule.span ℂ {r | Forms.FormRelation A n r} |
| 66 | |
| 67 | abbrev Form (n : ℕ) := RawForm A n ⧸ relations A n |
| 68 | |
| 69 | def formSymbol {n : ℕ} (a : Fin (n + 1) → A) : Form A n := |
| 70 | (relations A n).mkQ (symbol A a) |
| 71 | |
| 72 | theorem formSymbol_add {n : ℕ} (a : Fin (n + 1) → A) (i : Fin (n + 1)) |
| 73 | (x y : A) : |
| 74 | formSymbol A (Function.update a i (x + y)) = |
| 75 | formSymbol A (Function.update a i x) + formSymbol A (Function.update a i y) := by |
| 76 | have h := (Submodule.Quotient.mk_eq_zero (relations A n)).mpr |
| 77 | (Submodule.subset_span (Forms.FormRelation.add n a i x y)) |
| 78 | change (relations A n).mkQ (_ - _ - _) = 0 at h |
| 79 | rw [map_sub, map_sub, sub_sub, sub_eq_zero] at h |
| 80 | exact h |
| 81 | |
| 82 | theorem formSymbol_smul {n : ℕ} (a : Fin (n + 1) → A) (i : Fin (n + 1)) |
| 83 | (c : ℂ) (x : A) : |
| 84 | formSymbol A (Function.update a i (c • x)) = |
| 85 | c • formSymbol A (Function.update a i x) := by |
| 86 | have h := (Submodule.Quotient.mk_eq_zero (relations A n)).mpr |
| 87 | (Submodule.subset_span (Forms.FormRelation.smul n a i c x)) |
| 88 | change (relations A n).mkQ (_ - c • _) = 0 at h |
| 89 | rw [map_sub, map_smul, sub_eq_zero] at h |
| 90 | exact h |
| 91 | |
| 92 | theorem differential_mem_relations (n : ℕ) {r : RawForm A n} |
| 93 | (hr : r ∈ relations A n) : |
| 94 | rawDifferential A n r ∈ relations A (n + 1) := by |
| 95 | induction hr using Submodule.span_induction with |
| 96 | | mem x hx => |
| 97 | exact Submodule.subset_span (Forms.FormRelation.differential hx) |
| 98 | | zero => simp |
| 99 | | add x y hx hy ihx ihy => |
| 100 | simpa only [map_add] using (relations A (n + 1)).add_mem ihx ihy |
| 101 | | smul c x hx ih => |
| 102 | simpa only [map_smul] using (relations A (n + 1)).smul_mem c ih |
| 103 | |
| 104 | def differential (n : ℕ) : Form A n →ₗ[ℂ] Form A (n + 1) := |
| 105 | Submodule.mapQ (relations A n) (relations A (n + 1)) (rawDifferential A n) |
| 106 | (fun _ hr => differential_mem_relations A n hr) |
| 107 | |
| 108 | @[simp] |
| 109 | theorem differential_symbol {n : ℕ} (a : Fin (n + 1) → A) : |
| 110 | Forms.differential A n (formSymbol A a) = formSymbol A (Fin.cons 1 a) := by |
| 111 | change (relations A (n + 1)).mkQ (rawDifferential A n (symbol A a)) = _ |
| 112 | rw [rawDifferential_symbol] |
| 113 | rfl |
| 114 | |
| 115 | theorem double_differential_symbol_mem {n : ℕ} (a : Fin (n + 1) → A) : |
| 116 | symbol A (Fin.cons 1 (Fin.cons 1 a)) ∈ relations A (n + 2) := by |
| 117 | let b : Fin (n + 3) → A := Fin.cons (1 : A) (Fin.cons (1 : A) a) |
| 118 | have h := Forms.FormRelation.constant (A := A) (n + 2) b 0 1 |
| 119 | have heq : Function.update b (Fin.succ 0) (algebraMap ℂ A 1) = b := by |
| 120 | rw [map_one] |
| 121 | exact Function.update_eq_self _ _ |
| 122 | apply Submodule.subset_span |
| 123 | change Forms.FormRelation A (n + 2) (symbol A b) |
| 124 | rw [← heq] |
| 125 | exact h |
| 126 | |
| 127 | theorem differential_squared (n : ℕ) : |
| 128 | (Forms.differential A (n + 1)).comp (Forms.differential A n) = 0 := by |
| 129 | apply LinearMap.ext |
| 130 | intro x |
| 131 | obtain ⟨r, rfl⟩ := (relations A n).mkQ_surjective x |
| 132 | induction r using Finsupp.induction_linear with |
| 133 | | zero => simp |
| 134 | | add x y ihx ihy => simpa only [map_add] using congrArg₂ (· + ·) ihx ihy |
| 135 | | single a c => |
| 136 | have hc : Finsupp.single a c = c • symbol A a := by simp [symbol] |
| 137 | rw [hc] |
| 138 | simp only [map_smul] |
| 139 | suffices h : Forms.differential A (n + 1) (Forms.differential A n (formSymbol A a)) = 0 by |
| 140 | simpa [formSymbol, LinearMap.comp_apply] using congrArg (c • ·) h |
| 141 | rw [differential_symbol, differential_symbol] |
| 142 | exact (Submodule.Quotient.mk_eq_zero (relations A (n + 2))).mpr |
| 143 | (double_differential_symbol_mem A a) |
| 144 | |
| 145 | /-- The algebraic de Rham complex of a complex algebra in the displayed |
| 146 | generators-and-relations presentation. -/ |
| 147 | def algebraicDeRhamComplex : CochainComplex (ModuleCat.{u} ℂ) ℕ := |
| 148 | CochainComplex.of (fun n => ModuleCat.of ℂ (Form A n)) |
| 149 | (fun n => ModuleCat.ofHom (Forms.differential A n)) |
| 150 | (fun n => ModuleCat.hom_ext (differential_squared A n)) |
| 151 | |
| 152 | @[simp] |
| 153 | theorem algebraicDeRhamComplex_d (n : ℕ) : |
| 154 | (algebraicDeRhamComplex A).d n (n + 1) = ModuleCat.ofHom (Forms.differential A n) := |
| 155 | CochainComplex.of_d (fun k => ModuleCat.of ℂ (Form A k)) |
| 156 | (fun k => ModuleCat.ofHom (Forms.differential A k)) n |
| 157 | |
| 158 | section Pullback |
| 159 | |
| 160 | variable {A} {B C : Type u} [CommRing B] [Algebra ℂ B] |
| 161 | [CommRing C] [Algebra ℂ C] |
| 162 | |
| 163 | def rawPullback (f : A →ₐ[ℂ] B) (n : ℕ) : RawForm A n →ₗ[ℂ] RawForm B n := |
| 164 | Finsupp.lmapDomain ℂ ℂ (fun a => f ∘ a) |
| 165 | |
| 166 | @[simp] |
| 167 | theorem rawPullback_symbol (f : A →ₐ[ℂ] B) {n : ℕ} (a : Fin (n + 1) → A) : |
| 168 | rawPullback f n (symbol A a) = symbol B (f ∘ a) := by |
| 169 | simp [rawPullback, symbol] |
| 170 | |
| 171 | theorem rawPullback_differential (f : A →ₐ[ℂ] B) (n : ℕ) : |
| 172 | (rawPullback f (n + 1)).comp (rawDifferential A n) = |
| 173 | (rawDifferential B n).comp (rawPullback f n) := by |
| 174 | apply Finsupp.lhom_ext |
| 175 | intro a c |
| 176 | have heq : f ∘ Fin.cons (1 : A) a = Fin.cons (1 : B) (f ∘ a) := by |
| 177 | funext i |
| 178 | refine Fin.cases ?_ (fun j => ?_) i |
| 179 | · simp |
| 180 | · rfl |
| 181 | simp [rawPullback, rawDifferential, Finsupp.mapDomain_single, heq] |
| 182 | |
| 183 | theorem rawPullback_relation (f : A →ₐ[ℂ] B) {n : ℕ} {r : RawForm A n} |
| 184 | (hr : Forms.FormRelation A n r) : Forms.FormRelation B n (rawPullback f n r) := by |
| 185 | induction hr with |
| 186 | | add n a i x y => |
| 187 | simpa only [map_sub, rawPullback_symbol, Function.comp_update, map_add] using |
| 188 | (Forms.FormRelation.add (A := B) n (f ∘ a) i (f x) (f y)) |
| 189 | | smul n a i c x => |
| 190 | simpa only [map_sub, map_smul, rawPullback_symbol, Function.comp_update] using |
| 191 | (Forms.FormRelation.smul (A := B) n (f ∘ a) i c (f x)) |
| 192 | | leibniz n a i x y => |
| 193 | simpa only [map_sub, rawPullback_symbol, Function.comp_update, map_mul, |
| 194 | Function.comp_apply] using |
| 195 | (Forms.FormRelation.leibniz (A := B) n (f ∘ a) i (f x) (f y)) |
| 196 | | constant n a i c => |
| 197 | simpa only [rawPullback_symbol, Function.comp_update, AlgHom.commutes] using |
| 198 | (Forms.FormRelation.constant (A := B) n (f ∘ a) i c) |
| 199 | | alternating n a i j hij ha => |
| 200 | rw [rawPullback_symbol] |
| 201 | exact Forms.FormRelation.alternating n (f ∘ a) i j hij (congrArg f ha) |
| 202 | | @differential n r hr ih => |
| 203 | rw [← LinearMap.comp_apply, rawPullback_differential, LinearMap.comp_apply] |
| 204 | exact Forms.FormRelation.differential ih |
| 205 | |
| 206 | theorem rawPullback_mem_relations (f : A →ₐ[ℂ] B) (n : ℕ) {r : RawForm A n} |
| 207 | (hr : r ∈ relations A n) : rawPullback f n r ∈ relations B n := by |
| 208 | induction hr using Submodule.span_induction with |
| 209 | | mem x hx => exact Submodule.subset_span (rawPullback_relation f hx) |
| 210 | | zero => simp |
| 211 | | add x y hx hy ihx ihy => |
| 212 | simpa only [map_add] using (relations B n).add_mem ihx ihy |
| 213 | | smul c x hx ih => |
| 214 | simpa only [map_smul] using (relations B n).smul_mem c ih |
| 215 | |
| 216 | def pullback (f : A →ₐ[ℂ] B) (n : ℕ) : Form A n →ₗ[ℂ] Form B n := |
| 217 | Submodule.mapQ (relations A n) (relations B n) (rawPullback f n) |
| 218 | (fun _ hr => rawPullback_mem_relations f n hr) |
| 219 | |
| 220 | @[simp] |
| 221 | theorem pullback_symbol (f : A →ₐ[ℂ] B) {n : ℕ} (a : Fin (n + 1) → A) : |
| 222 | pullback f n (formSymbol A a) = formSymbol B (f ∘ a) := by |
| 223 | change (relations B n).mkQ (rawPullback f n (symbol A a)) = _ |
| 224 | rw [rawPullback_symbol] |
| 225 | rfl |
| 226 | |
| 227 | theorem pullback_differential (f : A →ₐ[ℂ] B) (n : ℕ) : |
| 228 | (pullback f (n + 1)).comp (Forms.differential A n) = |
| 229 | (Forms.differential B n).comp (pullback f n) := by |
| 230 | apply LinearMap.ext |
| 231 | intro x |
| 232 | obtain ⟨r, rfl⟩ := (relations A n).mkQ_surjective x |
| 233 | change (relations B (n + 1)).mkQ (rawPullback f (n + 1) (rawDifferential A n r)) = |
| 234 | (relations B (n + 1)).mkQ (rawDifferential B n (rawPullback f n r)) |
| 235 | exact congrArg ((relations B (n + 1)).mkQ) |
| 236 | (LinearMap.congr_fun (rawPullback_differential f n) r) |
| 237 | |
| 238 | theorem pullback_id (n : ℕ) : pullback (AlgHom.id ℂ A) n = LinearMap.id := by |
| 239 | apply LinearMap.ext |
| 240 | intro x |
| 241 | obtain ⟨r, rfl⟩ := (relations A n).mkQ_surjective x |
| 242 | change (relations A n).mkQ (rawPullback (AlgHom.id ℂ A) n r) = |
| 243 | (relations A n).mkQ r |
| 244 | exact congrArg ((relations A n).mkQ) Finsupp.mapDomain_id |
| 245 | |
| 246 | theorem pullback_comp (f : A →ₐ[ℂ] B) (g : B →ₐ[ℂ] C) (n : ℕ) : |
| 247 | pullback (g.comp f) n = (pullback g n).comp (pullback f n) := by |
| 248 | apply LinearMap.ext |
| 249 | intro x |
| 250 | obtain ⟨r, rfl⟩ := (relations A n).mkQ_surjective x |
| 251 | change (relations C n).mkQ (rawPullback (g.comp f) n r) = |
| 252 | (relations C n).mkQ (rawPullback g n (rawPullback f n r)) |
| 253 | apply congrArg ((relations C n).mkQ) |
| 254 | exact LinearMap.congr_fun (Finsupp.lmapDomain_comp ℂ ℂ |
| 255 | (fun a : Fin (n + 1) → A => f ∘ a) (fun a : Fin (n + 1) → B => g ∘ a)) r |
| 256 | |
| 257 | def complexPullback (f : A →ₐ[ℂ] B) : |
| 258 | algebraicDeRhamComplex A ⟶ algebraicDeRhamComplex B := |
| 259 | CochainComplex.ofHom (fun n => ModuleCat.ofHom (pullback f n)) |
| 260 | (fun n => by |
| 261 | rw [algebraicDeRhamComplex_d, algebraicDeRhamComplex_d] |
| 262 | exact ModuleCat.hom_ext (pullback_differential f n).symm) |
| 263 | |
| 264 | theorem complexPullback_id : |
| 265 | complexPullback (AlgHom.id ℂ A) = 𝟙 (algebraicDeRhamComplex A) := by |
| 266 | apply HomologicalComplex.Hom.ext |
| 267 | funext n |
| 268 | exact ModuleCat.hom_ext (pullback_id n) |
| 269 | |
| 270 | theorem complexPullback_comp (f : A →ₐ[ℂ] B) (g : B →ₐ[ℂ] C) : |
| 271 | complexPullback (g.comp f) = complexPullback f ≫ complexPullback g := by |
| 272 | apply HomologicalComplex.Hom.ext |
| 273 | funext n |
| 274 | exact ModuleCat.hom_ext (pullback_comp f g n) |
| 275 | |
| 276 | end Pullback |
| 277 | |
| 278 | /-- Functoriality is induced by algebra homomorphisms on all coefficients |
| 279 | of the displayed differential-form symbols. -/ |
| 280 | def algebraicDeRhamFunctor : CommAlgCat.{u} ℂ ⥤ CochainComplex (ModuleCat.{u} ℂ) ℕ where |
| 281 | obj A := algebraicDeRhamComplex A |
| 282 | map f := complexPullback f.hom |
| 283 | map_id _A := complexPullback_id |
| 284 | map_comp f g := complexPullback_comp f.hom g.hom |
| 285 | |
| 286 | def rawZeroEvaluation : RawForm A 0 →ₗ[ℂ] A := |
| 287 | Finsupp.linearCombination ℂ (fun a => a 0) |
| 288 | |
| 289 | @[simp] |
| 290 | theorem rawZeroEvaluation_symbol (a : Fin 1 → A) : |
| 291 | rawZeroEvaluation A (symbol A a) = a 0 := by |
| 292 | simp [rawZeroEvaluation, symbol] |
| 293 | |
| 294 | theorem zeroRelation_evaluates_zero {r : RawForm A 0} (hr : Forms.FormRelation A 0 r) : |
| 295 | rawZeroEvaluation A r = 0 := by |
| 296 | cases hr with |
| 297 | | add n a i x y => |
| 298 | have hi : i = 0 := Fin.eq_zero i |
| 299 | simp [hi] |
| 300 | | smul n a i c x => |
| 301 | have hi : i = 0 := Fin.eq_zero i |
| 302 | simp [hi] |
| 303 | | leibniz n a i x y => exact Fin.elim0 i |
| 304 | | constant n a i c => exact Fin.elim0 i |
| 305 | | alternating n a i j hij ha => exact Fin.elim0 i |
| 306 | |
| 307 | def zeroEvaluation : Form A 0 →ₗ[ℂ] A := |
| 308 | (relations A 0).liftQ (rawZeroEvaluation A) |
| 309 | (Submodule.span_le.mpr (fun _ hr => zeroRelation_evaluates_zero A hr)) |
| 310 | |
| 311 | omit [CommRing A] [Algebra ℂ A] in |
| 312 | theorem update_fin_one (a x : A) : |
| 313 | Function.update (fun _ : Fin (0 + 1) => a) 0 x = fun _ => x := by |
| 314 | funext i |
| 315 | have hi : i = 0 := Fin.eq_zero i |
| 316 | simp [hi] |
| 317 | |
| 318 | def zeroSymbol : A →ₗ[ℂ] Form A 0 where |
| 319 | toFun a := formSymbol A (fun _ => a) |
| 320 | map_add' x y := by |
| 321 | simpa only [update_fin_one] using formSymbol_add A (fun _ : Fin (0 + 1) => 0) 0 x y |
| 322 | map_smul' c x := by |
| 323 | simpa only [update_fin_one, RingHom.id_apply] using |
| 324 | formSymbol_smul A (fun _ : Fin (0 + 1) => 0) 0 c x |
| 325 | |
| 326 | @[simp] |
| 327 | theorem zeroEvaluation_zeroSymbol (a : A) : zeroEvaluation A (zeroSymbol A a) = a := |
| 328 | rawZeroEvaluation_symbol A (fun _ => a) |
| 329 | |
| 330 | theorem zeroSymbol_zeroEvaluation (x : Form A 0) : |
| 331 | zeroSymbol A (zeroEvaluation A x) = x := by |
| 332 | obtain ⟨r, rfl⟩ := (relations A 0).mkQ_surjective x |
| 333 | induction r using Finsupp.induction_linear with |
| 334 | | zero => simp |
| 335 | | add r s ihr ihs => simp only [map_add, ihr, ihs] |
| 336 | | single a c => |
| 337 | have hc : Finsupp.single a c = c • symbol A a := by simp [symbol] |
| 338 | rw [hc] |
| 339 | simp only [map_smul] |
| 340 | apply congrArg (c • ·) |
| 341 | change zeroSymbol A (rawZeroEvaluation A (symbol A a)) = formSymbol A a |
| 342 | rw [rawZeroEvaluation_symbol] |
| 343 | change formSymbol A (fun _ => a 0) = formSymbol A a |
| 344 | congr 1 |
| 345 | funext i |
| 346 | exact congrArg a (Fin.eq_zero i).symm |
| 347 | |
| 348 | /-- The degree-zero term is canonically the original algebra, not a |
| 349 | substitute cohomology space. -/ |
| 350 | def zeroFormsEquiv : Form A 0 ≃ₗ[ℂ] A := |
| 351 | LinearEquiv.ofLinearMap (zeroEvaluation A) (zeroSymbol A) |
| 352 | (LinearMap.ext (zeroEvaluation_zeroSymbol A)) |
| 353 | (LinearMap.ext (zeroSymbol_zeroEvaluation A)) |
| 354 | |
| 355 | end |
| 356 | |
| 357 | end OAI.AlgebraicGeometry.Comparison.Betti.Algebraic.Forms |