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 | /- |
| 2 | Copyright (c) 2021 Kim Morrison. All rights reserved. |
| 3 | Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | Authors: Kim Morrison, Joël Riou |
| 5 | This file has been modified. |
| 6 | -/ |
| 7 | import Mathlib.Algebra.Homology.QuasiIso |
| 8 | import Mathlib.Algebra.Homology.SingleHomology |
| 9 | import Mathlib.CategoryTheory.Preadditive.Projective.Preserves |
| 10 | |
| 11 | /-! # Resolution Basic -/ |
| 12 | |
| 13 | namespace OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Projective.ResolutionBasic |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | /- Adapted to HilbertConstruction-local declarations; retain only bundled resolutions and their |
| 18 | augmentation cokernel and positive-degree exactness properties. -/ |
| 19 | |
| 20 | universe v u v' u' |
| 21 | |
| 22 | open _root_.CategoryTheory |
| 23 | |
| 24 | open Category Limits _root_.ChainComplex _root_.HomologicalComplex |
| 25 | |
| 26 | variable {C : Type u} [Category.{v} C] |
| 27 | |
| 28 | open Projective |
| 29 | |
| 30 | variable [HasZeroObject C] [HasZeroMorphisms C] |
| 31 | |
| 32 | /-- |
| 33 | A `ProjectiveResolution Z` consists of a bundled `ℕ`-indexed chain complex of projective objects, |
| 34 | along with a quasi-isomorphism to the complex consisting of just `Z` supported in degree `0`. |
| 35 | -/ |
| 36 | structure ProjectiveResolution (Z : C) where |
| 37 | /-- the chain complex involved in the resolution -/ |
| 38 | complex : ChainComplex C ℕ |
| 39 | /-- the chain complex must be degreewise projective -/ |
| 40 | projective : ∀ n, Projective (complex.X n) := by infer_instance |
| 41 | /-- the chain complex must have homology -/ |
| 42 | [hasHomology : ∀ i, complex.HasHomology i] |
| 43 | /-- the morphism to the single chain complex with `Z` in degree `0` -/ |
| 44 | π : complex ⟶ (ChainComplex.single₀ C).obj Z |
| 45 | /-- the morphism to the single chain complex with `Z` in degree `0` is a quasi-isomorphism -/ |
| 46 | quasiIso : QuasiIso π := by infer_instance |
| 47 | |
| 48 | open ProjectiveResolution in |
| 49 | attribute [instance] projective hasHomology ProjectiveResolution.quasiIso |
| 50 | |
| 51 | namespace ProjectiveResolution |
| 52 | |
| 53 | variable {Z : C} (P : ProjectiveResolution Z) |
| 54 | |
| 55 | lemma complex_exactAt_succ (n : ℕ) : |
| 56 | P.complex.ExactAt (n + 1) := by |
| 57 | rw [← quasiIsoAt_iff_exactAt' P.π (n + 1) (exactAt_succ_single_obj _ _)] |
| 58 | infer_instance |
| 59 | |
| 60 | lemma exact_succ (n : ℕ) : |
| 61 | (ShortComplex.mk _ _ (P.complex.d_comp_d (n + 2) (n + 1) n)).Exact := |
| 62 | ((HomologicalComplex.exactAt_iff' _ (n + 2) (n + 1) n) (by simp only [prev]; rfl) |
| 63 | (by simp)).1 (P.complex_exactAt_succ n) |
| 64 | |
| 65 | @[simp] |
| 66 | theorem π_f_succ (n : ℕ) : P.π.f (n + 1) = 0 := |
| 67 | (isZero_single_obj_X _ _ _ _ (by simp)).eq_of_tgt _ _ |
| 68 | |
| 69 | @[reassoc (attr := simp)] |
| 70 | theorem complex_d_comp_π_f_zero : |
| 71 | P.complex.d 1 0 ≫ P.π.f 0 = 0 := by |
| 72 | rw [← P.π.comm 1 0, single_obj_d, comp_zero] |
| 73 | |
| 74 | theorem complex_d_succ_comp (n : ℕ) : |
| 75 | P.complex.d n (n + 1) ≫ P.complex.d (n + 1) (n + 2) = 0 := by |
| 76 | simp |
| 77 | |
| 78 | /-- The (limit) cokernel cofork given by the composition |
| 79 | `P.complex.X 1 ⟶ P.complex.X 0 ⟶ Z` when `P: ProjectiveResolution Z`. -/ |
| 80 | @[simp] |
| 81 | noncomputable def cokernelCofork : CokernelCofork (P.complex.d 1 0) := |
| 82 | CokernelCofork.ofπ _ P.complex_d_comp_π_f_zero |
| 83 | |
| 84 | /-- `Z` is the cokernel of `P.complex.X 1 ⟶ P.complex.X 0` when `P: ProjectiveResolution Z`. -/ |
| 85 | noncomputable def isColimitCokernelCofork : IsColimit (P.cokernelCofork) := by |
| 86 | refine IsColimit.ofIsoColimit (P.complex.opcyclesIsCokernel 1 0 (by simp)) ?_ |
| 87 | refine Cofork.ext (P.complex.isoHomologyι₀.symm ≪≫ isoOfQuasiIsoAt P.π 0 ≪≫ |
| 88 | singleObjHomologySelfIso _ _ _) ?_ |
| 89 | change P.complex.pOpcycles 0 ≫ P.complex.isoHomologyι₀.inv ≫ |
| 90 | homologyMap P.π 0 ≫ (singleObjHomologySelfIso (ComplexShape.down ℕ) 0 Z).hom = P.π.f 0 |
| 91 | apply (cancel_mono (singleObjOpcyclesSelfIso (ComplexShape.down ℕ) 0 Z).hom).mp |
| 92 | rw [assoc, assoc, assoc, singleObjHomologySelfIso_hom_singleObjOpcyclesSelfIso_hom] |
| 93 | change P.complex.pOpcycles 0 ≫ P.complex.isoHomologyι₀.inv ≫ |
| 94 | homologyMap P.π 0 ≫ (((ChainComplex.single₀ C).obj Z).isoHomologyι₀).hom = _ |
| 95 | rw [isoHomologyι₀_inv_naturality_assoc, Iso.inv_hom_id, comp_id, p_opcyclesMap] |
| 96 | have hs : (singleObjOpcyclesSelfIso (ComplexShape.down ℕ) 0 Z).hom = |
| 97 | ((ChainComplex.single₀ C).obj Z).pOpcycles 0 := by |
| 98 | change (𝟙 Z) ≫ ((ChainComplex.single₀ C).obj Z).pOpcycles 0 = _ |
| 99 | exact id_comp _ |
| 100 | rw [hs] |
| 101 | rfl |
| 102 | |
| 103 | instance (n : ℕ) : Epi (P.π.f n) := by |
| 104 | cases n with |
| 105 | | zero => exact epi_of_isColimit_cofork P.isColimitCokernelCofork |
| 106 | | succ n => exact (isZero_single_obj_X _ _ _ _ (by simp)).epi (P.π.f (n + 1)) |
| 107 | |
| 108 | end ProjectiveResolution |
| 109 | |
| 110 | end |
| 111 | |
| 112 | end OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Projective.ResolutionBasic |