module import Mathlib.Algebra.Ring.Divisibility.Lemmas import Mathlib.RingTheory.PiTensorProduct public import Lib.GaloisRep.BaseChange.Defs import Lib.GaloisRep.Hilbert90.TameActions import Lib.General.LinearAlgebra.MatrixPolynomials /-! # Hilbert 90 for unitary groups over profinite rings and for finite ideles This file proves Hilbert 90 for the unitary group over a profinite ring, with a congruence modulo `m`. On the way it constructs twisted roots in `O[X]/Q` (`New.exists_isTwistedRoot_of_charpoly_eq`) and orthonormal frames fixed by `τ` for invertible hermitian matrices (`New.exists_fixed_orthonormal_frame`). It also proves Hilbert 90 for the finite ideles of `L`, for an automorphism `σ` of `L/K` acting through `New.adeleMap`. This follows from Galois descent for the semilinear map `x ↦ u * σ x`, together with the fact that two of its fixed points have a common divisor that is again fixed. The main results `New.exists_fixed_orthonormal_frame` and `New.unitary_hilbert90_at_level` share these hypotheses: `New.IsProfiniteRing O` (`O` is profinite); `New.IsTameAtLevel τ p 0`, which says that `τ ^ p = 1`, `0 < p` and some element has trace `1`; `τ` commutes with `star` and fixes `c`, and `c - star c` is a unit. The lemmas before them concern the polynomial `X * (-w) ^ k`, for an inverse `w` of `1 + m X` modulo `Q`, and endomorphisms of `O[X]/Q`; they state their own hypotheses. ## Main definitions and results * `New.unitary_hilbert90_at_level`: Hilbert 90 for the unitary group, with a congruence modulo `m`. * `New.hilbert90_finite_idele`: Hilbert 90 for the finite ideles, for an automorphism of `L/K`. Notions from other files: * `New.IsTameAtLevel σ p m`: `σ ^ p = 1` with `0 < p`, `σ m = m`, some element has trace `1` modulo `m`, and no `σ ^ i` with `0 < i < p` is trivial modulo a prime not containing `m`. * `New.IsProfiniteRing R`: every sequence has a unique limit modulo each natural number `M ≠ 0`, along the hyperfilter. ## Relation to the literature Known; see `Lib.GaloisRep.Hilbert90.TameActions` for sources. -/ @[expose] public section open IsDedekindDomain (FiniteAdeleRing) /-! ## Hilbert 90 for unitary groups over profinite rings -/ section UnitaryHilbert90 open Matrix Polynomial AdjoinRoot Finset Ideal New.U RingHom namespace New variable {O n : Type*} [CommRing O] [Fintype n] [DecidableEq n] [StarRing O] {τ : O →+* O} {p : ℕ} omit [StarRing O] in /-- Let `g` be a ring endomorphism of `O` and `s` a polynomial such that `Q` divides `(Q.map g).comp s`. Then `q ↦ (q.map g).comp s` passes to a ring endomorphism `θ` of `O[X]/Q`. -/ lemma exists_adjoinRoot_map_comp {Q : O[X]} (g : O →+* O) (s : O[X]) (hs : Q ∣ (Q.map g).comp s) : ∃ θ : AdjoinRoot Q →+* AdjoinRoot Q, ∀ q : O[X], θ (AdjoinRoot.mk Q q) = AdjoinRoot.mk Q ((q.map g).comp s) := by have h_le : span {Q} ≤ (span {Q}).comap (s.compRingHom.comp (mapRingHom g)) := by simpa [mem_span_singleton] using hs exact ⟨quotientMap _ _ h_le, fun q ↦ quotientMap_mk⟩ omit [StarRing O] in /-- If `w` inverts `1 + m X` modulo `Q`, that is `a * Q + w * (1 + m X) = 1`, and `k ≤ 1`, then at a root `B` of `Q` in an `O`-algebra `A`, any `C` with `C * (1 + m B) ^ k = (-1) ^ k * B` is the value of `X * (-w) ^ k` at `B`. -/ private lemma aeval_X_mul_neg_pow_eq_of_mul_one_add_smul_pow_eq {A : Type*} [Ring A] [Algebra O A] {m : O} {Q a w : O[X]} (hw₀ : a * Q + w * (1 + m • X) = 1) {k : ℕ} (hk : k ≤ 1) {B C : A} (hB : Q.aeval B = 0) (hC : C * (1 + m • B) ^ k = (-1) ^ k * B) : (X * (-w) ^ k).aeval B = C := by rw [mul_comm w] at hw₀ have h_inv : (1 + m • B) * aeval B w = 1 := by simpa [hB] using congrArg (aeval B) hw₀ interval_cases k · simpa using hC.symm · calc (X * (-w) ^ 1).aeval B = (-1) ^ 1 * B * aeval B w := by simp _ = C * ((1 + m • B) ^ 1 * aeval B w) := by rw [← hC, mul_assoc] _ = C := by rw [pow_one, h_inv, mul_one] omit [StarRing O] in /-- If `θ` acts on `O[X]/Q` by applying `τ` to the coefficients, then its `i`-th iterate applies `τ ^ i`. -/ private lemma iterate_mk_eq_mk_map_pow {Q : O[X]} {θ : AdjoinRoot Q →+* AdjoinRoot Q} (hθ : ∀ q : O[X], θ (mk Q q) = mk Q (q.map τ)) (i : ℕ) (q : O[X]) : θ^[i] (mk Q q) = mk Q (q.map (τ ^ i)) := by induction i generalizing q with | zero => simp [RingHom.one_def] | succ i ih => simp [hθ, ih, Polynomial.map_map, pow_succ, RingHom.mul_def] universe w in /-- The polynomials `y`, `z`, `z'` over `O` solve the norm equations of `New.exists_isTwistedRoot_of_charpoly_eq` at an element `B` of an `O`-algebra `A` with `star`. Write `T` for the value of `1 + m X ^ (1 - k) y` at `B`. -/ structure IsTwistedRoot (τ : O →+* O) (p : ℕ) (m : O) (k : ℕ) {A : Type w} [Ring A] [StarRing A] [Algebra O A] (B : A) (y z z' : O[X]) : Prop where /-- `y` and `τ y` have the same value at `B`. -/ aeval_map_eq : (y.map τ).aeval B = y.aeval B /-- If `τ` is tame at level `m`, then `1 + m z'` is a left inverse of `1 + m z` at `B`. -/ aeval_mul_eq_one : IsTameAtLevel τ p m → aeval B ((1 + m • z') * (1 + m • z)) = 1 /-- If `τ` is tame at level `m`, then `T` is the value of the twisted norm of `1 + m z`. -/ aeval_twistedNorm_eq : IsTameAtLevel τ p m → aeval B (twistedNorm (Polynomial.map τ) p (1 + m • z)) = aeval B (1 + m • (X ^ (1 - k) * y)) /-- If `B⋆ (1 + m B) ^ k = (-1) ^ k B`, then `T ^ (1 - k) (1 + m B) T⋆ = T ^ k`. -/ pow_mul_star_eq_pow : star B * (1 + m • B) ^ k = (-1) ^ k * B → aeval B (1 + m • (X ^ (1 - k) * y)) ^ (1 - k) * (1 + m • B) * star (aeval B (1 + m • (X ^ (1 - k) * y))) = aeval B (1 + m • (X ^ (1 - k) * y)) ^ k universe w in /-- Roots in `O[X]/Q`. Let `O` be profinite, let `τ` be tame at level `0` (`τ ^ p = 1`, `0 < p`, and some element has trace `1`), commute with `star` and fix `c`, with `c - star c` a unit. Let `m` be fixed by `τ` and `star`, let `1 + m Y` be invertible, with `Y` hermitian (`k = 0`) or with `Yᴴ (1 + m Y) = -Y` (`k = 1`), and let `Q = charpoly Y` be fixed by `τ`. Then some polynomials `y`, `z`, `z'` satisfy `New.IsTwistedRoot τ p m k B y z z'` at every root `B` of `Q` in an `O`-algebra `A` with a compatible `star`. -/ lemma exists_isTwistedRoot_of_charpoly_eq (hO : IsProfiniteRing O) {m c : O} (h_tame_zero : IsTameAtLevel τ p 0) (hc : τ c = c) (hc_unit : IsUnit (c - star c)) (hτ : ∀ x : O, τ (star x) = star (τ x)) {Y : Matrix n n O} (hm_star : star m = m) (hm : τ m = m) {Q : O[X]} (hQ : Y.charpoly = Q) (hQτ : Q.map τ = Q) {k : ℕ} (hk : k ≤ 1) (hY_rel : Yᴴ * (1 + m • Y) ^ k = (-1) ^ k * Y) (hY_unit : IsUnit (1 + m • Y)) : ∃ y z z' : O[X], ∀ ⦃A : Type w⦄ [Ring A] [StarRing A] [Algebra O A] [StarModule O A] ⦃B : A⦄, Q.aeval B = 0 → IsTwistedRoot τ p m k B y z z' := by -- Work in `O[X]/Q` with two commuting maps: `θ`, acting by `τ` on coefficients, and an -- involution `ρ` that becomes `star` at each root `B` obeying the relation of `Y`. Solve for `T` -- in the `θ`-fixed ring by tame descent along `ρ`, write it as a norm by tame descent along `θ`, -- and evaluate at `B`. have h_coprime : IsCoprime Q (1 + m • X) := by rw [← hQ, ← isUnit_aeval_iff_isCoprime] simpa using hY_unit obtain ⟨a, w, hw₀⟩ : ∃ a w : O[X], a * Q + w * (1 + m • X) = 1 := h_coprime have hQ_monic : Q.Monic := hQ ▸ Y.charpoly_monic obtain ⟨θ, hθ⟩ : ∃ θ : AdjoinRoot Q →+* AdjoinRoot Q, ∀ q : O[X], θ (mk Q q) = mk Q (q.map τ) := by simpa using exists_adjoinRoot_map_comp (Q := Q) τ X (by rw [comp_X, hQτ]) have hQ_dvd : Q ∣ (Q.map (starRingEnd O)).comp (X * (-w) ^ k) := by subst hQ have h_val : (X * (-w) ^ k).aeval Y = Yᴴ := aeval_X_mul_neg_pow_eq_of_mul_one_add_smul_pow_eq hw₀ hk Y.aeval_self_charpoly hY_rel have h_char : Yᴴ.charpoly = Y.charpoly.map (starRingEnd O) := by change (Yᵀ.map (starRingEnd O)).charpoly = _ rw [charpoly_map, charpoly_transpose] have h_dvd := charpoly_dvd_charpoly_aeval_comp (Y := Y) (X * (-w) ^ k) rwa [h_val, h_char] at h_dvd obtain ⟨ρ, hρ⟩ := exists_adjoinRoot_map_comp (starRingEnd O) (X * (-w) ^ k) hQ_dvd have hw : mk Q w * (1 + AdjoinRoot.of Q m * root Q) = 1 := by simpa [smul_eq_C_mul] using congrArg (mk Q) hw₀ have hθ_of (a : O) : θ (AdjoinRoot.of Q a) = AdjoinRoot.of Q (τ a) := by simp [hθ, ← mk_C] have hθ_root : θ (root Q) = root Q := by simp [hθ, ← mk_X] have hρ_of (a : O) : ρ (AdjoinRoot.of Q a) = AdjoinRoot.of Q (star a) := by rw [← mk_C, hρ, Polynomial.map_C, C_comp, starRingEnd_apply, mk_C] have hρ_root : ρ (root Q) = root Q * (-mk Q w) ^ k := by rw [← mk_X, hρ, Polynomial.map_X, X_comp, map_mul, map_pow, map_neg, mk_X] have h_comm : Commute θ ρ := by have hθw : θ (mk Q w) = mk Q w := by refine left_inv_eq_right_inv ?_ ((mul_comm _ _).trans hw) have h_fix : θ (1 + AdjoinRoot.of Q m * root Q) = 1 + AdjoinRoot.of Q m * root Q := by simp [hθ_of, hθ_root, hm] rw [← h_fix, ← map_mul, hw, map_one] refine (commute_iff_eq θ ρ).mpr ?_ ext a · simp [hθ_of, hρ_of, hτ] · simp [hθ_root, hρ_root, hθw] have hρ_sq : ρ ^ 2 = 1 := by have hρ_root_sq : ρ (ρ (root Q)) = root Q := by interval_cases k · simp [hρ_root] · have hρw : ρ (mk Q w) * mk Q w = 1 := by have h_img : ρ (mk Q w) * (1 + AdjoinRoot.of Q m * (root Q * (-mk Q w) ^ 1)) = 1 := by rw [← hρ_root, ← hm_star, ← hρ_of, ← map_mul, ← map_one ρ, ← map_add, ← map_mul, hw] have h_w : 1 + AdjoinRoot.of Q m * (root Q * (-mk Q w) ^ 1) = mk Q w := by linear_combination (-1 : AdjoinRoot Q) * hw rwa [h_w] at h_img rw [hρ_root, map_mul, map_pow, map_neg, hρ_root] linear_combination root Q * hρw ext a · simp [sq, hρ_of] · simpa [sq] using hρ_root_sq have h_prof : IsProfiniteRing (AdjoinRoot Q) := hO.of_addEquiv_pi (powerBasisAux' hQ_monic).equivFun.toAddEquiv have hθ_tame {x : O} (ht : IsTameAtLevel τ p x) : IsTameAtLevel θ p (AdjoinRoot.of Q x) := ht.of_semiconj (AdjoinRoot.of Q) (fun a ↦ (hθ_of a).symm) <| RingHom.ext fun z ↦ by obtain ⟨q, rfl⟩ := mk_surjective z simp [iterate_mk_eq_mk_map_pow hθ, ht.pow_eq_one, RingHom.one_def] -- Solve for a `θ`-fixed unit `g ≡ 1 mod m X ^ (1 - k)` by descent along `ρ` in `θ.eqLocus 1`. let F : Subring (AdjoinRoot Q) := θ.eqLocus 1 have hρ_mem (x : AdjoinRoot Q) (hx : x ∈ F) : ρ x ∈ F := (RingHom.congr_fun h_comm.eq x).trans (congrArg ρ hx) let r : F →+* F := ρ.restrict F F hρ_mem have hr_val (x : F) : (r x : AdjoinRoot Q) = ρ x := rfl let N (j : ℕ) : F := ⟨AdjoinRoot.of Q m, by simp [F, hθ_of, hm]⟩ * ⟨root Q, hθ_root⟩ ^ (1 - j) have hF_prof : IsProfiniteRing F := h_prof.eqLocus (by simpa using hθ_tame h_tame_zero) have hr_tame : IsTameAtLevel r 2 (N k) := by let γ : F := ⟨AdjoinRoot.of Q c, by simp [F, hθ_of, hc]⟩ have hr_sq : r ^ 2 = 1 := RingHom.ext fun x ↦ Subtype.ext (RingHom.congr_fun hρ_sq x) have hγ_unit : IsUnit (γ - r γ) := .of_map F.subtype _ (by simp [γ, hr_val, hρ_of, hc_unit, IsUnit.map, ← map_sub]) have hr_N : r (N k) = N k := by interval_cases k · simp [N, hr_val, hρ_of, hρ_root, hm_star, Subtype.ext_iff] · simp [N, hr_val, hρ_of, hm_star, Subtype.ext_iff] exact .of_sq_eq_one_of_isUnit_sub hr_sq hγ_unit hr_N have hu : IsUnit (1 + N 0) := .of_map F.subtype _ (.of_mul_eq_one_right _ (by simpa [N] using hw)) obtain ⟨g, ⟨y₀, hg_lev⟩, hg_rel⟩ : ∃ g : Fˣ, N k ∣ g - 1 ∧ g ^ (1 - k) * (1 + N 0) * r g = g ^ k := by interval_cases k · have hr_fix : r (1 + N 0) = 1 + N 0 := by simp [N, hr_val, hρ_of, hρ_root, hm_star, Subtype.ext_iff] obtain ⟨z, -, hz_lev, hz⟩ := hr_tame.exists_prod_range_pow_apply_eq (.inr hF_prof) hu hr_fix (by simp) have h_split : ((z⁻¹ : Fˣ) : F) * (1 + N 0) * r ((z⁻¹ : Fˣ) : F) = 1 := by simp [← hz, prod_range_succ, ← map_mul] exact ⟨z⁻¹, hz_lev, by simpa using h_split⟩ · have h_norm_one : (1 + N 0) * r (1 + N 0) = 1 := by suffices h_val : (1 + AdjoinRoot.of Q m * root Q) * (1 + -(AdjoinRoot.of Q m * (root Q * mk Q w))) = 1 by simpa [N, hr_val, hρ_of, hρ_root, hm_star, Subtype.ext_iff] using h_val linear_combination -(AdjoinRoot.of Q m * root Q) * hw have h_lev : N 1 ∣ (1 + N 0) - 1 := ⟨⟨root Q, hθ_root⟩, by simp [N]⟩ have h_prod : ∏ i ∈ range 2, (r ^ i) (1 + N 0) = 1 := by simpa [prod_range_succ] using h_norm_one obtain ⟨g, hg_lev, hg⟩ := hr_tame.hilbert90_unit (.inr hF_prof) hu h_lev h_prod exact ⟨g, hg_lev, by simpa using hg⟩ obtain ⟨y, hy⟩ : ∃ y : O[X], mk Q y = y₀ := mk_surjective (y₀ : AdjoinRoot Q) have hy_fix : mk Q (y.map τ) = mk Q y := by rw [← hθ, hy] exact y₀.prop have hg_mk : ((g : F) : AdjoinRoot Q) = mk Q (1 + m • (X ^ (1 - k) * y)) := by simpa [N, smul_eq_C_mul, mul_assoc, sub_eq_iff_eq_add', Subtype.ext_iff, hy] using hg_lev -- At tame level `m` the `θ`-fixed unit `g ≡ 1 mod m` is a norm along `θ`. have hg_lev' : AdjoinRoot.of Q m ∣ ((g : F) : AdjoinRoot Q) - 1 := by simp [hg_mk, ← C_mul'] have h_norm (ht : IsTameAtLevel τ p m) : ∃ (u : (AdjoinRoot Q)ˣ) (z' z : O[X]), (u : AdjoinRoot Q) = 1 + mk Q (m • z) ∧ (↑u⁻¹ : AdjoinRoot Q) = 1 + mk Q (m • z') ∧ ∏ i ∈ range p, (θ ^ i) u = ((g : F) : AdjoinRoot Q) := by obtain ⟨u, ⟨a₁, ha₁⟩, ⟨b₁, hb₁⟩, hu⟩ := (hθ_tame ht).exists_prod_range_pow_apply_eq (.inr h_prof) (g.isUnit.map F.subtype) (g : F).prop hg_lev' obtain ⟨z, rfl⟩ := mk_surjective a₁ obtain ⟨z', rfl⟩ := mk_surjective b₁ refine ⟨u, z', z, ?_, ?_, hu⟩ · simpa [sub_eq_iff_eq_add', ← C_mul'] using ha₁ · simpa [sub_eq_iff_eq_add', ← C_mul'] using hb₁ choose! u z' z hz hz' hu_norm using h_norm refine ⟨y, z, z', fun A _ _ _ _ B hB ↦ ?_⟩ -- Evaluate at the root `B` of `Q`, through the map `f` from `O[X]/Q` to `A`. let f : AdjoinRoot Q →ₐ[O] A := Quotient.liftₐ _ (aeval B) (by simp [mem_span_singleton', hB]) have hf (q : O[X]) : f (mk Q q) = q.aeval B := rfl refine ⟨?_, fun ht ↦ ?_, fun ht ↦ ?_, fun h_rel ↦ ?_⟩ · rw [← hf, ← hf, hy_fix] · simp [← hf, ← hz ht, ← hz' ht] · simp [← hf, ← (hu_norm ht).trans hg_mk, twistedNorm_map_eq_prod, hz ht, iterate_mk_eq_mk_map_pow hθ] · have h_star_root : (X * (-w) ^ k).aeval B = star B := aeval_X_mul_neg_pow_eq_of_mul_one_add_smul_pow_eq hw₀ hk hB h_rel have hf_ρ (q : O[X]) : f (ρ (mk Q q)) = star (q.aeval B) := by rw [hρ, hf, aeval_comp, h_star_root, star_aeval] have hf_g : f ((g : F) : AdjoinRoot Q) = aeval B (1 + m • (X ^ (1 - k) * y)) := by rw [hg_mk, hf] have hf_ρ_g : f (ρ ((g : F) : AdjoinRoot Q)) = star (aeval B (1 + m • (X ^ (1 - k) * y))) := by rw [hg_mk, hf_ρ] have hg_rel' : ((g : F) : AdjoinRoot Q) ^ (1 - k) * (1 + AdjoinRoot.of Q m * root Q) * ρ ((g : F) : AdjoinRoot Q) = ((g : F) : AdjoinRoot Q) ^ k := by simpa [N, hr_val, Subtype.ext_iff] using hg_rel have h_rel_f := congrArg f hg_rel' have hf_of (a : O) : f (AdjoinRoot.of Q a) = algebraMap O A a := by rw [← mk_C, hf, aeval_C] have hf_root : f (root Q) = B := by rw [← mk_X, hf, aeval_X] simpa [hf_g, hf_ρ_g, hf_of, hf_root, ← Algebra.smul_def] using h_rel_f /-- Orthonormal frame. Let `O` be profinite, let `τ` be tame at level `0` (`τ ^ p = 1`, `0 < p`, and some element has trace `1`), commute with `star` and fix `c`, with `c - star c` a unit. Then an invertible hermitian matrix `h` fixed by `τ` has an orthonormal frame fixed by `τ`: a matrix `g` with `gᴴ h g = 1` and `g.map τ = g`, of the form `g = 1 + W (h - 1)`. -/ lemma exists_fixed_orthonormal_frame (hO : IsProfiniteRing O) {c : O} (h_tame_zero : IsTameAtLevel τ p 0) (hc : τ c = c) (hc_unit : IsUnit (c - star c)) (hτ : ∀ x : O, τ (star x) = star (τ x)) {h : Matrix n n O} (hh_unit : IsUnit h) (h_herm : hᴴ = h) (h_fixed : h.map τ = h) : ∃ g W : Matrix n n O, g = 1 + W * (h - 1) ∧ g.map τ = g ∧ gᴴ * h * g = 1 := by -- Apply `exists_isTwistedRoot_of_charpoly_eq` with `m = 1`, `k = 0`, `Y = h - 1` at the root -- `B = h - 1`: it gives `T = 1 + (h - 1) * y(h - 1)` with `T * h * Tᴴ = 1`, and `g = Tᴴ`. have h_charpoly : (h - 1).charpoly.map τ = (h - 1).charpoly := by simp [← charpoly_map, h_fixed, Matrix.map_sub] have h_rel : (h - 1)ᴴ * (1 + (1 : O) • (h - 1)) ^ 0 = (-1) ^ 0 * (h - 1) := by simpa obtain ⟨y, _z, _z', hy⟩ := exists_isTwistedRoot_of_charpoly_eq hO h_tame_zero hc hc_unit hτ (star_one _) τ.map_one (Y := h - 1) rfl h_charpoly (k := 0) bot_le h_rel (by simpa) -- `y` is fixed by `τ` at `h - 1`, and `T * h * Tᴴ = 1` obtain ⟨hy_fix, -, -, h_polar⟩ := hy (h - 1).aeval_self_charpoly refine ⟨1 + (y.aeval (h - 1))ᴴ * (h - 1), (y.aeval (h - 1))ᴴ, rfl, ?_, ?_⟩ · simp [conjTranspose_map _ hτ, map_aeval_matrix, h_fixed, hy_fix, Matrix.map_add, Matrix.map_sub] · -- `g` is `Tᴴ`, as `h - 1` is hermitian simpa [h_herm, star] using h_polar /-- Hilbert 90 for the unitary group `U 1` (matrices with `gᴴ g = 1`) at level `m`. Let `O` be profinite, let `τ` be tame at level `0` and at level `m`, commute with `star` and fix `c`, with `c - star c` a unit, and let `star m = m`. Tame at level `m` means: `τ m = m`, `τ ^ p = 1`, `0 < p`, some `e` has `∑ i < p, τ^i e ≡ 1` mod `m`, and every prime modulo which some `τ^i` with `0 < i < p` is the identity contains `m`. If the unitary `s` is `1 + m Y` and its twisted norm `s · τ s ⋯ τ^{p-1} s` is `1` (`mapEnd hτ` applies `τ` to the entries), then `s · τ g = g`, that is `s = g · (τ g)⁻¹`, for a unitary `g = 1 + m W`. -/ lemma unitary_hilbert90_at_level (hO : IsProfiniteRing O) {m c : O} (h_tame_zero : IsTameAtLevel τ p 0) (hc : τ c = c) (hc_unit : IsUnit (c - star c)) (hτ : ∀ x : O, τ (star x) = star (τ x)) (s : U (1 : Matrix n n O)) {Y : Matrix n n O} (hm_star : star m = m) (h_tame : IsTameAtLevel τ p m) (hs : (s : Matrix n n O) = 1 + m • Y) (hs_norm : ((twistedNorm (mapEnd hτ) p s : U (1 : Matrix n n O)) : Matrix n n O) = 1) : ∃ (g : U (1 : Matrix n n O)) (W : Matrix n n O), s * mapEnd hτ g = g ∧ (g : Matrix n n O) = 1 + m • W := by -- Split `s` in `GL n O` by some `k ≡ 1 mod m`, then correct `k` to a unitary `k * g` by a -- `τ`-fixed orthonormal frame `g` of the hermitian matrix `kᴴ * k`. have h_norm : twistedNorm (GeneralLinearGroup.map τ) p (s : GL n O) = 1 := (map_twistedNorm (U 1).subtype (fun g ↦ rfl) p s).symm.trans (Units.ext hs_norm) obtain ⟨k, W, hk_cob, hk⟩ := h_tame.hilbert90_gl (.inr hO) (s : GL n O) hs h_norm -- `kᴴ * k` is fixed by `τ` because `sᴴ * s = 1`. have h_prod : ((s : Matrix n n O) * k.val.map τ)ᴴ * ((s : Matrix n n O) * k.val.map τ) = k.valᴴ * k.val := by rw [hk_cob] have h_fix : (k.valᴴ * k.val).map τ = k.valᴴ * k.val := by simpa [conjTranspose_map _ hτ, ← inv_val_eq_conjTranspose, mul_assoc] using h_prod have hkk_unit : IsUnit (k.valᴴ * k.val) := (star k * k).isUnit obtain ⟨g, V, hg, hg_fix, hg_frame⟩ := exists_fixed_orthonormal_frame hO h_tame_zero hc hc_unit hτ hkk_unit (by simp) h_fix have h_lev : k.valᴴ * k.val - 1 = m • (W + Wᴴ * k.val) := by simp [hk, hm_star, mul_add, add_mul, smul_add, smul_smul, add_left_comm, add_assoc, sub_eq_iff_eq_add'] refine ⟨of isUnit_one (k.val * g) (by simpa [conjTranspose_mul, Matrix.mul_assoc] using hg_frame), W + k.val * V * (W + Wᴴ * k.val), ?_, ?_⟩ · -- on matrices, `s * τ (k g) = (s * τ k) * τ g = k * g` simp [Units.ext_iff, U.map, ← mul_assoc, hk_cob, hg_fix, Subtype.ext_iff] · calc k.val * g = k.val + m • (k.val * V * (W + Wᴴ * k.val)) := by simp [hg, h_lev, mul_add, mul_assoc] _ = 1 + m • (W + k.val * V * (W + Wᴴ * k.val)) := by rw [smul_add, ← add_assoc, ← hk] end New end UnitaryHilbert90 /-! ## Hilbert 90 for finite ideles `New.hilbert90_finite_idele` is Hilbert's Theorem 90 for the finite adeles of `L` and an automorphism `σ` of `L/K`, acting through `New.adeleMap`. It follows from Galois descent for the semilinear map `x ↦ u * σ x`, together with the fact that two of its fixed points have a common divisor that is again fixed. -/ section IdeleHilbert90 open AlgEquiv Valued namespace New variable {K L : Type*} [Field K] [Field L] [NumberField L] [Algebra K L] {σ : Gal(L/K)} {u : 𝔸f L} /-- The `i`-th iterate of the action of `σ` on finite adeles is the action of `σ ^ i`. -/ lemma adeleMap_gal_pow (i : ℕ) : adeleMap (σ : L →+* L) ^ i = adeleMap (↑(σ ^ i) : L →+* L) := (map_pow galAdeleHom σ i).symm /-- Let `a` and `b` be finite adeles of `L` that solve `u * σ x = x`, where `σ` acts through `New.adeleMap`. Then some solution `c` divides both: at each place take whichever of `a`, `b` has the larger valuation. -/ lemma exists_dvd_dvd_mul_adeleMap_eq {a b : 𝔸f L} (ha : u * adeleMap (σ : L →+* L) a = a) (hb : u * adeleMap (σ : L →+* L) b = b) : ∃ c : 𝔸f L, c ∣ a ∧ c ∣ b ∧ u * adeleMap (σ : L →+* L) c = c := by let c : 𝔸f L := b + idem {w | v (b w) ≤ v (a w)} * (a - b) have c_apply (w : FinPlace L) : c w = if v (b w) ≤ v (a w) then a w else b w := by by_cases h : v (b w) ≤ v (a w) <;> simp [c, h] have dvd_of_le {x : 𝔸f L} (hx : ∀ w : FinPlace L, v (x w) ≤ v (c w)) : c ∣ x := by obtain ⟨y, -, hy⟩ := exists_eq_mul_iff_v_le.mpr hx exact ⟨y, hy⟩ have ha_le (w : FinPlace L) : v (a w) ≤ v (c w) := by grind have hb_le (w : FinPlace L) : v (b w) ≤ v (c w) := by simp [c_apply, apply_ite] refine ⟨c, dvd_of_le ha_le, dvd_of_le hb_le, DFunLike.ext _ _ fun w ↦ ?_⟩ have haw : u w * adeleMap (σ : L →+* L) a w = a w := by rw [← FiniteAdeleRing.mul_apply, ha] have hbw : u w * adeleMap (σ : L →+* L) b w = b w := by rw [← FiniteAdeleRing.mul_apply, hb] change u w * adeleMap (σ : L →+* L) c w = c w by_cases hw : u w = 0 · -- both `a` and `b`, hence `c`, vanish at a zero of `u` have ha_zero : a w = 0 := by rw [← haw, hw, zero_mul] simp [c_apply, hw, ha_zero, show b w = 0 by rw [← hbw, hw, zero_mul]] · rw [adeleMap_apply (σ : L →+* L) rfl] at haw hbw ⊢ -- Since `σ` preserves valuations, the choice at `w` agrees with that at the pullback of `w`. have h_choice : v (b w) ≤ v (a w) ↔ v (b (FinPlace.comap (σ : L →+* L) w)) ≤ v (a (FinPlace.comap (σ : L →+* L) w)) := by rw [← haw, ← hbw] simp [pos_iff_ne_zero, hw, v_locMap_eq_of_surjective (σ : L →+* L) rfl σ.surjective] rw [c_apply, c_apply, if_congr h_choice rfl rfl] split_ifs exacts [haw, hbw] /-- Hilbert's Theorem 90 for finite ideles. Let `σ ∈ Gal(L/K)` have order `n`, and let the finite adele `u` of `L` have norm `∏_{i < n} σ ^ i u = 1`. Then `u * σ c = c` for some invertible finite adele `c`. -/ lemma hilbert90_finite_idele [NumberField K] (hu : ∏ i ∈ Finset.range (orderOf σ), adeleMap (↑(σ ^ i) : L →+* L) u = 1) : ∃ c : 𝔸f L, IsUnit c ∧ u * adeleMap (σ : L →+* L) c = c := by -- By Galois descent `1` lies in the `L`-span of the solutions of `u * σ c = c`. Any two solutions -- have a common divisor that is a solution, so a single solution divides `1`. let τ : 𝔸f L →ₛₗ[(σ : L →+* L)] 𝔸f L := { toFun x := u * adeleMap σ x map_add' x y := by rw [map_add, mul_add] map_smul' r x := by simp [Algebra.smul_def, mul_left_comm] } -- `τ^[n] x = (∏ i < n, σ ^ i u) * σ ^ n x`; for `n = orderOf σ` this is `x`, by `hu`. have τ_order (x : 𝔸f L) : τ^[orderOf σ] x = x := by simp [τ, iterate_mul_apply, adeleMap_gal_pow, aut_one, hu] -- Descent (`σ` is tame at level `1`) at the prime `⊥` of the field `L`. obtain ⟨r, hr, h_span⟩ := (isTameAtLevel_gal σ).exists_smul_mem_span_fixedPoints τ τ_order ⊥ one_ne_zero -- Every element of the span of the solutions is divisible by a solution. have divisible (x : 𝔸f L) (hx : x ∈ Submodule.span L (Function.fixedPoints τ)) : ∃ c : 𝔸f L, c ∣ x ∧ u * adeleMap σ c = c := by induction hx using Submodule.span_induction with | mem c hc => exact ⟨c, dvd_rfl, hc⟩ | zero => exact ⟨0, dvd_refl 0, by simp⟩ | add x y _ _ hx hy => obtain ⟨a, ha_dvd, ha⟩ := hx obtain ⟨b, hb_dvd, hb⟩ := hy obtain ⟨c, hca, hcb, hc⟩ := exists_dvd_dvd_mul_adeleMap_eq ha hb exact ⟨c, dvd_add (hca.trans ha_dvd) (hcb.trans hb_dvd), hc⟩ | smul r x _ hx => obtain ⟨c, hc_dvd, hc⟩ := hx exact ⟨c, dvd_smul_of_dvd r hc_dvd, hc⟩ have one_mem : (1 : 𝔸f L) ∈ Submodule.span L (Function.fixedPoints τ) := by simpa [smul_smul, Ideal.mem_bot.not.mp hr] using h_span (r⁻¹ • 1) obtain ⟨c, hc_dvd, hc⟩ := divisible 1 one_mem exact ⟨c, isUnit_of_dvd_one hc_dvd, hc⟩ end New end IdeleHilbert90