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.AlgebraicGeometry.AffineScheme |
| 2 | import Mathlib.Algebra.Ring.Subring.Basic |
| 3 | import OAI.AlgebraicGeometry.Quotients.FiniteDescent.InvariantBasisOf |
| 4 | import OAI.AlgebraicGeometry.Quotients.FiniteDescent.InvariantPolynomialOf |
| 5 | import OAI.AlgebraicGeometry.Quotients.FiniteDescent.InvariantLocalizationIs |
| 6 | import OAI.AlgebraicGeometry.Quotients.FiniteDescent.DeterminantCoverEq |
| 7 | import OAI.AlgebraicGeometry.Quotients.FiniteDescent.LocalBasisAnd |
| 8 | import OAI.AlgebraicGeometry.Quotients.FiniteDescent.FlatInvariants |
| 9 | import OAI.AlgebraicGeometry.Quotients.FiniteDescent.InvariantTensorExists |
| 10 | |
| 11 | /-! # Affine Ring -/ |
| 12 | |
| 13 | namespace OAI.AlgebraicGeometry.Quotients.FiniteDescent.AffineRing.Construction.Affine |
| 14 | |
| 15 | /-! |
| 16 | # The affine candidate for the FiniteDescent quotient |
| 17 | |
| 18 | The candidate is the spectrum of the actual equalizer ring of invariant |
| 19 | functions. Its affine universal property is proved here. The finite-flat |
| 20 | effectiveness argument will show that it is also the fppf quotient. |
| 21 | -/ |
| 22 | |
| 23 | open _root_.CategoryTheory _root_.AlgebraicGeometry |
| 24 | |
| 25 | universe u |
| 26 | |
| 27 | variable {A B : Type u} [CommRing A] [CommRing B] |
| 28 | |
| 29 | /-- The ring of functions invariant under a pair of affine relation maps. -/ |
| 30 | abbrev invariants (s t : A →+* B) : Subring A := s.eqLocus t |
| 31 | |
| 32 | /-- The affine quotient candidate, with its actual invariant coordinate ring. -/ |
| 33 | noncomputable abbrev quotient (s t : A →+* B) : Scheme.{u} := |
| 34 | Spec (.of (invariants s t)) |
| 35 | |
| 36 | /-- Inclusion of invariant functions induces the affine candidate map. -/ |
| 37 | noncomputable def projection (s t : A →+* B) : Spec (.of A) ⟶ quotient s t := |
| 38 | Spec.map (CommRingCat.ofHom (invariants s t).subtype) |
| 39 | |
| 40 | /-- The affine candidate identifies the two relation maps. -/ |
| 41 | theorem projection_condition (s t : A →+* B) : |
| 42 | Spec.map (CommRingCat.ofHom s) ≫ projection s t = |
| 43 | Spec.map (CommRingCat.ofHom t) ≫ projection s t := by |
| 44 | unfold projection |
| 45 | rw [← Spec.map_comp, ← Spec.map_comp] |
| 46 | congr 1 |
| 47 | ext a |
| 48 | exact a.property |
| 49 | |
| 50 | /-- An invariant ring homomorphism factors uniquely through the invariant ring. -/ |
| 51 | theorem invariant_ring_universal_property |
| 52 | (s t : A →+* B) {R : Type u} [CommRing R] |
| 53 | (f : R →+* A) (hf : s.comp f = t.comp f) : |
| 54 | ∃! g : R →+* invariants s t, (invariants s t).subtype.comp g = f := by |
| 55 | let g : R →+* invariants s t := f.codRestrict (invariants s t) |
| 56 | (fun r => congrArg (fun e : R →+* B => e r) hf) |
| 57 | refine ⟨g, rfl, ?_⟩ |
| 58 | intro g' hg' |
| 59 | ext r |
| 60 | exact congrArg (fun e : R →+* A => e r) hg' |
| 61 | |
| 62 | /-- The spectrum of the invariant ring is the coequalizer against affine targets. -/ |
| 63 | theorem quotient_universal_property_spec |
| 64 | (s t : A →+* B) (R : CommRingCat.{u}) |
| 65 | (f : Spec (.of A) ⟶ Spec R) |
| 66 | (hf : Spec.map (CommRingCat.ofHom s) ≫ f = |
| 67 | Spec.map (CommRingCat.ofHom t) ≫ f) : |
| 68 | ∃! g : quotient s t ⟶ Spec R, projection s t ≫ g = f := by |
| 69 | obtain ⟨f₀, rfl⟩ := Spec.map_surjective f |
| 70 | rw [← Spec.map_comp, ← Spec.map_comp] at hf |
| 71 | have hf₀ : s.comp f₀.hom = t.comp f₀.hom := |
| 72 | congrArg (fun h => h.hom) (Spec.map_injective hf) |
| 73 | obtain ⟨g, hg, hu⟩ := invariant_ring_universal_property s t f₀.hom hf₀ |
| 74 | refine ⟨Spec.map (CommRingCat.ofHom g), ?_, ?_⟩ |
| 75 | · change projection s t ≫ Spec.map (CommRingCat.ofHom g) = Spec.map f₀ |
| 76 | unfold projection |
| 77 | rw [← Spec.map_comp] |
| 78 | congr 1 |
| 79 | ext r |
| 80 | exact congrArg (fun e : R →+* A => e r) hg |
| 81 | · intro g' hg' |
| 82 | obtain ⟨g₀, rfl⟩ := Spec.map_surjective g' |
| 83 | unfold projection at hg' |
| 84 | rw [← Spec.map_comp] at hg' |
| 85 | have hg₀ : (invariants s t).subtype.comp g₀.hom = f₀.hom := |
| 86 | congrArg (fun h => h.hom) (Spec.map_injective hg') |
| 87 | apply congrArg Spec.map |
| 88 | ext r |
| 89 | exact congrArg (fun e : R →+* invariants s t => (e r : A)) (hu g₀.hom hg₀) |
| 90 | |
| 91 | end OAI.AlgebraicGeometry.Quotients.FiniteDescent.AffineRing.Construction.Affine |