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.CategoryTheory.EquivalenceRelation |
| 2 | import Mathlib.AlgebraicGeometry.PullbackCarrier |
| 3 | import Mathlib.AlgebraicGeometry.Fiber |
| 4 | import Mathlib.AlgebraicGeometry.Morphisms.Proper |
| 5 | import Mathlib.AlgebraicGeometry.Morphisms.QuasiFinite |
| 6 | |
| 7 | /-! # Invariant -/ |
| 8 | |
| 9 | namespace OAI.AlgebraicGeometry.Quotients.FiniteDescent.Invariant.Construction.InvariantCore |
| 10 | |
| 11 | /-! |
| 12 | # Invariant cores of open subsets |
| 13 | |
| 14 | For a finite equivalence relation, removing every orbit meeting the complement |
| 15 | of an open gives its largest invariant open subset. The relation on underlying |
| 16 | points is established using actual scheme pullbacks. |
| 17 | -/ |
| 18 | |
| 19 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.AlgebraicGeometry |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | variable {R X : Scheme.{u}} (s t : R ⟶ X) |
| 24 | |
| 25 | /-- Two points are related when a point of the relation maps to them. -/ |
| 26 | def Related (x y : X) : Prop := ∃ r : R, s r = x ∧ t r = y |
| 27 | |
| 28 | variable {s t} (e : CategoryTheory.EquivalenceRelation s t) |
| 29 | |
| 30 | include e in |
| 31 | theorem related_refl (x : X) : Related s t x x := by |
| 32 | exact ⟨e.r x, congrArg (fun f => f x) e.reflexivity₁, |
| 33 | congrArg (fun f => f x) e.reflexivity₂⟩ |
| 34 | |
| 35 | include e in |
| 36 | theorem related_symm {x y : X} (h : Related s t x y) : Related s t y x := by |
| 37 | obtain ⟨r, hs, ht⟩ := h |
| 38 | refine ⟨e.s r, ?_, ?_⟩ |
| 39 | · simpa only [← Scheme.Hom.comp_apply, e.symmetry₁] using ht |
| 40 | · simpa only [← Scheme.Hom.comp_apply, e.symmetry₂] using hs |
| 41 | |
| 42 | include e in |
| 43 | theorem related_trans {x y z : X} (hxy : Related s t x y) (hyz : Related s t y z) : |
| 44 | Related s t x z := by |
| 45 | obtain ⟨r, hr, hr'⟩ := hxy |
| 46 | obtain ⟨r', hr'', hr'''⟩ := hyz |
| 47 | have hc : IsPullback e.c.fst e.c.snd t s := IsPullback.of_isLimit e.isLimit |
| 48 | obtain ⟨a, ha, ha'⟩ := Scheme.exists_preimage_of_isPullback hc r r' (hr'.trans hr''.symm) |
| 49 | refine ⟨e.t a, ?_, ?_⟩ |
| 50 | · exact (congrArg (fun f => f a) e.transitivity₁).trans ((congrArg s ha).trans hr) |
| 51 | · exact (congrArg (fun f => f a) e.transitivity₂).trans ((congrArg t ha').trans hr''') |
| 52 | |
| 53 | variable (s t) [IsFinite s] |
| 54 | |
| 55 | /-- Every orbit of a finite relation is finite. -/ |
| 56 | theorem finite_orbit (x : X) : {y : X | Related s t x y}.Finite := by |
| 57 | simpa only [Related, Set.mem_preimage, Set.mem_singleton_iff, Set.image, Set.ofPred_mem_eq] |
| 58 | using (s.finite_preimage_singleton x).image t |
| 59 | |
| 60 | /-- The largest invariant open inside an open set: remove all points related |
| 61 | to a point outside that open. -/ |
| 62 | def core (U : X.Opens) : X.Opens := |
| 63 | ⟨(s '' (t ⁻¹' (U : Set X)ᶜ))ᶜ, |
| 64 | (s.isClosedMap _ (U.isOpen.isClosed_compl.preimage t.continuous)).isOpen_compl⟩ |
| 65 | |
| 66 | theorem mem_core (U : X.Opens) (x : X) : |
| 67 | x ∈ core s t U ↔ ∀ y, Related s t x y → y ∈ U := by |
| 68 | constructor |
| 69 | · intro h y hy |
| 70 | obtain ⟨r, hr, hr'⟩ := hy |
| 71 | by_contra hn |
| 72 | exact h ⟨r, fun hrU => hn (hr' ▸ hrU), hr⟩ |
| 73 | · intro h hx |
| 74 | obtain ⟨r, hr, hr'⟩ := hx |
| 75 | exact hr (h (t r) ⟨r, hr', rfl⟩) |
| 76 | |
| 77 | include e in |
| 78 | theorem core_le (U : X.Opens) : core s t U ≤ U := fun x hx => |
| 79 | (mem_core s t U x).mp hx x (related_refl e x) |
| 80 | |
| 81 | include e in |
| 82 | theorem core_invariant (U : X.Opens) : s ⁻¹ᵁ core s t U = t ⁻¹ᵁ core s t U := by |
| 83 | ext r |
| 84 | change s r ∈ core s t U ↔ t r ∈ core s t U |
| 85 | rw [mem_core, mem_core] |
| 86 | have hst : Related s t (s r) (t r) := ⟨r, rfl, rfl⟩ |
| 87 | exact ⟨fun h y hy => h y (related_trans e hst hy), |
| 88 | fun h y hy => h y (related_trans e (related_symm e hst) hy)⟩ |
| 89 | |
| 90 | /-- Every invariant open contained in `U` is contained in its invariant core. -/ |
| 91 | theorem le_core (U V : X.Opens) (hV : s ⁻¹ᵁ V = t ⁻¹ᵁ V) (hVU : V ≤ U) : |
| 92 | V ≤ core s t U := by |
| 93 | intro x hx |
| 94 | apply (mem_core s t U x).mpr |
| 95 | intro y hy |
| 96 | obtain ⟨r, hr, hr'⟩ := hy |
| 97 | have h : r ∈ s ⁻¹ᵁ V := by simpa only [Scheme.Hom.mem_preimage, hr] using hx |
| 98 | rw [hV] at h |
| 99 | exact hVU (by simpa only [Scheme.Hom.mem_preimage, hr'] using h) |
| 100 | |
| 101 | include e in |
| 102 | /-- An orbit contained in an open neighborhood remains in its invariant |
| 103 | core; taking the core loses no point of that orbit. -/ |
| 104 | theorem orbit_subset_core (U : X.Opens) (x : X) |
| 105 | (hU : ∀ y, Related s t x y → y ∈ U) : |
| 106 | ∀ y, Related s t x y → y ∈ core s t U := by |
| 107 | intro y hxy |
| 108 | exact (mem_core s t U y).mpr fun z hyz => hU z (related_trans e hxy hyz) |
| 109 | |
| 110 | end OAI.AlgebraicGeometry.Quotients.FiniteDescent.Invariant.Construction.InvariantCore |