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 | /- |
| 2 | Copyright 2026 The Formal Conjectures Authors. |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | This file has been modified. |
| 16 | -/ |
| 17 | import OAI.AlgebraicGeometry.ComplexPoint.AffineScheme |
| 18 | import Mathlib.Topology.IsLocalHomeomorph |
| 19 | |
| 20 | /-! # Localization -/ |
| 21 | |
| 22 | namespace OAI.AlgebraicGeometry.ComplexPoint.Localization.ComplexAlgHom |
| 23 | |
| 24 | noncomputable section |
| 25 | |
| 26 | /-! |
| 27 | # Complex points of a localization |
| 28 | |
| 29 | Complex algebra homomorphisms from `S[1/f]` are canonically homeomorphic to the open subspace of |
| 30 | complex algebra homomorphisms from `S` at which `f` is nonzero. The forward map is restriction. |
| 31 | Continuity of the extension map follows by representing a localized element as a quotient whose |
| 32 | denominator is a power of `f`. |
| 33 | |
| 34 | Nothing here mentions a complex point of a scheme, so it lives in namespace |
| 35 | `AlgebraicGeometry.ComplexAlgHom`: the algebraic model of the complex points of an affine scheme, |
| 36 | as the space of `ℂ`-algebra homomorphisms out of its ring of sections. |
| 37 | -/ |
| 38 | |
| 39 | open scoped _root_.Topology |
| 40 | |
| 41 | open _root_.Topology |
| 42 | |
| 43 | open ComplexPoint OAI.AlgebraicGeometry.ComplexPoint.Basic.Point |
| 44 | |
| 45 | variable {A B : Type} [CommRing A] [CommRing B] [Algebra ℂ A] [Algebra ℂ B] |
| 46 | |
| 47 | /-- Precomposition by a complex algebra equivalence, as an equivalence of complex-valued algebra |
| 48 | homomorphisms. -/ |
| 49 | def precompAlgEquiv (e : A ≃ₐ[ℂ] B) : (B →ₐ[ℂ] ℂ) ≃ (A →ₐ[ℂ] ℂ) := |
| 50 | AlgEquiv.arrowCongr e.symm (AlgEquiv.refl : ℂ ≃ₐ[ℂ] ℂ) |
| 51 | |
| 52 | lemma continuous_precompAlgEquiv (e : A ≃ₐ[ℂ] B) : |
| 53 | Continuous (precompAlgEquiv e) := by |
| 54 | rw [continuous_induced_rng] |
| 55 | exact continuous_pi fun a ↦ Basic.ComplexSchemePoint.continuous_affineAlgebraHom_apply B (e a) |
| 56 | |
| 57 | lemma continuous_precompAlgEquiv_symm (e : A ≃ₐ[ℂ] B) : |
| 58 | Continuous (precompAlgEquiv e).symm := by |
| 59 | rw [continuous_induced_rng] |
| 60 | exact continuous_pi fun b ↦ Basic.ComplexSchemePoint.continuous_affineAlgebraHom_apply A (e.symm b) |
| 61 | |
| 62 | /-- Precomposition by a complex algebra equivalence is a homeomorphism for pointwise |
| 63 | convergence. -/ |
| 64 | def precompAlgEquivHomeomorph (e : A ≃ₐ[ℂ] B) : |
| 65 | (B →ₐ[ℂ] ℂ) ≃ₜ (A →ₐ[ℂ] ℂ) where |
| 66 | toEquiv := precompAlgEquiv e |
| 67 | continuous_toFun := continuous_precompAlgEquiv e |
| 68 | continuous_invFun := continuous_precompAlgEquiv_symm e |
| 69 | |
| 70 | variable (S : Type) [CommRing S] [Algebra ℂ S] |
| 71 | |
| 72 | /-- The open subspace of complex algebra homomorphisms at which `f` does not vanish. -/ |
| 73 | abbrev nonvanishingAlgHom (f : S) := {u : S →ₐ[ℂ] ℂ // u f ≠ 0} |
| 74 | |
| 75 | /-- Restriction of an algebra homomorphism from `S[1/f]` to `S`, bundled with its nonvanishing |
| 76 | property. -/ |
| 77 | def localizationAwayAlgHomRestriction (f : S) (u : Localization.Away f →ₐ[ℂ] ℂ) : |
| 78 | nonvanishingAlgHom S f := |
| 79 | ⟨u.comp (IsScalarTower.toAlgHom ℂ S (Localization.Away f)), |
| 80 | ((IsLocalization.Away.algebraMap_isUnit f).map u).ne_zero⟩ |
| 81 | |
| 82 | /-- Extension of an algebra homomorphism on which `f` is nonzero to `S[1/f]`. -/ |
| 83 | def nonvanishingAlgHomExtension (f : S) (u : nonvanishingAlgHom S f) : |
| 84 | Localization.Away f →ₐ[ℂ] ℂ := |
| 85 | IsLocalization.Away.liftAlgHom f (isUnit_iff_ne_zero.mpr u.2) |
| 86 | |
| 87 | @[simp] |
| 88 | lemma nonvanishingAlgHomExtension_algebraMap (f : S) (u : nonvanishingAlgHom S f) (s : S) : |
| 89 | nonvanishingAlgHomExtension S f u (algebraMap S (Localization.Away f) s) = u.1 s := by |
| 90 | exact IsLocalization.Away.lift_eq f (isUnit_iff_ne_zero.mpr u.2) s |
| 91 | |
| 92 | @[simp] |
| 93 | lemma localizationAwayAlgHomRestriction_apply (f : S) |
| 94 | (u : Localization.Away f →ₐ[ℂ] ℂ) (s : S) : |
| 95 | (localizationAwayAlgHomRestriction S f u).1 s = |
| 96 | u (algebraMap S (Localization.Away f) s) := |
| 97 | rfl |
| 98 | |
| 99 | /-- The algebraic equivalence between homomorphisms from `S[1/f]` and homomorphisms from `S` on |
| 100 | which `f` does not vanish. -/ |
| 101 | def localizationAwayAlgHomEquiv (f : S) : |
| 102 | (Localization.Away f →ₐ[ℂ] ℂ) ≃ nonvanishingAlgHom S f where |
| 103 | toFun := localizationAwayAlgHomRestriction S f |
| 104 | invFun := nonvanishingAlgHomExtension S f |
| 105 | left_inv u := by |
| 106 | apply AlgHom.coe_ringHom_injective |
| 107 | apply IsLocalization.ringHom_ext (.powers f) |
| 108 | refine DFunLike.ext _ _ fun s ↦ ?_ |
| 109 | change nonvanishingAlgHomExtension S f (localizationAwayAlgHomRestriction S f u) |
| 110 | (algebraMap S (Localization.Away f) s) = u (algebraMap S (Localization.Away f) s) |
| 111 | rw [nonvanishingAlgHomExtension_algebraMap, localizationAwayAlgHomRestriction_apply] |
| 112 | right_inv u := by |
| 113 | apply Subtype.ext |
| 114 | exact AlgHom.coe_ringHom_injective |
| 115 | (DFunLike.ext _ _ (nonvanishingAlgHomExtension_algebraMap S f u)) |
| 116 | |
| 117 | lemma continuous_localizationAwayAlgHomEquiv (f : S) : |
| 118 | Continuous (localizationAwayAlgHomEquiv S f) := by |
| 119 | apply Continuous.subtype_mk |
| 120 | rw [continuous_induced_rng] |
| 121 | exact continuous_pi fun s ↦ |
| 122 | Basic.ComplexSchemePoint.continuous_affineAlgebraHom_apply (Localization.Away f) (algebraMap S _ s) |
| 123 | |
| 124 | lemma localizationAwayAlgHomEquiv_symm_apply_eq_div (f : S) |
| 125 | (x : Localization.Away f) : |
| 126 | ∃ (n : ℕ) (a : S), ∀ u : nonvanishingAlgHom S f, |
| 127 | (localizationAwayAlgHomEquiv S f).symm u x = u.1 a / u.1 f ^ n := by |
| 128 | obtain ⟨n, a, hxa⟩ := IsLocalization.Away.surj f x |
| 129 | refine ⟨n, a, fun u ↦ ?_⟩ |
| 130 | have h := congrArg (nonvanishingAlgHomExtension S f u) hxa |
| 131 | change nonvanishingAlgHomExtension S f u x = u.1 a / u.1 f ^ n |
| 132 | apply (eq_div_iff (pow_ne_zero n u.2)).2 |
| 133 | simpa only [map_mul, map_pow, nonvanishingAlgHomExtension_algebraMap] using h |
| 134 | |
| 135 | lemma continuous_localizationAwayAlgHomEquiv_symm (f : S) : |
| 136 | Continuous (localizationAwayAlgHomEquiv S f).symm := by |
| 137 | rw [continuous_induced_rng] |
| 138 | refine continuous_pi fun x ↦ ?_ |
| 139 | obtain ⟨n, a, h⟩ := localizationAwayAlgHomEquiv_symm_apply_eq_div S f x |
| 140 | have ha : Continuous (fun u : nonvanishingAlgHom S f ↦ u.1 a) := |
| 141 | (Basic.ComplexSchemePoint.continuous_affineAlgebraHom_apply S a).comp continuous_subtype_val |
| 142 | have hf : Continuous (fun u : nonvanishingAlgHom S f ↦ u.1 f) := |
| 143 | (Basic.ComplexSchemePoint.continuous_affineAlgebraHom_apply S f).comp continuous_subtype_val |
| 144 | exact (ha.div (hf.pow n) fun u ↦ pow_ne_zero n u.2).congr fun u ↦ (h u).symm |
| 145 | |
| 146 | /-- Complex points of `S[1/f]` are homeomorphic to the nonvanishing locus of `f` in the complex |
| 147 | points of `S`. -/ |
| 148 | def localizationAwayAlgHomHomeomorph (f : S) : |
| 149 | (Localization.Away f →ₐ[ℂ] ℂ) ≃ₜ nonvanishingAlgHom S f where |
| 150 | toEquiv := localizationAwayAlgHomEquiv S f |
| 151 | continuous_toFun := continuous_localizationAwayAlgHomEquiv S f |
| 152 | continuous_invFun := continuous_localizationAwayAlgHomEquiv_symm S f |
| 153 | |
| 154 | /-- Restriction from complex points of `S[1/f]` to complex points of `S`, with the nonvanishing |
| 155 | witness forgotten. -/ |
| 156 | def localizationAwayAlgHomMap (f : S) : |
| 157 | (Localization.Away f →ₐ[ℂ] ℂ) → (S →ₐ[ℂ] ℂ) := |
| 158 | fun u ↦ (localizationAwayAlgHomRestriction S f u).1 |
| 159 | |
| 160 | lemma isOpen_nonvanishingAlgHom (f : S) : |
| 161 | IsOpen {u : S →ₐ[ℂ] ℂ | u f ≠ 0} := |
| 162 | isOpen_ne_fun (Basic.ComplexSchemePoint.continuous_affineAlgebraHom_apply S f) continuous_const |
| 163 | |
| 164 | /-- Restriction from `S[1/f]` identifies its complex points with an open subspace of the complex |
| 165 | points of `S`. -/ |
| 166 | lemma isOpenEmbedding_localizationAwayAlgHomMap (f : S) : |
| 167 | IsOpenEmbedding (localizationAwayAlgHomMap S f) := |
| 168 | (isOpen_nonvanishingAlgHom S f).isOpenEmbedding_subtypeVal.comp |
| 169 | (localizationAwayAlgHomHomeomorph S f).isOpenEmbedding |
| 170 | |
| 171 | end |
| 172 | |
| 173 | end OAI.AlgebraicGeometry.ComplexPoint.Localization.ComplexAlgHom |