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 OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.ExternalTensorAcyclic |
| 2 | import OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Tor.ComparisonByPresentations |
| 3 | import OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Tor.Annihilator |
| 4 | import OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Tor.Euler |
| 5 | |
| 6 | /-! # Diagonal Tor -/ |
| 7 | |
| 8 | namespace OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.DiagonalTor |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! Reduction to the diagonal for native Tor over a Noetherian algebra |
| 13 | over a field. It preserves every Tor length and hence every Euler cutoff. -/ |
| 14 | |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | set_option backward.isDefEq.respectTransparency.types false |
| 17 | |
| 18 | open _root_.CategoryTheory |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | open OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.DiagonalTensor OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.DiagonalTensorNaturality |
| 23 | |
| 24 | variable (K R : Type u) [Field K] [CommRing R] [Algebra K R] |
| 25 | |
| 26 | attribute [local instance] DiagonalTensor.diagonalAlgebra |
| 27 | |
| 28 | variable (M N : ModuleCat.{u} R) |
| 29 | |
| 30 | abbrev external : ModuleCat.{u} (DiagonalTensor.Ring K R) := (ExternalTensorFunctor.tensor K R R N).obj M |
| 31 | |
| 32 | theorem exists_iso [IsNoetherianRing R] [Module.Finite R M] (n : ℕ) : |
| 33 | Nonempty ((ModuleCat.restrictScalars (DiagonalTensorNaturality.first K R)).obj |
| 34 | (((Tor (ModuleCat (DiagonalTensor.Ring K R)) n).obj (external K R M N)).obj (DiagonalTensorNaturality.diagonal K R)) ≅ |
| 35 | (((Tor (ModuleCat R) n).obj M).obj N)) := |
| 36 | ProjectionFormula.Tor.ComparisonByPresentations.exists_iso R (DiagonalTensor.Ring K R) N (DiagonalTensorNaturality.diagonal K R) |
| 37 | (ExternalTensorFunctor.tensor K R R N) (ModuleCat.restrictScalars (DiagonalTensorNaturality.first K R)) |
| 38 | (DiagonalTensorNaturality.naturalIso K R N) (fun P _ _ i => ExternalTensorAcyclic.free K R N P i) n M |
| 39 | |
| 40 | theorem length_restrict (n : ℕ) : |
| 41 | Module.length (DiagonalTensor.Ring K R) (((Tor (ModuleCat (DiagonalTensor.Ring K R)) n).obj (external K R M N)).obj (DiagonalTensorNaturality.diagonal K R)) = |
| 42 | Module.length R ((ModuleCat.restrictScalars (DiagonalTensorNaturality.first K R)).obj |
| 43 | (((Tor (ModuleCat (DiagonalTensor.Ring K R)) n).obj (external K R M N)).obj (DiagonalTensorNaturality.diagonal K R))) := by |
| 44 | let T := (((Tor (ModuleCat (DiagonalTensor.Ring K R)) n).obj (external K R M N)).obj (DiagonalTensorNaturality.diagonal K R)) |
| 45 | let : Module R T := Module.compHom T (DiagonalTensorNaturality.first K R) |
| 46 | let : IsScalarTower (DiagonalTensor.Ring K R) R T := IsScalarTower.of_algebraMap_smul fun t x => by |
| 47 | change DiagonalTensorNaturality.first K R (DiagonalTensor.multiplication K R t) • x = t • x |
| 48 | have h := ProjectionFormula.Tor.Annihilator.second (DiagonalTensor.Ring K R) (external K R M N) (DiagonalTensorNaturality.diagonal K R) |
| 49 | (t - DiagonalTensorNaturality.first K R (DiagonalTensor.multiplication K R t)) (by |
| 50 | intro y |
| 51 | change (DiagonalTensor.multiplication K R (t - DiagonalTensorNaturality.first K R (DiagonalTensor.multiplication K R t))) * (show R from y) = 0 |
| 52 | have he : DiagonalTensor.multiplication K R (DiagonalTensorNaturality.first K R (DiagonalTensor.multiplication K R t)) = DiagonalTensor.multiplication K R t := mul_one _ |
| 53 | rw [map_sub, he, sub_self, zero_mul]) n x |
| 54 | rw [sub_smul, sub_eq_zero] at h |
| 55 | exact h.symm |
| 56 | exact Module.length_eq_of_surjective (R := R) (S := DiagonalTensor.Ring K R) (M := T) |
| 57 | (fun r => ⟨DiagonalTensorNaturality.first K R r, (mul_one r : DiagonalTensor.multiplication K R (DiagonalTensorNaturality.first K R r) = r)⟩) |
| 58 | |
| 59 | theorem length [IsNoetherianRing R] [Module.Finite R M] (n : ℕ) : |
| 60 | Module.length (DiagonalTensor.Ring K R) (((Tor (ModuleCat (DiagonalTensor.Ring K R)) n).obj (external K R M N)).obj (DiagonalTensorNaturality.diagonal K R)) = |
| 61 | Module.length R (((Tor (ModuleCat R) n).obj M).obj N) := |
| 62 | (length_restrict K R M N n).trans (Classical.choice (exists_iso K R M N n)).toLinearEquiv.length_eq |
| 63 | |
| 64 | theorem euler [IsNoetherianRing R] [Module.Finite R M] (d : ℕ) : |
| 65 | ProjectionFormula.Tor.Euler.euler (DiagonalTensor.Ring K R) (external K R M N) (DiagonalTensorNaturality.diagonal K R) d = ProjectionFormula.Tor.Euler.euler R M N d := by |
| 66 | apply Finset.sum_congr rfl |
| 67 | intro i _ |
| 68 | exact congrArg (fun l : ℕ∞ => (-1 : ℚ) ^ i * (l.toNat : ℚ)) (DiagonalTor.length K R M N i) |
| 69 | |
| 70 | end |
| 71 | |
| 72 | end OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.DiagonalTor |