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.RingTheory.Unramified.Basic |
| 2 | |
| 3 | /-! # Unramified Congruence Neighborhood -/ |
| 4 | |
| 5 | namespace OAI.AlgebraicGeometry.Resolution.Blowups.UnramifiedCongruenceNeighborhood.Construction |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | section |
| 10 | |
| 11 | /-! Open equalizer neighborhoods for two maps from an unramified algebra. -/ |
| 12 | |
| 13 | open scoped TensorProduct |
| 14 | |
| 15 | variable {P R S : Type*} [CommRing P] [CommRing R] [CommRing S] |
| 16 | [Algebra P R] [Algebra P S] |
| 17 | [Algebra.EssFiniteType P R] [Algebra.FormallyUnramified P R] |
| 18 | |
| 19 | /-- The ideal of differences of two maps from an unramified algebra is |
| 20 | generated by one idempotent: their equalizer is open and closed. -/ |
| 21 | theorem unramified_differenceIdeal_idempotent (f g : R →ₐ[P] S) : |
| 22 | ∃ e : S, IsIdempotentElem e ∧ |
| 23 | Ideal.span (Set.range (fun x : R => g x - f x)) = Ideal.span {e} := by |
| 24 | let ψ : R ⊗[P] R →ₐ[P] S := |
| 25 | Algebra.TensorProduct.lift f g (fun _ _ => Commute.all _ _) |
| 26 | have hmap : (KaehlerDifferential.ideal P R).map ψ.toRingHom = |
| 27 | Ideal.span (Set.range (fun x : R => g x - f x)) := by |
| 28 | rw [← KaehlerDifferential.span_range_eq_ideal, Ideal.map_span, ← Set.range_comp] |
| 29 | congr 1 |
| 30 | funext x |
| 31 | simp [ψ, Function.comp_def] |
| 32 | obtain ⟨e, he, hsp⟩ : ∃ e : R ⊗[P] R, IsIdempotentElem e ∧ |
| 33 | KaehlerDifferential.ideal P R = Ideal.span {e} := |
| 34 | (Ideal.isIdempotentElem_iff_of_fg _ (KaehlerDifferential.ideal_fg P R)).mp |
| 35 | ((Ideal.cotangent_subsingleton_iff _).mp |
| 36 | (inferInstanceAs (Subsingleton (KaehlerDifferential P R)))) |
| 37 | refine ⟨ψ e, ?_, ?_⟩ |
| 38 | · change ψ e * ψ e = ψ e |
| 39 | rw [← map_mul, he.eq] |
| 40 | · rw [hsp, Ideal.map_span, Set.image_singleton] at hmap |
| 41 | exact hmap.symm |
| 42 | |
| 43 | /-- If the two maps agree at a prime, a single element outside that prime |
| 44 | annihilates all their differences. This constructs an open equalizer neighborhood. -/ |
| 45 | theorem unramified_equalizer_neighborhood (f g : R →ₐ[P] S) |
| 46 | (q : Ideal S) [q.IsPrime] (hq : ∀ x : R, g x - f x ∈ q) : |
| 47 | ∃ s : S, s ∉ q ∧ ∀ x : R, s * (g x - f x) = 0 := by |
| 48 | obtain ⟨e, he, hsp⟩ := unramified_differenceIdeal_idempotent f g |
| 49 | have heq : e ∈ q := by |
| 50 | have hle : Ideal.span (Set.range (fun x : R => g x - f x)) ≤ q := |
| 51 | Ideal.span_le.mpr (by rintro _ ⟨x, rfl⟩; exact hq x) |
| 52 | rw [hsp] at hle |
| 53 | exact hle (Ideal.mem_span_singleton_self e) |
| 54 | refine ⟨1 - e, ?_, ?_⟩ |
| 55 | · intro hs |
| 56 | have h := q.add_mem hs heq |
| 57 | rw [sub_add_cancel] at h |
| 58 | have hprime : q.IsPrime := inferInstance |
| 59 | exact hprime.ne_top (Ideal.eq_top_of_isUnit_mem q h isUnit_one) |
| 60 | · intro x |
| 61 | have hx : g x - f x ∈ Ideal.span {e} := by |
| 62 | rw [← hsp] |
| 63 | exact Ideal.subset_span (Set.mem_range_self x) |
| 64 | obtain ⟨a, ha⟩ := Ideal.mem_span_singleton.mp hx |
| 65 | rw [ha, ← mul_assoc, he.one_sub_mul_self, zero_mul] |
| 66 | |
| 67 | end |
| 68 | |
| 69 | /-! Selecting the equalizer branch modulo an ideal on an actual principal open. -/ |
| 70 | |
| 71 | variable {P R S : Type*} [CommRing P] [CommRing R] [CommRing S] |
| 72 | [Algebra P R] [Algebra.EssFiniteType P R] [Algebra.FormallyUnramified P R] |
| 73 | |
| 74 | /-- Agreement on the coordinate algebra modulo `I`, and at the selected point |
| 75 | on the whole algebra, extends to agreement modulo `I` on a principal neighborhood. -/ |
| 76 | theorem unramified_congruence_neighborhood (f g : R →+* S) (I q : Ideal S) |
| 77 | [q.IsPrime] (hIq : I ≤ q) |
| 78 | (hbase : ∀ p : P, g (algebraMap P R p) - f (algebraMap P R p) ∈ I) |
| 79 | (hq : ∀ x : R, g x - f x ∈ q) : |
| 80 | ∃ s : S, s ∉ q ∧ ∀ x : R, s * (g x - f x) ∈ I := by |
| 81 | let Q : S →+* S ⧸ I := Ideal.Quotient.mk I |
| 82 | let : Algebra P (S ⧸ I) := ((Q.comp f).comp (algebraMap P R)).toAlgebra |
| 83 | let fP : R →ₐ[P] S ⧸ I := { Q.comp f with commutes' := fun _ => rfl } |
| 84 | let gP : R →ₐ[P] S ⧸ I := |
| 85 | { Q.comp g with commutes' := fun p => Ideal.Quotient.eq.mpr (hbase p) } |
| 86 | let qbar : Ideal (S ⧸ I) := q.map Q |
| 87 | let : qbar.IsPrime := Ideal.isPrime_map_quotientMk_of_isPrime hIq |
| 88 | have hqbar : ∀ x : R, gP x - fP x ∈ qbar := by |
| 89 | intro x |
| 90 | change Q (g x) - Q (f x) ∈ q.map Q |
| 91 | rw [← map_sub] |
| 92 | exact Ideal.mem_map_of_mem Q (hq x) |
| 93 | obtain ⟨sbar, hsbar, hzero⟩ := unramified_equalizer_neighborhood fP gP qbar hqbar |
| 94 | obtain ⟨s, rfl⟩ := Ideal.Quotient.mk_surjective sbar |
| 95 | refine ⟨s, ?_, ?_⟩ |
| 96 | · intro hs |
| 97 | exact hsbar (Ideal.mem_map_of_mem Q hs) |
| 98 | · intro x |
| 99 | apply Ideal.Quotient.eq_zero_iff_mem.mp |
| 100 | rw [map_mul, map_sub] |
| 101 | exact hzero x |
| 102 | |
| 103 | /-- The constructed principal localization has the required congruence for |
| 104 | every section, not only for the coordinate generators. -/ |
| 105 | theorem unramified_congruence_principal_open (f g : R →+* S) (I q : Ideal S) |
| 106 | [q.IsPrime] (hIq : I ≤ q) |
| 107 | (hbase : ∀ p : P, g (algebraMap P R p) - f (algebraMap P R p) ∈ I) |
| 108 | (hq : ∀ x : R, g x - f x ∈ q) : |
| 109 | ∃ s : S, s ∉ q ∧ ∀ x : R, |
| 110 | algebraMap S (Localization.Away s) (g x - f x) ∈ |
| 111 | I.map (algebraMap S (Localization.Away s)) := by |
| 112 | obtain ⟨s, hs, hann⟩ := unramified_congruence_neighborhood f g I q hIq hbase hq |
| 113 | refine ⟨s, hs, ?_⟩ |
| 114 | intro x |
| 115 | have h := Ideal.mem_map_of_mem (algebraMap S (Localization.Away s)) (hann x) |
| 116 | rw [map_mul] at h |
| 117 | exact (Ideal.unit_mul_mem_iff_mem _ (IsLocalization.Away.algebraMap_isUnit s)).mp h |
| 118 | |
| 119 | end |
| 120 | |
| 121 | end OAI.AlgebraicGeometry.Resolution.Blowups.UnramifiedCongruenceNeighborhood.Construction |