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 (c) 2026 Chris Birkbeck. All rights reserved. |
| 3 | Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | Authors: Chris Birkbeck |
| 5 | This file has been modified. |
| 6 | -/ |
| 7 | import Mathlib.RingTheory.GradedAlgebra.HomogeneousLocalization |
| 8 | |
| 9 | /-! # Away Congr -/ |
| 10 | |
| 11 | namespace OAI.AlgebraicGeometry.SheafCohomology.Projective.AwayCongr |
| 12 | |
| 13 | /-! |
| 14 | # Transport of homogeneous localizations along element equalities |
| 15 | |
| 16 | `HomogeneousLocalization.Away 𝒜 s` depends on the element `s`; propositional |
| 17 | equalities `s = t` therefore change the type. This file provides the transport |
| 18 | ring isomorphism together with a `subst`-derived API on `Away.mk` normal forms and |
| 19 | naturality against `Away.map`, so that downstream proofs never juggle `eqToHom`s. |
| 20 | |
| 21 | AINTLIB Hodge.Projective (T-A5a-iso); upstream candidate. |
| 22 | -/ |
| 23 | |
| 24 | open _root_.HomogeneousLocalization |
| 25 | |
| 26 | variable {ι R A : Type*} [AddCommMonoid ι] [DecidableEq ι] |
| 27 | [CommRing R] [CommRing A] [Algebra R A] |
| 28 | {𝒜 : ι → Submodule R A} [GradedAlgebra 𝒜] |
| 29 | |
| 30 | /-- Transport an `Away` ring along an equality of localization elements. -/ |
| 31 | noncomputable def awayCongr {s t : A} (h : s = t) : Away 𝒜 s ≃+* Away 𝒜 t := by |
| 32 | subst h |
| 33 | exact RingEquiv.refl _ |
| 34 | |
| 35 | @[simp] |
| 36 | lemma awayCongr_rfl {s : A} : |
| 37 | (awayCongr (rfl : s = s) : Away 𝒜 s ≃+* Away 𝒜 s) = RingEquiv.refl _ := |
| 38 | rfl |
| 39 | |
| 40 | lemma awayCongr_mk {s t : A} (h : s = t) {i : ι} (hs : s ∈ 𝒜 i) (n : ℕ) (a : A) |
| 41 | (ha : a ∈ 𝒜 (n • i)) : |
| 42 | awayCongr (𝒜 := 𝒜) h (Away.mk 𝒜 hs n a ha) = |
| 43 | Away.mk 𝒜 (h ▸ hs) n a ha := by |
| 44 | subst h |
| 45 | rfl |
| 46 | |
| 47 | variable {σ B S : Type*} [CommRing S] [CommRing B] [Algebra S B] |
| 48 | {ℬ : ι → Submodule S B} [GradedAlgebra ℬ] |
| 49 | |
| 50 | /-- `awayCongr` is natural against the graded `Away.map`. -/ |
| 51 | lemma awayCongr_map {s t : A} (h : s = t) (g : GradedRingHom 𝒜 ℬ) (x : Away 𝒜 s) : |
| 52 | Away.map g t (awayCongr (𝒜 := 𝒜) h x) = |
| 53 | awayCongr (𝒜 := ℬ) (congrArg g h) |
| 54 | (Away.map g s x) := by |
| 55 | subst h |
| 56 | rfl |
| 57 | |
| 58 | lemma awayCongr_trans {s t u : A} (h₁ : s = t) (h₂ : t = u) (x : Away 𝒜 s) : |
| 59 | awayCongr (𝒜 := 𝒜) h₂ (awayCongr (𝒜 := 𝒜) h₁ x) = |
| 60 | awayCongr (𝒜 := 𝒜) (h₁.trans h₂) x := by |
| 61 | subst h₁; subst h₂; rfl |
| 62 | |
| 63 | lemma awayCongr_self {s : A} (h : s = s) (x : Away 𝒜 s) : |
| 64 | awayCongr (𝒜 := 𝒜) h x = x := by |
| 65 | rw [Subsingleton.elim h rfl] |
| 66 | rfl |
| 67 | |
| 68 | /-- `Away.map` only depends on the graded hom up to propositional equality, through |
| 69 | the transport. -/ |
| 70 | lemma awayMap_congr {g₁ g₂ : GradedRingHom 𝒜 ℬ} (h : g₁ = g₂) (s : A) (x : Away 𝒜 s) : |
| 71 | Away.map g₂ s x = |
| 72 | awayCongr (𝒜 := ℬ) (congrArg (fun g : GradedRingHom 𝒜 ℬ => g s) h) |
| 73 | (Away.map g₁ s x) := by |
| 74 | subst h |
| 75 | exact (awayCongr_self _ _).symm |
| 76 | |
| 77 | set_option backward.isDefEq.respectTransparency.types false in |
| 78 | /-- The graded `Away.map` commutes with the degree-zero inclusion `fromZeroRingHom`: |
| 79 | `Away.map g s` sends `a/1` (for `a: 𝒜 0`) to `(g a)/1` in `Away ℬ (g s)`. This is the |
| 80 | ring-hom heart of the naturality of `Proj.toSpecZero` under `Proj.map` — when `g` fixes the |
| 81 | degree-zero part it exhibits `Proj.map g` as a morphism over `Spec (𝒜 0)`. -/ |
| 82 | lemma awayMap_fromZeroRingHom (g : GradedRingHom 𝒜 ℬ) (s : A) (a : 𝒜 0) : |
| 83 | Away.map g s |
| 84 | (fromZeroRingHom 𝒜 (Submonoid.powers s) a) = |
| 85 | fromZeroRingHom ℬ (Submonoid.powers (g s)) |
| 86 | ⟨g a, g.map_mem a.2⟩ := by |
| 87 | ext |
| 88 | simp only [fromZeroRingHom, RingHom.coe_mk, MonoidHom.coe_mk, |
| 89 | OneHom.coe_mk, Away.map, map_mk, val_mk] |
| 90 | congr 1 |
| 91 | exact Subtype.ext (by simp) |
| 92 | |
| 93 | variable {τ C T : Type*} [CommRing T] [CommRing C] [Algebra T C] |
| 94 | {𝒞 : ι → Submodule T C} [GradedAlgebra 𝒞] |
| 95 | |
| 96 | /-- Applied form of `Away.map_comp`. -/ |
| 97 | lemma awayMap_map (f : GradedRingHom 𝒜 ℬ) (g : GradedRingHom ℬ 𝒞) (s : A) |
| 98 | (x : Away 𝒜 s) : |
| 99 | Away.map g (f s) |
| 100 | (Away.map f s x) = |
| 101 | Away.map (g.comp f) s x := |
| 102 | (DFunLike.congr_fun (Away.map_comp f g s) x).symm |
| 103 | |
| 104 | variable {S' B' : Type*} [CommRing S'] [CommRing B'] [Algebra S' B'] |
| 105 | {ℬ' : ι → Submodule S' B'} [GradedAlgebra ℬ'] |
| 106 | |
| 107 | /-- Comparing the two ways around a commuting square of graded homs, with |
| 108 | transports along any equalities of the localization elements. -/ |
| 109 | lemma awayMap_square {f₁ : GradedRingHom 𝒜 ℬ} {g₁ : GradedRingHom ℬ 𝒞} |
| 110 | {f₂ : GradedRingHom 𝒜 ℬ'} {g₂ : GradedRingHom ℬ' 𝒞} |
| 111 | (hsq : g₁.comp f₁ = g₂.comp f₂) (s : A) (x : Away 𝒜 s) |
| 112 | {t : C} (h₁ : g₁ (f₁ s) = t) (h₂ : g₂ (f₂ s) = t) : |
| 113 | awayCongr (𝒜 := 𝒞) h₁ |
| 114 | (Away.map g₁ (f₁ s) |
| 115 | (Away.map f₁ s x)) = |
| 116 | awayCongr (𝒜 := 𝒞) h₂ |
| 117 | (Away.map g₂ (f₂ s) |
| 118 | (Away.map f₂ s x)) := by |
| 119 | rw [awayMap_map, awayMap_map, awayMap_congr hsq s x] |
| 120 | refine Eq.trans ?_ (awayCongr_trans (𝒜 := 𝒞) |
| 121 | (congrArg (fun g : GradedRingHom 𝒜 𝒞 => g s) hsq) h₂ |
| 122 | ((Away.map (g₁.comp f₁) s) x)).symm |
| 123 | exact congrArg (fun hh => awayCongr (𝒜 := 𝒞) hh |
| 124 | ((Away.map (g₁.comp f₁) s) x)) (Subsingleton.elim _ _) |
| 125 | |
| 126 | end OAI.AlgebraicGeometry.SheafCohomology.Projective.AwayCongr |