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 OAI.NumberTheory.Quaternion.Arithmetic.LocalAdeles |
| 2 | |
| 3 | /-! # Approximation Topology -/ |
| 4 | |
| 5 | namespace OAI.NumberTheory.Quaternion.Arithmetic.ApproximationTopology |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | section |
| 10 | |
| 11 | /-! The basic open sets in which Arithmetic must produce rational points. |
| 12 | These results construct and describe the target sets. They do not assert |
| 13 | that rational points meet them. -/ |
| 14 | |
| 15 | open scoped Classical RestrictedProduct |
| 16 | open Filter |
| 17 | |
| 18 | variable {F : Type} [Field F] [NumberField F] {n : ℕ} |
| 19 | variable (G : ArithmeticGroups.Lattices.Algebraic.MatrixAlgebraicGroup F n) (S : Finset (LocalAdeles.Place F)) |
| 20 | |
| 21 | abbrev AwayPlace := {v : LocalAdeles.Place F // v ∉ S} |
| 22 | |
| 23 | /-- Prescribed local open conditions at finitely many places, and integral |
| 24 | matrix conditions at every remaining place outside S. -/ |
| 25 | def basicAdelicSet (T : Finset (AwayPlace S)) |
| 26 | (U : (v : AwayPlace S) → Set (LocalAdeles.LocalPoints G v.val)) : Set (LocalAdeles.AwayAdelicPoints G S) := |
| 27 | {a | (∀ v ∈ T, a v ∈ U v) ∧ |
| 28 | ∀ v, v ∉ T → a v ∈ LocalAdeles.integralLocalSubgroup G v.val} |
| 29 | |
| 30 | theorem basicAdelicSet_isOpen (T : Finset (AwayPlace S)) |
| 31 | (U : (v : AwayPlace S) → Set (LocalAdeles.LocalPoints G v.val)) |
| 32 | (hU : ∀ v ∈ T, IsOpen (U v)) : IsOpen (basicAdelicSet G S T U) := by |
| 33 | have hfinite : IsOpen {a : LocalAdeles.AwayAdelicPoints G S | ∀ v ∈ T, a v ∈ U v} := by |
| 34 | simp only [Set.ofPred_forall] |
| 35 | exact isOpen_biInter_finset fun v hv => |
| 36 | (hU v hv).preimage (LocalAdeles.awayAdelic_eval_continuous G S v) |
| 37 | have hrest : IsOpen {a : LocalAdeles.AwayAdelicPoints G S | |
| 38 | ∀ v, v ∉ T → a v ∈ LocalAdeles.integralLocalSubgroup G v.val} := |
| 39 | RestrictedProduct.isOpen_forall_imp_mem |
| 40 | (fun v : AwayPlace S => LocalAdeles.integralLocalSubgroup_isOpen G v.val) |
| 41 | exact hfinite.inter hrest |
| 42 | |
| 43 | /-- Extend any prescribed finite tuple by the identity at the other places. -/ |
| 44 | def finiteLocalTuple (T : Finset (AwayPlace S)) |
| 45 | (x : (v : AwayPlace S) → LocalAdeles.LocalPoints G v.val) : LocalAdeles.AwayAdelicPoints G S := |
| 46 | ⟨fun v => if v ∈ T then x v else 1, by |
| 47 | filter_upwards [T.finite_toSet.compl_mem_cofinite] with v hv |
| 48 | change v ∉ T at hv |
| 49 | change (if v ∈ T then x v else 1) ∈ LocalAdeles.integralLocalSubgroup G v.val |
| 50 | rw [ite_eq_right hv] |
| 51 | exact (LocalAdeles.integralLocalSubgroup G v.val).one_mem⟩ |
| 52 | |
| 53 | theorem basicAdelicSet_nonempty (T : Finset (AwayPlace S)) |
| 54 | (U : (v : AwayPlace S) → Set (LocalAdeles.LocalPoints G v.val)) |
| 55 | (hU : ∀ v ∈ T, (U v).Nonempty) : (basicAdelicSet G S T U).Nonempty := by |
| 56 | let x : (v : AwayPlace S) → LocalAdeles.LocalPoints G v.val := |
| 57 | fun v => if hv : v ∈ T then (hU v hv).choose else 1 |
| 58 | refine ⟨finiteLocalTuple G S T x, ?_, ?_⟩ |
| 59 | · intro v hv |
| 60 | change (if v ∈ T then x v else 1) ∈ U v |
| 61 | simpa only [ite_eq_left hv, x, dite_eq_left hv] using (hU v hv).choose_spec |
| 62 | · intro v hv |
| 63 | change (if v ∈ T then x v else 1) ∈ LocalAdeles.integralLocalSubgroup G v.val |
| 64 | simpa only [ite_eq_right hv] using (LocalAdeles.integralLocalSubgroup G v.val).one_mem |
| 65 | |
| 66 | theorem diagonal_mem_basicAdelicSet_iff (T : Finset (AwayPlace S)) |
| 67 | (U : (v : AwayPlace S) → Set (LocalAdeles.LocalPoints G v.val)) (g : G.RationalPoints) : |
| 68 | LocalAdeles.diagonalAway G S g ∈ basicAdelicSet G S T U ↔ |
| 69 | (∀ v ∈ T, LocalAdeles.diagonalLocal G v.val g ∈ U v) ∧ |
| 70 | ∀ v, v ∉ T → LocalAdeles.diagonalLocal G v.val g ∈ LocalAdeles.integralLocalSubgroup G v.val := Iff.rfl |
| 71 | |
| 72 | /-- The finite local conditions form a basis for the actual restricted-product |
| 73 | topology. This is the topological reduction needed before the arithmetic proof. -/ |
| 74 | theorem exists_basicAdelicSet_subset {V : Set (LocalAdeles.AwayAdelicPoints G S)} |
| 75 | (hV : IsOpen V) (a : LocalAdeles.AwayAdelicPoints G S) (ha : a ∈ V) : |
| 76 | ∃ (T : Finset (AwayPlace S)) |
| 77 | (U : (v : AwayPlace S) → Set (LocalAdeles.LocalPoints G v.val)), |
| 78 | (∀ v ∈ T, IsOpen (U v)) ∧ a ∈ basicAdelicSet G S T U ∧ |
| 79 | basicAdelicSet G S T U ⊆ V := by |
| 80 | let R := fun v : AwayPlace S => LocalAdeles.LocalPoints G v.val |
| 81 | let I := fun v : AwayPlace S => (LocalAdeles.integralLocalSubgroup G v.val : Set (R v)) |
| 82 | have hsupport : {v : AwayPlace S | a v ∉ I v}.Finite := |
| 83 | Filter.eventually_cofinite.mp a.property |
| 84 | let J := hsupport.toFinset |
| 85 | have hJ : ∀ v : AwayPlace S, v ∉ J → a v ∈ I v := by |
| 86 | intro v hv |
| 87 | simpa only [J, Set.Finite.mem_toFinset, Set.mem_ofPred_eq, not_not] using hv |
| 88 | have hc : cofinite ≤ Filter.principal (J : Set (AwayPlace S))ᶜ := |
| 89 | Filter.le_principal_iff.mpr J.finite_toSet.compl_mem_cofinite |
| 90 | let a₀ : Πʳ v, [R v, I v]_[Filter.principal (J : Set (AwayPlace S))ᶜ] := |
| 91 | ⟨a, fun v hv => hJ v hv⟩ |
| 92 | let inc := RestrictedProduct.inclusion R I hc |
| 93 | have hopen : IsOpen (inc ⁻¹' V) := |
| 94 | hV.preimage (RestrictedProduct.continuous_inclusion hc) |
| 95 | obtain ⟨W, hW, heq⟩ := |
| 96 | RestrictedProduct.isEmbedding_coe_of_principal.toIsInducing.isOpen_iff.mp hopen |
| 97 | have haW : (fun v => a v) ∈ W := by |
| 98 | change a₀ ∈ ((⇑) ⁻¹' W) |
| 99 | rw [heq] |
| 100 | exact ha |
| 101 | obtain ⟨T, U, hU, hsub⟩ := isOpen_pi_iff.mp hW _ haW |
| 102 | let U' : (v : AwayPlace S) → Set (LocalAdeles.LocalPoints G v.val) := fun v => |
| 103 | (if v ∈ T then U v else Set.univ) ∩ (if v ∈ J then Set.univ else I v) |
| 104 | refine ⟨J ∪ T, U', ?_, ?_, ?_⟩ |
| 105 | · intro v _ |
| 106 | apply IsOpen.inter |
| 107 | · by_cases hv : v ∈ T |
| 108 | · simpa only [ite_eq_left hv] using (hU v hv).1 |
| 109 | · simp only [ite_eq_right hv, isOpen_univ] |
| 110 | · by_cases hv : v ∈ J |
| 111 | · simp only [ite_eq_left hv, isOpen_univ] |
| 112 | · simpa only [ite_eq_right hv] using LocalAdeles.integralLocalSubgroup_isOpen G v.val |
| 113 | · constructor |
| 114 | · intro v _ |
| 115 | constructor |
| 116 | · by_cases hv : v ∈ T |
| 117 | · simpa only [ite_eq_left hv] using (hU v hv).2 |
| 118 | · simp only [ite_eq_right hv, Set.mem_univ] |
| 119 | · by_cases hv : v ∈ J |
| 120 | · simp only [ite_eq_left hv, Set.mem_univ] |
| 121 | · simpa only [ite_eq_right hv] using hJ v hv |
| 122 | · intro v hv |
| 123 | exact hJ v (fun h => hv (Finset.mem_union_left T h)) |
| 124 | · intro b hb |
| 125 | have hbI : ∀ v : AwayPlace S, v ∉ J → b v ∈ I v := by |
| 126 | intro v hv |
| 127 | by_cases hvT : v ∈ T |
| 128 | · have h := (hb.1 v (Finset.mem_union_right J hvT)).2 |
| 129 | simpa only [ite_eq_right hv] using h |
| 130 | · exact hb.2 v (by simp only [Finset.mem_union, not_or]; exact ⟨hv, hvT⟩) |
| 131 | let b₀ : Πʳ v, [R v, I v]_[Filter.principal (J : Set (AwayPlace S))ᶜ] := |
| 132 | ⟨b, fun v hv => hbI v hv⟩ |
| 133 | have hbW : (fun v => b v) ∈ W := by |
| 134 | apply hsub |
| 135 | intro v hv |
| 136 | change v ∈ T at hv |
| 137 | have h := (hb.1 v (Finset.mem_union_right J hv)).1 |
| 138 | simpa only [ite_eq_left hv] using h |
| 139 | have hb₀ : b₀ ∈ ((⇑) ⁻¹' W) := hbW |
| 140 | rw [heq] at hb₀ |
| 141 | exact hb₀ |
| 142 | |
| 143 | /-- Reformulate density as the simultaneous finite local approximation problem. |
| 144 | This equivalence proves neither side on its own. -/ |
| 145 | theorem denseRange_diagonalAway_iff : |
| 146 | DenseRange (LocalAdeles.diagonalAway G S) ↔ |
| 147 | ∀ (T : Finset (AwayPlace S)) |
| 148 | (U : (v : AwayPlace S) → Set (LocalAdeles.LocalPoints G v.val)), |
| 149 | (∀ v ∈ T, IsOpen (U v)) → (∀ v ∈ T, (U v).Nonempty) → |
| 150 | ∃ g : G.RationalPoints, LocalAdeles.diagonalAway G S g ∈ basicAdelicSet G S T U := by |
| 151 | constructor |
| 152 | · intro hd T U ho hn |
| 153 | exact hd.exists_mem_open (basicAdelicSet_isOpen G S T U ho) |
| 154 | (basicAdelicSet_nonempty G S T U hn) |
| 155 | · intro happ a |
| 156 | rw [mem_closure_iff] |
| 157 | intro V hV ha |
| 158 | obtain ⟨T, U, ho, haU, hsub⟩ := exists_basicAdelicSet_subset G S hV a ha |
| 159 | obtain ⟨g, hg⟩ := happ T U ho (fun v hv => ⟨a v, haU.1 v hv⟩) |
| 160 | exact ⟨LocalAdeles.diagonalAway G S g, hsub hg, Set.mem_range_self g⟩ |
| 161 | |
| 162 | end |
| 163 | |
| 164 | /-! A closed subgroup of the actual restricted product is the whole |
| 165 | group when it contains every single local factor. -/ |
| 166 | |
| 167 | open scoped Classical RestrictedProduct |
| 168 | open Set |
| 169 | |
| 170 | variable {F : Type} [Field F] [NumberField F] {n : ℕ} |
| 171 | (G : ArithmeticGroups.Lattices.Algebraic.MatrixAlgebraicGroup F n) (S : Finset (LocalAdeles.Place F)) |
| 172 | |
| 173 | def awayMulSingleHom (v : AwayPlace S) : LocalAdeles.LocalPoints G v.val →* LocalAdeles.AwayAdelicPoints G S where |
| 174 | toFun := RestrictedProduct.mulSingle (fun w : AwayPlace S => LocalAdeles.integralLocalSubgroup G w.val) v |
| 175 | map_one' := RestrictedProduct.mulSingle_one _ _ |
| 176 | map_mul' x y := by |
| 177 | apply RestrictedProduct.ext |
| 178 | intro w |
| 179 | exact congrFun (Pi.mulSingle_mul (f := fun w : AwayPlace S => LocalAdeles.LocalPoints G w.val) v x y) w |
| 180 | |
| 181 | theorem finiteLocalTuple_insert (T : Finset (AwayPlace S)) (v : AwayPlace S) (hv : v ∉ T) |
| 182 | (x : (w : AwayPlace S) → LocalAdeles.LocalPoints G w.val) : |
| 183 | finiteLocalTuple G S (insert v T) x = awayMulSingleHom G S v (x v) * finiteLocalTuple G S T x := by |
| 184 | apply RestrictedProduct.ext |
| 185 | intro w |
| 186 | change (if w ∈ insert v T then x w else 1) = |
| 187 | Pi.mulSingle (M := fun w : AwayPlace S => LocalAdeles.LocalPoints G w.val) v (x v) w * |
| 188 | (if w ∈ T then x w else 1) |
| 189 | by_cases hw : w = v |
| 190 | · subst w |
| 191 | simp [hv] |
| 192 | · simp [hw] |
| 193 | |
| 194 | theorem finiteLocalTuple_mem_of_single (H : Subgroup (LocalAdeles.AwayAdelicPoints G S)) |
| 195 | (hH : ∀ (v : AwayPlace S) (g : LocalAdeles.LocalPoints G v.val), awayMulSingleHom G S v g ∈ H) |
| 196 | (T : Finset (AwayPlace S)) (x : (v : AwayPlace S) → LocalAdeles.LocalPoints G v.val) : |
| 197 | finiteLocalTuple G S T x ∈ H := by |
| 198 | induction T using Finset.induction_on with |
| 199 | | empty => |
| 200 | have he : finiteLocalTuple G S ∅ x = 1 := by |
| 201 | apply RestrictedProduct.ext |
| 202 | intro v |
| 203 | simp [finiteLocalTuple] |
| 204 | rw [he] |
| 205 | exact H.one_mem |
| 206 | | @insert v T hv ih => |
| 207 | rw [finiteLocalTuple_insert G S T v hv x] |
| 208 | exact H.mul_mem (hH v (x v)) ih |
| 209 | |
| 210 | theorem adelic_closed_subgroup_eq_top_of_single (H : Subgroup (LocalAdeles.AwayAdelicPoints G S)) |
| 211 | (hclosed : IsClosed (H : Set (LocalAdeles.AwayAdelicPoints G S))) |
| 212 | (hH : ∀ (v : AwayPlace S) (g : LocalAdeles.LocalPoints G v.val), awayMulSingleHom G S v g ∈ H) : H = ⊤ := by |
| 213 | apply top_unique |
| 214 | intro a _ |
| 215 | apply hclosed.closure_subset |
| 216 | rw [mem_closure_iff] |
| 217 | intro V hV ha |
| 218 | obtain ⟨T, U, _, haU, hsub⟩ := exists_basicAdelicSet_subset G S hV a ha |
| 219 | refine ⟨finiteLocalTuple G S T a, hsub ⟨?_, ?_⟩, |
| 220 | finiteLocalTuple_mem_of_single G S H hH T a⟩ |
| 221 | · intro v hv |
| 222 | change (if v ∈ T then a v else 1) ∈ U v |
| 223 | simpa only [ite_eq_left hv] using haU.1 v hv |
| 224 | · intro v hv |
| 225 | change (if v ∈ T then a v else 1) ∈ LocalAdeles.integralLocalSubgroup G v.val |
| 226 | rw [ite_eq_right hv] |
| 227 | exact (LocalAdeles.integralLocalSubgroup G v.val).one_mem |
| 228 | |
| 229 | end |
| 230 | |
| 231 | end OAI.NumberTheory.Quaternion.Arithmetic.ApproximationTopology |