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.Affine.ResidueDegree |
| 2 | import OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Support.Map |
| 3 | |
| 4 | /-! # Fiber Degree -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Affine.FiberDegree |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! Affine primes over a target point are exactly the native scheme |
| 11 | fiber points, with identical residue-degree weights. -/ |
| 12 | |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | set_option backward.isDefEq.respectTransparency.types false |
| 15 | |
| 16 | open _root_.CategoryTheory _root_.AlgebraicGeometry |
| 17 | |
| 18 | variable {X Y : Scheme} (f : X ⟶ Y) (U : Y.Opens) (hU : IsAffineOpen U) |
| 19 | (hV : IsAffineOpen (f ⁻¹ᵁ U)) (y : Y) (hy : y ∈ U) |
| 20 | |
| 21 | local instance : Algebra Γ(Y, U) Γ(X, f ⁻¹ᵁ U) := (f.app U).hom.toAlgebra |
| 22 | |
| 23 | def prime : PrimeSpectrum Γ(Y, U) := hU.primeIdealOf ⟨y, hy⟩ |
| 24 | |
| 25 | theorem square : Spec.map (f.app U) ≫ hU.fromSpec = hV.fromSpec ≫ f := by |
| 26 | rw [Scheme.Hom.app_eq_appLE] |
| 27 | exact IsAffineOpen.SpecMap_appLE_fromSpec f hU hV le_rfl |
| 28 | |
| 29 | def point (q : (prime U hU y hy).asIdeal.primesOver Γ(X, f ⁻¹ᵁ U)) : f ⁻¹' ({y} : Set Y) := by |
| 30 | let Q : PrimeSpectrum Γ(X, f ⁻¹ᵁ U) := ⟨q.val, q.property.1⟩ |
| 31 | have hQ : (Spec.map (f.app U)) Q = prime U hU y hy := PrimeSpectrum.ext q.property.2.1.symm |
| 32 | refine ⟨hV.fromSpec Q, ?_⟩ |
| 33 | change f (hV.fromSpec Q) = y |
| 34 | have h := congrArg (fun k : Spec Γ(X, f ⁻¹ᵁ U) ⟶ Y => k Q) (square f U hU hV) |
| 35 | exact h.symm.trans ((congrArg hU.fromSpec hQ).trans (hU.fromSpec_primeIdealOf ⟨y, hy⟩)) |
| 36 | |
| 37 | theorem injective : Function.Injective (point f U hU hV y hy) := by |
| 38 | intro q q' he |
| 39 | apply Subtype.ext |
| 40 | have hp : hV.fromSpec (⟨q.val, q.property.1⟩ : PrimeSpectrum Γ(X, f ⁻¹ᵁ U)) = |
| 41 | hV.fromSpec (⟨q'.val, q'.property.1⟩ : PrimeSpectrum Γ(X, f ⁻¹ᵁ U)) := |
| 42 | congrArg (fun x : f ⁻¹' ({y} : Set Y) => x.val) he |
| 43 | have h := hV.fromSpec.isOpenEmbedding.injective hp |
| 44 | exact congrArg PrimeSpectrum.asIdeal h |
| 45 | |
| 46 | theorem surjective : Function.Surjective (point f U hU hV y hy) := by |
| 47 | intro x |
| 48 | have hxy : f x.val = y := x.property |
| 49 | have hx : x.val ∈ f ⁻¹ᵁ U := by change f x.val ∈ U; rwa [hxy] |
| 50 | let Q := hV.primeIdealOf ⟨x.val, hx⟩ |
| 51 | have hQ : (Spec.map (f.app U)) Q = prime U hU y hy := by |
| 52 | apply hU.fromSpec.isOpenEmbedding.injective |
| 53 | have h := congrArg (fun k : Spec Γ(X, f ⁻¹ᵁ U) ⟶ Y => k Q) (square f U hU hV) |
| 54 | exact h.trans ((congrArg f (hV.fromSpec_primeIdealOf ⟨x.val, hx⟩)).trans |
| 55 | (hxy.trans (hU.fromSpec_primeIdealOf ⟨y, hy⟩).symm)) |
| 56 | let q : (prime U hU y hy).asIdeal.primesOver Γ(X, f ⁻¹ᵁ U) := |
| 57 | ⟨Q.asIdeal, Q.isPrime, ⟨(congrArg PrimeSpectrum.asIdeal hQ).symm⟩⟩ |
| 58 | exact ⟨q, Subtype.ext (hV.fromSpec_primeIdealOf ⟨x.val, hx⟩)⟩ |
| 59 | |
| 60 | def equiv : (prime U hU y hy).asIdeal.primesOver Γ(X, f ⁻¹ᵁ U) ≃ f ⁻¹' ({y} : Set Y) := |
| 61 | Equiv.ofBijective (point f U hU hV y hy) ⟨FiberDegree.injective f U hU hV y hy, surjective f U hU hV y hy⟩ |
| 62 | |
| 63 | theorem degree (q : (prime U hU y hy).asIdeal.primesOver Γ(X, f ⁻¹ᵁ U)) : |
| 64 | f.residueDegree (point f U hU hV y hy q).val = q.val.inertiaDeg Γ(Y, U) := by |
| 65 | let Q : PrimeSpectrum Γ(X, f ⁻¹ᵁ U) := ⟨q.val, q.property.1⟩ |
| 66 | change f.residueDegree (hV.fromSpec Q) = _ |
| 67 | rw [← Support.Map.residueDegree_pre_immersion hV.fromSpec f Q, ← square f U hU hV, |
| 68 | Support.Map.residueDegree_post_immersion] |
| 69 | exact ResidueDegree.residueDegree_eq_inertiaDeg Γ(Y, U) Γ(X, f ⁻¹ᵁ U) Q |
| 70 | |
| 71 | include hV in |
| 72 | theorem sum [Fintype (f ⁻¹' ({y} : Set Y))] |
| 73 | [Fintype ((prime U hU y hy).asIdeal.primesOver Γ(X, f ⁻¹ᵁ U))] : |
| 74 | ∑ x : f ⁻¹' ({y} : Set Y), f.residueDegree x.val = |
| 75 | ∑ q : (prime U hU y hy).asIdeal.primesOver Γ(X, f ⁻¹ᵁ U), q.val.inertiaDeg Γ(Y, U) := by |
| 76 | rw [← (equiv f U hU hV y hy).sum_comp (fun x => f.residueDegree x.val)] |
| 77 | exact Finset.sum_congr rfl (fun q _ => degree f U hU hV y hy q) |
| 78 | |
| 79 | end |
| 80 | |
| 81 | end OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Affine.FiberDegree |