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.NumberTheory.NumberField.Basic |
| 2 | import Mathlib.RingTheory.Localization.Integer |
| 3 | import Mathlib.RingTheory.Localization.Away.Basic |
| 4 | import Mathlib.RingTheory.Extension.Presentation.Core |
| 5 | |
| 6 | /-! # Algebra -/ |
| 7 | |
| 8 | namespace OAI.ArithmeticGeometry.Models.Algebra.Constructions.Foundations |
| 9 | |
| 10 | /-! Algebraic foundations for Foundations. This file imports no graph statements. -/ |
| 11 | |
| 12 | open scoped _root_.NumberField nonZeroDivisors TensorProduct |
| 13 | |
| 14 | universe u v |
| 15 | |
| 16 | variable (K : Type u) [Field K] [NumberField K] |
| 17 | |
| 18 | /-- A nonzero natural denominator defines the canonical map into the number field. -/ |
| 19 | noncomputable def integersAwayToField (N : ℕ) (hN : N ≠ 0) : |
| 20 | Localization.Away (N : 𝓞 K) →+* K := |
| 21 | IsLocalization.Away.lift (N : 𝓞 K) |
| 22 | (show IsUnit (algebraMap (𝓞 K) K (N : 𝓞 K)) from |
| 23 | by simpa using (isUnit_iff_ne_zero.mpr (Nat.cast_ne_zero.mpr hN) : IsUnit (N : K))) |
| 24 | |
| 25 | @[simp] |
| 26 | theorem integersAwayToField_algebraMap (N : ℕ) (hN : N ≠ 0) (a : 𝓞 K) : |
| 27 | integersAwayToField K N hN (algebraMap (𝓞 K) (Localization.Away (N : 𝓞 K)) a) = |
| 28 | algebraMap (𝓞 K) K a := |
| 29 | IsLocalization.Away.lift_eq _ _ _ |
| 30 | |
| 31 | theorem integersAwayToField_comp (N : ℕ) (hN : N ≠ 0) : |
| 32 | (integersAwayToField K N hN).comp |
| 33 | (algebraMap (𝓞 K) (Localization.Away (N : 𝓞 K))) = |
| 34 | algebraMap (𝓞 K) K := by |
| 35 | ext a |
| 36 | exact integersAwayToField_algebraMap K N hN a |
| 37 | |
| 38 | /-- A common natural denominator can also contain prescribed prime factors. -/ |
| 39 | theorem exists_common_natural_denominator |
| 40 | {ι : Type v} [Finite ι] (x : ι → K) (N₀ : ℕ) (hN₀ : N₀ ≠ 0) : |
| 41 | ∃ N : ℕ, N ≠ 0 ∧ N₀ ∣ N ∧ |
| 42 | ∀ i, ∃ a : 𝓞 K, algebraMap (𝓞 K) K a = (N : K) * x i := by |
| 43 | obtain ⟨b, hb⟩ := IsLocalization.exist_integer_multiples_of_finite |
| 44 | (Algebra.algebraMapSubmonoid (𝓞 K) ℤ⁰) x |
| 45 | obtain ⟨m, hm, hmb⟩ := b.property |
| 46 | have hm0 : m ≠ 0 := mem_nonZeroDivisors_iff_ne_zero.mp hm |
| 47 | let N := N₀ * m.natAbs |
| 48 | have hN : N ≠ 0 := mul_ne_zero hN₀ (Int.natAbs_ne_zero.mpr hm0) |
| 49 | refine ⟨N, hN, dvd_mul_right N₀ m.natAbs, ?_⟩ |
| 50 | have hmN : m ∣ (N : ℤ) := Int.dvd_natCast.mpr (dvd_mul_left m.natAbs N₀) |
| 51 | obtain ⟨c, hc⟩ := hmN |
| 52 | intro i |
| 53 | obtain ⟨a, ha⟩ := hb i |
| 54 | refine ⟨(c : 𝓞 K) * a, ?_⟩ |
| 55 | have ha' : algebraMap (𝓞 K) K a = (m : K) * x i := by |
| 56 | simpa [Algebra.smul_def, ← hmb] using ha |
| 57 | have hc' : (N : K) = (m : K) * (c : K) := by |
| 58 | exact_mod_cast hc |
| 59 | simp only [map_mul, map_intCast, ha', hc'] |
| 60 | rw [← mul_assoc, mul_comm (c : K) (m : K)] |
| 61 | |
| 62 | /-- Every element with denominator `N` belongs to the canonical localization image. -/ |
| 63 | theorem mem_range_integersAwayToField |
| 64 | (N : ℕ) (hN : N ≠ 0) (x : K) |
| 65 | (hx : ∃ a : 𝓞 K, algebraMap (𝓞 K) K a = (N : K) * x) : |
| 66 | x ∈ (integersAwayToField K N hN).range := by |
| 67 | obtain ⟨a, ha⟩ := hx |
| 68 | let L := Localization.Away (N : 𝓞 K) |
| 69 | let j := integersAwayToField K N hN |
| 70 | let z : L := IsLocalization.Away.invSelf (N : 𝓞 K) |
| 71 | have hz : (N : K) * j z = 1 := by |
| 72 | have H := congrArg j (IsLocalization.Away.mul_invSelf (S := L) (N : 𝓞 K)) |
| 73 | simpa [j] using H |
| 74 | refine ⟨algebraMap (𝓞 K) L a * z, ?_⟩ |
| 75 | change j (algebraMap (𝓞 K) L a * z) = x |
| 76 | rw [map_mul, integersAwayToField_algebraMap, ha] |
| 77 | calc |
| 78 | (N : K) * x * j z = x * ((N : K) * j z) := by ac_rfl |
| 79 | _ = x := by rw [hz, mul_one] |
| 80 | |
| 81 | /-- A finite family of coefficients is contained in one localization of the integers. -/ |
| 82 | theorem finite_coefficients_in_localized_integers |
| 83 | {ι : Type v} [Finite ι] (x : ι → K) (N₀ : ℕ) (hN₀ : N₀ ≠ 0) : |
| 84 | ∃ (N : ℕ) (hN : N ≠ 0), N₀ ∣ N ∧ |
| 85 | ∀ i, x i ∈ (integersAwayToField K N hN).range := by |
| 86 | obtain ⟨N, hN, hd, h⟩ := exists_common_natural_denominator K x N₀ hN₀ |
| 87 | exact ⟨N, hN, hd, fun i ↦ mem_range_integersAwayToField K N hN (x i) (h i)⟩ |
| 88 | |
| 89 | /-- A finitely presented algebra over a number field has an integral model, |
| 90 | with the base-change isomorphism included in the conclusion. -/ |
| 91 | theorem finitely_presented_algebra_has_integral_model |
| 92 | (A : Type v) [CommRing A] [Algebra K A] [Algebra.FinitePresentation K A] |
| 93 | (N₀ : ℕ) (hN₀ : N₀ ≠ 0) : |
| 94 | ∃ (N : ℕ) (hN : N ≠ 0), N₀ ∣ N ∧ |
| 95 | let L := Localization.Away (N : 𝓞 K) |
| 96 | letI : Algebra L K := (integersAwayToField K N hN).toAlgebra |
| 97 | ∃ (A₀ : Type u) (_ : CommRing A₀) (_ : Algebra L A₀), |
| 98 | Algebra.FinitePresentation L A₀ ∧ Nonempty (K ⊗[L] A₀ ≃ₐ[K] A) := by |
| 99 | classical |
| 100 | let P := Algebra.Presentation.ofFinitePresentation K A |
| 101 | let : Finite P.coeffs := P.finite_coeffs.to_subtype |
| 102 | obtain ⟨N, hN, hd, hcoeff⟩ := finite_coefficients_in_localized_integers K |
| 103 | (fun c : P.coeffs ↦ (c : K)) N₀ hN₀ |
| 104 | refine ⟨N, hN, hd, ?_⟩ |
| 105 | let L := Localization.Away (N : 𝓞 K) |
| 106 | let : Algebra L K := (integersAwayToField K N hN).toAlgebra |
| 107 | let : Algebra L A := ((algebraMap K A).comp (integersAwayToField K N hN)).toAlgebra |
| 108 | let : IsScalarTower L K A := IsScalarTower.of_algebraMap_eq' rfl |
| 109 | let : P.HasCoeffs L := ⟨fun c hc ↦ hcoeff ⟨c, hc⟩⟩ |
| 110 | exact ⟨P.ModelOfHasCoeffs L, inferInstance, inferInstance, inferInstance, |
| 111 | ⟨P.tensorModelOfHasCoeffsEquiv L⟩⟩ |
| 112 | |
| 113 | end OAI.ArithmeticGeometry.Models.Algebra.Constructions.Foundations |