grh-compacta Lean artifact read back into mathematics

Lean source

Lib.Adelic.Adeles.IdeleHilbert90

Lib/Adelic/Adeles/IdeleHilbert90.lean · 178 lines · 26 declarations · read in Unit 123 · Adelic self-duality and a one-sided Poisson summation bound

Its 26 declarations
Lib/Adelic/Adeles/IdeleHilbert90.lean · all 178 lines
import Lib.GaloisRep.Hilbert90.TameDescent/-! Known result: base change, discreteness and compact quotient, and the modulus for the adeles ofa number field. Base change is proved for finite adeles only, and the full adeles are those oftotally complex fields with chosen embeddings. The measure is normalised so that the field hascovolume one. Source: J. W. S. Cassels, Global Fields, in Cassels-Fröhlich, Algebraic Number Theory,1967, ch. II §§14-16; A. Weil, Basic Number Theory, ch. IV.This file: A minor of a generic matrix is a non-zero polynomial. Gauss q-binomial theorem as a sumover subspaces of a finite vector space. Functoriality of places and finite adeles under field mapsand complex conjugation. Base change of finite adeles as topological modules; Galois invariants offinite adeles. Hilbert 90 for finite ideles under a cyclic Galois action. -/open Algebra Ideal Finset Fint IsTopologicalAddGroup Module NumberField Submodule mixedEmbedding  fundamentalConevariable {K L M} [Field K] [NumberField K] [Field L] [Field M] [NumberField M] (g :  L →+* M) (f : K →+* L) {Φ l n n'} [Fintype l] (τ : Φ) (i : l → n') (j : l → n) {u v : FinPlace M}/-- The minor det(x_{τ,i(a),j(b)})_{a,b∈l} of the variable matrix at τ, in rows i and columns j. -/noncomputable def letterMinor := (Matrix.of fun a b ↦ @MvPolynomial.X ℂ _ _ (τ, i a, j b)).det@[simp↓] lemma letterMinor_ne_zero (hi : i.Injective) (hc : j.Injective) : letterMinor τ i j ≠  0 := by simpa [Matrix.det_apply, letterMinor] using (MvPolynomial.rename_injective (τ, ·.map i j)  (by aesop_cat)).ne (Matrix.det_mvPolynomialX_ne_zero l ℂ)/-- For natural numbers q, m and a complex number X, the product of 1 − q^l·X over 0 ≤ l < m. -/@[simp] noncomputable abbrev trivialHecke (q m : ℕ) (X : ℂ) := ∏ l ∈ range m, (1 - q ^ l * X)/-- The number (−X)^d q^{d(d−1)/2} attached to a subspace U of k^n of dimension d, with q thenumber of elements of the field k (0 if k is infinite). -/noncomputable abbrev heckePolyCoeff {n k} [Field k] (X : ℂ) (U : Submodule k (n → k)) :=  (-X) ^ finrank k U * Nat.card k ^ (finrank k U).choose 2/-- The q-binomial theorem for subspaces: for a subspace W of a finite vector space over a fieldwith q elements, ∑_{U ⊆ W} (−X)^{dim U} q^{binom(dim U, 2)} = ∏_{l < dim W} (1 − q^l X) forX ∈ ℂ. -/lemma q_binomial_submodule n k [Finite n] [Field k] [Finite k] (W : Submodule k (n → k)) X :    ∑ U with U ≤ W, heckePolyCoeff X U = trivialHecke (.card k) (finrank k W) X :=  ((@le_iff_reflTransGen_covBy _ _  Fintype.toLocallyFiniteOrder ⊥ W).1 bot_le).rec (by simp [filter_eq', heckePolyCoeff]) @fun H W _  ⟨⟨l, n⟩, h⟩ ih ↦ have m U {v} (a : U ≤ W) (c : v ∈ U ∧ v ∉ U ⊓ H) : U ⊓ H ⊔ k ∙ v = U := by rw [    inf_sup_assoc_of_le, eq_of_le_of_not_lt _ (h (left_lt_sup.2 _))] <;> aesop  by rw [← sum_sdiff, ih, sum_congr rfl, (fun t ↦ @sum_comm' _ _ _ _ _ t (t W) ({U | U ≤ W ∧ · ∈    U})) (fun U ↦ Set.toFinset (U \ ↑(U ⊓ H))) (by simp; tauto), sum_congr rfl fun v _ ↦ (sum_nbij'    (· ⊓ H) (· ⊔ k ∙ v) _ _ _ _ (by tauto)).trans (ih ▸ mul_sum _ _ (-X / (Nat.card k - 1))).symm]    <;> intros <;> simp_all [(disjoint_span_singleton_of_notMem _).symm.eq_bot,    l.trans', -Submodule.coe_inf,    prod_range_succ, heckePolyCoeff, Nat.choose, fun U a b ↦ have ⟨_, c⟩ := Set.not_subset.1 b    m U a c ▸ finrank_sup_span_singleton c.2, congr(finrank k $(inf_of_le_right l)),    sup_inf_assoc_of_le, ↓@card_eq_pow_finrank k (Set.Elem _), cast_card_sdiff,    Submodule.mem_sup_right, subset_iff] <;> field [Fintype.one_lt_card.ne']/-- Every ideal of the ring of integers of a number field has a positive power that isprincipal. -/lemma exists_ideal_pow_eq_span_singleton {F} [Field F] [NumberField F] (I : Ideal (𝓞 F)) : ∃ n ≠ 0,  ∃ y, I ^ n = .span {y} := ⟨_, by simp, by_cases (fun h ↦ ((ClassGroup.mk0_eq_one_iff _).1  ((map_pow _ ⟨I, h⟩ _).trans pow_card_eq_one)).1) fun _ ↦ ⟨0, by simp_all⟩⟩/-- If w is an ideal of norm > 1 in the ring of integers of a number field K and r > 0, somepower of w is generated by a non-unit a with 1/|σ(a)| < r for every complex embedding σ. -/lemma exists_pow_eq_span_inv_lt {w r} (h : 1 < absNorm w) (r0 : 0 < r) : ∃ a :    𝓞 K, (∃ k, w ^ k = Ideal.span {a}) ∧ ¬IsUnit a ∧ ∀ σ : K →+* ℂ, ‖σ a‖⁻¹ < r := by  have ⟨R, R0, hR⟩ := (isBounded_normLeOne K).exists_pos_norm_lt  simp [norm_eq_sup'_normAtPlace, -Prod.forall] at hR  have ⟨_, c, a, ha⟩ := exists_ideal_pow_eq_span_singleton (w ^ ⌈|R / r| ^ finrank ℚ K⌉₊)  have hM := (Nat.lt_pow_self (one_lt_pow₀ h c)).trans_eq (by    rw [pow_right_comm, ← map_pow, ← map_pow, ha])  have ⟨u, hu⟩ := exists_unit_smul_mem (x := mixedEmbedding K a⁻¹) (by aesop)  exact ⟨_, ⟨_, by rwa [span_singleton_mul_left_unit u⁻¹.isUnit, pow_mul]⟩, hM.not_ge ∘ by    simp_all [span_singleton_eq_top.2, ne_of_gt], by simpa [normAtPlace_smul, *, field, abs_of_pos]    using (hR _ (smul_mem_of_mem hu (div_pos R0 r0).ne') (by simpa [mixedEmbedding.norm_smul, ←   (coe_norm_int a), Algebra.norm_inv] using mul_inv_le_one_of_le₀ (Nat.ceil_le.1 hM.le)) <| .mk ·)⟩omit [NumberField K] in@[simp] lemma FinPlace.mem_comap {w x} : x ∈ (comap f w).1 ↔ .mapRingHom f x ∈ w.1 := .rfl@[simp] lemma adeleMap_adeleMap [NumberField L] :    ∀ x, adeleMap g (adeleMap f x) = adeleMap (g.comp f) x :=  denseRange_algebraMap_finAdele.eq@[simp] lemma adeleMap_id : ∀ x, adeleMap (.id K) x = x := denseRange_algebraMap_finAdele.eqomit [NumberField K] inlemma FinPlace.comap_surjective : (comap f).Surjective := fun ⟨p, _, _⟩ ↦ let := f.toAlgebra        p.nonempty_primesOver (S := 𝓞 L).elim fun ⟨P, i, ⟨_⟩⟩ ↦ ⟨⟨P, i, by bound⟩, by aesop⟩lemma FinPlace.exists_gal_comap_eq [Algebra K M] [IsGalois K M] (h : u.below K = v.below K) : ∃ g :    Gal(M/K), u.comap g = v := (IsGaloisGroup.isInvariant.exists_smul_of_under_eq (𝓞 K) _ Gal(M/K) _    u.1 congr($h.1).symm).imp fun g e ↦ by ext; apply e ▸ smul_mem_pointwise_smul_iff@[simp] lemma adeleMap_mem_Ohat [NumberField L] {x} : adeleMap f x ∈ Ô L ↔ x ∈ Ô K := by  simp [mem_Ô, adeleMap_apply, (FinPlace.comap_surjective f).forall]variable [NumberField L]variable [Algebra K L] {ι} [Fintype ι] (b : Basis ι K L) (f : M →+* L) {σ : Gal(L/K)}lemma star_eq_adeleMap [IsCMField K] x : star x = adeleMap (starRingEnd K) x := rfllemma below_star [IsCMField K] [IsCMField L] (u : FinPlace L) : (star u).below K =  star (u.below K) := by ext; simp; congr!; ext; simp [map_star_CM]lemma adeleMap_star [IsCMField M] [IsCMField L] : ∀ x, adeleMap f (star x) = star (adeleMap f x) :=  denseRange_algebraMap_finAdele.eq (by simp [map_star_CM])lemma adeleMap_injective : (⇑(adeleMap f)).Injective := .of_ker _    (by simp [DFunLike.ext_iff, adeleMap_apply, (FinPlace.comap_surjective f).forall])noncomputable instance (priority := low) adeleAlgebra : Algebra (𝔸f K) (𝔸f L) :=  (finAdeleIncl ..).toAlgebra@[local simp] lemma algebraMap_eq_finAdeleIncl : algebraMap .. = finAdeleIncl K L := rfl/-- For a finite basis b of L over K, the linear map sending a family (a_i) of finite adeles ofK to the finite adele ∑ a_i b_i of L. -/noncomputable abbrev adeleCombination := Fintype.linearCombination (𝔸f K) ((↑) ∘ b : _ → 𝔸f L)lemma adeleCombination_repr x : adeleCombination b (Pi.map (fun _ ↦ (↑)) (b.repr x)) = x := .trans    (by simp [Algebra.smul_def, Fintype.linearCombination]) congr($(b.sum_repr x))attribute [local instance] IsRightUniformAddGroup.completeSpace_of_weaklyLocallyCompactSpace  rightUniformSpace isUniformAddGroup_of_addCommGroup/-- Base change of finite adeles: for a K-basis b of L, (a_i) ↦ ∑ a_i b_i is a homeomorphism onto 𝔸fL. -/lemma isHomeomorph_adeleCombination : IsHomeomorph (adeleCombination b) :=  have hc : Continuous (adeleCombination b) := continuous_finsetSum _ fun _ _ ↦    .mul_const (by fun_prop) _  have h := isInducing_iff_nhds_zero.2 ((hc.tendsto' _ _ (by simp)).le_comap.antisymm    (nhds_pi.substr (Filter.le_pi.2 fun i ↦ (closed_nhds_basis _).tendsto_right_iff.2 fun U k ↦    (mem_nhds_zero_finAdele_iff.1 k.1).rec fun N h ↦ ⟨_, (isOpen_Ô.preimage (continuous_mul_const    _)).mem_nhds (by simp), isClosed_property (.piMap fun _ ↦ denseRange_algebraMap_finAdele)    (isClosed_imp (isOpen_Ô.preimage (hc.mul_const ↑(b.traceDual i / N)))    (k.2.preimage (by fun_prop))) (b.equivFun.forall_congr_right.1 fun x e ↦ by    simp_all [adeleCombination_repr, ← map_mul, ← nsmul_eq_mul]    simpa [↓← map_nsmul, mul_div, ← traceForm_apply, ← Basis.traceDual_repr_apply, *] using      h.2 _ (algebraMap_mem_Ô.2 (isIntegral_trace e)))⟩)))  isHomeomorph_iff_isEmbedding_surjective.2 ⟨h.isEmbedding,    isClosed_property denseRange_algebraMap_finAdele (AddMonoidHom.isUniformInducing_of_isInducing    h).isComplete_range.isClosed (⟨_, adeleCombination_repr b ·⟩)⟩/-- A finite basis of L over K, viewed as a basis of the finite adeles of L over the finiteadeles of K. -/noncomputable def adeleBasis :=  Basis.ofEquivFun (.symm (.ofBijective _ (isHomeomorph_adeleCombination b).3))/-- Galois descent for finite adeles: if L/K is Galois, a finite adele y of L comes from afinite adele of K exactly when every σ in Gal(L/K) fixes y. -/lemma mem_range_finAdeleIncl_iff [IsGalois K L] {y} : y ∈ (finAdeleIncl K L).range ↔ ∀ σ : Gal(L/K),  adeleMap σ y = y := by  have (σ : Gal(L/K)) := by simpa using σ.toAlgHom.comp_algebraMap  cases' trace_surjective K L 1 with c  use by aesop, fun h ↦ ((isHomeomorph_adeleCombination (finBasis ..)).3.2 (c • y)).imp' (∑ i, trace    K L _ • · i) fun a ha ↦ by simpa [← map_sum _, sum_comm, ← mul_sum, Algebra.smul_def, commutes,    ← trace_eq_sum_automorphisms, Fintype.linearCombination, *] using    congr(∑ σ : Gal(L/K), adeleMap σ.toRingHom $ha)omit [NumberField K]lemma adeleMap_gal_pow i : adeleMap (σ : L →+* L) ^ i = adeleMap ↑(σ ^ i) := by  induction i with aesop (add simp [pow_add, AlgEquiv.aut_one])/-- Hilbert's Theorem 90 for finite ideles: if σ ∈ Gal(L/K) has finite order n and a finiteadele u of L has ∏_{i<n} σ^i(u) = 1, then u·σ(c) = c for some invertible finite adele c. -/lemma hilbert90_finite_idele {u : 𝔸f L} [NumberField K] (hu : ∏ i ∈ .range (orderOf σ),  adeleMap (σ ^ i) u = (1 : 𝔸f L)) : ∃ c, IsUnit c ∧ u * adeleMap σ c = c := by  choose r _ k using (isTameAtLevel_gal σ).exists_smul_mem_span_fixedPoints    ⟨⟨(u * adeleMap σ ·), by grind⟩, by simp [Algebra.smul_def, mul_left_comm]⟩    (by simp_all [iterate_mul_apply, adeleMap_gal_pow, AlgEquiv.aut_one]) ⊥ one_ne_zero  refine (Submodule.mem_span.1 (k (r⁻¹ • 1)) ⟨⟨⟨{x | ∃ c, c ∣ x ∧ _ = c}, fun ⟨a, h, A⟩ ⟨b, g, B⟩ ↦    ⟨b + idem {w | Valued.v (b w) ≤ Valued.v (a w)} * (a - b), .add (.trans ?_ h) (.trans ?_ g),    DFunLike.ext _ _ ?_⟩⟩, 0, by simp⟩, fun r _ ⟨c, h, A⟩ ↦ ⟨c, dvd_smul_of_dvd r h, A⟩⟩    (⟨·, dvd_rfl, ·⟩)).imp (by simp_all [isUnit_of_dvd_one])  any_goals apply (exists_eq_mul_iff_v_le.2 _).imp (by tauto)  all_goals intro w; simp [idem_apply, apply_ite, adeleMap_apply, ← congr($A w), ← congr($B w),    v_locMap_eq_of_surjective (σ : L →+* L) _ σ.surjective] <;> grind [mul_le_mul_iff_right₀,    Valuation.pos_iff]