import Definitions.Def_LanglandsTunnell_CubicInduction_SlabL2 import Definitions.Def_LanglandsTunnell_CubicInduction_Structure import Mathlib.Analysis.Calculus.ContDiff.Defs set_option autoImplicit false noncomputable section open NumberField MeasureTheory AutomorphicForm IsDedekindDomain open scoped ENNReal namespace LanglandsTunnell.CubicInduction.SlabL2 attribute [local instance] NumberField.AdelicHaar.glBorel def cuspFunctions (ฯ‰ : (AdeleRing (๐“ž โ„š) โ„š)หฃ โ†’* โ„‚หฃ) (a b : โ„) (ฮฆโ‚€ : Set (AdelicGL 3 (๐“ž โ„š) โ„š)) : Set (AdelicGL 3 (๐“ž โ„š) โ„š โ†’ โ„‚) := {F | F โˆˆ automorphicSubmodule ฯ‰ a b ฮฆโ‚€ โˆง Continuous F โˆง IsCuspidalAlongP21 (productionPinsOf โ„š โˆ… (fun _ => โŠฅ) (fun _ => 1) (AdelicBox.adelicBox โ„š)) F โˆง IsCuspidalAlongP12 (productionPinsOf โ„š โˆ… (fun _ => โŠฅ) (fun _ => 1) (AdelicBox.adelicBox โ„š)) F} theorem mem_cuspFunctions_iff (ฯ‰ : (AdeleRing (๐“ž โ„š) โ„š)หฃ โ†’* โ„‚หฃ) (a b : โ„) (ฮฆโ‚€ : Set (AdelicGL 3 (๐“ž โ„š) โ„š)) (F : AdelicGL 3 (๐“ž โ„š) โ„š โ†’ โ„‚) : F โˆˆ cuspFunctions ฯ‰ a b ฮฆโ‚€ โ†” F โˆˆ automorphicSubmodule ฯ‰ a b ฮฆโ‚€ โˆง Continuous F โˆง IsCuspidalAlongP21 (productionPinsOf โ„š โˆ… (fun _ => โŠฅ) (fun _ => 1) (AdelicBox.adelicBox โ„š)) F โˆง IsCuspidalAlongP12 (productionPinsOf โ„š โˆ… (fun _ => โŠฅ) (fun _ => 1) (AdelicBox.adelicBox โ„š)) F := Iff.rfl theorem automorphicSubmodule_of_mem_cuspFunctions (ฯ‰ : (AdeleRing (๐“ž โ„š) โ„š)หฃ โ†’* โ„‚หฃ) (a b : โ„) (ฮฆโ‚€ : Set (AdelicGL 3 (๐“ž โ„š) โ„š)) {F : AdelicGL 3 (๐“ž โ„š) โ„š โ†’ โ„‚} (hF : F โˆˆ cuspFunctions ฯ‰ a b ฮฆโ‚€) : F โˆˆ automorphicSubmodule ฯ‰ a b ฮฆโ‚€ := hF.1 def cuspMembers (ฯ‰ : (AdeleRing (๐“ž โ„š) โ„š)หฃ โ†’* โ„‚หฃ) (a b : โ„) (ฮฆโ‚€ : Set (AdelicGL 3 (๐“ž โ„š) โ„š)) : Set โ†ฅ(automorphicSubmodule ฯ‰ a b ฮฆโ‚€) := {f | (f : AdelicGL 3 (๐“ž โ„š) โ„š โ†’ โ„‚) โˆˆ cuspFunctions ฯ‰ a b ฮฆโ‚€} theorem mem_cuspMembers_iff (ฯ‰ : (AdeleRing (๐“ž โ„š) โ„š)หฃ โ†’* โ„‚หฃ) (a b : โ„) (ฮฆโ‚€ : Set (AdelicGL 3 (๐“ž โ„š) โ„š)) (f : โ†ฅ(automorphicSubmodule ฯ‰ a b ฮฆโ‚€)) : f โˆˆ cuspMembers ฯ‰ a b ฮฆโ‚€ โ†” (f : AdelicGL 3 (๐“ž โ„š) โ„š โ†’ โ„‚) โˆˆ cuspFunctions ฯ‰ a b ฮฆโ‚€ := Iff.rfl def cuspidalSubspace (ฯ‰ : (AdeleRing (๐“ž โ„š) โ„š)หฃ โ†’* โ„‚หฃ) (a b : โ„) (ฮฆโ‚€ : Set (AdelicGL 3 (๐“ž โ„š) โ„š)) : Submodule โ„‚ (Carrier a b ฮฆโ‚€) := (Submodule.span โ„‚ (toL2 ฯ‰ a b ฮฆโ‚€ '' cuspMembers ฯ‰ a b ฮฆโ‚€)).topologicalClosure theorem cuspidalSubspace_def (ฯ‰ : (AdeleRing (๐“ž โ„š) โ„š)หฃ โ†’* โ„‚หฃ) (a b : โ„) (ฮฆโ‚€ : Set (AdelicGL 3 (๐“ž โ„š) โ„š)) : cuspidalSubspace ฯ‰ a b ฮฆโ‚€ = (Submodule.span โ„‚ (toL2 ฯ‰ a b ฮฆโ‚€ '' cuspMembers ฯ‰ a b ฮฆโ‚€)).topologicalClosure := rfl theorem isClosed_cuspidalSubspace (ฯ‰ : (AdeleRing (๐“ž โ„š) โ„š)หฃ โ†’* โ„‚หฃ) (a b : โ„) (ฮฆโ‚€ : Set (AdelicGL 3 (๐“ž โ„š) โ„š)) : IsClosed (cuspidalSubspace ฯ‰ a b ฮฆโ‚€ : Set (Carrier a b ฮฆโ‚€)) := Submodule.isClosed_topologicalClosure _ theorem toL2_mem_cuspidalSubspace (ฯ‰ : (AdeleRing (๐“ž โ„š) โ„š)หฃ โ†’* โ„‚หฃ) (a b : โ„) (ฮฆโ‚€ : Set (AdelicGL 3 (๐“ž โ„š) โ„š)) {f : โ†ฅ(automorphicSubmodule ฯ‰ a b ฮฆโ‚€)} (hf : f โˆˆ cuspMembers ฯ‰ a b ฮฆโ‚€) : toL2 ฯ‰ a b ฮฆโ‚€ f โˆˆ cuspidalSubspace ฯ‰ a b ฮฆโ‚€ := Submodule.le_topologicalClosure _ (Submodule.subset_span โŸจf, hf, rflโŸฉ) theorem toL2_mem_cuspidalSubspace_of_mem_cuspFunctions (ฯ‰ : (AdeleRing (๐“ž โ„š) โ„š)หฃ โ†’* โ„‚หฃ) (a b : โ„) (ฮฆโ‚€ : Set (AdelicGL 3 (๐“ž โ„š) โ„š)) {F : AdelicGL 3 (๐“ž โ„š) โ„š โ†’ โ„‚} (hF : F โˆˆ cuspFunctions ฯ‰ a b ฮฆโ‚€) : toL2 ฯ‰ a b ฮฆโ‚€ โŸจF, hF.1โŸฉ โˆˆ cuspidalSubspace ฯ‰ a b ฮฆโ‚€ := toL2_mem_cuspidalSubspace ฯ‰ a b ฮฆโ‚€ (f := โŸจF, hF.1โŸฉ) hF def realCoordinate : InfiniteAdeleRing โ„š โ†’+* โ„ := (InfinitePlace.Completion.ringEquivRealOfIsReal Rat.isReal_infinitePlace).toRingHom.comp (Pi.evalRingHom (fun v : InfinitePlace โ„š => v.Completion) Rat.infinitePlace) def archEntries (g : AdelicGL 3 (๐“ž โ„š) โ„š) : Fin 3 โ†’ Fin 3 โ†’ โ„ := fun i j => realCoordinate ((g : Matrix (Fin 3) (Fin 3) (AdeleRing (๐“ž โ„š) โ„š)) i j).1 def IsSmoothArchFactor (ฮฑ : (Fin 3 โ†’ Fin 3 โ†’ โ„) โ†’ โ„‚) : Prop := ContDiff โ„ (โŠค : โ„•โˆž) ฮฑ โˆง HasCompactSupport ฮฑ โˆง tsupport ฮฑ โІ {m | (Matrix.of m).det โ‰  0} def IsSmoothingKernel (ฯ† : AdelicGL 3 (๐“ž โ„š) โ„š โ†’ โ„‚) : Prop := โˆƒ (ฮฑ : (Fin 3 โ†’ Fin 3 โ†’ โ„) โ†’ โ„‚) (K' : (p : HeightOneSpectrum (๐“ž โ„š)) โ†’ Subgroup (GL (Fin 3) (p.adicCompletion โ„š))), IsSmoothArchFactor ฮฑ โˆง (โˆ€ p, IsOpen (K' p : Set (GL (Fin 3) (p.adicCompletion โ„š))) โˆง IsCompact (K' p : Set (GL (Fin 3) (p.adicCompletion โ„š)))) โˆง (โˆ€แถ  p in Filter.cofinite, K' p = localMaximalCompact3 (๐“ž โ„š) โ„š p) โˆง โˆ€ g : AdelicGL 3 (๐“ž โ„š) โ„š, ฯ† g = ฮฑ (archEntries g) * Set.indicator {x : AdelicGL 3 (๐“ž โ„š) โ„š | โˆ€ p, componentAt3 (๐“ž โ„š) โ„š p x โˆˆ K' p} (fun _ => (1 : โ„‚)) g def translateRight (h : AdelicGL 3 (๐“ž โ„š) โ„š) (f : AdelicGL 3 (๐“ž โ„š) โ„š โ†’ โ„‚) : AdelicGL 3 (๐“ž โ„š) โ„š โ†’ โ„‚ := fun x => f (x * h) theorem translateRight_apply (h : AdelicGL 3 (๐“ž โ„š) โ„š) (f : AdelicGL 3 (๐“ž โ„š) โ„š โ†’ โ„‚) (x : AdelicGL 3 (๐“ž โ„š) โ„š) : translateRight h f x = f (x * h) := rfl theorem translateRight_one (f : AdelicGL 3 (๐“ž โ„š) โ„š โ†’ โ„‚) : translateRight 1 f = f := by funext x; simp [translateRight] theorem translateRight_mul (h h' : AdelicGL 3 (๐“ž โ„š) โ„š) (f : AdelicGL 3 (๐“ž โ„š) โ„š โ†’ โ„‚) : translateRight (h * h') f = translateRight h (translateRight h' f) := by funext x; simp [translateRight, mul_assoc] def smoothingOperator (ฯ† f : AdelicGL 3 (๐“ž โ„š) โ„š โ†’ โ„‚) : AdelicGL 3 (๐“ž โ„š) โ„š โ†’ โ„‚ := fun x => โˆซ g, ฯ† g * f (x * g) โˆ‚(NumberField.AdelicHaar.adelicGLHaar (Fin 3) (๐“ž โ„š) โ„š) theorem smoothingOperator_apply (ฯ† f : AdelicGL 3 (๐“ž โ„š) โ„š โ†’ โ„‚) (x : AdelicGL 3 (๐“ž โ„š) โ„š) : smoothingOperator ฯ† f x = โˆซ g, ฯ† g * f (x * g) โˆ‚(NumberField.AdelicHaar.adelicGLHaar (Fin 3) (๐“ž โ„š) โ„š) := rfl end LanglandsTunnell.CubicInduction.SlabL2 end