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.Adeles.FiniteNorm |
| 2 | import OAI.NumberTheory.Adeles.NormAlgebra |
| 3 | |
| 4 | /-! # Completion Factors Finite Tensor -/ |
| 5 | |
| 6 | namespace OAI.NumberTheory.Adeles.CompletionFactorsFiniteTensor |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | section |
| 11 | |
| 12 | /-! Scalar extension and the finite completion factors. -/ |
| 13 | |
| 14 | open _root_.NumberField IsDedekindDomain HeightOneSpectrum |
| 15 | open scoped _root_.NumberField _root_.Topology TensorProduct OAI.NumberTheory.Adeles.LocalCompletions.CompletionFactors.FiniteLiesOver Valued |
| 16 | |
| 17 | variable {F E : Type*} [Field F] [NumberField F] |
| 18 | [Field E] [NumberField E] [Algebra F E] |
| 19 | (v : HeightOneSpectrum (𝓞 F)) |
| 20 | |
| 21 | def finiteTensorMapAt (w : FiniteNorm.CompletionFactors.FinitePlacesOver E v) : |
| 22 | v.adicCompletion F ⊗[F] E →ₐ[v.adicCompletion F] w.val.adicCompletion E := |
| 23 | Algebra.TensorProduct.lift |
| 24 | (Algebra.algHom (v.adicCompletion F) (v.adicCompletion F) (w.val.adicCompletion E)) |
| 25 | (Algebra.algHom F E (w.val.adicCompletion E)) (fun _ _ => mul_comm ..) |
| 26 | |
| 27 | theorem finiteTensorMapAt_surjective (w : FiniteNorm.CompletionFactors.FinitePlacesOver E v) : |
| 28 | Function.Surjective (finiteTensorMapAt v w) := by |
| 29 | have hd : DenseRange (finiteTensorMapAt v w) := by |
| 30 | apply (w.val.denseRange_algebraMap E).mono |
| 31 | rintro _ ⟨x, rfl⟩ |
| 32 | refine ⟨1 ⊗ₜ[F] x, ?_⟩ |
| 33 | simp [finiteTensorMapAt, Algebra.algHom] |
| 34 | change Function.Surjective (finiteTensorMapAt v w).toLinearMap |
| 35 | rw [← Set.range_eq_univ, ← (finiteTensorMapAt v w).toLinearMap.coe_range, |
| 36 | ← (finiteTensorMapAt v w).toLinearMap.range.closed_of_finiteDimensional.closure_eq] |
| 37 | exact hd.closure_range |
| 38 | |
| 39 | /-- A continuous local map compatible with the global field determines its prime. -/ |
| 40 | theorem finitePlace_eq_of_localHom (w z : FiniteNorm.CompletionFactors.FinitePlacesOver E v) |
| 41 | (f : w.val.adicCompletion E →ₐ[v.adicCompletion F] z.val.adicCompletion E) |
| 42 | (hf : ∀ x : E, f (algebraMap E (w.val.adicCompletion E) x) = |
| 43 | algebraMap E (z.val.adicCompletion E) x) : w = z := by |
| 44 | apply Subtype.ext |
| 45 | apply HeightOneSpectrum.ext |
| 46 | apply w.val.isMaximal.eq_of_le z.val.isPrime.ne_top |
| 47 | intro a ha |
| 48 | have hw : ‖FinitePlace.embedding w.val (a : E)‖ < 1 := |
| 49 | (FinitePlace.norm_lt_one_iff_mem E w.val a).mpr ha |
| 50 | have ht := tendsto_pow_atTop_nhds_zero_iff_norm_lt_one.mpr hw |
| 51 | have hc : Continuous f := f.toLinearMap.continuous_of_finiteDimensional |
| 52 | have hx : f (FinitePlace.embedding w.val (a : E)) = |
| 53 | FinitePlace.embedding z.val (a : E) := hf (a : E) |
| 54 | have hz : Filter.Tendsto (fun n : ℕ => |
| 55 | (FinitePlace.embedding z.val (a : E)) ^ n) Filter.atTop (𝓝 0) := by |
| 56 | simpa only [Function.comp_def, map_zero, map_pow, hx] using (hc.tendsto 0).comp ht |
| 57 | exact (FinitePlace.norm_lt_one_iff_mem E z.val a).mp |
| 58 | (tendsto_pow_atTop_nhds_zero_iff_norm_lt_one.mp hz) |
| 59 | |
| 60 | theorem finiteTensorMapAt_ker_pairwise : |
| 61 | Pairwise (fun w z : FiniteNorm.CompletionFactors.FinitePlacesOver E v => |
| 62 | RingHom.ker (finiteTensorMapAt v w).toRingHom ≠ |
| 63 | RingHom.ker (finiteTensorMapAt v z).toRingHom) := by |
| 64 | intro w z hwz hker |
| 65 | let f := (finiteTensorMapAt v w).liftOfSurjective (finiteTensorMapAt_surjective v w) |
| 66 | (finiteTensorMapAt v z) hker.le |
| 67 | apply hwz |
| 68 | apply finitePlace_eq_of_localHom v w z f |
| 69 | intro x |
| 70 | have h := AlgHom.liftOfSurjective_apply (finiteTensorMapAt v w) |
| 71 | (finiteTensorMapAt_surjective v w) (finiteTensorMapAt v z) hker.le (1 ⊗ₜ[F] x) |
| 72 | simpa [f, finiteTensorMapAt, Algebra.algHom] using h |
| 73 | |
| 74 | abbrev FiniteBlock := (w : FiniteNorm.CompletionFactors.FinitePlacesOver E v) → w.val.adicCompletion E |
| 75 | |
| 76 | def finiteTensorMap : v.adicCompletion F ⊗[F] E →ₐ[v.adicCompletion F] FiniteBlock (E := E) v := |
| 77 | AlgHom.pi fun w => finiteTensorMapAt v w |
| 78 | |
| 79 | /-- Distinct completion factors are independent, by the Chinese remainder theorem. -/ |
| 80 | theorem finiteTensorMap_surjective : Function.Surjective (finiteTensorMap (E := E) v) := by |
| 81 | let I := fun w : FiniteNorm.CompletionFactors.FinitePlacesOver E v => RingHom.ker (finiteTensorMapAt v w).toRingHom |
| 82 | let : ∀ w, (I w).IsMaximal := fun w => |
| 83 | RingHom.ker_isMaximal_of_surjective _ (finiteTensorMapAt_surjective v w) |
| 84 | have hc : Pairwise (fun w z => IsCoprime (I w) (I z)) := by |
| 85 | intro w z h |
| 86 | exact Ideal.isCoprime_of_isMaximal (finiteTensorMapAt_ker_pairwise v h) |
| 87 | let e := fun w : FiniteNorm.CompletionFactors.FinitePlacesOver E v => |
| 88 | Ideal.quotientKerAlgEquivOfSurjective (finiteTensorMapAt_surjective v w) |
| 89 | intro a |
| 90 | obtain ⟨b, hb⟩ := Ideal.pi_quotient_surjective hc (fun w => (e w).symm (a w)) |
| 91 | refine ⟨b, funext fun w => ?_⟩ |
| 92 | have h := congrArg (e w) (hb w) |
| 93 | rw [AlgEquiv.apply_symm_apply] at h |
| 94 | exact h |
| 95 | |
| 96 | end |
| 97 | |
| 98 | section |
| 99 | |
| 100 | /-! Global automorphisms and finite completion factors. -/ |
| 101 | |
| 102 | open _root_.NumberField IsDedekindDomain HeightOneSpectrum |
| 103 | open scoped _root_.NumberField _root_.Topology TensorProduct OAI.NumberTheory.Adeles.LocalCompletions.CompletionFactors.FiniteLiesOver Valued |
| 104 | |
| 105 | variable {F E : Type*} [Field F] [NumberField F] |
| 106 | [Field E] [NumberField E] [Algebra F E] |
| 107 | (v : HeightOneSpectrum (𝓞 F)) |
| 108 | |
| 109 | def finitePlaceConjugate (σ : E ≃ₐ[F] E) (w : FiniteNorm.CompletionFactors.FinitePlacesOver E v) : |
| 110 | FiniteNorm.CompletionFactors.FinitePlacesOver E v := by |
| 111 | let e := RingOfIntegers.mapAlgEquiv σ |
| 112 | let z := HeightOneSpectrum.comap e.toRingHom e.surjective w.val |
| 113 | refine ⟨z, ?_⟩ |
| 114 | rw [Ideal.liesOver_iff] |
| 115 | change v.asIdeal = Ideal.comap (algebraMap (𝓞 F) (𝓞 E)) |
| 116 | (Ideal.comap e.toRingHom w.val.asIdeal) |
| 117 | rw [Ideal.comap_comap] |
| 118 | have he : e.toRingHom.comp (algebraMap (𝓞 F) (𝓞 E)) = |
| 119 | algebraMap (𝓞 F) (𝓞 E) := RingHom.ext fun x => e.commutes x |
| 120 | rw [he] |
| 121 | exact Ideal.over_def w.val.asIdeal v.asIdeal |
| 122 | |
| 123 | omit [NumberField F] in |
| 124 | theorem finitePlaceConjugate_eq_of_unique [Subsingleton (FiniteNorm.CompletionFactors.FinitePlacesOver E v)] |
| 125 | (σ : E ≃ₐ[F] E) (w : FiniteNorm.CompletionFactors.FinitePlacesOver E v) : |
| 126 | w.val.asIdeal.comap (RingOfIntegers.mapRingHom σ.toRingHom) = w.val.asIdeal := by |
| 127 | exact congrArg (fun z : FiniteNorm.CompletionFactors.FinitePlacesOver E v => z.val.asIdeal) |
| 128 | (Subsingleton.elim (finitePlaceConjugate v σ w) w) |
| 129 | |
| 130 | theorem intValuation_equiv (w : HeightOneSpectrum (𝓞 E)) (σ : E ≃+* E) |
| 131 | (hw : w.asIdeal.comap (RingOfIntegers.mapRingHom σ.toRingHom) = w.asIdeal) |
| 132 | (x : 𝓞 E) : w.intValuation (RingOfIntegers.mapRingHom σ.toRingHom x) = |
| 133 | w.intValuation x := by |
| 134 | let e := RingOfIntegers.mapRingEquiv σ |
| 135 | let eI : Ideal (𝓞 E) ≃* Ideal (𝓞 E) := |
| 136 | { e.idealComapOrderIso.symm.toEquiv with |
| 137 | map_mul' := fun I J => Ideal.map_mul e.toRingHom I J } |
| 138 | have hwe : eI w.asIdeal = w.asIdeal := by |
| 139 | change w.asIdeal.map e.toRingHom = w.asIdeal |
| 140 | nth_rw 1 [← hw] |
| 141 | exact Ideal.map_comap_eq_self_of_equiv e w.asIdeal |
| 142 | by_cases hx : x = 0 |
| 143 | · simp [hx] |
| 144 | change w.intValuation (e x) = w.intValuation x |
| 145 | rw [w.intValuation_eq_exp_neg_multiplicity |
| 146 | (fun h => hx (e.injective (h.trans (map_zero e).symm))), |
| 147 | w.intValuation_eq_exp_neg_multiplicity hx] |
| 148 | have hm := multiplicity_map_eq eI (a := w.asIdeal) (b := Ideal.span {x}) |
| 149 | rw [hwe] at hm |
| 150 | change multiplicity w.asIdeal ((Ideal.span {x}).map e.toRingHom) = _ at hm |
| 151 | rw [Ideal.map_span, Set.image_singleton] at hm |
| 152 | exact congrArg (fun n : ℕ => WithZero.exp (-(n : ℤ))) hm |
| 153 | |
| 154 | theorem valuation_equiv (w : HeightOneSpectrum (𝓞 E)) (σ : E ≃+* E) |
| 155 | (hw : w.asIdeal.comap (RingOfIntegers.mapRingHom σ.toRingHom) = w.asIdeal) |
| 156 | (x : E) : w.valuation E (σ x) = w.valuation E x := by |
| 157 | obtain ⟨a, b, hb, rfl⟩ := IsFractionRing.div_surjective (A := 𝓞 E) x |
| 158 | simp only [map_div₀] |
| 159 | have ha : w.valuation E (σ (algebraMap (𝓞 E) E a)) = w.valuation E |
| 160 | (algebraMap (𝓞 E) E a) := by |
| 161 | change w.valuation E (algebraMap (𝓞 E) E (RingOfIntegers.mapRingHom σ.toRingHom a)) = _ |
| 162 | simpa only [valuation_of_algebraMap] using intValuation_equiv w σ hw a |
| 163 | have hb' : w.valuation E (σ (algebraMap (𝓞 E) E b)) = w.valuation E |
| 164 | (algebraMap (𝓞 E) E b) := by |
| 165 | change w.valuation E (algebraMap (𝓞 E) E (RingOfIntegers.mapRingHom σ.toRingHom b)) = _ |
| 166 | simpa only [valuation_of_algebraMap] using intValuation_equiv w σ hw b |
| 167 | rw [ha, hb'] |
| 168 | |
| 169 | def finiteValuedAutomorphism (w : HeightOneSpectrum (𝓞 E)) (σ : E ≃+* E) : |
| 170 | WithVal (w.valuation E) ≃+* WithVal (w.valuation E) := |
| 171 | ((WithVal.equiv (w.valuation E)).trans σ).trans (WithVal.equiv (w.valuation E)).symm |
| 172 | |
| 173 | theorem uniformContinuous_finiteValuedAutomorphism (w : HeightOneSpectrum (𝓞 E)) |
| 174 | (σ : E ≃+* E) |
| 175 | (hw : w.asIdeal.comap (RingOfIntegers.mapRingHom σ.toRingHom) = w.asIdeal) : |
| 176 | UniformContinuous (finiteValuedAutomorphism w σ).toRingHom := by |
| 177 | apply uniformContinuous_of_continuousAt_zero (finiteValuedAutomorphism w σ).toAddMonoidHom |
| 178 | rw [ContinuousAt, map_zero, |
| 179 | (Valued.hasBasis_nhds_zero (WithVal (w.valuation E)) _).tendsto_iff |
| 180 | (Valued.hasBasis_nhds_zero (WithVal (w.valuation E)) _)] |
| 181 | intro γ _ |
| 182 | refine ⟨γ, trivial, ?_⟩ |
| 183 | intro x hx |
| 184 | change Valued.v.restrict x < γ.val at hx |
| 185 | change Valued.v.restrict (finiteValuedAutomorphism w σ x) < γ.val |
| 186 | rw [Valuation.restrict_lt_iff_lt_embedding] at hx ⊢ |
| 187 | change w.valuation E (σ (WithVal.equiv _ x)) < _ |
| 188 | rw [valuation_equiv w σ hw] |
| 189 | exact hx |
| 190 | |
| 191 | def finiteCompletionAutomorphism (w : HeightOneSpectrum (𝓞 E)) (σ : E ≃+* E) |
| 192 | (hw : w.asIdeal.comap (RingOfIntegers.mapRingHom σ.toRingHom) = w.asIdeal) : |
| 193 | w.adicCompletion E →+* w.adicCompletion E := |
| 194 | ((adicCompletion.equiv E w).symm.toRingHom.comp |
| 195 | (UniformSpace.Completion.mapRingHom (finiteValuedAutomorphism w σ).toRingHom |
| 196 | (uniformContinuous_finiteValuedAutomorphism w σ hw).continuous)).comp |
| 197 | (adicCompletion.equiv E w).toRingHom |
| 198 | |
| 199 | theorem continuous_finiteCompletionAutomorphism (w : HeightOneSpectrum (𝓞 E)) |
| 200 | (σ : E ≃+* E) |
| 201 | (hw : w.asIdeal.comap (RingOfIntegers.mapRingHom σ.toRingHom) = w.asIdeal) : |
| 202 | Continuous (finiteCompletionAutomorphism w σ hw) := |
| 203 | (adicCompletion.continuous_ofCompletion E w).comp |
| 204 | (UniformSpace.Completion.continuous_map.comp |
| 205 | (adicCompletion.continuous_toCompletion E w)) |
| 206 | |
| 207 | @[simp] theorem finiteCompletionAutomorphism_coe (w : HeightOneSpectrum (𝓞 E)) |
| 208 | (σ : E ≃+* E) |
| 209 | (hw : w.asIdeal.comap (RingOfIntegers.mapRingHom σ.toRingHom) = w.asIdeal) (x : E) : |
| 210 | finiteCompletionAutomorphism w σ hw (algebraMap E (w.adicCompletion E) x) = |
| 211 | algebraMap E (w.adicCompletion E) (σ x) := by |
| 212 | apply adicCompletion.ext |
| 213 | change UniformSpace.Completion.mapRingHom (finiteValuedAutomorphism w σ).toRingHom _ |
| 214 | ((WithVal.equiv (w.valuation E)).symm x : UniformSpace.Completion _) = _ |
| 215 | exact UniformSpace.Completion.mapRingHom_coe |
| 216 | (uniformContinuous_finiteValuedAutomorphism w σ hw).continuous |
| 217 | ((WithVal.equiv (w.valuation E)).symm x) |
| 218 | |
| 219 | theorem finiteCompletionAutomorphism_base (σ : E ≃ₐ[F] E) (w : FiniteNorm.CompletionFactors.FinitePlacesOver E v) |
| 220 | (hw : w.val.asIdeal.comap (RingOfIntegers.mapRingHom σ.toRingHom) = w.val.asIdeal) |
| 221 | (a : v.adicCompletion F) : |
| 222 | finiteCompletionAutomorphism w.val σ.toRingEquiv hw (LocalCompletions.CompletionFactors.finiteCompletionMap v w.val a) = |
| 223 | LocalCompletions.CompletionFactors.finiteCompletionMap v w.val a := by |
| 224 | apply (v.denseRange_algebraMap F).induction_on (p := fun a => |
| 225 | finiteCompletionAutomorphism w.val σ.toRingEquiv hw (LocalCompletions.CompletionFactors.finiteCompletionMap v w.val a) = |
| 226 | LocalCompletions.CompletionFactors.finiteCompletionMap v w.val a) a |
| 227 | · exact isClosed_eq |
| 228 | ((continuous_finiteCompletionAutomorphism w.val σ.toRingEquiv hw).comp |
| 229 | (LocalCompletions.CompletionFactors.continuous_finiteCompletionMap v w.val)) (LocalCompletions.CompletionFactors.continuous_finiteCompletionMap v w.val) |
| 230 | · intro x |
| 231 | change finiteCompletionAutomorphism w.val σ.toRingEquiv hw |
| 232 | (LocalCompletions.CompletionFactors.finiteCompletionMap v w.val (x : v.adicCompletion F)) = |
| 233 | LocalCompletions.CompletionFactors.finiteCompletionMap v w.val (x : v.adicCompletion F) |
| 234 | rw [LocalCompletions.CompletionFactors.finiteCompletionMap_coe] |
| 235 | change finiteCompletionAutomorphism w.val σ.toRingEquiv hw |
| 236 | (algebraMap E (w.val.adicCompletion E) (algebraMap F E x)) = _ |
| 237 | rw [finiteCompletionAutomorphism_coe] |
| 238 | exact congrArg (algebraMap E (w.val.adicCompletion E)) (σ.commutes x) |
| 239 | |
| 240 | theorem globalAutomorphism_eq_one_of_unique_local_degree_one |
| 241 | [Subsingleton (FiniteNorm.CompletionFactors.FinitePlacesOver E v)] (w : FiniteNorm.CompletionFactors.FinitePlacesOver E v) |
| 242 | (hd : Module.finrank (v.adicCompletion F) (w.val.adicCompletion E) = 1) |
| 243 | (σ : E ≃ₐ[F] E) : σ = 1 := by |
| 244 | have hs := (Algebra.finrank_eq_one_iff_bijective_algebraMap.mp hd).surjective |
| 245 | have hw := finitePlaceConjugate_eq_of_unique v σ w |
| 246 | apply AlgEquiv.ext |
| 247 | intro x |
| 248 | apply (algebraMap E (w.val.adicCompletion E)).injective |
| 249 | change algebraMap E (w.val.adicCompletion E) (σ.toRingEquiv x) = |
| 250 | algebraMap E (w.val.adicCompletion E) x |
| 251 | rw [← finiteCompletionAutomorphism_coe w.val σ.toRingEquiv hw] |
| 252 | obtain ⟨a, ha⟩ := hs (algebraMap E (w.val.adicCompletion E) x) |
| 253 | change LocalCompletions.CompletionFactors.finiteCompletionMap v w.val a = _ at ha |
| 254 | rw [← ha] |
| 255 | exact finiteCompletionAutomorphism_base v σ w hw a |
| 256 | |
| 257 | end |
| 258 | |
| 259 | /-! The finite completion decomposition for a quadratic extension. -/ |
| 260 | |
| 261 | open _root_.NumberField IsDedekindDomain HeightOneSpectrum |
| 262 | open scoped _root_.NumberField _root_.Topology TensorProduct OAI.NumberTheory.Adeles.LocalCompletions.CompletionFactors.FiniteLiesOver Valued |
| 263 | |
| 264 | variable {F E : Type*} [Field F] [NumberField F] |
| 265 | [Field E] [NumberField E] [Algebra F E] |
| 266 | (v : HeightOneSpectrum (𝓞 F)) |
| 267 | |
| 268 | instance finitePlacesOver_nonempty : Nonempty (FiniteNorm.CompletionFactors.FinitePlacesOver E v) := by |
| 269 | obtain ⟨q⟩ := (inferInstance : Nonempty (v.asIdeal.primesOver (𝓞 E))) |
| 270 | let : q.val.IsPrime := q.property.1 |
| 271 | let : q.val.LiesOver v.asIdeal := q.property.2 |
| 272 | exact ⟨⟨⟨q.val, q.property.1, Ideal.ne_bot_of_liesOver_of_ne_bot v.ne_bot q.val⟩, |
| 273 | q.property.2⟩⟩ |
| 274 | |
| 275 | instance finiteBlock_finiteDimensional : |
| 276 | FiniteDimensional (v.adicCompletion F) (FiniteBlock (E := E) v) := inferInstance |
| 277 | |
| 278 | theorem finiteBlock_finrank_quadratic (hQuadratic : Module.finrank F E = 2) : |
| 279 | Module.finrank (v.adicCompletion F) (FiniteBlock (E := E) v) = 2 := by |
| 280 | classical |
| 281 | let : Algebra.IsQuadraticExtension F E := ⟨hQuadratic⟩ |
| 282 | have hle : Module.finrank (v.adicCompletion F) (FiniteBlock (E := E) v) ≤ 2 := by |
| 283 | have h := LinearMap.finrank_le_finrank_of_surjective |
| 284 | (f := (finiteTensorMap (E := E) v).toLinearMap) (finiteTensorMap_surjective v) |
| 285 | simpa only [Module.finrank_baseChange, hQuadratic] using h |
| 286 | have hpos : 0 < Module.finrank (v.adicCompletion F) (FiniteBlock (E := E) v) := |
| 287 | Module.finrank_pos |
| 288 | by_contra hne |
| 289 | have hone : Module.finrank (v.adicCompletion F) (FiniteBlock (E := E) v) = 1 := by omega |
| 290 | have hsum : (∑ w : FiniteNorm.CompletionFactors.FinitePlacesOver E v, |
| 291 | Module.finrank (v.adicCompletion F) (w.val.adicCompletion E)) = 1 := by |
| 292 | simpa only [FiniteBlock, Module.finrank_pi_fintype] using hone |
| 293 | have hcard : Fintype.card (FiniteNorm.CompletionFactors.FinitePlacesOver E v) ≤ 1 := by |
| 294 | calc |
| 295 | _ = ∑ _w : FiniteNorm.CompletionFactors.FinitePlacesOver E v, 1 := by simp |
| 296 | _ ≤ ∑ w : FiniteNorm.CompletionFactors.FinitePlacesOver E v, |
| 297 | Module.finrank (v.adicCompletion F) (w.val.adicCompletion E) := |
| 298 | Finset.sum_le_sum fun w _ => Module.finrank_pos |
| 299 | _ = 1 := hsum |
| 300 | let : Subsingleton (FiniteNorm.CompletionFactors.FinitePlacesOver E v) := Fintype.card_le_one_iff_subsingleton.mp hcard |
| 301 | let w := Classical.choice (finitePlacesOver_nonempty (E := E) v) |
| 302 | have hd : Module.finrank (v.adicCompletion F) (w.val.adicCompletion E) = 1 := by |
| 303 | rw [Finset.sum_eq_single w (fun z _ hzw => (hzw (Subsingleton.elim z w)).elim) |
| 304 | (fun h => (h (Finset.mem_univ w)).elim)] at hsum |
| 305 | exact hsum |
| 306 | let : Subsingleton (E ≃ₐ[F] E) := ⟨fun σ τ => |
| 307 | (globalAutomorphism_eq_one_of_unique_local_degree_one v w hd σ).trans |
| 308 | (globalAutomorphism_eq_one_of_unique_local_degree_one v w hd τ).symm⟩ |
| 309 | have hc := IsGalois.card_aut_eq_finrank F E |
| 310 | have hsmall : Nat.card (E ≃ₐ[F] E) ≤ 1 := by |
| 311 | rw [Nat.card_eq_fintype_card] |
| 312 | exact Fintype.card_le_one_iff_subsingleton.mpr inferInstance |
| 313 | rw [hc, hQuadratic] at hsmall |
| 314 | omega |
| 315 | |
| 316 | def finiteTensorEquivQuadratic (hQuadratic : Module.finrank F E = 2) : |
| 317 | v.adicCompletion F ⊗[F] E ≃ₐ[v.adicCompletion F] FiniteBlock (E := E) v := |
| 318 | AlgEquiv.ofBijective (finiteTensorMap v) (by |
| 319 | have hd : Module.finrank (v.adicCompletion F) (v.adicCompletion F ⊗[F] E) = |
| 320 | Module.finrank (v.adicCompletion F) (FiniteBlock (E := E) v) := by |
| 321 | rw [Module.finrank_baseChange, finiteBlock_finrank_quadratic v hQuadratic, hQuadratic] |
| 322 | exact ⟨(LinearMap.injective_iff_surjective_of_finrank_eq_finrank |
| 323 | (f := (finiteTensorMap (E := E) v).toLinearMap) hd).mpr |
| 324 | (finiteTensorMap_surjective v), finiteTensorMap_surjective v⟩) |
| 325 | |
| 326 | end |
| 327 | |
| 328 | end OAI.NumberTheory.Adeles.CompletionFactorsFiniteTensor |