Lean formalization of the Riemann Hypothesis (Alpöge, 2026-11-20) being cleaned up by members of the Lean community.
Python
module
public import Mathlib.Analysis.CStarAlgebra.CStarMatrix
import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension
import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ContDiff
import Mathlib.RingTheory.Coalgebra.CoassocSimps
import Mathlib.Topology.UniformSpace.Uniformizable
import TauCeti.Analysis.Calculus.ContDiff.Matrix
public import New.Determinant.Exchange.LargeTriple
import Lib.Adelic.Unitary.RationalPoints
import Lib.General.Analysis.MeanValueAndTaylor
import Lib.PadicComparison.Descent.TestCategory
import Lib.Weil.MixedModel.ThetaInvariance
/-!
# Smooth local Witt theorem and the exchange identity for `V' ⊕ W₁` and `V'`
Construction of the data at the real places for the identity `New.Exchange.RowColExchangeIdentity`
between the theta integrals of the pairs `(X, V' ⊕ W₁)` and `(X, V')`, where `X` splits over `W₁`.
* `New.Exchange.exists_isSchwartzVector_realSlice_eq`: a Schwartz Fock vector whose slices are a
bump function times `realWeil 1 v`, scaled so that its slice at 0 for the opposite splitting is
`v`.
* `New.Exchange.exists_contDiff_witt`: a local form of Witt's theorem for spans: frames near a
nondegenerate frame `x` lie in the span of a unitary image of `x` that depends smoothly on them.
* `New.Exchange.exists_rowColExchangeIdentity_sum`: two vectors for which
`New.Exchange.RowColExchangeIdentity` holds for these two pairs, one of them with a prescribed
slice at 0.
Notions from other files:
* `New.Space.Splitting`: a decomposition V = (lE^p ⊕ kE^p) ⊥ iV₀ with dual isotropic frames l, k and
an isometric embedding i of V₀; `New.Space.Splitting.symm` exchanges k and l. It is adapted
(`New.Exchange.IsBaseAdapted`) if the frames are orthonormal at the infinite places and integral
at the finite ones.
* `New.PairFock E s t`: the Fock space of matrices whose `(i, j)` coordinate has the sign
`t i * s j`, repeated at every infinite place. These signs are `New.homSigns s t`, and repeating
them at every place is `New.realSigns`.
* `New.realPairWeil γ γ'`: the Weil representation on this Fock space, restricted to a pair of
unitary groups at the infinite places, twisted by the powers of the determinants with exponents
`γ` on the second and `-γ'` on the first.
* `New.Exchange.IsSchwartzVector`: all moments of the Fock vector are finite.
* `New.Exchange.realSlice`: the slice of a vector in the mixed Schrödinger–Fock model of an adapted
splitting.
* `New.Exchange.RowColExchangeIdentity`: two theta integrals are proportional on admissible data,
with a formula for the absolute value of the factor.
## Relation to the literature
See `New.Determinant.Exchange.TheoremForPartners` for related work. See
`Lib.Adelic.Witt.IwasawaDecomposition` for sources.
-/
@[expose] public section
namespace New.Exchange
open Matrix NumberField MeasureTheory Complex Fock Space Filter ContDiff Norms.Elementwise Finset
Function Splitting Measure MixedModel GeneralLinearGroup ENNReal IsHermitianInvolution U
private lemma contDiff_mat_mul {X l o k : Type*} {N : ℕ∞ω} [NormedAddCommGroup X]
[NormedSpace ℝ X] [Fintype l] [Fintype o] [Fintype k]
{f : X → Matrix l o ℂ} {g : X → Matrix o k ℂ}
(hf : ContDiff ℝ N f) (hg : ContDiff ℝ N g) : ContDiff ℝ N fun x ↦ f x * g x :=
contDiff_matrix_mul.comp (hf.prodMk hg)
private lemma continuous_mat_mul {X l o k : Type*} [TopologicalSpace X] [Fintype l] [Fintype o]
[Fintype k] {f : X → Matrix l o ℂ} {g : X → Matrix o k ℂ}
(hf : Continuous f) (hg : Continuous g) : Continuous fun x ↦ f x * g x :=
(contDiff_matrix_mul (N := 0)).continuous.comp (hf.prodMk hg)
private lemma contDiff_mat_det {X k : Type*} {N : ℕ∞ω} [NormedAddCommGroup X] [NormedSpace ℝ X]
[Fintype k] [DecidableEq k] {f : X → Matrix k k ℂ} (hf : ContDiff ℝ N f) :
ContDiff ℝ N fun x ↦ (f x).det :=
ContDiff.matrix_det fun i j ↦ contDiff_pi.1 (contDiff_pi.1 hf i) j
private lemma pi_mul_inv_apply {ι G : Type*} [Group G] (a b : ι → G) (w : ι) :
(a * b)⁻¹ w = b⁻¹ w * a⁻¹ w := by
rw [_root_.mul_inv_rev, Pi.mul_apply]
variable {E n a b m : Type} [Field E] [CMType E] [WeilData E] [Fintype n] [DecidableEq n]
[Fintype a] [DecidableEq a] [Fintype b] [DecidableEq b] [Fintype m] [DecidableEq m]
{s : n → ℤˣ} {r : m → ℤˣ} {X : Space E m r} {W₁ : Space E n s}
/-- Let `τ ≥ 0` be smooth, compactly supported and nonzero at some `y`, and let `v` be a Schwartz
vector for `(W₁, V')`. Then there are a complex number `κ` and a Schwartz vector `Λ` for `(X, V')`
whose slice at each `x` is `τ x • κ` times `realWeil 1 v`, and whose slice at `0` for `D.symm`, the
splitting with the two isotropic frames exchanged, is `v`. -/
lemma exists_isSchwartzVector_realSlice_eq (D : X.Splitting W₁ b) [IsBaseAdapted D] {t' : a → ℤˣ}
(V' : Space E a t') (τ : (InfinitePlace E × a × b → ℂ) → ℝ) (hτ : ContDiff ℝ ∞ τ)
{v : fockSpace (realSigns E (homSigns s t'))} (hv : IsSchwartzVector v)
(hsupp : HasCompactSupport τ) (hτ₀ : 0 ≤ τ) (y : InfinitePlace E × a × b → ℂ) (hy : τ y ≠ 0) :
∃ (κ : ℂ) (Λ : fockSpace (realSigns E (homSigns r t'))),
IsSchwartzVector Λ ∧
realSlice D.symm V' 0 Λ = v ∧
∀ x : InfinitePlace E × a × b → ℂ,
(isAdapted_homSource D V').mixedModel.slice x Λ = (τ x • κ) • realWeil 1 v := by
-- Choose `κ` so that `τ κ` and the Gaussian slices of the vacuum have the same integral. The
-- slice at `0` for `D.symm` is the integral of all slices, so the section `τ κ • v` gives `v`.
have hpos : 0 < ∫ x, τ x ∂normalizedVolume _ :=
hτ.continuous.integral_pos_of_hasCompactSupport_nonneg_ne_zero hsupp hτ₀ hy
set 𝓜 := (isAdapted_homSource D V').mixedModel
obtain ⟨κ, hκ⟩ : ∃ κ : ℂ,
∫ x, 𝓜.slice x Fock.vacVector 0 ∂normalizedVolume _ = (∫ x, τ x ∂normalizedVolume _ : ℝ) *
κ :=
⟨_, (mul_div_cancel₀ _ (ofReal_ne_zero.2 hpos.ne')).symm⟩
obtain ⟨Λ, hΛ, hslice⟩ := 𝓜.exists_isSchwartzVector_slice_eq (hτ.smul_const κ) hsupp.smul_right
(u := fun _ ↦ 1) contDiff_const hv
-- It is enough to compare the two vectors after tensoring with zero terms.
refine ⟨κ, Λ, hΛ, eq_of_integrated_zeroTerm_eq (isAdapted_homSource D.symm V') fun f ↦ ?_, hslice⟩
-- Both sides are integrals of slices for `volume`, which is a multiple of the Haar measure
-- `vacuumMeasure` moved by `star g`, for the change of frame `g`.
let g : GL (a × b) (𝔸 E) := adaptedHomBasis b V'
have : MeasurableConstSMul (GL (a × b) (𝔸 E)) (a × b → 𝔸 E) :=
ContinuousConstSMul.toMeasurableConstSMul
let ν : Measure (a × b → 𝔸 E) :=
(DomMulAct.mk (star g) : (GL (a × b) (𝔸 E))ᵈᵐᵃ) • (vacuumMeasure : Measure (a × b → 𝔸 E))
obtain ⟨c, hc⟩ : ∃ c : NNReal, volume = c • ν := ⟨_, isAddLeftInvariant_eq_smul volume ν⟩
let term (x : a × b → 𝔸 E) : 𝒮 (X.hom V') → 𝒮 (W₁.hom V') :=
(D.homSource V').slice ((g⁻¹ : GL (a × b) (𝔸 E)).valᴴ *ᵥ x)
suffices h : ∫ x, term x ((X.hom V').integrated Λ f) ∂vacuumMeasure =
∫ x, (W₁.hom V').integrated v (term x ((X.hom V').projReal f)) ∂vacuumMeasure by
calc _ = (D.symm.homSource V').zeroTerm ((X.hom V').integrated Λ f) :=
(zeroTerm_integrated (isAdapted_homSource D.symm V') Λ f).symm
_ = ∫ x, (D.homSource V').slice x ((X.hom V').integrated Λ f) :=
symm_homSource_zeroTerm_eq_integral D V' _
_ = ∫ x,
(W₁.hom V').integrated v ((D.homSource V').slice x ((X.hom V').projReal f)) := by
simpa [hc, ν, integral_domSMul, star, -coe_units_inv] using congrArg (c • ·) h
_ = (W₁.hom V').integrated v ((D.symm.homSource V').zeroTerm ((X.hom V').projReal f)) := by
rw [symm_homSource_zeroTerm_eq_integral,
← (integrated _ v).integral_comp_comm (by fun_prop)]
-- In real and finite coordinates, both integrands are a function of the real variable times the
-- same function `ψ` of the finite one.
have term_eq (Φ : PairFock E r t') (x : a × b → 𝔸 E) : term x ((X.hom V').integrated Φ f) =
(W₁.hom V').integrated (𝓜.slice (realCoord x) Φ) ((D.homSource V').slice
(g⁻¹.valᴴ *ᵥ fun i ↦ (0, (x i).2)) ((X.hom V').projReal f)) :=
slice_integrated (isAdapted_homSource D V') x Φ f
let ψ (x : a × b → 𝔸f E) : 𝒮 (W₁.hom V') :=
(W₁.hom V').integrated v ((D.homSource V').slice
(g.val⁻¹ᴴ *ᵥ fun i ↦ (0, (WeilData.scaleIdele E).val.2 * x i)) ((X.hom V').projReal f))
let μ := (normalizedVolume (InfinitePlace E × a × b)).prod (latticeMeasure E (a × b))
-- Split off the real integrals (Fubini) and compare them by `hκ`.
have h : ∫ x, ((τ x.1 : ℂ) * κ) • ψ x.2 ∂μ = ∫ x, 𝓜.slice x.1 Fock.vacVector 0 • ψ x.2 ∂μ := by
rw [integral_prod_smul (fun x ↦ (τ x : ℂ) * κ) ψ, integral_mul_const, integral_complex_ofReal,
integral_prod_smul (fun x ↦ 𝓜.slice x Fock.vacVector 0) ψ, hκ]
-- Here `projReal` is `integrated` at the vacuum, so `term_eq` applies to both sides.
simp only [term_eq]
-- Insert the slice of `Λ` and split the adelic variable into real and finite parts.
have h_real (y : (InfinitePlace E × a × b → ℂ) × (a × b → 𝔸f E)) :
realCoord ((adelicSum E 1).equiv y) = y.1 := by
funext p
change ((WeilData.scaleIdele E).val.1 p.1 * y.1 p) / (WeilData.scaleIdele E).val.1 p.1 = y.1 p
have hne : (WeilData.scaleIdele E).val.1 p.1 ≠ 0 := fun h0 ↦ by
have h1 := congrFun (congrArg Prod.fst (WeilData.scaleIdele E).mul_inv) p.1
simp only [Prod.fst_mul, Pi.mul_apply, h0, zero_mul, Prod.fst_one, Pi.one_apply,
zero_ne_one] at h1
exact mul_div_cancel_left₀ _ hne
rw [(adelicSum E 1).integral_eq_integral_prod, (adelicSum E 1).integral_eq_integral_prod]
have h_lhs (y : (InfinitePlace E × a × b → ℂ) × (a × b → 𝔸f E)) :
(W₁.hom V').integrated (𝓜.slice (realCoord ((adelicSum E 1).equiv y)) Λ)
((D.homSource V').slice (g⁻¹.valᴴ *ᵥ fun i ↦ (0, ((adelicSum E 1).equiv y i).2))
((X.hom V').projReal f)) = ((τ y.1 : ℂ) * κ) • ψ y.2 := by
rw [h_real, hslice, map_one, one_apply_eq_self, map_smul, _root_.smul_apply, real_smul,
coe_units_inv]
rfl
have h_rhs (y : (InfinitePlace E × a × b → ℂ) × (a × b → 𝔸f E)) :
(W₁.hom V').integrated v ((W₁.hom V').integrated
(𝓜.slice (realCoord ((adelicSum E 1).equiv y)) Fock.vacVector)
((D.homSource V').slice (g⁻¹.valᴴ *ᵥ fun i ↦ (0, ((adelicSum E 1).equiv y i).2))
((X.hom V').projReal f))) = 𝓜.slice y.1 Fock.vacVector 0 • ψ y.2 := by
rw [h_real]
simp [ψ, g, adelicSum]
simp only [h_lhs, h_rhs]
exact h
/-- Taking the slice at `0` is onto on Schwartz vectors. Every Schwartz vector `v` (all moments
finite) in the Fock space `PairFock E s t'` of `(W₁, V')` is the slice at `0` of a Schwartz vector
in the Fock space `PairFock E r t'` of `(X, V')`. -/
lemma exists_isSchwartzVector_realSlice_zero_eq (A : X.Splitting W₁ b) [IsBaseAdapted A]
{t' : a → ℤˣ} (V' : Space E a t') {v : PairFock E s t'} (hv : IsSchwartzVector v) :
∃ w : PairFock E r t', IsSchwartzVector w ∧ realSlice A V' 0 w = v := by
-- Prescribe the slices along `A.symm`, with the standard smooth bump function. The splitting
-- opposite to `A.symm` is `A` by definition.
let τ : (InfinitePlace E × a × b → ℂ) → ℝ := ExistsContDiffBumpBase.u
have hτ_zero : τ 0 ≠ 0 := (ExistsContDiffBumpBase.u_support _).ge (by simp)
obtain ⟨-, w, hw, hw_zero, -⟩ := exists_isSchwartzVector_realSlice_eq A.symm V' τ
(ExistsContDiffBumpBase.u_smooth _) hv (ExistsContDiffBumpBase.u_compact_support _)
ExistsContDiffBumpBase.u_nonneg 0 hτ_zero
exact ⟨w, hw, hw_zero⟩
/-- A smooth local form of Witt's theorem, for spans. Let `J` be Hermitian and `x` a frame
(a matrix of column vectors) with invertible Gram matrix `xᴴ * J * x`. There are elements `k y` of
the unitary group `U J`, indexed by all frames `y`, such that the matrix of `k y` is a smooth
function of `y` and, for `y` near `x`, the columns of `y` are linear combinations of those of
`k y * x`. -/
theorem exists_contDiff_witt {J : Matrix m m ℂ} (hJ : Jᴴ = J) {x : Matrix m b ℂ}
(hdet : (xᴴ * J * x).det ≠ 0) :
∃ k : Matrix m b ℂ → U J,
ContDiff ℝ ∞ (fun y : Matrix m b ℂ ↦ (k y : Matrix m m ℂ)) ∧
∀ᶠ y : Matrix m b ℂ in nhds x, ∃ c : Matrix b b ℂ, (k y : Matrix m m ℂ) * x * c = y := by
-- `L a` lies in the Lie algebra of `U J`, and `a - L a` keeps the span of `x`. The map
-- `T a = exp (L a) * (a - L a)` has derivative the identity at `1`, so it has a local inverse
-- `A`; apply `A` to a matrix `z y` near `1` with `z y * x = y`.
let w : Matrix b m ℂ := (xᴴ * J * x)⁻¹ * xᴴ
have hw (y : Matrix m b ℂ) : y * w * J * x = y := by
rw [Matrix.mul_assoc] at hdet
simp only [w, Matrix.mul_assoc, nonsing_inv_mul _ (isUnit_iff_ne_zero.2 hdet), Matrix.mul_one]
let L (a : Matrix m m ℂ) : Matrix m m ℂ := (a * x * w - x * w * aᴴ) * J
have hL (a : Matrix m m ℂ) : L a ∈ unitaryLie J := by
change (L a)ᴴ * J + J * L a = 0
simp only [L, w, conjTranspose_mul, conjTranspose_sub, conjTranspose_conjTranspose,
conjTranspose_nonsing_inv, hJ, Matrix.mul_assoc, Matrix.sub_mul, Matrix.mul_sub,
sub_add_sub_cancel, sub_self]
have hL_span (a : Matrix m m ℂ) : (a - L a) * x = x * (w * aᴴ * J * x) := by
simp only [L, Matrix.sub_mul, hw, _root_.sub_sub_cancel, Matrix.mul_assoc x]
let T (a : Matrix m m ℂ) : Matrix m m ℂ := NormedSpace.exp (L a) * (a - L a)
have hL₁ : L 1 = 0 := by
simp only [L, Matrix.one_mul, conjTranspose_one, Matrix.mul_one, sub_self, Matrix.zero_mul]
have hT₁ : T 1 = 1 := by
simp only [T, hL₁, NormedSpace.exp_zero, sub_zero, Matrix.one_mul]
have hL_smooth : ContDiff ℝ ω L :=
contDiff_mat_mul
((contDiff_mat_mul (contDiff_mat_mul contDiff_id contDiff_const) contDiff_const).sub
(contDiff_mat_mul contDiff_const (contDiff_conjTranspose.comp contDiff_id)))
contDiff_const
have hT' : HasFDerivAt T (ContinuousLinearEquiv.refl ℝ _).toContinuousLinearMap 1 := by
obtain ⟨L', hL'⟩ := (hL_smooth.of_le le_top).differentiable_one 1
open Norms.L2Operator in
-- The product rule gives `(id - L') + L'`.
refine ((HasFDerivAt.comp 1 (by simpa only [hL₁] using hasFDerivAt_exp_zero) hL').fun_mul'
((hasFDerivAt_id 1).fun_sub hL')).congr_fderiv ?_
simp only [hL₁, Function.comp_apply, NormedSpace.exp_zero, sub_zero, id, one_smul,
MulOpposite.op_one]
exact sub_add_cancel _ L'
obtain ⟨A, hA, hTA⟩ : ∃ A, ContDiff ℝ ∞ A ∧ ∀ᶠ z in nhds 1, T (A z) = z := by
have hT : ContDiffAt ℝ ω T 1 :=
(contDiff_mat_mul (contDiff_matrix_exp.comp hL_smooth)
(contDiff_id.sub hL_smooth)).contDiffAt
obtain ⟨A, hA, h_eq⟩ := exists_contDiff_eventuallyEq
(hT.to_localInverse hT' (WithTop.coe_ne_top (a := (0 : ℕ∞))).symm)
rw [← hT₁]
exact ⟨A, hA, (h_eq.fun_comp T).trans (HasStrictFDerivAt.eventually_right_inverse _)⟩
let z (y : Matrix m b ℂ) : Matrix m m ℂ := 1 - (x - y) * w * J
have hz_smooth : ContDiff ℝ ∞ z :=
contDiff_const.sub
(contDiff_mat_mul (contDiff_mat_mul (contDiff_const.sub contDiff_id) contDiff_const)
contDiff_const)
have hz : Tendsto z (nhds x) (nhds 1) :=
hz_smooth.continuous.tendsto' _ _ (by simp only [z, sub_self, Matrix.zero_mul, sub_zero])
refine ⟨fun y ↦ expU ⟨L (A (z y)), hL _⟩,
((contDiff_matrix_exp.comp (hL_smooth.of_le le_top)).comp hA).comp hz_smooth,
(hz.eventually hTA).mono fun y hy ↦ ⟨w * (A (z y))ᴴ * J * x, ?_⟩⟩
calc NormedSpace.exp (L (A (z y))) * x * (w * (A (z y))ᴴ * J * x)
_ = T (A (z y)) * x := by rw [Matrix.mul_assoc, ← hL_span, ← Matrix.mul_assoc]
_ = z y * x := by rw [hy]
_ = y := by rw [Matrix.sub_mul, Matrix.one_mul, hw, _root_.sub_sub_cancel]
/-- The external product `realBoxProd he v w` of two Schwartz Fock vectors (all moments finite), for
a splitting `e` of the coordinates compatible with the signs, is a Schwartz vector. -/
lemma isSchwartzVector_realBoxProd {ι ι₁ ι₂ : Type*} [Fintype ι] [DecidableEq ι] [Fintype ι₁]
[DecidableEq ι₁] [Fintype ι₂] [DecidableEq ι₂] {ε : ι → ℤˣ} {ε₁ : ι₁ → ℤˣ} {ε₂ : ι₂ → ℤˣ}
{e : ι₁ ⊕ ι₂ ≃ ι}
(he : ε ∘ e = ε₁ ⊕ᵥ ε₂) {v : fockSpace ε₁} {w : fockSpace ε₂} (hv : IsSchwartzVector v)
(hw : IsSchwartzVector w) : IsSchwartzVector (realBoxProd he v w) := by
-- In product coordinates the tensor is the product of the two functions, and its moment
-- weight is at most the product of their weights.
intro N
let S := realCoordSum he
have h_weight (p : (ι₁ → ℂ) × (ι₂ → ℂ)) :
(1 + ‖S.equiv p‖ₑ) ^ N ≤ (1 + ‖p.1‖ₑ) ^ N * (1 + ‖p.2‖ₑ) ^ N := by
have h_norm : ‖S.equiv p‖ₑ ≤ ‖p.1‖ₑ + ‖p.2‖ₑ := by
rw [eNorm_eq_nnNorm, eNorm_eq_nnNorm, eNorm_eq_nnNorm, ← ENNReal.coe_add,
ENNReal.coe_le_coe, pi_nnNorm_le_iff]
refine e.surjective.forall.2 ?_
change ∀ i, ‖(p.1 ⊕ᵥ p.2) (e.symm (e i))‖₊ ≤ _
simp only [e.symm_apply_apply]
rintro (i | i)
· exact (nnNorm_le_pi_nnNorm p.1 i).trans le_self_add
· exact (nnNorm_le_pi_nnNorm p.2 i).trans le_add_self
rw [← mul_pow]
refine pow_le_pow_left' ((add_le_add_right h_norm 1).trans ?_) N
calc
_ ≤ 1 + (‖p.1‖ₑ + ‖p.2‖ₑ) + ‖p.1‖ₑ * ‖p.2‖ₑ := le_self_add
_ = _ := by ring
rw [fockMoment, ← S.measurePreserving_equiv.lintegral_comp (by fun_prop)]
refine ne_top_of_le_ne_top (mul_ne_top (hv N) (hw N)) ?_
rw [fockMoment, fockMoment, ← lintegral_prod_mul (by fun_prop) (by fun_prop)]
refine lintegral_mono fun p ↦ ?_
rw [realBoxProd, Heisenberg.OrthogonalSum.tmul_apply, S.equiv.symm_apply_apply, eNorm_mul]
exact (mul_le_mul_left (h_weight p) _).trans_eq (by ac_rfl)
/-- Matrix inversion agrees, near a matrix `A₀` of nonzero determinant, with a function that is
smooth on all matrices. -/
lemma exists_contDiff_eventuallyEq_inv {A₀ : Matrix b b ℂ} (hdet : A₀.det ≠ 0) :
∃ γ : Matrix b b ℂ → Matrix b b ℂ,
ContDiff ℝ ∞ γ ∧ γ =ᶠ[nhds A₀] fun A : Matrix b b ℂ ↦ A⁻¹ := by
obtain ⟨u, rfl⟩ := (isUnit_iff_isUnit_det A₀).2 hdet.isUnit
apply exists_contDiff_eventuallyEq
simp only [nonsing_inv_eq_ringInverse]
-- Transport smoothness of ring inversion from the operator norm to the entrywise norm.
open Norms.Operator in
exact
let e : (b → b → ℂ) ≃L[ℝ] Matrix b b ℂ := .refl ..
let x : b → b → ℂ := (u : Matrix b b ℂ)
show ContDiffAt ℝ ω (e.symm ∘ Ring.inverse ∘ e) x from
e.symm.contDiff.comp_contDiffAt x ((contDiffAt_ringInverse ℝ u).comp x e.contDiff.contDiffAt)
/-- If `x * A` has an invertible Gram matrix for `J` and equals `g * x₀ * c` with `g` in the unitary
group `U J`, then `x` has the same form `g * x₀ * c'`, and `c'` carries the Gram matrix of `x₀` to
that of `x`. -/
lemma exists_mul_mul_eq_and_gram_eq {J : Matrix m m ℂ} (g : U J) {x₀ x : Matrix m b ℂ}
{A c : Matrix b b ℂ}
(hc : (g : Matrix m m ℂ) * x₀ * c = x * A) (hdet : ((x * A)ᴴ * J * (x * A)).det ≠ 0) :
∃ c' : Matrix b b ℂ,
(g : Matrix m m ℂ) * x₀ * c' = x ∧ c'ᴴ * (x₀ᴴ * J * x₀) * c' = xᴴ * J * x := by
rw [gram_mul, det_mul] at hdet
have hx : (g : Matrix m m ℂ) * x₀ * (c * A⁻¹) = x := by
rw [← Matrix.mul_assoc, hc, Matrix.mul_assoc,
mul_nonsing_inv _ (isUnit_iff_ne_zero.2 (right_ne_zero_of_mul hdet)), Matrix.mul_one]
exact ⟨c * A⁻¹, hx, by conv_rhs => rw [← hx, gram_mul, U.gram_invariant]⟩
/-- Smooth data for Witt's theorem near a frame `x₀`, for a form `J`: a function `γ` on square
matrices, unitary elements `k y` indexed by frames `y`, and a bump function `σ` on families of
frames. For each member `y` of a family at which `σ` does not vanish, `γ` inverts the Gram matrix of
`y` and `y` lies in the span of `k y * x₀`. -/
structure IsWittBump {ι : Type*} [Fintype ι] (J : Matrix m m ℂ) (x₀ : Matrix m b ℂ)
(γ : Matrix b b ℂ → Matrix b b ℂ) (k : Matrix m b ℂ → U J) (σ : (ι → Matrix m b ℂ) → ℝ) :
Prop where
/-- `γ` is smooth. -/
contDiff_inv : ContDiff ℝ ∞ γ
/-- `γ` inverts the Gram matrix of `x₀`. -/
inv_gram_base : γ (x₀ᴴ * J * x₀) = (x₀ᴴ * J * x₀)⁻¹
/-- The matrix of `k y` is a smooth function of `y`. -/
contDiff_unitary : ContDiff ℝ ∞ fun y : Matrix m b ℂ ↦ (k y : Matrix m m ℂ)
/-- `σ` is smooth. -/
contDiff_bump : ContDiff ℝ ∞ σ
/-- `σ` has compact support. -/
hasCompactSupport_bump : HasCompactSupport σ
/-- `σ` is nonnegative. -/
bump_nonneg : ∀ x : ι → Matrix m b ℂ, 0 ≤ σ x
/-- `σ` is `1` at the constant family `x₀`. -/
bump_base : σ (fun _ : ι ↦ x₀) = 1
/-- Where `σ` does not vanish, each frame `y` lies in the span of `k y * x₀`. -/
exists_mul_eq : ∀ x : ι → Matrix m b ℂ, σ x ≠ 0 → ∀ i : ι,
∃ c : Matrix b b ℂ, (k (x i) : Matrix m m ℂ) * x₀ * c = x i
/-- Where `σ` does not vanish, `γ` inverts the Gram matrix of each frame. -/
inv_gram : ∀ x : ι → Matrix m b ℂ, σ x ≠ 0 → ∀ i : ι,
γ ((x i)ᴴ * J * x i) = ((x i)ᴴ * J * x i)⁻¹
/-- Where `σ` does not vanish, the Gram matrix of each frame is invertible. -/
det_gram_ne_zero : ∀ x : ι → Matrix m b ℂ, σ x ≠ 0 → ∀ i : ι, ((x i)ᴴ * J * x i).det ≠ 0
/-- For `J` Hermitian and a frame `x₀` with invertible Gram matrix there are a smooth function `γ`,
elements `k y` of `U J` depending smoothly on the frame `y` and a bump function `σ`, equal to 1 at
the constant family `x₀`, such that for each member `y` of a family where `σ` is nonzero `γ` inverts
the invertible Gram matrix of `y` and `y` lies in the span of `k y * x₀` (`IsWittBump`). -/
lemma exists_contDiff_witt_and_bump {ι : Type*} [Fintype ι] {J : Matrix m m ℂ} (hJ : Jᴴ = J)
{x₀ : Matrix m b ℂ} (hdet : (x₀ᴴ * J * x₀).det ≠ 0) :
∃ (γ : Matrix b b ℂ → Matrix b b ℂ) (k : Matrix m b ℂ → U J) (σ : (ι → Matrix m b ℂ) → ℝ),
IsWittBump J x₀ γ k σ := by
obtain ⟨γ, γ_smooth, γ_inv⟩ := exists_contDiff_eventuallyEq_inv hdet
obtain ⟨k, k_smooth, span_near⟩ := exists_contDiff_witt hJ hdet
obtain ⟨σ, σ_supp, σ_cpt, σ_smooth, σ_range, σ_one⟩ := exists_contDiff_tsupport_subset <|
nhds_pi.le <| eventually_pi fun _ : ι ↦ span_near.and <|
(by fun_prop : Continuous fun y : Matrix m b ℂ ↦ yᴴ * J * y).tendsto x₀ <|
γ_inv.and (ContinuousAt.eventually_ne (by fun_prop) hdet)
exact ⟨γ, k, σ, γ_smooth, γ_inv.eq_of_nhds, k_smooth, σ_smooth, σ_cpt,
fun x ↦ (σ_range ⟨x, rfl⟩).1, σ_one,
fun x hx i ↦ (σ_supp (subset_closure hx) i).1,
fun x hx i ↦ (σ_supp (subset_closure hx) i).2.1,
fun x hx i ↦ (σ_supp (subset_closure hx) i).2.2⟩
omit [DecidableEq m] in
/-- The `J`-orthogonal projection `x * (xᴴ * J * x)⁻¹ * xᴴ * J * x₀` of `x₀` to the span of a frame
`x` does not change when `x` is multiplied on the right by an invertible matrix. -/
lemma mul_gram_inv_mul_of_isUnit_det (J : Matrix m m ℂ) (x x₀ : Matrix m b ℂ) {C : Matrix b b ℂ}
(hC : IsUnit C.det) :
x * C * (((x * C)ᴴ * J * (x * C))⁻¹ * ((x * C)ᴴ * J * x₀)) =
x * ((xᴴ * J * x)⁻¹ * (xᴴ * J * x₀)) := by
have hC' : IsUnit Cᴴ.det := by rw [det_conjTranspose]; exact hC.map (starRingEnd ℂ)
rw [gram_mul, Matrix.mul_inv_rev, Matrix.mul_inv_rev, conjTranspose_mul]
simp only [Matrix.mul_assoc, mul_nonsing_inv_cancel_left _ _ hC,
nonsing_inv_mul_cancel_left _ _ hC']
/-- Let `g`, `k` be unitary for the diagonal form with signs `t' ⊕ᵥ s` and `u` unitary for the form
with signs `t'`. If `k * x₀ * u = g⁻¹ * x₀`, where `x₀ = fromRows 1 0` is the frame of the first
summand, then `g * k * diag(u, 1)` fixes `x₀` and so is `diag(1, q)` with `q` unitary for `s`. -/
lemma exists_sum_one_eq_mul_mul_sum {t' : b → ℤˣ}
{g k : U (signMatrix (t' ⊕ᵥ s) : Matrix (b ⊕ n) (b ⊕ n) ℂ)}
{u : U (signMatrix t' : Matrix b b ℂ)}
(h_frame : (k : Matrix (b ⊕ n) (b ⊕ n) ℂ) * fromRows (1 : Matrix b b ℂ) (0 : Matrix n b ℂ) *
(u : Matrix b b ℂ) =
(↑g⁻¹ : Matrix (b ⊕ n) (b ⊕ n) ℂ) * fromRows (1 : Matrix b b ℂ) (0 : Matrix n b ℂ)) :
∃ q : U (signMatrix s : Matrix n n ℂ),
U.sum (signMatrix_sum t' s) (1, q) = g * k * U.sum (signMatrix_sum t' s) (u, 1) := by
refine (mem_range_sum_right (signMatrix_sum t' s) isUnit).2 ?_
have h_fix : (g : Matrix (b ⊕ n) (b ⊕ n) ℂ) * ((k : Matrix (b ⊕ n) (b ⊕ n) ℂ) *
fromRows (1 : Matrix b b ℂ) (0 : Matrix n b ℂ) * (u : Matrix b b ℂ)) = fromRows 1 0 := by
rw [h_frame, ← Matrix.mul_assoc, ← Units.val_mul, ← Subgroup.coe_mul, mul_inv_cancel,
Subgroup.coe_one, Units.val_one, Matrix.one_mul]
have h_blk : (U.sum (signMatrix_sum t' s) (u, 1) : Matrix (b ⊕ n) (b ⊕ n) ℂ) =
fromCols (fromRows (u : Matrix b b ℂ) 0) (fromRows 0 1) := by
rw [fromCols_fromRows_eq_fromBlocks]
rfl
have h_u : fromRows (u : Matrix b b ℂ) (0 : Matrix n b ℂ) =
fromRows (1 : Matrix b b ℂ) 0 * (u : Matrix b b ℂ) := by
rw [fromRows_mul, Matrix.one_mul, Matrix.zero_mul]
rw [Subgroup.coe_mul, Units.val_mul, Subgroup.coe_mul, Units.val_mul, h_blk,
mul_fromCols, toCols₁_fromCols, h_u, Matrix.mul_assoc,
← Matrix.mul_assoc (k : Matrix (b ⊕ n) (b ⊕ n) ℂ), h_fix]
/-- The coordinates at the infinite places of an `a × b` matrix, read as one complex matrix for each
place. -/
noncomputable def placeMatrices (E a b : Type) [Field E] [CMType E] [Fintype a] [Fintype b] :
(InfinitePlace E × a × b → ℂ) ≃L[ℝ] InfinitePlace E → Matrix a b ℂ :=
(LinearEquiv.curry ℝ ℂ (InfinitePlace E) (a × b) ≪≫ₗ LinearEquiv.piCongrRight
fun _ : InfinitePlace E ↦ LinearEquiv.curry ℝ ℂ a b).toContinuousLinearEquiv
/-- The real slice at an adelic matrix `x` is the slice at its coordinates at infinity. -/
lemma realSlice_eq_slice_placeMatrices_symm (D : X.Splitting W₁ b) [IsBaseAdapted D] {t : a → ℤˣ}
(V : Space E a t) (x : Matrix a b (𝔸 E)) :
realSlice D V x =
(isAdapted_homSource D V).mixedModel.slice ((placeMatrices E a b).symm (atRealPlace x)) :=
rfl
/-- For a function `γ` that inverts Gram matrices, the projection of the frame `fromRows 1 0` of the
first summand to the span of the frame `x`, orthogonal for the form with signs `t' ⊕ᵥ s`. -/
def frameProjection {t' : b → ℤˣ} (γ : Matrix b b ℂ → Matrix b b ℂ) (x : Matrix (b ⊕ n) b ℂ) :
Matrix (b ⊕ n) b ℂ :=
x * (γ (xᴴ * signMatrix (t' ⊕ᵥ s) * x) * (xᴴ * signMatrix (t' ⊕ᵥ s) * fromRows 1 0))
private lemma contDiff_frameProjection {t' : b → ℤˣ} {γ : Matrix b b ℂ → Matrix b b ℂ}
(hγ : ContDiff ℝ ∞ γ) : ContDiff ℝ ∞ (frameProjection (t' := t') (s := s) γ) := by
have hJ : ContDiff ℝ ∞ fun x : Matrix (b ⊕ n) b ℂ ↦ xᴴ * signMatrix (t' ⊕ᵥ s) :=
contDiff_mat_mul (contDiff_conjTranspose.comp contDiff_id) contDiff_const
exact contDiff_mat_mul contDiff_id
(contDiff_mat_mul (hγ.comp (contDiff_mat_mul hJ contDiff_id))
(contDiff_mat_mul hJ contDiff_const))
/-- The family `x` of frames moved by the inverses of the unitary elements `k (y v)`. -/
def unitaryMovedFrame {t' : b → ℤˣ}
(k : Matrix (b ⊕ n) b ℂ → U (signMatrix (t' ⊕ᵥ s) : Matrix (b ⊕ n) (b ⊕ n) ℂ))
(y x : InfinitePlace E → Matrix (b ⊕ n) b ℂ) : InfinitePlace E → Matrix (b ⊕ n) b ℂ :=
fun v : InfinitePlace E ↦ (↑(k (y v))⁻¹ : Matrix (b ⊕ n) (b ⊕ n) ℂ) * x v
/-- For families `y`, `x` of frames, one for each infinite place `w`, unitary elements `k y` indexed
by frames, a constant `κ` and vectors `v`, `v₁` in the Fock spaces `PairFock` of the signs `(s, t')`
and `(s, s)`, the vector `(σ y * σ x' * κ * ∏ w, conj (det (x' w)₁) ^ (2 * M w)) • ω (1, k ∘ y) (v ⊠
v₁)`, where `x' w = (k (y w))⁻¹ * x w` (`unitaryMovedFrame`), `(x' w)₁` is its upper square block,
`ω` is the real Weil representation `realPairWeil` twisted by `det ^ (j - M w)` on the unitary group
of `t' ⊕ᵥ s`, and `⊠` is the external product `realBoxProd`. In the applications `t'` and `s` are
the signs of spaces `V'` and `W₁`, `j` is half the rank of `W₁`, `M` is the weight of a character,
and this vector is a prescribed slice for the pair `(X, V' ⊕ W₁)`. -/
noncomputable def exchangeSection {t' : b → ℤˣ}
(σ : (InfinitePlace E → Matrix (b ⊕ n) b ℂ) → ℝ)
(k : Matrix (b ⊕ n) b ℂ → U (signMatrix (t' ⊕ᵥ s) : Matrix (b ⊕ n) (b ⊕ n) ℂ))
(j : ℕ) (M : InfinitePlace E → ℕ) (κ : ℂ) (v : PairFock E s t') (v₁ : PairFock E s s)
(y x : InfinitePlace E → Matrix (b ⊕ n) b ℂ) : PairFock E s (t' ⊕ᵥ s) :=
((σ y * σ (unitaryMovedFrame k y x)) •
((∏ w : InfinitePlace E, (unitaryMovedFrame k y x w).toRows₁ᴴ.det ^ (M w * 2)) * κ)) •
realPairWeil (fun w : InfinitePlace E ↦ (j : ℤ) - M w) 0 (1, k ∘ y)
(realBoxProd (realSigns_comp_split (homSigns_sum_target signs_comp_refl)) v v₁)
/-- Let `σ ≥ 0` be a smooth compactly supported function on families of frames in `V' ⊕ W₁`, equal
to 1 at the frame `(1, 0)` of `V'`, let `N` be a family of exponents and `v` a Schwartz vector (all
moments finite) in the Fock space `PairFock E s t'` of `(W₁, V')`. There are `κ` and a Schwartz
vector `Λ` for `(X, V')` whose slice at an adelic matrix with infinite components `x w`
(`atRealPlace`) is `σ (x, 0) * ‖∏ w, det (x w) ^ N w‖ ^ 2 * κ` times `v`, and whose slice at 0 for
`D.symm`, the splitting with the two isotropic frames exchanged, is `v`. -/
lemma exists_isSchwartzVector_realSlice_bump (D : X.Splitting W₁ b) [IsBaseAdapted D] {t' : b → ℤˣ}
(V' : Space E b t') (N : InfinitePlace E → ℕ)
{σ : (InfinitePlace E → Matrix (b ⊕ n) b ℂ) → ℝ} (hσ : ContDiff ℝ ∞ σ)
(hσ_cpt : HasCompactSupport σ) (hσ₀ : ∀ x : InfinitePlace E → Matrix (b ⊕ n) b ℂ, 0 ≤ σ x)
(hσ₁ : σ (fun _ : InfinitePlace E ↦ fromRows (1 : Matrix b b ℂ) (0 : Matrix n b ℂ)) = 1)
{v : PairFock E s t'} (hv : IsSchwartzVector v) :
∃ (κ : ℂ) (Λ : PairFock E r t'),
IsSchwartzVector Λ ∧
realSlice D.symm V' 0 Λ = v ∧
∀ x : Matrix b b (𝔸 E), realSlice D V' x Λ =
((σ (fun w : InfinitePlace E ↦ fromRows (1 : Matrix b b ℂ) 0 * atRealPlace x w) *
‖∏ w : InfinitePlace E, (atRealPlace x w).det ^ N w‖ ^ 2) • κ) • v := by
let C := placeMatrices E b b
let τ (x : InfinitePlace E → Matrix b b ℂ) : ℝ :=
σ (fun w ↦ fromRows (1 : Matrix b b ℂ) (0 : Matrix n b ℂ) * x w) * ‖∏ w, (x w).det ^ N w‖ ^ 2
have τ_smooth : ContDiff ℝ ∞ (τ ∘ C) :=
(hσ.comp (contDiff_pi.2 fun w ↦ contDiff_mat_mul contDiff_const
(contDiff_pi.1 C.contDiff w))).mul
(.norm_sq ℂ (contDiff_prod fun w _ ↦
(contDiff_mat_det (contDiff_pi.1 C.contDiff w)).pow (N w)))
-- `x` is recovered from the frame `(x, 0)`, which lies in the support of `σ`.
have τ_cpt : HasCompactSupport (τ ∘ C) := by
refine HasCompactSupport.comp_homeomorph (f := τ) ?_ C.toHomeomorph
have h_cont : Continuous (fun (x : InfinitePlace E → Matrix (b ⊕ n) b ℂ) w ↦
(x w).submatrix Sum.inl id) := by fun_prop
refine (hσ_cpt.image h_cont).closure_of_subset fun x hx ↦
⟨fun w ↦ fromRows 1 0 * x w, subset_closure (left_ne_zero_of_mul hx), ?_⟩
funext w
change (fromRows (1 : Matrix b b ℂ) (0 : Matrix n b ℂ) * x w).toRows₁ = x w
rw [fromRows_mul, toRows₁_fromRows, Matrix.one_mul]
obtain ⟨κ, Λ, hΛ, hΛ₀, hΛ_slice⟩ := exists_isSchwartzVector_realSlice_eq D V' (τ ∘ C) τ_smooth hv
τ_cpt
(fun _ ↦ mul_nonneg (hσ₀ _) (sq_nonneg _)) (C.symm fun _ ↦ 1) (by
simp only [Function.comp_apply, C.apply_symm_apply, τ, Matrix.mul_one, hσ₁, det_one, one_pow,
prod_const_one, norm_one, mul_one, ne_eq, one_ne_zero, not_false_eq_true])
exact ⟨κ, Λ, hΛ, hΛ₀, fun x ↦ by
rw [realSlice_eq_slice_placeMatrices_symm, hΛ_slice, Function.comp_apply, C.apply_symm_apply,
map_one, one_apply_eq_self]⟩
/-- Let `σ` be smooth with compact support, `z` and `k` smooth maps on frames, and `v`, `v₁`
Schwartz vectors (all moments finite) in the Fock spaces `PairFock` of `(W₁, V')` and `(W₁, W₁)`.
Then some Schwartz vector `Φ` in the Fock space of `(X, V' ⊕ W₁)` has slice
`exchangeSection σ k j M κ v v₁ y x` at every adelic matrix with infinite components `x`, for
`y = z ∘ x`. -/
lemma exists_isSchwartzVector_exchangeSection (D : X.Splitting W₁ b) [IsBaseAdapted D] {t' : b → ℤˣ}
(V' : Space E b t') {σ : (InfinitePlace E → Matrix (b ⊕ n) b ℂ) → ℝ}
(hσ : ContDiff ℝ ∞ σ) (hσ_cpt : HasCompactSupport σ)
{k : Matrix (b ⊕ n) b ℂ → U (signMatrix (t' ⊕ᵥ s) : Matrix (b ⊕ n) (b ⊕ n) ℂ)}
(hk : ContDiff ℝ ∞ fun y : Matrix (b ⊕ n) b ℂ ↦ (k y : Matrix (b ⊕ n) (b ⊕ n) ℂ))
{z : Matrix (b ⊕ n) b ℂ → Matrix (b ⊕ n) b ℂ} (hz : ContDiff ℝ ∞ z)
(j : ℕ) (M : InfinitePlace E → ℕ) (κ : ℂ) {v : PairFock E s t'} {v₁ : PairFock E s s}
(hv : IsSchwartzVector v) (hv₁ : IsSchwartzVector v₁) :
∃ Φ : fockSpace (realSigns E (homSigns r (t' ⊕ᵥ s))),
IsSchwartzVector Φ ∧
∀ x : Matrix (b ⊕ n) b (𝔸 E), realSlice D (V'.sum W₁) x Φ =
exchangeSection σ k j M κ v v₁ (z ∘ atRealPlace x) (atRealPlace x) := by
let C := placeMatrices E (b ⊕ n) b
let S (y : Matrix (b ⊕ n) b ℂ) : Matrix (b ⊕ n) (b ⊕ n) ℂ := k y
replace hk : ContDiff ℝ ∞ S := hk
let w (x : InfinitePlace E → Matrix (b ⊕ n) b ℂ) := unitaryMovedFrame k (z ∘ x) x
-- The scalar of the section, times the determinant factor of `realPairWeil`.
let τ (x : InfinitePlace E → Matrix (b ⊕ n) b ℂ) : ℂ := (σ (z ∘ x) * σ (w x)) •
((∏ p, star (w x p).toRows₁.det ^ (M p * 2)) * κ *
((∏ p, (S (z (x p))).det ^ j) * ∏ p, star (S (z (x p))).det ^ M p))
have section_eq (x : InfinitePlace E → Matrix (b ⊕ n) b ℂ) :
exchangeSection σ k j M κ v v₁ (z ∘ x) x = τ x • realWeil (pairHomInf (1, k ∘ z ∘ x))
(realBoxProd (realSigns_comp_split (homSigns_sum_target signs_comp_refl)) v v₁) := by
have h_inv_det (p : InfinitePlace E) : ((S (z (x p))).det)⁻¹ = star (S (z (x p))).det := by
have hd := congrArg Matrix.det (U.coe_inv IsHermitianInvolution.mul_self (k (z (x p))))
rw [Subgroup.coe_inv, coe_units_inv, det_nonsing_inv, Ring.inverse_eq_inv',
det_mul, det_mul, det_conjTranspose, mul_right_comm, ← det_mul,
IsHermitianInvolution.mul_self, det_one, one_mul] at hd
exact hd
rw [exchangeSection, realPairWeil, MonoidHom.coe_mk, OneHom.coe_mk, _root_.smul_apply,
smul_smul]
congr 1
dsimp only [τ, w]
rw [smul_mul_assoc]
congr 1
congr 1
· simp only [det_conjTranspose]
· rw [← prod_mul_distrib]
refine Finset.prod_congr rfl fun p _ ↦ ?_
rw [Pi.zero_apply, neg_zero, zpow_zero, mul_one, Function.comp_apply, Function.comp_apply,
zpow_sub₀ (GeneralLinearGroup.det_ne_zero (k (z (x p))).val), div_eq_mul_inv,
zpow_natCast, zpow_natCast, ← inv_pow, h_inv_det p]
-- `τ` is `σ * σ` times a polynomial in the entries of `x` and `k (z x)` and their conjugates.
have τ_smooth : ContDiff ℝ ∞ (τ ∘ C) := by
have w_eq (x : InfinitePlace E → Matrix (b ⊕ n) b ℂ) : w x = fun p ↦
signMatrix (t' ⊕ᵥ s) * (S (z (x p)))ᴴ * signMatrix (t' ⊕ᵥ s) * x p :=
funext fun p ↦ congrArg (· * x p) (U.coe_inv IsHermitianInvolution.mul_self _)
simp only [τ, w_eq, comp_def, det_apply, Matrix.mul_assoc, toRows₁_apply, star_sum, star_smul,
star_prod, star_def]
fun_prop
-- On the support, `x = k y * w x` with `y = z ∘ x` and `w x` in the support of `σ`.
have τ_cpt : HasCompactSupport (τ ∘ C) := by
refine HasCompactSupport.comp_homeomorph (f := τ) ?_ C.toHomeomorph
have h_cont : Continuous (fun (p : (InfinitePlace E → Matrix (b ⊕ n) b ℂ) ×
(InfinitePlace E → Matrix (b ⊕ n) b ℂ)) v ↦ S (p.1 v) * p.2 v) :=
continuous_pi fun v ↦ continuous_mat_mul
(hk.continuous.comp ((_root_.continuous_apply v).comp continuous_fst))
((_root_.continuous_apply v).comp continuous_snd)
refine ((hσ_cpt.prod hσ_cpt).image h_cont).closure_of_subset fun x hx ↦ ?_
have hσ_ne : σ (z ∘ x) ≠ 0 ∧ σ (w x) ≠ 0 := mul_ne_zero_iff.1 (left_ne_zero_of_smul hx)
refine ⟨(z ∘ x, w x), closure_prod_eq.le (subset_closure hσ_ne), ?_⟩
funext v
simp only [S, w, unitaryMovedFrame, Function.comp_apply, ← Matrix.mul_assoc, ← Units.val_mul,
← Subgroup.coe_mul, mul_inv_cancel, Subgroup.coe_one, Units.val_one, Matrix.one_mul]
-- The entries of the unitary matrix are entries of `k (z x)` or `0`.
have u_smooth : ContDiff ℝ ∞ fun x ↦ (pairHomInf (1, k ∘ z ∘ C x) : USign
(realSigns E (homSigns s (t' ⊕ᵥ s)))).val.val := by
refine contDiff_pi' fun p ↦ contDiff_pi' fun q ↦ ?_
have h_eq : (fun x ↦ (pairHomInf (1, k ∘ z ∘ C x) : USign
(realSigns E (homSigns s (t' ⊕ᵥ s)))).val.val p q) = fun x ↦
if p.1 = q.1 then if p.2.2 = q.2.2 then S (z (C x p.1)) p.2.1 q.2.1 else 0 else 0 := by
funext x
change blockDiagonal (fun w ↦ (pairHom (t' ⊕ᵥ s) s (1, k (z (C x w))) :
Matrix ((b ⊕ n) × n) ((b ⊕ n) × n) ℂ)) (p.2, p.1) (q.2, q.1) = _
rw [blockDiagonal_apply]
by_cases h1 : p.1 = q.1
· rw [ite_eq_left h1, ite_eq_left h1, coe_pairHom, kroneckerMap_apply]
have h_one : (1 : Matrix n n ℂ)⁻¹ = 1 := Matrix.inv_eq_left_inv (Matrix.one_mul 1)
simp only [S, Subgroup.coe_one, Units.val_one, h_one, transpose_one,
Matrix.one_apply, mul_ite, mul_one, mul_zero]
· rw [ite_eq_right h1, ite_eq_right h1]
rw [h_eq]
split_ifs
· exact contDiff_pi.1 (contDiff_pi.1
(hk.comp (hz.comp (contDiff_pi.1 C.contDiff p.1))) p.2.1) q.2.1
· exact contDiff_const
· exact contDiff_const
obtain ⟨Φ, hΦ, hΦ_slice⟩ := exists_isSchwartzVector_slice_eq
(isAdapted_homSource D (V'.sum W₁)).mixedModel
τ_smooth τ_cpt u_smooth (isSchwartzVector_realBoxProd _ hv hv₁)
refine ⟨Φ, hΦ, fun x ↦ ?_⟩
rw [realSlice_eq_slice_placeMatrices_symm, hΦ_slice, section_eq, Function.comp_apply,
C.apply_symm_apply]
omit [WeilData E] in
/-- For families `y`, `x` of frames, one for each infinite place `w`, and vectors `v₀`, `v₁` in the
Fock spaces `PairFock` of the signs `(s, t')` and `(s, s)`, the value `exchangeSection σ k j M κ v₀
v₁ y x` is `(σ y * σ x' * κ * ∏ w, conj (det (x' w)₁) ^ (2 * M w)) • ω (1, k ∘ y) (v₀ ⊠ v₁)`, where
`x' w = (k (y w))⁻¹ * x w` (`unitaryMovedFrame`), `(x' w)₁` is its upper square block, `ω` is the
real Weil representation `realPairWeil` twisted by `det ^ (j - M w)` on the unitary group of `t' ⊕ᵥ
s`, and `⊠` is the external product `realBoxProd`. Write `frameProjection γ x` for the projection of
the frame `(1, 0)` to the span of the frame `x`, with `γ` in the place of the inversion of the Gram
matrix. If `γ` inverts the Gram matrices of the frames on which `σ` is nonzero and of each `x w`,
then in the section with second argument `A w = x w * C w` (`C w` invertible) and first argument the
projections for `A`, these may be replaced by the projections for `x`. -/
lemma exchangeSection_frameProjection_mul {t' : b → ℤˣ}
{σ : (InfinitePlace E → Matrix (b ⊕ n) b ℂ) → ℝ} {γ : Matrix b b ℂ → Matrix b b ℂ}
(k : Matrix (b ⊕ n) b ℂ → U (signMatrix (t' ⊕ᵥ s) : Matrix (b ⊕ n) (b ⊕ n) ℂ))
(hγ_supp : ∀ y : InfinitePlace E → Matrix (b ⊕ n) b ℂ, σ y ≠ 0 → ∀ w : InfinitePlace E,
γ ((y w)ᴴ * signMatrix (t' ⊕ᵥ s) * y w) = ((y w)ᴴ * signMatrix (t' ⊕ᵥ s) * y w)⁻¹)
(j : ℕ) (M : InfinitePlace E → ℕ) (κ : ℂ) (v₀ : PairFock E s t') (v₁ : PairFock E s s)
(x : InfinitePlace E → Matrix (b ⊕ n) b ℂ) (C : InfinitePlace E → GL b ℂ)
(hγx : ∀ w : InfinitePlace E,
γ ((x w)ᴴ * signMatrix (t' ⊕ᵥ s) * x w) = ((x w)ᴴ * signMatrix (t' ⊕ᵥ s) * x w)⁻¹) :
exchangeSection σ k j M κ v₀ v₁
(frameProjection (t' := t') (s := s) γ ∘ fun w : InfinitePlace E ↦ x w * (C w).val)
(fun w : InfinitePlace E ↦ x w * (C w).val) =
exchangeSection σ k j M κ v₀ v₁ (frameProjection (t' := t') (s := s) γ ∘ x)
(fun w : InfinitePlace E ↦ x w * (C w).val) := by
set A : InfinitePlace E → Matrix (b ⊕ n) b ℂ := fun w ↦ x w * (C w).val
rcases forall_or_exists_not fun y ↦ σ (unitaryMovedFrame k y A) = 0 with hσ_zero | ⟨y, hy⟩
· simp only [exchangeSection, hσ_zero, mul_zero, zero_smul]
-- It is enough to see that `A w` and `x w` give the same projection.
refine congrArg (exchangeSection σ k j M κ v₀ v₁ · A) (funext fun w ↦ ?_)
have hγA : γ ((A w)ᴴ * signMatrix (t' ⊕ᵥ s) * A w) = ((A w)ᴴ * signMatrix (t' ⊕ᵥ s) * A w)⁻¹ := by
simpa only [unitaryMovedFrame, U.gram_invariant] using hγ_supp _ hy w
simp only [Function.comp_apply, frameProjection, hγA, hγx, A]
exact mul_gram_inv_mul_of_isUnit_det _ (x w) _ (isUnits_det_units _)
omit [CMType E] [WeilData E] in
/-- If each frame `(h v)⁻¹ * fromRows 1 0` is `k v * fromRows 1 0 * c` with `c` carrying the form
with signs `t'` to its Gram matrix, then `c` is a unitary `u v`, and for some unitary `q v` one has
`diag(u v, (q v)⁻¹) * h v * k v = 1`. -/
lemma exists_unitary_pair_of_frame {t' : b → ℤˣ}
(h k : InfinitePlace E → U (signMatrix (t' ⊕ᵥ s) : Matrix (b ⊕ n) (b ⊕ n) ℂ))
(hframe : ∀ v : InfinitePlace E, ∃ c : Matrix b b ℂ,
(k v : Matrix (b ⊕ n) (b ⊕ n) ℂ) * fromRows (1 : Matrix b b ℂ) (0 : Matrix n b ℂ) * c =
(↑(h v)⁻¹ : Matrix (b ⊕ n) (b ⊕ n) ℂ) * fromRows (1 : Matrix b b ℂ) (0 : Matrix n b ℂ) ∧
cᴴ * signMatrix t' * c = signMatrix t') :
∃ (u : InfinitePlace E → U (signMatrix t' : Matrix b b ℂ))
(q : InfinitePlace E → U (signMatrix s : Matrix n n ℂ)),
∀ v : InfinitePlace E,
(k v : Matrix (b ⊕ n) (b ⊕ n) ℂ) * fromRows (1 : Matrix b b ℂ) (0 : Matrix n b ℂ) *
(u v : Matrix b b ℂ) =
(↑(h v)⁻¹ : Matrix (b ⊕ n) (b ⊕ n) ℂ) * fromRows (1 : Matrix b b ℂ) (0 : Matrix n b ℂ) ∧
U.sum (signMatrix_sum t' s) (u v, (q v)⁻¹) * h v * k v = 1 := by
choose c hc c_gram using hframe
choose u hu_eq using fun v ↦ exists_U_coe_eq (c_gram v)
simp only [← hu_eq] at hc
choose q hq using fun v ↦ exists_sum_one_eq_mul_mul_sum (hc v)
refine ⟨u, q, fun v ↦ ⟨hc v, ?_⟩⟩
let φ := U.sum (signMatrix_sum t' s)
have hhk : h v * k v = φ ((1, q v) * (u v, 1)⁻¹) := by
rw [φ.map_mul, φ.map_inv, hq, mul_inv_cancel_right]
rw [mul_assoc, hhk, ← φ.map_mul]
simp only [Prod.inv_mk, Prod.mk_mul_mk, one_mul, inv_one, mul_one, mul_inv_cancel,
inv_mul_cancel, Prod.mk_one_one, φ.map_one]
omit [WeilData E] in
/-- Let `𝔠` be a tame character (`SplitTameChar`) of weight `μ ≥ 0` with automorphic character
`ν = 𝔠.character` of the norm-one ideles, so that `ν` has weight `μ w` at each infinite place `w`,
and let `z` be the idele with infinite part `ζ` and finite part 1. Then the product of the
`conj (ζ w) ^ (2 μ w)` is `‖∏ ζ w ^ (j + μ w)‖ ^ 2 / (ν(z / z̄) |z| ^ j)`. -/
lemma prod_conj_pow_eq_norm_div {μ : InfinitePlace E → ℕ}
(𝔠 : SplitTameChar E fun w : InfinitePlace E ↦ (μ w : ℤ)) (j : ℕ) (ζ : (InfinitePlace E → ℂ)ˣ) :
∏ w : InfinitePlace E, star (ζ.val w) ^ (μ w * 2) =
(‖∏ w : InfinitePlace E, ζ.val w ^ (j + μ w)‖ ^ 2 : ℝ) /
((𝔠.character.baseChange.val (ζ.map (MonoidHom.inl (InfinitePlace E → ℂ) (𝔸f E))) : ℂ) *
√(ideleAbs (ζ.map (MonoidHom.inl (InfinitePlace E → ℂ) (𝔸f E)))) ^ (2 * j)) := by
set z := ζ.map (MonoidHom.inl (InfinitePlace E → ℂ) (𝔸f E))
set P : ℂ := ∏ w, ζ.val w with hP
set Q : ℂ := ∏ w, ζ.val w ^ μ w with hQ
have hζ (w : InfinitePlace E) : ζ.val w ≠ 0 := (ζ.isUnit.apply w).ne_zero
have hP₀ : (‖P‖ : ℂ) ≠ 0 := ofReal_ne_zero.2 <| norm_ne_zero_iff.2 <|
Finset.prod_ne_zero_iff.2 fun w _ ↦ hζ w
have hQ₀ : Q ≠ 0 := Finset.prod_ne_zero_iff.2 fun w _ ↦ pow_ne_zero _ (hζ w)
have h_char : (𝔠.character.baseChange.val z : ℂ) = Q ^ 2 / ‖Q‖ ^ 2 := by
rw [𝔠.hasWeight.baseChange_apply_inf, hQ, norm_prod, Complex.ofReal_prod,
← prod_pow, ← prod_pow]
trans ∏ w, (ζ.val w ^ μ w) ^ 2 / (‖ζ.val w ^ μ w‖ : ℂ) ^ 2
· refine Finset.prod_congr rfl fun w _ ↦ ?_
simp only [Pi.smul_apply, nsmul_eq_mul, Nat.cast_ofNat, _root_.zpow_mul, zpow_natCast,
zpow_two, ← sq, div_pow, norm_pow, Complex.ofReal_pow, pow_right_comm _ 2]
· exact Finset.prod_div_distrib _ _
have h_abs : √(ideleAbs z) = ‖P‖ := by
rw [ideleAbs_eq_prod_of_v_eq_one (fun w ↦ by change Valued.v (1 : _) = 1; exact map_one _),
prod_pow, Real.sqrt_sq (Finset.prod_nonneg fun _ _ ↦ norm_nonneg _), hP, norm_prod]
rfl
have h_lhs : ∏ w, star (ζ.val w) ^ (μ w * 2) = star Q ^ 2 := by
simp only [hQ, pow_mul, ← prod_pow, star_prod, star_pow]
have h_num : ∏ w, ζ.val w ^ (j + μ w) = P ^ j * Q := by
simp only [hP, hQ, pow_add, prod_mul_distrib, prod_pow]
have h_conj : star Q = ‖Q‖ ^ 2 / Q := by rw [eq_div_iff hQ₀, star_def, conj_mul']
push_cast [h_lhs, h_char, h_abs, h_num, h_conj, norm_mul, norm_pow]
field
omit [WeilData E] in
/-- For families `y`, `x` of frames, one for each infinite place `w`, and vectors `v`, `v₁` in the
Fock spaces `PairFock` of the signs `(s, t')` and `(s, s)`, the value `exchangeSection σ k j M κ v
v₁ y x` is `(σ y * σ x' * κ * ∏ w, conj (det (x' w)₁) ^ (2 * M w)) • ω (1, k ∘ y) (v ⊠ v₁)`, where
`x' w = (k (y w))⁻¹ * x w` (`unitaryMovedFrame`), `(x' w)₁` is its upper square block, `ω` is the
real Weil representation `realPairWeil` twisted by `det ^ (j - M w)` on the unitary group of `t' ⊕ᵥ
s`, and `⊠` is the external product `realBoxProd` (its first argument is the proof that the signs
split accordingly). Suppose that `g * (k ∘ y) = 1` and `x' = (B, 0)` whenever `σ y ≠ 0`. Then `ω (1,
g)` carries this value to `σ y * σ (B, 0) * κ * ∏ w, conj (det (B w)) ^ (2 * M w)` times `v ⊠ v₁`.
-/
lemma realPairWeil_exchangeSection {t' : b → ℤˣ} {σ : (InfinitePlace E → Matrix (b ⊕ n) b ℂ) → ℝ}
{k : Matrix (b ⊕ n) b ℂ → U (signMatrix (t' ⊕ᵥ s) : Matrix (b ⊕ n) (b ⊕ n) ℂ)}
(j : ℕ) (M : InfinitePlace E → ℕ) (κ : ℂ) (v : PairFock E s t') (v₁ : PairFock E s s)
{y x : InfinitePlace E → Matrix (b ⊕ n) b ℂ} {g : GInf E (t' ⊕ᵥ s)}
{B : InfinitePlace E → Matrix b b ℂ} (hg : σ y ≠ 0 → g * (k ∘ y) = 1)
(hx : σ y ≠ 0 → unitaryMovedFrame k y x = fun w : InfinitePlace E ↦ fromRows (B w) 0) :
realPairWeil (fun w : InfinitePlace E ↦ (j : ℤ) - M w) 0 (1, g)
(exchangeSection σ k j M κ v v₁ y x) =
((σ y * σ fun w : InfinitePlace E ↦ fromRows (B w) 0) •
((∏ w : InfinitePlace E, star (B w).det ^ (M w * 2)) * κ)) •
realBoxProd (realSigns_comp_split (homSigns_sum_target signs_comp_refl)) v v₁ := by
by_cases hσ : σ y = 0
· simp only [exchangeSection, hσ, zero_mul, zero_smul, map_zero]
let ρ := realPairWeil (s := s) (s' := t' ⊕ᵥ s) (fun w : InfinitePlace E ↦ (j : ℤ) - M w) 0
rw [exchangeSection, map_smul, ← mul_apply_eq_comp, ← ρ.map_mul, hx hσ, Prod.mk_mul_mk,
one_mul, hg hσ, Prod.mk_one_one, ρ.map_one, one_apply_eq_self]
simp only [toRows₁_fromRows, det_conjTranspose]
omit [WeilData E] in
/-- Let `h` be a point of `GInf E (t' ⊕ᵥ s)`, the unitary group for the signs `t' ⊕ᵥ s` at the
infinite places. Let `u`, `q` be points of `GInf E t'` and `GInf E s`. All three are completed by
`1` at the finite places to adelic points, and `G.sum` is the block sum of `u` and `q`. At each
infinite place `w`, the adelic matrix `(diag(u, q) * h)⁻¹ * fromRows B 0` has component
`h⁻¹ * fromRows 1 0 * u⁻¹ * B`. -/
lemma atRealPlace_inv_sum_mul_fromRows {t' : b → ℤˣ} (u : GInf E t') (q : GInf E s)
(h : GInf E (t' ⊕ᵥ s)) (B : Matrix b b (𝔸 E)) (w : InfinitePlace E) :
atRealPlace (G.adeleMatrix ((G.sum ((u, 1), q, 1)).1 * h, 1)⁻¹ * fromRows (m₂ := n) B 0) w =
(↑(h⁻¹ w) : Matrix (b ⊕ n) (b ⊕ n) ℂ) * fromRows (1 : Matrix b b ℂ) (0 : Matrix n b ℂ) *
((↑(u⁻¹ w) : Matrix b b ℂ) * atRealPlace B w) := by
let φ : 𝔸 E →+* ℂ := (Pi.evalRingHom _ w).comp (RingHom.fst _ _)
have h_mul : atRealPlace (G.adeleMatrix ((G.sum ((u, 1), q, 1)).1 * h, 1)⁻¹ *
fromRows (m₂ := n) B 0) w =
atRealPlace (G.adeleMatrix ((G.sum ((u, 1), q, 1)).1 * h, 1)⁻¹) w *
atRealPlace (fromRows (m₂ := n) B 0) w :=
Matrix.map_mul (f := φ)
have h_g : atRealPlace (G.adeleMatrix ((G.sum ((u, 1), q, 1)).1 * h, 1)⁻¹) w =
(↑(h⁻¹ w) : Matrix (b ⊕ n) (b ⊕ n) ℂ) *
fromBlocks (↑(u⁻¹ w) : Matrix b b ℂ) 0 0 (↑(q⁻¹ w) : Matrix n n ℂ) := by
have h_sum : (((G.sum ((u, 1), q, 1)).1)⁻¹ w : Matrix (b ⊕ n) (b ⊕ n) ℂ) =
fromBlocks (↑(u⁻¹ w) : Matrix b b ℂ) 0 0 (↑(q⁻¹ w) : Matrix n n ℂ) := by
change (↑((U.sum (signMatrix_sum t' s) (u w, q w))⁻¹) : Matrix (b ⊕ n) (b ⊕ n) ℂ) = _
rw [← (U.sum (signMatrix_sum t' s)).map_inv]
rfl
refine Matrix.ext fun i j ↦ ?_
rw [atRealPlace, Matrix.map_apply, G.adeleMatrix_fst, Prod.inv_mk]
dsimp only
rw [pi_mul_inv_apply, Subgroup.coe_mul, Units.val_mul, h_sum]
have h_rows : atRealPlace (fromRows (m₂ := n) B 0) w = fromRows (atRealPlace B w) 0 := by
refine Matrix.ext fun i j ↦ ?_
cases i <;> rfl
have h_from : fromRows ((↑(u⁻¹ w) : Matrix b b ℂ) * atRealPlace B w) (0 : Matrix n b ℂ) =
fromRows (1 : Matrix b b ℂ) 0 * ((↑(u⁻¹ w) : Matrix b b ℂ) * atRealPlace B w) := by
rw [fromRows_mul, Matrix.one_mul, Matrix.zero_mul]
rw [h_mul, h_g, h_rows, Matrix.mul_assoc]
simp only [fromBlocks_mul_fromRows, Matrix.mul_zero, Matrix.zero_mul, add_zero]
rw [h_from, ← Matrix.mul_assoc]
/-- The Gram matrix of the frame `fromRows 1 0` of the first summand, for the form with signs
`t' ⊕ᵥ s`, is the form with signs `t'`. -/
lemma gram_signMatrix_fromRows_one_zero (t' : b → ℤˣ) (s : n → ℤˣ) :
(fromRows (1 : Matrix b b ℂ) (0 : Matrix n b ℂ))ᴴ * signMatrix (t' ⊕ᵥ s) *
fromRows (1 : Matrix b b ℂ) (0 : Matrix n b ℂ) = signMatrix t' := by
simp [← signMatrix_sum, conjTranspose_fromRows_eq_fromCols_conjTranspose,
fromCols_mul_fromBlocks, fromCols_mul_fromRows]
omit [WeilData E] in
/-- Let `γ`, `k`, `σ` be smooth Witt data near `x₀ = fromRows 1 0` for the form with signs `t' ⊕ᵥ s`
(`IsWittBump`): for each member `z` of a family of frames where the bump function `σ` is nonzero,
`γ` inverts the Gram matrix of `z` and `z` lies in the span of `k z * x₀`, with `k z` unitary. Let
`y w = frameProjection γ (x w)` be the projection of `x₀` to the span of the frame `x w`, with `γ`
in the place of the inverse Gram matrix. If `σ y ≠ 0`, then `x w = k (y w) * x₀ * c` for a matrix
`c` that carries the form with signs `t'` to the Gram matrix of `x w`. -/
lemma IsWittBump.exists_mul_fromRows_mul_eq_of_ne_zero
{t' : b → ℤˣ} {γ : Matrix b b ℂ → Matrix b b ℂ}
{k : Matrix (b ⊕ n) b ℂ → U (signMatrix (t' ⊕ᵥ s) : Matrix (b ⊕ n) (b ⊕ n) ℂ)}
{σ : (InfinitePlace E → Matrix (b ⊕ n) b ℂ) → ℝ}
(hW : IsWittBump (signMatrix (t' ⊕ᵥ s)) (fromRows 1 0) γ k σ)
{x : InfinitePlace E → Matrix (b ⊕ n) b ℂ}
(hx : σ (frameProjection (t' := t') (s := s) γ ∘ x) ≠ 0) (w : InfinitePlace E) :
∃ c : Matrix b b ℂ,
(k (frameProjection (t' := t') (s := s) γ (x w)) : Matrix (b ⊕ n) (b ⊕ n) ℂ) *
fromRows (1 : Matrix b b ℂ) (0 : Matrix n b ℂ) * c = x w ∧
cᴴ * signMatrix t' * c = (x w)ᴴ * signMatrix (t' ⊕ᵥ s) * x w := by
obtain ⟨c, hc⟩ := hW.exists_mul_eq _ hx w
rw [← gram_signMatrix_fromRows_one_zero t' s]
exact exists_mul_mul_eq_and_gram_eq _ hc (hW.det_gram_ne_zero _ hx w)
omit [WeilData E] in
/-- Let `γ`, `k`, `σ` be smooth Witt data near `x₀ = fromRows 1 0` for the form with signs `t' ⊕ᵥ s`
(`IsWittBump`); in particular `γ` inverts the Gram matrix of `x₀` and the bump function `σ` is `1`
at the constant family `x₀`. For `h` near `1` in `GInf`, the product of the unitary groups of the
form over the infinite places, `σ` does not vanish at the family of projections `frameProjection γ`
of `x₀` to the spans of the frames `(h w)⁻¹ * x₀`, formed with `γ` in the place of the inverse Gram
matrix. -/
lemma IsWittBump.eventually_bump_frameProjection_ne_zero
{t' : b → ℤˣ} {γ : Matrix b b ℂ → Matrix b b ℂ}
{k : Matrix (b ⊕ n) b ℂ → U (signMatrix (t' ⊕ᵥ s) : Matrix (b ⊕ n) (b ⊕ n) ℂ)}
{σ : (InfinitePlace E → Matrix (b ⊕ n) b ℂ) → ℝ}
(hW : IsWittBump (signMatrix (t' ⊕ᵥ s)) (fromRows 1 0) γ k σ) :
∀ᶠ h : GInf E (t' ⊕ᵥ s) in nhds 1,
σ (frameProjection (t' := t') (s := s) γ ∘ fun w : InfinitePlace E ↦
(↑(h⁻¹ w) : Matrix (b ⊕ n) (b ⊕ n) ℂ) * (fromRows 1 0 : Matrix (b ⊕ n) b ℂ)) ≠ 0 := by
have γ_smooth : ContDiff ℝ ∞ γ := hW.contDiff_inv
have σ_smooth : ContDiff ℝ ∞ σ := hW.contDiff_bump
let x₀ : Matrix (b ⊕ n) b ℂ := fromRows 1 0
have proj_base : frameProjection (t' := t') (s := s) γ x₀ = x₀ := by
change x₀ * (γ (x₀ᴴ * signMatrix (t' ⊕ᵥ s) * x₀) * (x₀ᴴ * signMatrix (t' ⊕ᵥ s) * x₀)) = x₀
rw [hW.inv_gram_base, gram_signMatrix_fromRows_one_zero,
nonsing_inv_mul _ (isUnit_iff_ne_zero.2 (IsHermitianInvolution.det_ne_zero (signMatrix t'))),
Matrix.mul_one]
have h_cont : Continuous fun h : GInf E (t' ⊕ᵥ s) ↦
σ (frameProjection (t' := t') (s := s) γ ∘ fun w : InfinitePlace E ↦
(↑(h⁻¹ w) : Matrix (b ⊕ n) (b ⊕ n) ℂ) * x₀) :=
σ_smooth.continuous.comp (continuous_pi fun w ↦
(contDiff_frameProjection γ_smooth).continuous.comp
(continuous_mat_mul
(Units.continuous_val.comp (continuous_subtypeVal.comp
((_root_.continuous_apply w).comp continuous_inv)))
continuous_const))
refine (h_cont.tendsto 1).eventually_ne ?_
have h_at_one : (frameProjection (t' := t') (s := s) γ ∘ fun w : InfinitePlace E ↦
(↑((1 : GInf E (t' ⊕ᵥ s))⁻¹ w) : Matrix (b ⊕ n) (b ⊕ n) ℂ) * x₀) = fun _ ↦ x₀ := by
funext w
rw [Function.comp_apply, inv_one, Pi.one_apply, Subgroup.coe_one, Units.val_one,
Matrix.one_mul, proj_base]
rw [h_at_one, hW.bump_base]
exact one_ne_zero
/-- Let `γ`, `k`, `σ` be smooth Witt data near `x₀ = fromRows 1 0` (`IsWittBump`): for frames `y`
where the bump function `σ` is nonzero, `y` lies in the span of `k y * x₀` with `k y` unitary, and
`γ` inverts the Gram matrix of `y`; `frameProjection γ x` is the projection of `x₀` to the span of
`x`, formed with `γ`. Let `D` be an adapted Witt decomposition of the Hermitian space `X` as `W₁`
plus `card b` hyperbolic planes, let `W₁` have rank `2 j` and split off a hyperbolic plane by `D₁`,
let `V'` have rank `card b`, and let `𝔠` be a tame character of weight `μ`, with automorphic
character `ν = 𝔠.character`. Let `v₁` be a Schwartz vector (all moments finite). Suppose that the
slice of `Φ` at `x` is `exchangeSection` at `x` and `y = frameProjection γ ∘ x`, namely
`(σ y * σ x' * κ * ∏ w, conj (det (x' w)₁) ^ (2 * μ w)) • ω (1, k ∘ y) (v ⊠ v₁)`, where
`x' w = (k (y w))⁻¹ * x w` (`unitaryMovedFrame`), `(x' w)₁` is its upper square block, `ω` is the
real Weil representation `realPairWeil` twisted by `det ^ (j - μ w)` on the unitary group of
`t' ⊕ᵥ s`, and `⊠` is the external product `realBoxProd`, and that the slice of `Λ` at `x` is
`σ (x, 0) * ‖∏ w, det (x w) ^ (j + μ w)‖ ^ 2 * κ` times `v`. Then `IsPeriodIdentity` holds: for each
`h` at infinity there is `p` in `U V' × U W₁` such that for all invertible `B` the theta functional
of the slice of `Φ` at `(p h)⁻¹ (B, 0)`, moved by `p h` and integrated over the adelic quotient of
`U W₁`, is `ρ h * I₀ / (ν(z / z̄) |z| ^ j)` times the theta functional of the slice of `Λ` at `B`.
Here `z` is the idele with infinite part `det B` and finite part 1, `ρ h` is `σ` at the projections
of `x₀` to the spans of `(h w)⁻¹ * x₀`, and the period `I₀` is the value at `1` of the theta
integral `thetaLarge` over `U W₁` with real part `v₁` and, at the ramified places of `𝔠`, the
function `stdColDatum`. -/
lemma IsWittBump.isPeriodIdentity {t' : b → ℤˣ} {γ : Matrix b b ℂ → Matrix b b ℂ}
{k : Matrix (b ⊕ n) b ℂ → U (signMatrix (t' ⊕ᵥ s) : Matrix (b ⊕ n) (b ⊕ n) ℂ)}
{σ : (InfinitePlace E → Matrix (b ⊕ n) b ℂ) → ℝ}
(hW : IsWittBump (signMatrix (t' ⊕ᵥ s)) (fromRows 1 0) γ k σ)
(D : X.Splitting W₁ b) [IsBaseAdapted D] {t : a → ℤˣ} {W : Space E a t}
(D₁ : W₁.Splitting W Unit) [IsBaseAdapted D₁] (V' : Space E b t') {j : ℕ}
(hj : Fintype.card n = 2 * j) {μ : InfinitePlace E → ℕ}
(𝔠 : SplitTameChar E fun w : InfinitePlace E ↦ (μ w : ℤ)) {κ : ℂ} {v : PairFock E s t'}
{v₁ : PairFock E s s} (hv₁ : IsSchwartzVector v₁) {Φ : PairFock E r (t' ⊕ᵥ s)}
{Λ : PairFock E r t'}
(hΦ : ∀ x : Matrix (b ⊕ n) b (𝔸 E), realSlice D (V'.sum W₁) x Φ = exchangeSection σ k j μ κ v v₁
(frameProjection (t' := t') (s := s) γ ∘ atRealPlace x) (atRealPlace x))
(hΛ : ∀ x : Matrix b b (𝔸 E), realSlice D V' x Λ =
((σ (fun w : InfinitePlace E ↦ fromRows (1 : Matrix b b ℂ) 0 * atRealPlace x w) *
‖∏ w : InfinitePlace E, (atRealPlace x w).det ^ (j + μ w)‖ ^ 2) • κ) • v) :
IsPeriodIdentity X D V' 𝔠 Φ Λ
(fun h : GInf E (t' ⊕ᵥ s) ↦ σ (frameProjection (t' := t') (s := s) γ ∘
fun w : InfinitePlace E ↦ (↑(h⁻¹ w) : Matrix (b ⊕ n) (b ⊕ n) ℂ) *
fromRows (1 : Matrix b b ℂ) (0 : Matrix n b ℂ)))
(thetaLarge W₁ W₁ 𝔠 v₁ (stdColDatum 𝔠.semilocalChar 1) 1) := by
-- Fix `h` and let `y` be these projections. If `σ y ≠ 0`, then `h * k y` keeps the span of `x₀`,
-- so it is block diagonal. Its blocks give a point at which the moved slice of `Φ` is a multiple
-- of the product vector of `v` and `v₁`.
intro h
let x₀ : Matrix (b ⊕ n) b ℂ := fromRows 1 0
let x₁ (w : InfinitePlace E) : Matrix (b ⊕ n) b ℂ := (↑(h⁻¹ w) : Matrix (b ⊕ n) (b ⊕ n) ℂ) * x₀
have gram₁ (w : InfinitePlace E) : (x₁ w)ᴴ * signMatrix (t' ⊕ᵥ s) * x₁ w = signMatrix t' := by
rw [U.gram_invariant, gram_signMatrix_fromRows_one_zero]
have γ_inv (w : InfinitePlace E) : γ ((x₁ w)ᴴ * signMatrix (t' ⊕ᵥ s) * x₁ w) =
((x₁ w)ᴴ * signMatrix (t' ⊕ᵥ s) * x₁ w)⁻¹ := by
rw [gram₁, ← gram_signMatrix_fromRows_one_zero t' s, hW.inv_gram_base]
let y : InfinitePlace E → Matrix (b ⊕ n) b ℂ := frameProjection (t' := t') (s := s) γ ∘ x₁
obtain ⟨u, q, huq⟩ : ∃ (u : GInf E t') (q : GInf E s), σ y ≠ 0 → ∀ w : InfinitePlace E,
(k (y w) : Matrix (b ⊕ n) (b ⊕ n) ℂ) * x₀ * (u w : Matrix b b ℂ) = x₁ w ∧
U.sum (signMatrix_sum t' s) (u w, (q w)⁻¹) * h w * k (y w) = 1 := by
by_cases hσ : σ y = 0
· exact ⟨1, 1, fun h ↦ absurd hσ h⟩
have hframe (w : InfinitePlace E) : ∃ c : Matrix b b ℂ,
(k (y w) : Matrix (b ⊕ n) (b ⊕ n) ℂ) * x₀ * c = x₁ w ∧
cᴴ * signMatrix t' * c = signMatrix t' :=
(hW.exists_mul_fromRows_mul_eq_of_ne_zero hσ w).imp fun c hc ↦
hc.imp_right (·.trans (gram₁ w))
obtain ⟨u, q, huq⟩ := exists_unitary_pair_of_frame h (k ∘ y) hframe
exact ⟨u, q, fun _ ↦ huq⟩
refine ⟨((u, 1), q⁻¹, 1), fun B β f x g y' ↦ ?_⟩
-- The slice of `Φ` is read at `A = h⁻¹ x₀ u⁻¹ B`, which spans the same space as `x₁ = h⁻¹ x₀`.
let C (w : InfinitePlace E) : GL b ℂ := (u⁻¹ w).val * B.map (evalInf w)
have C_val (w : InfinitePlace E) :
(C w).val = (↑(u⁻¹ w) : Matrix b b ℂ) * atRealPlace B.val w := rfl
let p : GInf E (t' ⊕ᵥ s) := (G.sum ((u, 1), q⁻¹, 1)).1 * h
have re_A : atRealPlace (G.adeleMatrix (p, 1)⁻¹ * fromRows (m₂ := n) B.val 0) =
fun w ↦ x₁ w * (C w).val := funext (atRealPlace_inv_sum_mul_fromRows u q⁻¹ h B.val)
-- The group elements cancel, the moved frame is `(B, 0)`, and the period splits off `v₁`.
have cancel (hσ : σ y ≠ 0) : p * (k ∘ y) = 1 := funext fun w ↦ (huq hσ w).2
have moved_frame (hσ : σ y ≠ 0) : unitaryMovedFrame k y (fun w ↦ x₁ w * (C w).val) =
fun w ↦ fromRows (atRealPlace B.val w) 0 := by
funext w
rw [unitaryMovedFrame, C_val, ← (huq hσ w).1]
simp only [← Matrix.mul_assoc, ← Units.val_mul, ← Subgroup.coe_mul, inv_mul_cancel,
Subgroup.coe_one, Units.val_one, Matrix.one_mul, Pi.inv_apply, mul_inv_cancel, x₀,
fromRows_mul, Matrix.zero_mul]
have weight_eq : (fun w ↦ (Fintype.card n : ℤ) / 2 - μ w) = fun w ↦ (j : ℤ) - μ w := by
funext w
rw [hj, Nat.cast_mul, Nat.cast_ofNat, Int.mul_ediv_cancel_left _ two_ne_zero]
rw [hΦ, hΛ, re_A, exchangeSection_frameProjection_mul k hW.inv_gram j μ κ v v₁ x₁ C γ_inv,
weight_eq, realPairWeil_exchangeSection j μ κ v v₁ cancel moved_frame]
simp only [map_smul, smul_eq_mul, integral_const_mul, thetaOnRealData_boxProd_eq_mul]
-- The factor of `v₁` integrates to a theta integral that does not depend on `g`.
rw [← thetaLarge_eq_apply_one_of_even_rank D₁ 𝔠 (Dvd.intro j hj.symm) hv₁ g]
simp only [thetaIntegral, ← infiniteDet_apply, y, x₁, x₀, prod_conj_pow_eq_norm_div 𝔠 j, hj,
real_smul, fromRows_mul, Matrix.one_mul, Matrix.zero_mul]
push_cast
ring
/-- Let `D` be an adapted Witt decomposition of the Hermitian space `X` (signs `r`) as `W₁` (signs
`s`) plus `card b` hyperbolic planes, where `W₁` has even rank and an adapted splitting `D₁` along
an isotropic line, and let `V'` be a space with basis indexed by `b` and signs `t'`. Let `v` and
`v₁` be Schwartz vectors for `(W₁, V')` and `(W₁, W₁)`. Then there are vectors `Φ` for
`(X, V' ⊕ W₁)` and `Λ` for `(X, V')` with two properties. The slice `realSlice` of `Λ` at `0`, its
value at `0` in the mixed Schrödinger–Fock model of the splitting `D.symm` with the isotropic frames
exchanged, is `v`. And `RowColExchangeIdentity` holds: `Φ`, `Λ` are Schwartz and there is a real `C`
such that for each tame character `𝔠` of weight `μ` some `c : ℂ` has `C * ‖c‖ ^ 2 = lValueProdInt 𝔠
(rk (V' ⊕ W₁) - rk X / 2) * equalRankThetaRatio W₁ 𝔠 v₁`, and for all integral `z` the theta
integral of `Φ` and the row datum of `z` is `c` times that of `Λ` and the column datum of `z`. With
`χ` the character of `𝔠` at its ramified places, these data are `x ↦ χ⁻¹ (det)` of the matrix with
the rows of `z` and `x` ordered by `e`, and `x ↦ χ⁻¹ (det (z * x))`. -/
theorem exists_rowColExchangeIdentity_sum (D : X.Splitting W₁ b) [IsBaseAdapted D] {t : a → ℤˣ}
{t' : b → ℤˣ} {W : Space E a t} (D₁ : W₁.Splitting W Unit) [IsBaseAdapted D₁]
(V' : Space E b t') (e : b ⊕ b ⊕ n ≃ m) (hn : 2 ∣ Fintype.card n) (μ : InfinitePlace E → ℤ)
{v : PairFock E s t'} {v₁ : PairFock E s s} (hv : IsSchwartzVector v)
(hv₁ : IsSchwartzVector v₁) :
∃ (Φ : fockSpace (realSigns E (homSigns r (t' ⊕ᵥ s)))) (Λ : PairFock E r t'),
realSlice D.symm V' 0 Λ = v ∧
RowColExchangeIdentity X (V'.sum W₁) V' μ e Φ Λ fun 𝔠 : SplitTameChar E μ ↦
equalRankThetaRatio W₁ 𝔠 v₁ := by
-- A smooth unitary `k y` moves the span of `x₀ = fromRows 1 0` onto that of a nearby frame `y`.
-- The vectors have bump functions as slices, the one for `V' ⊕ W₁` twisted by `k`, and
-- `rowColExchangeIdentity_of_periods` compares periods.
obtain ⟨j, hj⟩ : ∃ j : ℕ, Fintype.card n = 2 * j := exists_eq_mul_right_of_dvd hn
obtain ⟨γ, k, σ, hW⟩ := exists_contDiff_witt_and_bump (ι := InfinitePlace E)
(J := signMatrix (t' ⊕ᵥ s)) (x₀ := fromRows (1 : Matrix b b ℂ) (0 : Matrix n b ℂ)) isHermitian
(by
rw [gram_signMatrix_fromRows_one_zero]
exact IsHermitianInvolution.det_ne_zero (signMatrix t'))
let z : Matrix (b ⊕ n) b ℂ → Matrix (b ⊕ n) b ℂ := frameProjection (t' := t') (s := s) γ
have γ_smooth : ContDiff ℝ ∞ γ := hW.contDiff_inv
have z_smooth : ContDiff ℝ ∞ z := contDiff_frameProjection γ_smooth
let M : InfinitePlace E → ℕ := Int.toNat ∘ μ
obtain ⟨κ, Λ, hΛ, Λ_zero, Λ_slice⟩ :=
exists_isSchwartzVector_realSlice_bump D V' (fun w ↦ j + M w)
hW.contDiff_bump hW.hasCompactSupport_bump hW.bump_nonneg hW.bump_base hv
obtain ⟨Φ, hΦ, Φ_slice⟩ := exists_isSchwartzVector_exchangeSection D V' hW.contDiff_bump
hW.hasCompactSupport_bump hW.contDiff_unitary z_smooth j M κ hv hv₁
-- Where the slice of `Φ` is nonzero, the frame is `k x₀ c`, and `c` represents its Gram matrix.
have h_vanish : SlicesVanishOutside D (V'.sum W₁) t' Φ := fun x hx w ↦ by
have hσ : σ (z ∘ atRealPlace x) ≠ 0 := fun h₀ ↦
hx (by rw [Φ_slice, exchangeSection, h₀, zero_mul, zero_smul, zero_smul])
obtain ⟨c, -, hc⟩ := hW.exists_mul_fromRows_mul_eq_of_ne_zero hσ w
exact ⟨c, hc.trans (gram_atRealPlace _ w)⟩
let ρ (h : GInf E (t' ⊕ᵥ s)) : ℝ := σ (z ∘ fun w ↦
(↑(h⁻¹ w) : Matrix (b ⊕ n) (b ⊕ n) ℂ) * (fromRows 1 0 : Matrix (b ⊕ n) b ℂ))
have h_period (𝔠 : SplitTameChar E μ) :
IsPeriodIdentity X D V' 𝔠 Φ Λ ρ (thetaLarge W₁ W₁ 𝔠 v₁ (stdColDatum 𝔠.semilocalChar 1)
1) := by
lift μ to InfinitePlace E → ℕ using fun w ↦ (𝔠.weight_pos w).le
exact hW.isPeriodIdentity D D₁ V' hj 𝔠 hv₁ Φ_slice Λ_slice
exact ⟨Φ, Λ, Λ_zero, rowColExchangeIdentity_of_periods X D D₁ V' _ hn (fun _ ↦ hW.bump_nonneg _)
hW.eventually_bump_frameProjection_ne_zero hΦ hΛ h_period (.inl h_vanish)⟩
end New.Exchange