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 | Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | This file has been modified. |
| 5 | -/ |
| 6 | import Mathlib.AlgebraicGeometry.Morphisms.Immersion |
| 7 | import OAI.AlgebraicGeometry.Stratification.AnalytificationIs |
| 8 | |
| 9 | /-! # Source Open -/ |
| 10 | |
| 11 | namespace OAI.AlgebraicGeometry.ClosedImmersion.SourceOpen |
| 12 | |
| 13 | noncomputable section |
| 14 | |
| 15 | open _root_.AlgebraicGeometry |
| 16 | |
| 17 | /-! |
| 18 | # Restricting the source of a closed immersion without losing closedness |
| 19 | |
| 20 | For a closed immersion `i: Y ⟶ X` and an open `A ⊆ Y`, delete `i(Y \ A)` |
| 21 | from the target. The map from `A` into this target open is closed, and its |
| 22 | image is exactly the restriction of the original image. This allows a smooth |
| 23 | source of varying local dimensions to be treated on fixed-dimensional opens. |
| 24 | -/ |
| 25 | |
| 26 | open _root_.CategoryTheory _root_.Topology _root_.TopologicalSpace |
| 27 | |
| 28 | variable {X Y : Scheme} (i : Y ⟶ X) [IsClosedImmersion i] (A : Y.Opens) |
| 29 | |
| 30 | /-- Let `i: Y → X` be a closed immersion of schemes and `A ⊆ Y` open. This is the open subset `X \ |
| 31 | i(Y \ A)`. Its inverse image in `Y` is `A`, and the image of `A` is closed in this open subset. -/ |
| 32 | def closedImmersionSourceOpenTarget : X.Opens := |
| 33 | ⟨(i '' (A : Set Y)ᶜ)ᶜ, (i.isClosedEmbedding.isClosedMap _ A.isOpen.isClosed_compl).isOpen_compl⟩ |
| 34 | |
| 35 | theorem closedImmersionSourceOpenTarget_preimage : |
| 36 | i ⁻¹' (closedImmersionSourceOpenTarget i A : Set X) = (A : Set Y) := by |
| 37 | change i ⁻¹' (i '' (A : Set Y)ᶜ)ᶜ = (A : Set Y) |
| 38 | rw [Set.preimage_compl, Set.preimage_image_eq _ i.isClosedEmbedding.injective, |
| 39 | compl_compl] |
| 40 | |
| 41 | /-- Let `i: Y → X` be a closed immersion of schemes and `A ⊆ Y` open. This is the restricted |
| 42 | morphism `A → X \ i(Y \ A)`, obtained by factoring the inclusion of `A` followed by `i` through |
| 43 | that open subscheme of `X`. -/ |
| 44 | def closedImmersionSourceOpenLift : (A : Scheme) ⟶ (closedImmersionSourceOpenTarget i A : Scheme) := |
| 45 | IsOpenImmersion.lift (closedImmersionSourceOpenTarget i A).ι (A.ι ≫ i) (by |
| 46 | rw [Scheme.Opens.range_ι] |
| 47 | rintro _ ⟨a, rfl⟩ |
| 48 | change a.1 ∈ i ⁻¹' (closedImmersionSourceOpenTarget i A : Set X) |
| 49 | rw [closedImmersionSourceOpenTarget_preimage] |
| 50 | exact a.2) |
| 51 | |
| 52 | @[reassoc (attr := simp)] |
| 53 | theorem closedImmersionSourceOpenLift_ι : |
| 54 | closedImmersionSourceOpenLift i A ≫ (closedImmersionSourceOpenTarget i A).ι = A.ι ≫ i := |
| 55 | IsOpenImmersion.lift_fac _ _ _ |
| 56 | |
| 57 | /-- In the target open, the restricted image is the original closed support. -/ |
| 58 | theorem range_closedImmersionSourceOpenLift : |
| 59 | Set.range (closedImmersionSourceOpenLift i A) = |
| 60 | (closedImmersionSourceOpenTarget i A).ι ⁻¹' Set.range i := by |
| 61 | have hf (a : A) : |
| 62 | (closedImmersionSourceOpenTarget i A).ι (closedImmersionSourceOpenLift i A a) = i a.1 := |
| 63 | congrArg (fun f => f a) (closedImmersionSourceOpenLift_ι i A) |
| 64 | ext y |
| 65 | constructor |
| 66 | · rintro ⟨a, rfl⟩ |
| 67 | exact ⟨a.1, (hf a).symm⟩ |
| 68 | · rintro ⟨a, ha⟩ |
| 69 | have haA : a ∈ A := by |
| 70 | change a ∈ (A : Set Y) |
| 71 | rw [← closedImmersionSourceOpenTarget_preimage i A] |
| 72 | change i a ∈ (closedImmersionSourceOpenTarget i A : Set X) |
| 73 | exact ha ▸ y.2 |
| 74 | refine ⟨⟨a, haA⟩, (closedImmersionSourceOpenTarget i A).ι.isOpenEmbedding.injective ?_⟩ |
| 75 | exact (hf ⟨a, haA⟩).trans ha |
| 76 | |
| 77 | /-- Restricting the source in this way produces a closed immersion. -/ |
| 78 | instance closedImmersionSourceOpenLift_isClosedImmersion : |
| 79 | IsClosedImmersion (closedImmersionSourceOpenLift i A) := by |
| 80 | have : IsPreimmersion (closedImmersionSourceOpenLift i A ≫ |
| 81 | (closedImmersionSourceOpenTarget i A).ι) := by |
| 82 | rw [closedImmersionSourceOpenLift_ι] |
| 83 | infer_instance |
| 84 | let : IsPreimmersion (closedImmersionSourceOpenLift i A) := |
| 85 | .of_comp (closedImmersionSourceOpenLift i A) (closedImmersionSourceOpenTarget i A).ι |
| 86 | apply IsClosedImmersion.of_isPreimmersion |
| 87 | rw [range_closedImmersionSourceOpenLift] |
| 88 | exact i.isClosedEmbedding.isClosed_range.preimage |
| 89 | (closedImmersionSourceOpenTarget i A).ι.continuous |
| 90 | |
| 91 | end |
| 92 | |
| 93 | end OAI.AlgebraicGeometry.ClosedImmersion.SourceOpen |