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.NormalPrincipalAssociated |
| 2 | import OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Local.FactorialTwo |
| 3 | import Mathlib.RingTheory.OrderOfVanishing.Noetherian |
| 4 | |
| 5 | /-! # Normal Divisibility -/ |
| 6 | |
| 7 | namespace OAI |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | namespace AlgebraicGeometry.IntersectionTheory.ProjectionFormula.NormalDivisibility |
| 12 | |
| 13 | /-! Divisibility in a normal Noetherian domain is detected at the |
| 14 | height-one primes. In particular, equal local orders imply association. -/ |
| 15 | |
| 16 | variable (R : Type*) [CommRing R] [IsDomain R] [IsNoetherianRing R] |
| 17 | [IsIntegrallyClosed R] |
| 18 | |
| 19 | theorem of_localizations (a b : R) (ha : a ≠ 0) |
| 20 | (h : ∀ (p : Ideal R) [p.IsPrime], p.height = 1 → |
| 21 | algebraMap R (Localization.AtPrime p) a ∣ algebraMap R (Localization.AtPrime p) b) : |
| 22 | a ∣ b := by |
| 23 | by_contra hn |
| 24 | have hb : b ∉ Ideal.span {a} := by simpa only [Ideal.mem_span_singleton] using hn |
| 25 | have hx : Ideal.Quotient.mk (Ideal.span {a}) b ≠ 0 := |
| 26 | Ideal.Quotient.eq_zero_iff_mem.not.mpr hb |
| 27 | obtain ⟨p, hp, hle⟩ := exists_le_isAssociatedPrime_of_isNoetherianRing R _ hx |
| 28 | let := hp.isPrime |
| 29 | have hh := NormalPrincipalAssociated.height_one R a ha p hp |
| 30 | have hmem : algebraMap R (Localization.AtPrime p) b ∈ |
| 31 | (Ideal.span {a}).map (algebraMap R (Localization.AtPrime p)) := by |
| 32 | rw [Ideal.map_span, Set.image_singleton, Ideal.mem_span_singleton] |
| 33 | exact h p hh |
| 34 | obtain ⟨s, hs, hsb⟩ := |
| 35 | (IsLocalization.algebraMap_mem_map_algebraMap_iff p.primeCompl _ _ _).mp hmem |
| 36 | apply hs |
| 37 | apply hle |
| 38 | rw [Submodule.mem_colon_singleton, Submodule.mem_bot] |
| 39 | change Ideal.Quotient.mk (Ideal.span {a}) (s * b) = 0 |
| 40 | exact Ideal.Quotient.eq_zero_iff_mem.mpr hsb |
| 41 | |
| 42 | theorem associated_of_localizations (a b : R) (ha : a ≠ 0) (hb : b ≠ 0) |
| 43 | (h : ∀ (p : Ideal R) [p.IsPrime], p.height = 1 → |
| 44 | Associated (algebraMap R (Localization.AtPrime p) a) |
| 45 | (algebraMap R (Localization.AtPrime p) b)) : Associated a b := by |
| 46 | apply associated_of_dvd_dvd |
| 47 | · exact of_localizations R a b ha (fun p _ hp => (h p hp).dvd) |
| 48 | · exact of_localizations R b a hb (fun p _ hp => (h p hp).symm.dvd) |
| 49 | |
| 50 | theorem localization_dvr (p : Ideal R) [p.IsPrime] (hp : p.height = 1) : |
| 51 | IsDiscreteValuationRing (Localization.AtPrime p) := by |
| 52 | let S := Localization.AtPrime p |
| 53 | let : IsIntegrallyClosed S := isIntegrallyClosed_of_isLocalization S p.primeCompl |
| 54 | p.primeCompl_le_nonZeroDivisors |
| 55 | have hm : (IsLocalRing.maximalIdeal S).height = 1 := by |
| 56 | rw [← IsLocalization.height_under p.primeCompl, |
| 57 | Localization.AtPrime.under_maximalIdeal, hp] |
| 58 | let : IsDedekindDomain S := Local.FactorialTwo.dedekind_of_maximal_height_one S hm |
| 59 | have hn : ¬ IsField S := by |
| 60 | intro hf |
| 61 | have hz := IsLocalRing.isField_iff_maximalIdeal_eq.mp hf |
| 62 | rw [hz, Ideal.height_bot] at hm |
| 63 | exact zero_ne_one hm |
| 64 | exact ((IsDiscreteValuationRing.TFAE S hn).out 3 1 rfl rfl).mp inferInstance |
| 65 | |
| 66 | theorem associated_of_orders (a b : R) (ha : a ≠ 0) (hb : b ≠ 0) |
| 67 | (h : ∀ (p : Ideal R) [p.IsPrime], p.height = 1 → |
| 68 | Ring.ord (Localization.AtPrime p) (algebraMap R (Localization.AtPrime p) a) = |
| 69 | Ring.ord (Localization.AtPrime p) (algebraMap R (Localization.AtPrime p) b)) : |
| 70 | Associated a b := by |
| 71 | apply associated_of_localizations R a b ha hb |
| 72 | intro p hprime hp |
| 73 | let := localization_dvr R p hp |
| 74 | exact (Ring.ord_eq_iff_associated _ _).mp (h p hp) |
| 75 | |
| 76 | theorem isUnit_of_orders (a : R) (ha : a ≠ 0) |
| 77 | (h : ∀ (p : Ideal R) [p.IsPrime], p.height = 1 → |
| 78 | Ring.ord (Localization.AtPrime p) (algebraMap R (Localization.AtPrime p) a) = 0) : |
| 79 | IsUnit a := by |
| 80 | apply associated_one_iff_isUnit.mp |
| 81 | apply associated_of_orders R a 1 ha one_ne_zero |
| 82 | intro p hprime hp |
| 83 | simpa only [map_one, Ring.ord_one] using h p hp |
| 84 | |
| 85 | end AlgebraicGeometry.IntersectionTheory.ProjectionFormula.NormalDivisibility |
| 86 | |
| 87 | namespace AlgebraicGeometry.IntersectionTheory.ProjectionFormula.NormalDivisibility.PrimePrincipalFromOrders |
| 88 | |
| 89 | /-! The characteristic height-one orders determine a prime ideal as the |
| 90 | principal ideal of the element realizing them in a normal domain. -/ |
| 91 | |
| 92 | open scoped Classical |
| 93 | |
| 94 | variable (R : Type*) [CommRing R] [IsDomain R] [IsNoetherianRing R] [IsIntegrallyClosed R] |
| 95 | |
| 96 | theorem span_eq (p : Ideal R) [p.IsPrime] (hp : p.height = 1) (r : R) (hr : r ≠ 0) |
| 97 | (ho : ∀ (q : Ideal R) [q.IsPrime], q.height = 1 → |
| 98 | Ring.ord (Localization.AtPrime q) (algebraMap R (Localization.AtPrime q) r) = |
| 99 | if q = p then 1 else 0) : p = Ideal.span {r} := by |
| 100 | have hrp : r ∈ p := by |
| 101 | by_contra hn |
| 102 | have hu : IsUnit (algebraMap R (Localization.AtPrime p) r) := |
| 103 | IsLocalization.map_units (Localization.AtPrime p) (⟨r, hn⟩ : p.primeCompl) |
| 104 | have h := ho p hp |
| 105 | rw [ite_eq_left rfl, Ring.ord_of_isUnit hu] at h |
| 106 | exact zero_ne_one h |
| 107 | apply le_antisymm |
| 108 | · intro x hx |
| 109 | apply Ideal.mem_span_singleton.mpr |
| 110 | apply of_localizations R r x hr |
| 111 | intro q hprime hq |
| 112 | let S := Localization.AtPrime q |
| 113 | let : IsDiscreteValuationRing S := localization_dvr R q hq |
| 114 | apply IsDiscreteValuationRing.addVal_le_iff_dvd.mp |
| 115 | rw [← Ring.ord_eq_addVal, ← Ring.ord_eq_addVal, ho q hq] |
| 116 | by_cases he : q = p |
| 117 | · subst q |
| 118 | rw [ite_eq_left rfl] |
| 119 | apply Order.one_le_iff_ne_zero.mpr |
| 120 | intro hz |
| 121 | have hu : IsUnit (algebraMap R (Localization.AtPrime p) x) := |
| 122 | IsDiscreteValuationRing.addVal_eq_zero_iff.mp (by simpa only [Ring.ord_eq_addVal] using hz) |
| 123 | have hm : algebraMap R (Localization.AtPrime p) x ∈ |
| 124 | IsLocalRing.maximalIdeal (Localization.AtPrime p) := by |
| 125 | rw [← Localization.AtPrime.map_eq_maximalIdeal] |
| 126 | exact Ideal.mem_map_of_mem _ hx |
| 127 | exact (IsLocalRing.notMem_maximalIdeal.mpr hu) hm |
| 128 | · rw [ite_eq_right he] |
| 129 | exact zero_le |
| 130 | · exact Ideal.span_le.mpr (Set.singleton_subset_iff.mpr hrp) |
| 131 | |
| 132 | end AlgebraicGeometry.IntersectionTheory.ProjectionFormula.NormalDivisibility.PrimePrincipalFromOrders |
| 133 | |
| 134 | end |
| 135 | |
| 136 | end OAI |