module import Mathlib.Algebra.Order.Star.Int public import TauCeti.LinearAlgebra.Matrix.GeneralLinearGroup.Lift -- shake: keep (needed public by an exposed definition) public import Lib.ClassField.HeckeCharacter.SplitTameCharacters public import Lib.General.LinearAlgebra.TensorChains /-! # Direct and mirror data modulo `N`, and the operator `Up` Let `P` contain one place of each conjugate pair above the split prime `N` of the CM field `E`. A marked lattice at `P` is a lattice `L` with a vector `Ξ΅` of `L / N L` that is non-zero at every place. Everything here is written in a basis of `L` whose last vector lifts `Ξ΅`, at all places of `P` at once: * the stabiliser of `(L, Ξ΅)` is `mirabolic`, and `diagNInv` takes `L` to `L⁺ = L + π’ͺ Ξ΅ / N`; * the direct datum `1[S L βŠ† L', S Ξ΅ = Ξ΅']` is `directDatum`; in bases of `L⁺` and `L'⁺` it is `lastRowDatum`; * the mirror datum `1[S L βŠ† L'⁺] ψ_N (u' (S Ξ΅))`, where `u'` is the linear form on `L'⁺` with kernel `L'` and `u' (Ξ΅' / N) = 1`, is `mirrorDatum` in bases of `L` and `L'⁺`; * the operator `Up`, which replaces `L` by `L⁺` and sums against `ψ_N` over the primitive vectors with unit last entry, is `upOperator`. A `LiftLaw` records how a lift depends on its datum. On ramified vectors the following hold. A mirror lift, moved by `diagNInv`, is `Up` after a direct lift, and `Up` moves through a direct lift up to the factor `Ξ³` of its law. A glued double lift is the number of primitive vectors times a mirror lift after a direct lift; hence, moved by `diagNInv`, it is a scalar times two direct lifts after `Up`. So a chain of glued double lifts is a scalar times a chain of direct lifts after a power of `Up`. Notions from other files: * `FinPlace E` is the set of finite places of `E`, `star w` the conjugate place, `LocField w` the completion `E_w` with valuation `v` (integral means `v x ≀ 1`) and `ResField w` its residue field. * `LocProd P` is the product of the `E_w` over `w ∈ P`, and `O` is its ring of integers. * `stdLattice.selfDualAddChar E` is the additive character of the finite adeles `𝔸f E` fixed by the Weil data. * `liftIntegralFn r f` is `S ↦ f (r S)` on integral matrices `S` and zero elsewhere. * `compUpTo f j` is the composite `f (j - 1) ∘ β‹― ∘ f 0` of a chain of linear maps. -/ @[expose] public section noncomputable section namespace New open Matrix Finset Function MulAction GeneralLinearGroup Exchange SemilocalField Valued WithZero section variable {E n n' n'' : Type} [Field E] [CMType E] {P S : Finset (FinPlace E)} {N : β„•} [Fact N.Prime] [Fintype n] [DecidableEq n] [Fintype n'] [DecidableEq n'] [Fintype n''] /-- `P` consists of one place of each pair `w, wΜ„` above `N`; these places are unramified of degree one. -/ class IsSplitLevel (P : Finset (FinPlace E)) (N : outParam β„•) : Prop where /-- The conjugate of a place in `P` is not in `P`; in particular the places in `P` are split. -/ star_notMem : βˆ€ w ∈ P, star w βˆ‰ P /-- The residue field at each place in `P` has `N` elements. -/ q_eq : βˆ€ w ∈ P, w.q = N /-- `N` is a uniformiser at each place in `P`. -/ protected v_natCast : βˆ€ w ∈ P, v (N : LocField w) = exp (-1) /-- The places above `N` are those in `P` and their conjugates. -/ natCast_mem_iff (w : FinPlace E) : ↑N ∈ w.asIdeal ↔ w ∈ P ∨ star w ∈ P /-- The finite adele that is `y w / N` at `w ∈ P`, with `y w` read in `[0, N)`, and `0` elsewhere. -/ def residueOverN {E : Type} [Field E] [NumberField E] {P : Finset (FinPlace E)} (y : P β†’ ZMod N) : 𝔸f E := adeleOfLocal P fun w : P ↦ (y w).val / N open scoped Classical in omit [Fact N.Prime] in @[simp] lemma residueOverN_apply (y : P β†’ ZMod N) (w : FinPlace E) : residueOverN y w = if h : w ∈ P then ((y ⟨w, h⟩).val / N : LocField w) else 0 := rfl /-- The adele `residueOverN y` is supported on `P`, so the idempotent `idem P` (which is `1` at the places of `P` and `0` elsewhere) fixes it. -/ lemma idem_mul_residueOverN (y : P β†’ ZMod N) : idem P * residueOverN y = residueOverN y := by refine DFunLike.ext _ _ fun w ↦ ?_ by_cases hw : w ∈ P <;> simp [hw] variable [WeilData E] namespace IsSplitLevel open scoped Classical in variable (n S) in /-- The matrix `diag (1, …, 1, N)` at the places of `P` that lie in `S`, and `1` at the others. -/ def diagN : GL (n βŠ• Unit) (LocProd P) := diagGL fun i : n βŠ• Unit ↦ if i.isLeft then 1 else MulEquiv.piUnits.symm fun w : P ↦ if ↑w ∈ S then .mk0 N NeZero.out else 1 variable [Ξ› : IsSplitLevel P N] (Ο€ : Rep β„‚ (GL (n βŠ• Unit) (LocProd P))) (Ο€' : Rep β„‚ (GL (n' βŠ• Unit) (LocProd P))) /-- The residue field at a place of `P` is `β„€ / N`. -/ def residueEquiv (w : P) : ResField w.val ≃+* ZMod N := letI : Fintype (ResField w.val) := Fintype.ofFinite (ResField w.val) (ZMod.ringEquivOfPrime (ResField w.val) Fact.out (by simp [← card_ResField, ← Ξ›.q_eq w])).symm /-- Reduction modulo `N` of the integers at `P`. -/ def reduction : O (F := LocProd P) β†’+* (P β†’ ZMod N) := RingHom.pi fun w : P ↦ (Ξ›.residueEquiv w).toRingHom.comp (residueAt w) section omit [WeilData E] /-- An integer `x` at `P` reduces to `c` modulo `N` exactly if `(x - c) / N` is integral at each place `w` of `P`, where `c w` is read in `[0, N)`. -/ lemma reduction_eq_iff {x : O (F := LocProd P)} {c : P β†’ ZMod N} : Ξ›.reduction x = c ↔ βˆ€ w : P, v (((x : LocProd P) w - (c w).val) / N) ≀ 1 := by -- At each place, `x - c` has residue `0` exactly if its valuation is below `1`, that is, at most -- the valuation of the uniformiser `N`. refine funext_iff.trans (forall_congr' fun w ↦ ?_) calc Ξ›.reduction x w = c w ↔ Ξ›.residueEquiv w (residueAt w (x - (c w).val)) = 0 := by rw [(residueAt w).map_sub, (residueEquiv w).map_sub, map_natCast (residueAt w), map_natCast (residueEquiv w), ZMod.natCast_zmod_val, sub_eq_zero] rfl _ ↔ v ((x : LocProd P) w - (c w).val) < 1 := (residueEquiv w).map_eq_zero_iff.trans (residueAt_eq_zero w) _ ↔ v (((x : LocProd P) w - (c w).val) / N) ≀ 1 := by simp [Ξ›.v_natCast, div_le_iffβ‚€, ← lt_mul_exp_iff_le, ← exp_add] instance : IsLocalHom Ξ›.reduction := ⟨by simp [reduction, Pi.isUnit_iff]⟩ lemma reduction_surjective : Surjective Ξ›.reduction := by intro y have h_int : (fun w : P ↦ ((y w).val : LocField w.val)) ∈ O (F := LocProd P) := mem_O_locProd.2 fun w ↦ (v.mem_integer_iff _).1 (natCast_mem v.integer (y w).val) exact ⟨⟨_, h_int⟩, by simp [reduction_eq_iff]⟩ /-- The inclusion of the integral invertible matrices into all invertible matrices at `P`. -/ abbrev inclGL {E : Type} [Field E] [NumberField E] {P : Finset (FinPlace E)} : GL n (O (F := LocProd P)) β†’* GL n (LocProd P) := map (O (F := LocProd P)).subtype /-- Reduction modulo `N` of integral invertible matrices. -/ abbrev reductionGL : GL n (O (F := LocProd P)) β†’* GL n (P β†’ ZMod N) := map Ξ›.reduction /-- A section of `reductionGL`. -/ abbrev liftGL : GL n (P β†’ ZMod N) β†’ GL n (O (F := LocProd P)) := surjInv (Matrix.GeneralLinearGroup.map_surjective Ξ›.reduction reduction_surjective) lemma reductionGL_liftGL (k : GL n (P β†’ ZMod N)) : reductionGL (Ξ›.liftGL k) = k := surjInv_eq _ k end /-- The matrix `diag (1, …, 1, N⁻¹)` at all places of `P`. -/ abbrev diagNInv : GL (n βŠ• Unit) (LocProd P) := (diagN (N := N) n P)⁻¹ /-- The character `ψ_N (y) = ψ (-y / N)` of the residues at `P`, where `ψ` is the additive character `stdLattice.selfDualAddChar E` of the finite adeles and `y / N` is the adele `residueOverN y`. -/ def psiN (y : P β†’ ZMod N) : β„‚ := stdLattice.selfDualAddChar E (-residueOverN y) /-- The last basis vector modulo `N`. -/ abbrev lastBasisVector : n βŠ• Unit β†’ P β†’ ZMod N := Pi.single (.inr ()) 1 /-- A vector whose last entry is a unit is both the last column and the last row of an invertible matrix. -/ lemma exists_GL_last_col_and_row {R : Type*} [CommRing R] : βˆƒ k : (n βŠ• Unit β†’ R) β†’ GL (n βŠ• Unit) R, βˆ€ y : n βŠ• Unit β†’ R, IsUnit (y (.inr ())) β†’ (k y).val.col (.inr ()) = y ∧ (k y).val.row (.inr ()) = y := by classical -- For `y` with unit last entry `u`, multiply the identity with last column `y` by the identity -- with last row `u⁻¹ β€’ y`; the determinants are `u` and `1`. have det_unit (y : n βŠ• Unit β†’ R) (h : IsUnit (y (.inr ()))) : IsUnit (updateCol 1 (Sum.inr ()) y * updateRow 1 (Sum.inr ()) (h.unit⁻¹.val β€’ y)).det := by simp [← cramer_apply, ← cramer_transpose_apply, h] refine ⟨fun y ↦ if h : IsUnit (y (.inr ())) then mk'' _ (det_unit y h) else 1, fun y h ↦ ?_⟩ -- The second factor has the last basis vector as its last column, and the last row of the first -- factor is `u` times that vector. constructor <;> ext a <;> simp [h, Matrix.mul_apply, ← mul_assoc] /-- For `y` with unit last entry, an integral invertible matrix whose last column and last row are both `y` modulo `N`. -/ def lastRowColGL (y : n βŠ• Unit β†’ P β†’ ZMod N) : GL (n βŠ• Unit) (O (F := LocProd P)) := Ξ›.liftGL (exists_GL_last_col_and_row.choose y) section omit [WeilData E] /-- If the last entry of `y` is a unit, then `y` is both the last column and the last row of `lastRowColGL y` modulo `N`. -/ lemma lastRowColGL_col_and_row {y : n βŠ• Unit β†’ P β†’ ZMod N} (hy : IsUnit (y (.inr ()))) : (reductionGL (Ξ›.lastRowColGL y)).val.col (.inr ()) = y ∧ (reductionGL (Ξ›.lastRowColGL y)).val.row (.inr ()) = y := by simpa only [lastRowColGL, reductionGL_liftGL] using exists_GL_last_col_and_row.choose_spec y hy /-- If the last entry of `y` is a unit, then `lastRowColGL y` takes the last basis vector to `y` modulo `N`. -/ lemma lastRowColGL_smul_lastBasisVector {y : n βŠ• Unit β†’ P β†’ ZMod N} (hy : IsUnit (y (.inr ()))) : reductionGL (Ξ›.lastRowColGL y) β€’ lastBasisVector = y := by simpa [Units.smul_def] using (lastRowColGL_col_and_row hy).left /-- If the last entry of `y` is a unit, then `lastRowColGL y`, acting on row vectors, takes the last basis vector to `y` modulo `N`. -/ lemma lastBasisVector_vecMul_lastRowColGL {y : n βŠ• Unit β†’ P β†’ ZMod N} (hy : IsUnit (y (.inr ()))) : lastBasisVector α΅₯* (reductionGL (Ξ›.lastRowColGL y)).val = y := by simpa using (lastRowColGL_col_and_row hy).right open scoped Classical in /-- The operator `Up = Ο€ (D) βˆ‘ y, ψ_N (y_last) Ο€ (lastRowColGL y)`, where `D = diagNInv` and `y` runs over the vectors modulo `N` whose last entry `y_last` is a unit. The matrix `D` replaces the standard lattice by the lattice enlarged by the last basis vector divided by `N`. -/ def upOperator : Module.End β„‚ Ο€ := Ο€.ρ (diagNInv (P := P) (N := N)) * βˆ‘ y : n βŠ• Unit β†’ P β†’ ZMod N with IsUnit (y (.inr ())), psiN (y (.inr ())) β€’ Ο€.ρ (inclGL (lastRowColGL y)) /-- The integral invertible matrices whose last column is the last basis vector modulo `N`: the stabiliser of the standard lattice marked with that vector. -/ def mirabolic : Subgroup (GL (n βŠ• Unit) (LocProd P)) := ((stabilizer (GL (n βŠ• Unit) (P β†’ ZMod N)) (lastBasisVector : n βŠ• Unit β†’ P β†’ ZMod N)).comap Ξ›.reductionGL).map inclGL /-- An integral invertible matrix that fixes the last basis vector modulo `N` lies in `mirabolic`, and every element of `mirabolic` has this form. -/ lemma mem_mirabolic {g : GL (n βŠ• Unit) (LocProd P)} : g ∈ Ξ›.mirabolic ↔ βˆƒ k : GL (n βŠ• Unit) (O (F := LocProd P)), Ξ›.reductionGL k β€’ (lastBasisVector : n βŠ• Unit β†’ P β†’ ZMod N) = lastBasisVector ∧ inclGL k = g := Iff.rfl /-- A vector is ramified if at each place `w` of `P` it has the form `ψ - x ψ` for an integral unit scalar `x` that is `1` modulo `N` at the other places. A vector that is fixed by the scalars congruent to `1` modulo `N` has this form if its mean over the unit scalars at each `w` is zero. The lift laws use only this form. -/ def ramified : Set Ο€ := {Ο† : Ο€ | βˆ€ w : P, βˆƒ x : (O (F := LocProd P))Λ£, (βˆ€ w' : P, w' β‰  w β†’ Ξ›.reduction x w' = 1) ∧ Ο† ∈ (1 - Ο€.ρ (inclGL (scalar (n βŠ• Unit) x))).range} /-- A function of matrices modulo `N`, as a function of integral matrices at `P`, extended by zero. -/ @[simps! -isSimp] abbrev liftFn : (Matrix n' n (P β†’ ZMod N) β†’ β„‚) β†’β‚—[β„‚] Matrix n' n (LocProd P) β†’ β„‚ := liftIntegralFn Ξ›.reduction /-- Applying `liftFn` to `T ↦ f (reductionGL b * T * reductionGL a)` gives `T ↦ liftFn f (inclGL b * T * inclGL a)`, for integral invertible matrices `a`, `b`. -/ lemma liftFn_comp_mul (f : Matrix n' n (P β†’ ZMod N) β†’ β„‚) (a : GL n (O (F := LocProd P))) (b : GL n' (O (F := LocProd P))) : (Ξ›.liftFn fun T : Matrix n' n (P β†’ ZMod N) ↦ f ((reductionGL b).val * T * (reductionGL a).val)) = fun T : Matrix n' n (LocProd P) ↦ Ξ›.liftFn f ((inclGL b).val * T * (inclGL a).val) := funext fun _ ↦ (liftIntegralFn_mul Ξ›.reduction f a b).symm /-- At an integral invertible matrix `k`, `liftFn f` (the function `f` of matrices modulo `N`, read on matrices at `P`) takes the value of `f` at `reductionGL k`, i.e. `k` modulo `N`. -/ lemma liftFn_inclGL (f : Matrix n n (P β†’ ZMod N) β†’ β„‚) (k : GL n (O (F := LocProd P))) : Ξ›.liftFn f (inclGL k).val = f (reductionGL k).val := dite_eq_left fun i j ↦ (k.val i j).property end /-- The indicator of the integral matrices whose last row is the last basis vector modulo `N`. -/ def lastRowDatum : Matrix (n' βŠ• Unit) (n βŠ• Unit) (LocProd P) β†’ β„‚ := Ξ›.liftFn fun T : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N) ↦ if T (.inr ()) = lastBasisVector then 1 else 0 /-- The indicator of the integral matrices whose last column is `y` modulo `N`. -/ def lastColDatum (y : n' β†’ P β†’ ZMod N) : Matrix n' (n βŠ• Unit) (LocProd P) β†’ β„‚ := Ξ›.liftFn fun T : Matrix n' (n βŠ• Unit) (P β†’ ZMod N) ↦ if Tα΅€ (.inr ()) = y then 1 else 0 /-- On integral matrices, `ψ_N` of the last row paired with `y`. -/ def charDatum (y : n β†’ P β†’ ZMod N) : Matrix (n' βŠ• Unit) n (LocProd P) β†’ β„‚ := Ξ›.liftFn fun T : Matrix (n' βŠ• Unit) n (P β†’ ZMod N) ↦ psiN (T (.inr ()) ⬝α΅₯ y) /-- The direct datum: the indicator of the integral matrices whose last column is the last basis vector modulo `N`. For marked lattices `(L, Ξ΅)`, `(L', Ξ΅')` it is `1[S L βŠ† L', S Ξ΅ = Ξ΅']`. -/ abbrev directDatum : Matrix (n' βŠ• Unit) (n βŠ• Unit) (LocProd P) β†’ β„‚ := Ξ›.lastColDatum lastBasisVector /-- The mirror datum: `ψ_N` of the corner entry modulo `N` on integral matrices, zero elsewhere. For marked lattices `(L, Ξ΅)`, `(L', Ξ΅')` it is `1[S L βŠ† L'⁺] ψ_N (u' (S Ξ΅))` in bases of `L` and `L'⁺ = L' + π’ͺ Ξ΅' / N`, where `u'` is the last coordinate on `L'⁺` modulo `N`. -/ abbrev mirrorDatum : Matrix (n' βŠ• Unit) (n βŠ• Unit) (LocProd P) β†’ β„‚ := Ξ›.charDatum lastBasisVector /-- The glued datum of a double lift: on pairs of integral matrices, `ψ_N` of the corner entry of the product `R T`. -/ def gluedDatum (T : Matrix n' (n βŠ• Unit) (LocProd P)) (R : Matrix (n'' βŠ• Unit) n' (LocProd P)) : β„‚ := Ξ›.liftFn (fun T' : Matrix n' (n βŠ• Unit) (P β†’ ZMod N) ↦ Ξ›.charDatum (T'α΅€ (.inr ())) R) T open scoped Classical in omit [DecidableEq n] in /-- The glued datum, sorted by the last column `y` of the first matrix modulo `N`: it is the sum of the indicator `lastColDatum y` at `T` times the character `charDatum y` at `R`. -/ lemma gluedDatum_eq_sum (T : Matrix n' (n βŠ• Unit) (LocProd P)) (R : Matrix (n'' βŠ• Unit) n' (LocProd P)) : Ξ›.gluedDatum T R = βˆ‘ y : n' β†’ P β†’ ZMod N, Ξ›.lastColDatum y T * Ξ›.charDatum y R := by simp only [gluedDatum, lastColDatum, liftFn_apply] split_ifs <;> simp [-transpose_of] open scoped Classical in /-- The vectors modulo `N` that are non-zero at every place of `P`. -/ abbrev primitiveVectors (n : Type) [Fintype n] [DecidableEq n] : Finset (n β†’ P β†’ ZMod N) := {y : n β†’ P β†’ ZMod N | βˆ€ w : P, βˆƒ a : n, IsUnit (y a w)} /-- The rules for a lift `L Ξ¨` from `Ο€` to `Ο€'` that is linear in its datum `Ξ¨`, a function on matrices at `P`; the constant `Ξ³` is the cost of the change of lattices `diagNInv`. -/ structure LiftLaw (L : (Matrix (n' βŠ• Unit) (n βŠ• Unit) (LocProd P) β†’ β„‚) β†’β‚—[β„‚] Ο€ β†’β‚—[β„‚] Ο€') (Ξ³ : β„‚) : Prop where /-- Integral invertible matrices move between the datum and the two representations with no factor. -/ integral_equivariant (a : GL (n βŠ• Unit) (O (F := LocProd P))) (b : GL (n' βŠ• Unit) (O (F := LocProd P))) (f : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N) β†’ β„‚) (Ο† : Ο€) : Ο€'.ρ (inclGL b) (L (liftFn fun T : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N) ↦ f ((reductionGL b).val * T * (reductionGL a).val)) (Ο€.ρ (inclGL a) Ο†)) = L (liftFn f) Ο† /-- Passing in the direct datum from bases of the enlarged lattices (`lastRowDatum`) to bases of the original lattices (`directDatum`) costs the factor `Ξ³`. -/ diagNInv_lastRowDatum (Ο† : Ο€) : Ο€'.ρ (diagNInv (P := P) (N := N)) (L lastRowDatum Ο†) = Ξ³ β€’ L directDatum (Ο€.ρ (diagNInv (P := P) (N := N)) Ο†) variable {Ο€ Ο€'} {Ο† : Ο€} {L : (Matrix (n' βŠ• Unit) (n βŠ• Unit) (LocProd P) β†’ β„‚) β†’β‚—[β„‚] Ο€ β†’β‚—[β„‚] Ο€'} {Ξ³ : β„‚} /-! ## The direct datum in terms of valuations -/ omit [WeilData E] in /-- An integer at `P` reduces to zero modulo `N` exactly if `N` divides it at every place. -/ lemma reduction_eq_zero_iff {x : O (F := LocProd P)} : Ξ›.reduction x = 0 ↔ βˆ€ w : P, v ((x : LocProd P) w) ≀ exp (-1) := by simp only [reduction_eq_iff, Pi.zero_apply, ZMod.val_zero, Nat.cast_zero, sub_zero, map_divβ‚€, SetLike.coe_mem, Ξ›.v_natCast, Int.reduceNeg, exp_pos, div_le_oneβ‚€, Subtype.forall] omit [WeilData E] in /-- An integer `x` at `P` reduces to one modulo `N` exactly if `N` divides `x - 1` at every place. -/ lemma reduction_eq_one_iff {x : O (F := LocProd P)} : Ξ›.reduction x = 1 ↔ βˆ€ w : P, v ((x : LocProd P) w - 1) ≀ exp (-1) := by simp only [reduction_eq_iff, Pi.one_apply, ZMod.val_one, Nat.cast_one, map_divβ‚€, SetLike.coe_mem, Ξ›.v_natCast, Int.reduceNeg, exp_pos, div_le_oneβ‚€, Subtype.forall] omit [Fintype n] [WeilData E] in /-- An integral vector is the last basis vector modulo `N` exactly if, at every place of `P`, `N` divides its entries other than the last and the last entry minus one. -/ lemma reduction_comp_eq_lastBasisVector_iff {x : n βŠ• Unit β†’ O (F := LocProd P)} : (fun j : n βŠ• Unit ↦ Ξ›.reduction (x j)) = lastBasisVector ↔ (βˆ€ (j : n) (w : P), v ((x (.inl j) : LocProd P) w) ≀ exp (-1)) ∧ βˆ€ w : P, v ((x (.inr ()) : LocProd P) w - 1) ≀ exp (-1) := by simp only [funext_iff (Ξ± := n βŠ• Unit), Sum.forall, ne_eq, reduceCtorEq, not_false_eq_true, Pi.single_eq_of_ne, reduction_eq_zero_iff, Int.reduceNeg, Subtype.forall, Pi.single_eq_same, reduction_eq_one_iff, Unique.forall_iff, PUnit.default_eq_unit] omit [DecidableEq n] [DecidableEq n'] [WeilData E] in /-- Let `p` be a condition on matrices modulo `N`, and let `Q` be equivalent, when `T` is integral, to `p` for the reduction of `T`. Then the lift of the indicator of `p` is `1` at `T` if `T` is integral and `Q` holds, and `0` otherwise. -/ lemma liftFn_indicator_apply {p : Matrix n' n (P β†’ ZMod N) β†’ Prop} [DecidablePred p] {Q : Prop} [Decidable Q] (T : Matrix n' n (LocProd P)) (hQ : βˆ€ hT : βˆ€ (i : n') (j : n), T i j ∈ O (F := LocProd P), p (of fun (i : n') (j : n) ↦ Ξ›.reduction ⟨T i j, hT i j⟩) ↔ Q) : Ξ›.liftFn (fun T' : Matrix n' n (P β†’ ZMod N) ↦ if p T' then 1 else 0) T = if (βˆ€ (i : n') (j : n) (w : P), v (T i j w) ≀ 1) ∧ Q then 1 else 0 := by classical simp only [liftFn_apply] by_cases h_int : βˆ€ (i : n') (j : n), T i j ∈ O (F := LocProd P) Β· simp [h_int, hQ h_int, fun i j ↦ mem_O_locProd.1 (h_int i j)] Β· rw [dite_eq_right h_int, ite_eq_right fun h ↦ h_int fun i j ↦ mem_O_locProd.2 (h.1 i j)] open scoped Classical in omit [DecidableEq n'] [WeilData E] in /-- `lastRowDatum` in terms of valuations: it is the indicator of the matrices `T` with integral entries whose last row is congruent to the last basis vector modulo the uniformiser `N`. -/ lemma lastRowDatum_apply (T : Matrix (n' βŠ• Unit) (n βŠ• Unit) (LocProd P)) : Ξ›.lastRowDatum T = if (βˆ€ (i : n' βŠ• Unit) (j : n βŠ• Unit) (w : P), v (T i j w) ≀ 1) ∧ (βˆ€ (j : n) (w : P), v (T (.inr ()) (.inl j) w) ≀ exp (-1)) ∧ βˆ€ w : P, v (T (.inr ()) (.inr ()) w - 1) ≀ exp (-1) then 1 else 0 := liftFn_indicator_apply T fun _ ↦ reduction_comp_eq_lastBasisVector_iff open scoped Classical in omit [DecidableEq n] [WeilData E] in /-- `directDatum` in terms of valuations: it is the indicator of the matrices `T` with integral entries whose last column is congruent to the last basis vector modulo the uniformiser `N`. -/ lemma directDatum_apply (T : Matrix (n' βŠ• Unit) (n βŠ• Unit) (LocProd P)) : Ξ›.directDatum T = if (βˆ€ (i : n' βŠ• Unit) (j : n βŠ• Unit) (w : P), v (T i j w) ≀ 1) ∧ (βˆ€ (i : n') (w : P), v (T (.inl i) (.inr ()) w) ≀ exp (-1)) ∧ βˆ€ w : P, v (T (.inr ()) (.inr ()) w - 1) ≀ exp (-1) then 1 else 0 := liftFn_indicator_apply T fun _ ↦ reduction_comp_eq_lastBasisVector_iff omit [WeilData E] in /-- The two descriptions of the direct datum agree. Let `D = diagNInv = diag (1, …, 1, N⁻¹)`. Then `D⁻¹ T D` is integral with last row the last basis vector modulo `N` (`lastRowDatum`) exactly if `T` is integral with last column the last basis vector modulo `N` (`directDatum`). -/ lemma lastRowDatum_conj_diagNInv (T : Matrix (n' βŠ• Unit) (n βŠ• Unit) (LocProd P)) : lastRowDatum ((diagNInv (P := P) (N := N) (n := n'))⁻¹.val * T * (diagNInv (P := P) (N := N) (n := n)).val) = directDatum T := by -- Conjugation multiplies the last row of `T` by `N` and the last column by `N⁻¹`, off the corner. set C : Matrix (n' βŠ• Unit) (n βŠ• Unit) (LocProd P) := (diagNInv (P := P) (N := N) (n := n'))⁻¹.val * T * (diagNInv (P := P) (N := N) (n := n)).val with hC have h_block (i : n') (j : n) : C (.inl i) (.inl j) = T (.inl i) (.inl j) := by simp only [hC, diagNInv, diagN, ← map_inv, inv_inv, coe_diagGL, Pi.inv_apply, Units.val_inv_eq_inv_val, mul_diagonal, diagonal_mul, Sum.isLeft_inl, Units.val_one, one_mul, inv_one, mul_one, ↓reduceIte] have h_corner : C (.inr ()) (.inr ()) = T (.inr ()) (.inr ()) := by ext w : 1 simp only [hC, diagNInv, diagN, ← map_inv, inv_inv, coe_diagGL, Pi.inv_apply, Units.val_inv_eq_inv_val, mul_diagonal, diagonal_mul, Sum.isLeft_inr, Bool.false_eq_true, Pi.mul_apply, MulEquiv.val_piUnits_symm_apply, Units.val_mk0, ← div_eq_mul_inv, w.property, ↓reduceIte, mul_div_cancel_leftβ‚€ _ (NeZero.out : (N : LocField w.val) β‰  0)] have h_row (j : n) (w : P) : v (C (.inr ()) (.inl j) w) = v (T (.inr ()) (.inl j) w) * exp (-1) := by simp only [hC, diagNInv, diagN, ← map_inv, inv_inv, coe_diagGL, Pi.inv_apply, Units.val_inv_eq_inv_val, mul_diagonal, diagonal_mul, Sum.isLeft_inr, Bool.false_eq_true, Sum.isLeft_inl, Units.val_one, inv_one, Pi.mul_apply, MulEquiv.val_piUnits_symm_apply, Units.val_mk0, Pi.one_apply, mul_one, map_mul, Ξ›.v_natCast, w.property, ↓reduceIte, mul_comm] have h_col (i : n') (w : P) : v (C (.inl i) (.inr ()) w) ≀ 1 ↔ v (T (.inl i) (.inr ()) w) ≀ exp (-1) := by simp only [hC, diagNInv, diagN, ← map_inv, inv_inv, coe_diagGL, Pi.inv_apply, Units.val_inv_eq_inv_val, mul_diagonal, diagonal_mul, Sum.isLeft_inl, Units.val_one, one_mul, Sum.isLeft_inr, Bool.false_eq_true, Pi.mul_apply, MulEquiv.val_piUnits_symm_apply, Units.val_mk0, ← div_eq_mul_inv, map_divβ‚€, Ξ›.v_natCast, w.property, ↓reduceIte, exp_pos, div_le_oneβ‚€] have hN : exp (-1 : β„€) ≀ 1 := exp_le_exp.2 (by norm_num) simp only [lastRowDatum_apply, directDatum_apply, Sum.forall, Unique.forall_iff, PUnit.default_eq_unit, h_block, h_corner, h_row, h_col, exp_pos, mul_le_iff_le_one_left] -- Both sides say: `T` is integral, `N` divides its last column off the corner, and the corner is -- `1` modulo `N`. The remaining conditions follow from these because `N` is integral. refine if_congr ⟨fun ⟨⟨h_left, _, h_corner⟩, h_row, h_one⟩ ↦ ⟨⟨fun i ↦ ⟨(h_left i).1, fun w ↦ ((h_left i).2 w).trans hN⟩, h_row, h_corner⟩, fun i ↦ (h_left i).2, h_one⟩, fun ⟨⟨h_left, h_row, h_corner⟩, h_col, h_one⟩ ↦ ⟨⟨fun i ↦ ⟨(h_left i).1, h_col i⟩, fun j w ↦ mul_le_one' (h_row j w) hN, h_corner⟩, h_row, h_one⟩⟩ rfl rfl /-! ## The stabilisers fix the direct and the mirror datum -/ omit [WeilData E] in /-- Let `liftFn f` be the extension by zero of `f` from integral matrices modulo `N`. If it is non-zero at `g` and at `g⁻¹`, then `g` comes from an integral invertible matrix `k` (`inclGL k = g`) and `f` is non-zero at the reduction of `k`. -/ lemma exists_inclGL_eq {f : Matrix n n (P β†’ ZMod N) β†’ β„‚} {g : GL n (LocProd P)} (hg : Ξ›.liftFn f g β‰  0) (hg_inv : Ξ›.liftFn f ↑g⁻¹ β‰  0) : βˆƒ k : GL n (O (F := LocProd P)), f (reductionGL k).val β‰  0 ∧ inclGL k = g := by have h_int {T : Matrix n n (LocProd P)} (hT : Ξ›.liftFn f T β‰  0) : βˆ€ i j : n, T i j ∈ O := by by_contra h simp [liftFn_apply, h] at hT obtain ⟨k, rfl⟩ : g ∈ intGL n O := mem_intGL.2 ⟨h_int hg, h_int hg_inv⟩ exact ⟨k, by rwa [liftFn_inclGL] at hg, rfl⟩ omit [WeilData E] in /-- The direct datum does not vanish on `mirabolic`, the integral invertible matrices whose last column is the last basis vector modulo `N`. -/ lemma directDatum_ne_zero_of_mem_mirabolic {g : GL (n βŠ• Unit) (LocProd P)} (hg : g ∈ Ξ›.mirabolic) : directDatum g.val β‰  0 := by obtain ⟨k, hk, rfl⟩ := mem_mirabolic.1 hg have h_col : (reductionGL k).valα΅€ (.inr ()) = lastBasisVector := by rwa [Units.smul_def, smul_eq_mulVec, mulVec_single_one] at hk rw [directDatum, lastColDatum, liftFn_inclGL, ite_eq_left h_col] exact one_ne_zero omit [WeilData E] in /-- Let `g` lie in `mirabolic`, that is, `g` is integral invertible with last column the last basis vector modulo `N`. Then its conjugate `D⁻¹ g D` by `D = diagNInv = diag (1, …, 1, N⁻¹)` is an integral invertible matrix whose last row is the last basis vector modulo `N`. -/ lemma exists_inclGL_eq_conj_diagNInv {g : GL (n βŠ• Unit) (LocProd P)} (hg : g ∈ Ξ›.mirabolic) : βˆƒ k : GL (n βŠ• Unit) (O (F := LocProd P)), (Ξ›.reductionGL k).val (.inr ()) = lastBasisVector ∧ inclGL k = (diagNInv (P := P) (N := N))⁻¹ * g * (diagNInv (P := P) (N := N)) := by classical have h_conj {a : GL (n βŠ• Unit) (LocProd P)} (ha : a ∈ mirabolic) : lastRowDatum ((diagNInv (P := P) (N := N))⁻¹ * a * (diagNInv (P := P) (N := N))).val β‰  0 := by rw [Units.val_mul, Units.val_mul, lastRowDatum_conj_diagNInv] exact directDatum_ne_zero_of_mem_mirabolic ha have h_conj_inv : lastRowDatum ((diagNInv (P := P) (N := N))⁻¹ * g * (diagNInv (P := P) (N := N)))⁻¹.val β‰  0 := by rw [_root_.mul_inv_rev, _root_.mul_inv_rev, inv_inv, ← mul_assoc] exact h_conj (inv_mem hg) obtain ⟨k, hk_row, hk⟩ := exists_inclGL_eq (f := fun T ↦ if T (.inr ()) = lastBasisVector then 1 else 0) (h_conj hg) h_conj_inv exact ⟨k, by simpa using hk_row, hk⟩ omit [WeilData E] in /-- Let `g` and `h` lie in `mirabolic`. Then `directDatum`, the indicator of the integral matrices whose last column is the last basis vector modulo `N`, is invariant under `T ↦ h⁻¹ T g`. -/ lemma directDatum_mul_mul_of_mem_mirabolic {g : GL (n βŠ• Unit) (LocProd P)} {h : GL (n' βŠ• Unit) (LocProd P)} (hg : g ∈ Ξ›.mirabolic) (hh : h ∈ Ξ›.mirabolic) (T : Matrix (n' βŠ• Unit) (n βŠ• Unit) (LocProd P)) : Ξ›.directDatum (h⁻¹.val * T * g.val) = Ξ›.directDatum T := by obtain ⟨a, ha_fix, rfl⟩ := mem_mirabolic.1 hg obtain ⟨b, hb_fix, hb⟩ := mem_mirabolic.1 (inv_mem hh) -- Write `g = a` and `h⁻¹ = b` with integral `a`, `b`. As these fix the last basis vector, -- `b T' a` has it as last column exactly if `T'` does. have h_col (T' : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N)) : ((Ξ›.reductionGL b).val * T' * (Ξ›.reductionGL a).val)α΅€ (.inr ()) = lastBasisVector ↔ T'α΅€ (.inr ()) = lastBasisVector := by have h_last : ((Ξ›.reductionGL b).val * T' * (Ξ›.reductionGL a).val)α΅€ (.inr ()) = Ξ›.reductionGL b β€’ (T' *α΅₯ Ξ›.reductionGL a β€’ lastBasisVector) := by simp only [Units.smul_def, smul_eq_mulVec, mulVec_mulVec, mulVec_single_one] rfl rw [h_last, ha_fix, mulVec_single_one] exact (MulAction.injective (Ξ›.reductionGL b)).eq_iff' hb_fix -- So the datum of `b T' a` modulo `N` is that of `T'`. rw [← hb] calc Ξ›.directDatum ((inclGL b).val * T * (inclGL a).val) = Ξ›.liftFn (fun T' : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N) ↦ if ((reductionGL b).val * T' * (reductionGL a).val)α΅€ (.inr ()) = lastBasisVector then 1 else 0) T := (congrFun (liftFn_comp_mul _ a b) T).symm _ = Ξ›.directDatum T := by simp only [h_col, directDatum, lastColDatum] /-! ## The operator `Up` -/ /-- `Up` preserves the vectors fixed by `mirabolic`, the group of integral invertible matrices at `P` whose last column is the last basis vector modulo `N`. -/ lemma mirabolic_fix_upOperator (hΟ† : βˆ€ a : GL (n βŠ• Unit) (LocProd P), a ∈ Ξ›.mirabolic β†’ Ο€.ρ a Ο† = Ο†) {g : GL (n βŠ• Unit) (LocProd P)} (hg : g ∈ Ξ›.mirabolic) : Ο€.ρ g (upOperator Ο€ Ο†) = upOperator Ο€ Ο† := by classical -- `k = diagNInv⁻¹ g diagNInv` is integral, and its last row is the last basis vector modulo `N`. obtain ⟨k, h_row, hk⟩ := exists_inclGL_eq_conj_diagNInv hg have h_last (y : n βŠ• Unit β†’ P β†’ ZMod N) : (reductionGL k β€’ y) (.inr ()) = y (.inr ()) := by change (Ξ›.reductionGL k).val (.inr ()) ⬝α΅₯ y = y (.inr ()) rw [h_row, single_one_dotProduct] -- Both `k * lastRowColGL y` and `lastRowColGL (k y)` have last column `k y` modulo `N`, so they -- differ by an element of `mirabolic`. have h_mem (y : n βŠ• Unit β†’ P β†’ ZMod N) (hy : IsUnit (y (.inr ()))) : (diagNInv (P := P) (N := N) * inclGL (lastRowColGL (reductionGL k β€’ y)))⁻¹ * g * (diagNInv (P := P) (N := N) * inclGL (lastRowColGL y)) ∈ Ξ›.mirabolic := by refine mem_mirabolic.2 ⟨(lastRowColGL (reductionGL k β€’ y))⁻¹ * k * lastRowColGL y, ?_, ?_⟩ Β· rw [map_mul, map_mul, map_inv, mul_smul, mul_smul, inv_smul_eq_iff, lastRowColGL_smul_lastBasisVector hy, lastRowColGL_smul_lastBasisVector (by rwa [h_last])] Β· rw [map_mul, map_mul, map_inv, hk, _root_.mul_inv_rev] simp only [mul_assoc] -- So `g` permutes the terms of the sum that defines `Up`, by `y ↦ k y`. simp only [upOperator, mul_sum, mul_smul_comm, ← map_mul, LinearMap.sum_apply, LinearMap.smul_apply, map_sum, map_smul] refine sum_equiv (toPerm (reductionGL k)) (by simp [h_last]) fun y hy ↦ ?_ rw [toPerm_apply, h_last] congr 1 rw [← Ο€.ρ.inv_apply_eq_iff, ← mul_apply_eq_comp, ← mul_apply_eq_comp, ← map_mul, ← map_mul] exact hΟ† _ (h_mem y (mem_filter.1 hy).2) /-- An endomorphism of `Ο€` that commutes with the action of all matrices at `P` commutes with `Up` (`upOperator`). -/ lemma commute_upOperator {T : Module.End β„‚ Ο€} (hT : βˆ€ g : GL (n βŠ• Unit) (LocProd P), Commute T (Ο€.ρ g)) : Commute T (upOperator Ο€) := (hT _).mul_right (Commute.sum_right _ _ _ fun _ _ ↦ (hT _).smul_right _) lemma scalar_commute_upOperator (x : (O (F := LocProd P))Λ£) : Commute (Ο€.ρ (inclGL (scalar (n βŠ• Unit) x))) (upOperator Ο€) := commute_upOperator fun g ↦ by rw [map_scalar] exact (show Commute _ g from GeneralLinearGroup.scalar_commute _ g).map Ο€.ρ omit [WeilData E] in /-- A linear map `T` from `Ο€` to `Ο€'` that commutes with integral unit scalars sends ramified vectors to ramified vectors. -/ lemma map_mem_ramified (T : Ο€ β†’β‚—[β„‚] Ο€') (hT : βˆ€ (x : (O (F := LocProd P))Λ£) (ψ : Ο€), Ο€'.ρ (inclGL (scalar (n' βŠ• Unit) x)) (T ψ) = T (Ο€.ρ (inclGL (scalar (n βŠ• Unit) x)) ψ)) (hΟ† : Ο† ∈ ramified Ο€) : T Ο† ∈ ramified Ο€' := by intro w obtain ⟨x, hx_one, ψ, rfl⟩ := hΟ† w exact ⟨x, hx_one, T ψ, (congrArg (T ψ - Β·) (hT x ψ)).trans (map_sub T ψ _).symm⟩ /-- `Up` (`upOperator`) commutes with integral unit scalars, so it preserves ramified vectors. -/ lemma upOperator_mem_ramified (hΟ† : Ο† ∈ ramified Ο€) : upOperator Ο€ Ο† ∈ ramified Ο€ := map_mem_ramified _ (fun x ψ ↦ LinearMap.congr_fun (scalar_commute_upOperator x).eq ψ) hΟ† /-- The powers of `Up` (`upOperator`) preserve ramified vectors. -/ lemma upOperator_pow_mem_ramified (hΟ† : Ο† ∈ ramified Ο€) (q : β„•) : (upOperator Ο€ ^ q) Ο† ∈ ramified Ο€ := by induction q with | zero => exact hΟ† | succ q ih => simpa [pow_succ'] using upOperator_mem_ramified ih /-! ## Cutting a datum into pieces, and consequences of the lift law -/ omit [WeilData E] in /-- Let `L` be linear in its datum. If the datum is `g (r T)` for a function `r` of the matrix `T` modulo `N` with finitely many values, then the lift is the sum over the values `y` of `g y` times the lift by the indicator of `r T = y`. -/ lemma liftFn_comp_eq_sum_smul {ΞΉ : Type} [Fintype ΞΉ] [DecidableEq ΞΉ] (r : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N) β†’ ΞΉ) (g : ΞΉ β†’ β„‚) : L (liftFn fun T : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N) ↦ g (r T)) Ο† = βˆ‘ y : ΞΉ, g y β€’ L (liftFn fun T : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N) ↦ if r T = y then 1 else 0) Ο† := by have h_sort : (fun T ↦ g (r T)) = βˆ‘ y : ΞΉ, g y β€’ fun T ↦ if r T = y then 1 else 0 := by ext; simp simp only [h_sort, map_sum, map_smul, LinearMap.sum_apply, LinearMap.smul_apply] omit [CMType E] [WeilData E] [IsSplitLevel P N] in /-- A vector modulo `N` that is non-zero at every place of `P` is the image of the last basis vector under an invertible matrix modulo `N`. -/ lemma exists_GL_smul_lastBasisVector {y : n βŠ• Unit β†’ P β†’ ZMod N} (hy : βˆ€ w : P, βˆƒ a : n βŠ• Unit, IsUnit (y a w)) : βˆƒ k : GL (n βŠ• Unit) (P β†’ ZMod N), k β€’ lastBasisVector = y := by -- Choose such a matrix at each place and assemble them. choose g hg using fun w : P ↦ exists_GL_smul_single (hy w) (Sum.inr ()) obtain ⟨k, hk⟩ : IsUnit (piRingEquiv.symm fun w : P ↦ (g w).val) := (Pi.isUnit_iff.2 fun w ↦ (g w).isUnit).map piRingEquiv.symm refine ⟨k, funextβ‚‚ fun a w ↦ ?_⟩ have h_entry := congrFun (hg w) a rw [Units.smul_def, smul_eq_mulVec, mulVec_single_one, col_apply] at h_entry rw [Units.smul_def, smul_eq_mulVec, mulVec_single_one, col_apply, hk, piRingEquiv_symm_apply, of_apply, h_entry] namespace LiftLaw section omit [WeilData E] /-- Let the lift `L Ξ¨ : Ο€ β†’ Ο€'`, linear in its datum `Ξ¨`, obey the lift law. Then the lift by any function `f` of matrices modulo `N`, extended by zero off the integral matrices (`liftFn f`), preserves ramified vectors, because scalars pass through it. -/ lemma mem_ramified (H : LiftLaw Ο€ Ο€' L Ξ³) (f : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N) β†’ β„‚) (hΟ† : Ο† ∈ ramified Ο€) : L (liftFn f) Ο† ∈ ramified Ο€' := by refine map_mem_ramified _ (fun x ψ ↦ ?_) hΟ† rw [← H.integral_equivariant (scalar (n βŠ• Unit) x)⁻¹ (scalar (n' βŠ• Unit) x) f (Ο€.ρ (inclGL (scalar (n βŠ• Unit) x)) ψ)] simp only [val_map_apply, coe_scalar, scalar_apply, diagonal_map Ξ›.reduction.map_zero, ← smul_eq_diagonal_mul, smul_eq_mul_diagonal, map_inv, coe_units_inv, Matrix.mul_assoc, det_diagonal, prod_const, card_univ, Fintype.card_sum, Fintype.card_unique, ne_eq, Nat.add_eq_zero_iff, one_ne_zero, and_false, not_false_eq_true, isUnit_pow_iff, _root_.isUnit_map_iff, Units.isUnit, mul_nonsing_inv, Matrix.mul_one, Representation.inv_self_apply] /-- Let the lift `L Ξ¨ : Ο€ β†’ Ο€'`, linear in its datum `Ξ¨`, obey the lift law, and let the function `f` of matrices modulo `N` be invariant under the unit scalars that are `1` away from the place `w`. Then the lift by `f`, extended by zero off the integral matrices (`liftFn f`), annihilates ramified vectors: such a vector is `ψ - x ψ` for an integral unit scalar `x` that is `1` modulo `N` away from `w`. -/ lemma apply_liftFn_eq_zero_of_smul_invariant (H : LiftLaw Ο€ Ο€' L Ξ³) (hΟ† : Ο† ∈ ramified Ο€) (w : P) {f : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N) β†’ β„‚} (hf : βˆ€ c : P β†’ ZMod N, IsUnit c β†’ (βˆ€ w' : P, w' β‰  w β†’ c w' = 1) β†’ βˆ€ T : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N), f (c β€’ T) = f T) : L (liftFn f) Ο† = 0 := by obtain ⟨x, hx_one, ψ, rfl⟩ := hΟ† w have h_fix : L (liftFn f) (Ο€.ρ (inclGL (scalar (n βŠ• Unit) x)) ψ) = L (liftFn f) ψ := by simp only [← H.integral_equivariant (scalar (n βŠ• Unit) x) 1 f ψ, map_one, Units.val_one, Matrix.one_mul, val_map_apply, coe_scalar, scalar_apply, diagonal_map Ξ›.reduction.map_zero, ← smul_eq_mul_diagonal, hf _ (Ξ›.reduction.isUnit_map x.isUnit) hx_one, one_apply_eq_self] exact (map_sub _ _ _).trans (sub_eq_zero.2 h_fix.symm) /-- Let the lift `L Ξ¨ : Ο€ β†’ Ο€'` be linear in its datum `Ξ¨`, a function on matrices at `P`, and obey the lift law; in particular integral invertible matrices move freely between the datum and the two representations. Let `Ο†` be ramified: at each place `w` of `P` it is `ψ - x ψ` for an integral unit scalar `x` that is `1` modulo `N` away from `w`. Let `r` map matrices modulo `N` to vectors modulo `N` and commute with scalars, and let the vector `y` vanish at some place `w`. Then `Ο†` is annihilated by the lift whose datum is the indicator of the integral matrices with reduction `T` satisfying `r T = y`. -/ lemma apply_liftFn_indicator_eq_zero (H : LiftLaw Ο€ Ο€' L Ξ³) (hΟ† : Ο† ∈ ramified Ο€) {ΞΉ : Type} [DecidableEq (ΞΉ β†’ P β†’ ZMod N)] (r : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N) β†’ ΞΉ β†’ P β†’ ZMod N) (hr : βˆ€ (c : P β†’ ZMod N) (T : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N)), r (c β€’ T) = c β€’ r T) {y : ΞΉ β†’ P β†’ ZMod N} {w : P} (hy : βˆ€ a : ΞΉ, y a w = 0) : L (liftFn fun T : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N) ↦ if r T = y then 1 else 0) Ο† = 0 := by refine H.apply_liftFn_eq_zero_of_smul_invariant hΟ† w fun c hc hc_one T ↦ ?_ have h_fix : c β€’ y = y := funextβ‚‚ fun a w' ↦ by by_cases hw : w' = w <;> simp [*] have h_iff : c β€’ r T = y ↔ r T = y := by rw [← hc.smul_left_cancel (x := r T), h_fix] simp only [hr, h_iff] /-- Let the lift `L Ξ¨ : Ο€ β†’ Ο€'` be linear in its datum `Ξ¨` and obey the lift law `H`; in particular integral invertible matrices move freely between the datum and the two representations. Let `k` be an integral invertible matrix at `P`, and let `lastColDatum y` be the indicator of the integral matrices with last column `y` modulo `N`. For every vector `Ο†` of `Ο€`, the action of `inclGL k` on `Ο€'` takes the lift of `Ο†` by `lastColDatum y` to the lift of `Ο†` by `lastColDatum (reductionGL k β€’ y)`. -/ lemma inclGL_lastColDatum (H : LiftLaw Ο€ Ο€' L Ξ³) (k : GL (n' βŠ• Unit) (O (F := LocProd P))) (y : n' βŠ• Unit β†’ P β†’ ZMod N) : Ο€'.ρ (inclGL k) (L (lastColDatum y) Ο†) = L (lastColDatum (reductionGL k β€’ y)) Ο† := by -- The last column of `k T` is `k y` exactly if that of `T` is `y`. have h_col (T : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N)) : ((reductionGL k).val * T)α΅€ (.inr ()) = reductionGL k β€’ y ↔ Tα΅€ (.inr ()) = y := by change reductionGL k β€’ Tα΅€ (.inr ()) = reductionGL k β€’ y ↔ _ rw [smul_left_cancel_iff] refine .trans ?_ (H.integral_equivariant 1 k _ Ο†) simp only [lastColDatum, map_one, Units.val_one, Matrix.mul_one, h_col, one_apply_eq_self] end /-- Let the lift `L Ξ¨ : Ο€ β†’ Ο€'` be linear in its datum `Ξ¨` and obey the lift law `H`; in particular integral invertible matrices move freely between the datum and the two representations. Let `k` be an integral invertible matrix at `P`, with reduction `reductionGL k` modulo `N` and image `inclGL k` among all invertible matrices. Let `charDatum y` be `ψ_N` of the last row paired with `y` modulo `N` on integral matrices and zero elsewhere. For every vector `Ο†` of `Ο€`, the lift of `Ο€.ρ (inclGL k) Ο†` by `charDatum (reductionGL k β€’ y)` is the lift of `Ο†` by `charDatum y`. -/ lemma charDatum_inclGL (H : LiftLaw Ο€ Ο€' L Ξ³) (k : GL (n βŠ• Unit) (O (F := LocProd P))) (y : n βŠ• Unit β†’ P β†’ ZMod N) : L (charDatum (reductionGL k β€’ y)) (Ο€.ρ (inclGL k) Ο†) = L (charDatum y) Ο† := by have h_pair (T : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N)) : (T * (reductionGL k).val) (.inr ()) ⬝α΅₯ y = T (.inr ()) ⬝α΅₯ reductionGL k β€’ y := (dotProduct_mulVec (T (.inr ())) (reductionGL k).val y).symm refine .trans ?_ (H.integral_equivariant k 1 _ Ο†) simp only [charDatum, map_one, Units.val_one, Matrix.one_mul, h_pair, one_apply_eq_self] open scoped Classical in /-- Let the lift `L Ξ¨ : Ο€ β†’ Ο€'` be linear in its datum `Ξ¨` and obey the lift law; in particular integral invertible matrices move freely between the datum and the two representations. Let `Ο†` be ramified: at each place `w` of `P` it is `ψ - x ψ` for an integral unit scalar `x` that is `1` modulo `N` away from `w`. Then the lift of `Ο†` does not change if `mirrorDatum` is restricted to the matrices whose corner entry is a unit modulo `N`. -/ lemma mirrorDatum_eq_unitCorner (H : LiftLaw Ο€ Ο€' L Ξ³) (hΟ† : Ο† ∈ ramified Ο€) : L mirrorDatum Ο† = L (liftFn fun T : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N) ↦ if IsUnit (T (.inr ()) (.inr ())) then psiN (T (.inr ()) (.inr ())) else 0) Ο† := by -- The datum is `ψ_N` of the corner entry `t`; sort both sides by `t`. simp only [mirrorDatum, charDatum, dotProduct_single_one] rw [liftFn_comp_eq_sum_smul _ psiN, liftFn_comp_eq_sum_smul _ fun t ↦ if IsUnit t then psiN t else 0] refine sum_congr rfl fun t _ ↦ ?_ split_ifs with ht Β· rfl obtain ⟨w, hw⟩ : βˆƒ w : P, t w = 0 := by simpa [Pi.isUnit_iff] using ht suffices h_zero : L (liftFn fun T ↦ if T (.inr ()) (.inr ()) = t then 1 else 0) Ο† = 0 by simp [h_zero] simpa [funext_iff (Ξ± := Unit)] using H.apply_liftFn_indicator_eq_zero hΟ† (fun T _ ↦ T (.inr ()) (.inr ())) (fun _ _ ↦ rfl) (y := fun _ : Unit ↦ t) fun _ ↦ hw /-- **Mirror data through direct data, on the target.** Let the lift `L Ξ¨ : Ο€ β†’ Ο€'` be linear in its datum `Ξ¨` and obey the lift law; in particular integral invertible matrices move freely between the datum and the two representations. Let `Ο†` be ramified: at each place `w` of `P` it is `ψ - x ψ` for an integral unit scalar `x` that is `1` modulo `N` away from `w`. Then the mirror lift of `Ο†`, moved by `D = diagNInv = diag (1, …, 1, N⁻¹)`, is `Up` of the direct lift of `Ο†`. -/ lemma mirror_eq_upOperator_direct (H : LiftLaw Ο€ Ο€' L Ξ³) (hΟ† : Ο† ∈ ramified Ο€) : Ο€'.ρ (diagNInv (P := P) (N := N)) (L mirrorDatum Ο†) = upOperator Ο€' (L directDatum Ο†) := by classical -- Sort by the last column `y`; its term is the translate of the direct lift by `lastRowColGL y`. have h_term (y : n' βŠ• Unit β†’ P β†’ ZMod N) (hy : IsUnit (y (.inr ()))) : L (lastColDatum y) Ο† = Ο€'.ρ (inclGL (lastRowColGL y)) (L directDatum Ο†) := by rw [H.inclGL_lastColDatum, lastRowColGL_smul_lastBasisVector hy] have h_sort : L mirrorDatum Ο† = βˆ‘ y : n' βŠ• Unit β†’ P β†’ ZMod N, (if IsUnit (y (.inr ())) then psiN (y (.inr ())) else 0) β€’ L (lastColDatum y) Ο† := (H.mirrorDatum_eq_unitCorner hΟ†).trans (liftFn_comp_eq_sum_smul (fun T ↦ Tα΅€ (.inr ())) fun y ↦ if IsUnit (y (.inr ())) then psiN (y (.inr ())) else 0) rw [h_sort, upOperator, mul_apply_eq_comp] congr 1 simp only [ite_smul, zero_smul, ← sum_filter, LinearMap.sum_apply, LinearMap.smul_apply] exact sum_congr rfl fun y hy ↦ by rw [h_term y (mem_filter.1 hy).2] /-- **Mirror data through direct data, on the source.** Let `Ο€`, `Ο€'` be representations (action `ρ`) of `GL (n βŠ• Unit)`, `GL (n' βŠ• Unit)` over `LocProd P`. Let the lift `L Ξ¨ : Ο€ β†’ Ο€'` be linear in its datum `Ξ¨` and obey the lift law `H : LiftLaw`. Also, `D = diagNInv = diag (1, …, 1, N⁻¹)` moves from `Ο€'` to `Ο€` at the cost `Ξ³`, turning `lastRowDatum` into `directDatum`. Let `Ο†` be ramified: at each place `w` of `P` it is `ψ - x ψ` for an integral unit scalar `x` that is `1` modulo `N` away from `w`. Then the lift of `Ο†` by `mirrorDatum`, moved by `D`, is `Ξ³` times the direct lift `L directDatum` of `Up Ο†`. -/ lemma mirror_eq_direct_upOperator (H : LiftLaw Ο€ Ο€' L Ξ³) (hΟ† : Ο† ∈ ramified Ο€) : Ο€'.ρ (diagNInv (P := P) (N := N)) (L mirrorDatum Ο†) = Ξ³ β€’ L directDatum (upOperator Ο€ Ο†) := by classical -- Sort by the last row `y`; its term is the lift by `lastRowDatum` after `lastRowColGL y`. have h_term (y : n βŠ• Unit β†’ P β†’ ZMod N) (hy : IsUnit (y (.inr ()))) : L (liftFn fun T ↦ if T (.inr ()) = y then 1 else 0) Ο† = L lastRowDatum (Ο€.ρ (inclGL (lastRowColGL y)) Ο†) := by have h_row (T : Matrix (n' βŠ• Unit) (n βŠ• Unit) (P β†’ ZMod N)) : (T * (reductionGL (lastRowColGL y)).val) (.inr ()) = y ↔ T (.inr ()) = lastBasisVector := (vecMul_injective_of_isUnit (reductionGL (lastRowColGL y)).isUnit).eq_iff' (lastBasisVector_vecMul_lastRowColGL hy) rw [← H.integral_equivariant (lastRowColGL y) 1] simp only [lastRowDatum, map_one, Units.val_one, Matrix.one_mul, h_row, one_apply_eq_self] have h_sort : L mirrorDatum Ο† = βˆ‘ y : n βŠ• Unit β†’ P β†’ ZMod N, (if IsUnit (y (.inr ())) then psiN (y (.inr ())) else 0) β€’ L (liftFn fun T ↦ if T (.inr ()) = y then 1 else 0) Ο† := (H.mirrorDatum_eq_unitCorner hΟ†).trans (liftFn_comp_eq_sum_smul (fun T ↦ T (.inr ())) fun y ↦ if IsUnit (y (.inr ())) then psiN (y (.inr ())) else 0) rw [h_sort, upOperator, mul_apply_eq_comp, ← H.diagNInv_lastRowDatum] congr 1 simp only [ite_smul, zero_smul, ← sum_filter, LinearMap.sum_apply, LinearMap.smul_apply, map_sum, map_smul] exact sum_congr rfl fun y hy ↦ by rw [h_term y (mem_filter.1 hy).2] /-- Let the lift `L Ξ¨ : Ο€ β†’ Ο€'`, linear in its datum `Ξ¨`, obey the lift law with factor `Ξ³`, and let `Ο†` be ramified: at each place `w` of `P` it is `ψ - x ψ` for an integral unit scalar `x` that is `1` modulo `N` away from `w`. Then `Up` (`upOperator`) moves through the lift by `directDatum`, the indicator of the integral matrices whose last column is the last basis vector modulo `N`, at the cost of the factor `Ξ³`. -/ lemma upOperator_direct (H : LiftLaw Ο€ Ο€' L Ξ³) (hΟ† : Ο† ∈ ramified Ο€) : upOperator Ο€' (L directDatum Ο†) = Ξ³ β€’ L directDatum (upOperator Ο€ Ο†) := (H.mirror_eq_upOperator_direct hΟ†).symm.trans (H.mirror_eq_direct_upOperator hΟ†) open scoped Classical in /-- Let the lifts `L Ξ¨ : Ο€ β†’ Ο€'` and `L' Ξ¨ : Ο€' β†’ Ο€''` be linear in their data and obey the lift law; in particular integral invertible matrices move freely between the datum and the two representations. Let `Ο†` be ramified: at each place `w` of `P` it is `ψ - x ψ` for an integral unit scalar `x` that is `1` modulo `N` away from `w`. Then the sum over `y` of `L' (charDatum y) (L (lastColDatum y) Ο†)` equals the number of primitive vectors times `L' mirrorDatum (L directDatum Ο†)`. -/ lemma sum_charDatum_lastColDatum (H : LiftLaw Ο€ Ο€' L Ξ³) [DecidableEq n''] {Ο€'' : Rep β„‚ (GL (n'' βŠ• Unit) (LocProd P))} {L' : (Matrix (n'' βŠ• Unit) (n' βŠ• Unit) (LocProd P) β†’ β„‚) β†’β‚—[β„‚] Ο€' β†’β‚—[β„‚] Ο€''} {Ξ³' : β„‚} (H' : LiftLaw Ο€' Ο€'' L' Ξ³') (hΟ† : Ο† ∈ ramified Ο€) : βˆ‘ y : n' βŠ• Unit β†’ P β†’ ZMod N, L' (charDatum y) (L (lastColDatum y) Ο†) = #(primitiveVectors (P := P) (N := N) (n' βŠ• Unit)) β€’ L' mirrorDatum (L directDatum Ο†) := by -- A term whose `y` vanishes at some place is zero. have h_support (y : n' βŠ• Unit β†’ P β†’ ZMod N) (hy : L' (charDatum y) (L (lastColDatum y) Ο†) β‰  0) (w : P) : βˆƒ a : n' βŠ• Unit, IsUnit (y a w) := by by_contra! h_nonunit refine hy ?_ rw [lastColDatum, H.apply_liftFn_indicator_eq_zero hΟ† (fun T ↦ Tα΅€ (.inr ())) (fun _ _ ↦ rfl) (fun a ↦ by simpa using h_nonunit a), map_zero] -- The integral invertible matrices permute the primitive vectors transitively and cancel between -- the two lifts. have h_term (y : n' βŠ• Unit β†’ P β†’ ZMod N) (hy : y ∈ primitiveVectors (n' βŠ• Unit)) : L' (charDatum y) (L (lastColDatum y) Ο†) = L' mirrorDatum (L directDatum Ο†) := by obtain ⟨k, rfl⟩ := exists_GL_smul_lastBasisVector (mem_filter.1 hy).2 rw [← reductionGL_liftGL k, ← H.inclGL_lastColDatum, H'.charDatum_inclGL] rw [← sum_eq_card_nsmul h_term, sum_filter_of_ne fun y _ ↦ h_support y] open scoped Classical in /-- Let the lifts `L Ξ¨ : Ο€ β†’ Ο€'` and `L' Ξ¨ : Ο€' β†’ Ο€''` be linear in their data and obey the lift law with factors `Ξ³`, `Ξ³'`: integral invertible matrices move freely between the datum and the two representations, and `D = diagNInv = diag (1, …, 1, N⁻¹)` moves from target to source at the cost of the factor, turning `lastRowDatum` into `directDatum`. Let `Ο†` be ramified: at each place `w` of `P` it is `ψ - x ψ` for an integral unit scalar `x` that is `1` modulo `N` away from `w`. Then the double lift of `Ο†` by `βˆ‘ y, lastColDatum y βŠ— charDatum y`, moved by `D`, is a scalar times the two direct lifts of `Up Ο†` (`upOperator`). The scalar is `Ξ³' Ξ³` times the number of primitive vectors. -/ lemma glued_eq_direct_direct_upOperator (H : LiftLaw Ο€ Ο€' L Ξ³) [DecidableEq n''] {Ο€'' : Rep β„‚ (GL (n'' βŠ• Unit) (LocProd P))} {L' : (Matrix (n'' βŠ• Unit) (n' βŠ• Unit) (LocProd P) β†’ β„‚) β†’β‚—[β„‚] Ο€' β†’β‚—[β„‚] Ο€''} {Ξ³' : β„‚} (H' : LiftLaw Ο€' Ο€'' L' Ξ³') (hΟ† : Ο† ∈ ramified Ο€) : Ο€''.ρ (diagNInv (P := P) (N := N)) (βˆ‘ y : n' βŠ• Unit β†’ P β†’ ZMod N, L' (charDatum y) (L (lastColDatum y) Ο†)) = (#(primitiveVectors (P := P) (N := N) (n' βŠ• Unit)) β€’ (Ξ³' * Ξ³)) β€’ L' directDatum (L directDatum (upOperator Ο€ Ο†)) := by -- Separate into a mirror lift after a direct lift, replace the mirror lift by a direct lift after -- `Up`, and move `Up` through the first lift. let c : β„• := #(primitiveVectors (P := P) (N := N) (n' βŠ• Unit)) have h_ramified : L directDatum Ο† ∈ ramified Ο€' := H.mem_ramified _ hΟ† calc Ο€''.ρ (diagNInv (P := P) (N := N)) (βˆ‘ y : n' βŠ• Unit β†’ P β†’ ZMod N, L' (charDatum y) (L (lastColDatum y) Ο†)) = c β€’ Ο€''.ρ (diagNInv (P := P) (N := N)) (L' mirrorDatum (L directDatum Ο†)) := by rw [H.sum_charDatum_lastColDatum H' hΟ†, map_nsmul] _ = c β€’ Ξ³' β€’ L' directDatum (Ξ³ β€’ L directDatum (upOperator Ο€ Ο†)) := by rw [H'.mirror_eq_direct_upOperator h_ramified, H.upOperator_direct hΟ†] _ = (c β€’ (Ξ³' * Ξ³)) β€’ L' directDatum (L directDatum (upOperator Ο€ Ο†)) := by rw [map_smul, smul_smul Ξ³' Ξ³, smul_assoc] end LiftLaw end IsSplitLevel end /-! ## Chains of lifts -/ namespace IsSplitLevel variable {E : Type} [Field E] [CMType E] [WeilData E] {P : Finset (FinPlace E)} {N : β„•} [Fact N.Prime] [Ξ› : IsSplitLevel P N] -- A chain: `L j` is a lift from `Ο€ j` to `Ο€ (j + 1)`, with factor `Ξ³ j` in its lift law. variable {X : β„• β†’ Type} [βˆ€ j : β„•, Fintype (X j)] [βˆ€ j : β„•, DecidableEq (X j)] (Ο€ : βˆ€ j : β„•, Rep β„‚ (GL (X j βŠ• Unit) (LocProd P))) {L : βˆ€ j : β„•, (Matrix (X (j + 1) βŠ• Unit) (X j βŠ• Unit) (LocProd P) β†’ β„‚) β†’β‚—[β„‚] Ο€ j β†’β‚—[β„‚] Ο€ (j + 1)} {Ξ³ : β„• β†’ β„‚} omit [WeilData E] in /-- If each `L j`, a lift from `Ο€ j` to `Ο€ (j + 1)` for places `P` above the split prime `N`, obeys the lift law, then the composite of the first `j` direct lifts preserves ramified vectors. -/ lemma compUpTo_direct_mem_ramified (law : βˆ€ j : β„•, LiftLaw (Ο€ j) (Ο€ (j + 1)) (L j) (Ξ³ j)) {Ο† : Ο€ 0} (hΟ† : Ο† ∈ ramified (Ο€ 0)) (j : β„•) : compUpTo (fun l : β„• ↦ L l directDatum) j Ο† ∈ ramified (Ο€ j) := by induction j with | zero => exact hΟ† | succ j ih => exact (law j).mem_ramified _ ih /-- Let each lift `L j Ξ¨ : Ο€ j β†’ Ο€ (j + 1)` obey the lift law with factor `Ξ³ j`. On ramified vectors `Up` (`upOperator`) moves through the composite `L (j - 1) Ξ¨ ∘ β‹― ∘ L 0 Ξ¨` of the first `j` lifts by `Ξ¨ = directDatum` at the cost of `∏ l < j, Ξ³ l`. -/ lemma upOperator_compUpTo_direct (law : βˆ€ j : β„•, LiftLaw (Ο€ j) (Ο€ (j + 1)) (L j) (Ξ³ j)) {Ο† : Ο€ 0} (hΟ† : Ο† ∈ ramified (Ο€ 0)) (j : β„•) : upOperator (Ο€ j) (compUpTo (fun l : β„• ↦ L l directDatum) j Ο†) = (∏ l ∈ range j, Ξ³ l) β€’ compUpTo (fun l : β„• ↦ L l directDatum) j (upOperator (Ο€ 0) Ο†) := by induction j with | zero => simp [compUpTo] | succ j ih => simp only [compUpTo, LinearMap.comp_apply] rw [(law j).upOperator_direct (compUpTo_direct_mem_ramified Ο€ law hΟ† j), ih, map_smul, smul_smul, prod_range_succ_comm] /-- The `i`-th glued double lift of a chain of lifts `L j` between representations `Ο€ j`: it is `d i` times the sum over the vectors `y` modulo `N` of the lift `L (2 i + 1)` by `charDatum y` after the lift `L (2 i)` by `lastColDatum y`, moved by `diagNInv`. -/ abbrev gluedLift (L : βˆ€ j : β„•, (Matrix (X (j + 1) βŠ• Unit) (X j βŠ• Unit) (LocProd P) β†’ β„‚) β†’β‚—[β„‚] Ο€ j β†’β‚—[β„‚] Ο€ (j + 1)) (d : β„• β†’ β„‚) (i : β„•) : Ο€ (2 * i) β†’β‚—[β„‚] Ο€ (2 * (i + 1)) := open scoped Classical in d i β€’ (Ο€ (2 * i + 1 + 1)).ρ (diagNInv (P := P) (N := N)) βˆ˜β‚— βˆ‘ y : X (2 * i + 1) βŠ• Unit β†’ P β†’ ZMod N, L (2 * i + 1) (charDatum y) βˆ˜β‚— L (2 * i) (lastColDatum y) open scoped Classical in /-- **All lifts become direct.** Let each lift `L j Ξ¨ : Ο€ j β†’ Ο€ (j + 1)` be linear in its datum `Ξ¨` and obey the lift law with factor `Ξ³ j`: integral invertible matrices move freely between the datum and the two representations, and `D = diagNInv = diag (1, …, 1, N⁻¹)` moves from target to source at the cost `Ξ³ j`, turning `lastRowDatum` into `directDatum`. The glued double lift `gluedLift Ο€ L d i : Ο€ (2 i) β†’ Ο€ (2 i + 2)` is `d i` times `D` after `βˆ‘ y, L (2 i + 1) (charDatum y) ∘ L (2 i) (lastColDatum y)`, and `compUpTo f j` is `f (j - 1) ∘ β‹― ∘ f 0`. Let `Ο†` be ramified: at each place `w` of `P` it is `ψ - x ψ` for an integral unit scalar `x` that is `1` modulo `N` away from `w`. Then the composite of the first `p` glued double lifts takes `Ο†` to a scalar times the composite of `2 p` direct lifts of `Up ^ p Ο†`. The scalar is the product over `i < p` of `d i`, the number of primitive vectors in the middle and `∏ l < 2 i + 2, Ξ³ l`. -/ lemma compUpTo_gluedLift_eq_smul (law : βˆ€ j : β„•, LiftLaw (Ο€ j) (Ο€ (j + 1)) (L j) (Ξ³ j)) {Ο† : Ο€ 0} {d : β„• β†’ β„‚} (hΟ† : Ο† ∈ ramified (Ο€ 0)) (p : β„•) : compUpTo (M := fun i : β„• ↦ Ο€ (2 * i)) (gluedLift Ο€ L d) p Ο† = (∏ i ∈ range p, d i * #(primitiveVectors (P := P) (N := N) (X (2 * i + 1) βŠ• Unit)) β€’ ∏ l ∈ range (2 * i + 2), Ξ³ l) β€’ compUpTo (fun l : β„• ↦ L l directDatum) (2 * p) ((upOperator (Ο€ 0) ^ p) Ο†) := by induction p with | zero => simp [compUpTo] | succ q ih => let directLifts (j : β„•) : Ο€ j := compUpTo (fun l ↦ L l directDatum) j ((upOperator (Ο€ 0) ^ q) Ο†) have h_ramified (j : β„•) : directLifts j ∈ ramified (Ο€ j) := compUpTo_direct_mem_ramified Ο€ law (upOperator_pow_mem_ramified hΟ† q) j -- Move the `Up` of the last double lift through the earlier lifts to the source. have h_up : upOperator (Ο€ (2 * q)) (directLifts (2 * q)) = (∏ l ∈ range (2 * q), Ξ³ l) β€’ compUpTo (fun l ↦ L l directDatum) (2 * q) ((upOperator (Ο€ 0) ^ (q + 1)) Ο†) := by rw [pow_succ', mul_apply_eq_comp] exact upOperator_compUpTo_direct Ο€ law (upOperator_pow_mem_ramified hΟ† q) (2 * q) -- The scalar of the last double lift, with the cost of moving its `Up` to the source. have h_scalar : (d q * #(primitiveVectors (P := P) (N := N) (X (2 * q + 1) βŠ• Unit)) β€’ (Ξ³ (2 * q + 1) * Ξ³ (2 * q))) * ∏ l ∈ range (2 * q), Ξ³ l = d q * #(primitiveVectors (P := P) (N := N) (X (2 * q + 1) βŠ• Unit)) β€’ ∏ l ∈ range (2 * q + 2), Ξ³ l := by simp only [prod_range_succ, nsmul_eq_mul] ring -- Separate the last double lift into two direct lifts after `Up`. have h_pair : gluedLift Ο€ L d q (directLifts (2 * q)) = (d q * #(primitiveVectors (P := P) (N := N) (X (2 * q + 1) βŠ• Unit)) β€’ ∏ l ∈ range (2 * q + 2), Ξ³ l) β€’ compUpTo (fun l ↦ L l directDatum) (2 * (q + 1)) ((upOperator (Ο€ 0) ^ (q + 1)) Ο†) := by simp only [gluedLift, LinearMap.smul_apply, LinearMap.comp_apply, LinearMap.sum_apply] rw [(law (2 * q)).glued_eq_direct_direct_upOperator (law (2 * q + 1)) (h_ramified (2 * q)), smul_smul (d q), h_up, map_smul, map_smul, smul_smul, h_scalar] -- The composite of `2 (q + 1)` lifts is by definition two lifts after the first `2 q`. rfl rw [compUpTo, LinearMap.comp_apply, ih, map_smul, prod_range_succ, mul_smul, h_pair] end IsSplitLevel end New end