import Definitions.Def_AutomorphicForm_WindowedSiegelSet open IsDedekindDomain NumberField MeasureTheory Matrix noncomputable section namespace AutomorphicForm namespace WindowedSiegel variable (F : Type) [Field F] [NumberField F] section Continuity variable {K : Type*} [NormedField K] theorem continuous_entry (i j : Fin 2) : Continuous fun g : GL (Fin 2) K => (g : Matrix (Fin 2) (Fin 2) K) i j := Units.continuous_val.matrix_elem i j theorem continuous_topNormSq_gl : Continuous fun g : GL (Fin 2) K => topNormSq (g : Matrix (Fin 2) (Fin 2) K) := by unfold topNormSq exact ((continuous_entry 0 0).norm.pow 2).add ((continuous_entry 0 1).norm.pow 2) theorem continuous_rowNormSq_gl : Continuous fun g : GL (Fin 2) K => rowNormSq (g : Matrix (Fin 2) (Fin 2) K) := by unfold rowNormSq exact ((continuous_entry 1 0).norm.pow 2).add ((continuous_entry 1 1).norm.pow 2) theorem continuous_det_gl : Continuous fun g : GL (Fin 2) K => ((g : Matrix (Fin 2) (Fin 2) K)).det := Units.continuous_val.matrix_det theorem continuous_localHeight : Continuous (localHeight (K := K)) := by unfold localHeight exact continuous_det_gl.norm.div continuous_rowNormSq_gl fun g => (rowNormSq_pos g).ne' theorem continuous_xWindowSq : Continuous (xWindowSq (K := K)) := by unfold xWindowSq exact (continuous_topNormSq_gl.div continuous_rowNormSq_gl fun g => (rowNormSq_pos g).ne').sub (continuous_localHeight.pow 2) end Continuity theorem continuous_archHeight : Continuous (archHeight F) := by unfold archHeight exact continuous_finsetProd _ fun v _ => (continuous_localHeight.comp (AdelicLevel.continuous_archComponent F v)).pow _ theorem one_mem_interior_integralWindowedSiegelSet {c u : ℝ} (hc : c < 1) (hu : u β‰  0) : (1 : AdelicGL2 (π“ž F) F) ∈ interior (integralWindowedSiegelSet F c u) := by have htop : (⊀ : Ideal (π“ž F)) β‰  βŠ₯ := by simp have hKf : IsOpen {g : AdelicGL2 (π“ž F) F | AdelicLevel.glFin (π“ž F) F g ∈ AdelicLevel.finiteIntegralGL2 (π“ž F) F} := (AdelicLevel.isOpen_finiteLevelZero (π“ž F) F htop).preimage (AdelicLevel.continuous_glFin (π“ž F) F) have hArch : IsOpen {g : AdelicGL2 (π“ž F) F | c < archHeight F (AdelicLevel.glArch (π“ž F) F g)} := isOpen_lt continuous_const ((continuous_archHeight F).comp (AdelicLevel.continuous_glArch (π“ž F) F)) have hWin : IsOpen {g : AdelicGL2 (π“ž F) F | βˆ€ v : InfinitePlace F, xWindowSq (AdelicLevel.archComponent F v (AdelicLevel.glArch (π“ž F) F g)) < u ^ 2} := by have hset : {g : AdelicGL2 (π“ž F) F | βˆ€ v : InfinitePlace F, xWindowSq (AdelicLevel.archComponent F v (AdelicLevel.glArch (π“ž F) F g)) < u ^ 2} = β‹‚ v : InfinitePlace F, {g : AdelicGL2 (π“ž F) F | xWindowSq (AdelicLevel.archComponent F v (AdelicLevel.glArch (π“ž F) F g)) < u ^ 2} := by ext g simp [Set.mem_iInter] rw [hset] exact isOpen_iInter_of_finite fun v => isOpen_lt (continuous_xWindowSq.comp ((AdelicLevel.continuous_archComponent F v).comp (AdelicLevel.continuous_glArch (π“ž F) F))) continuous_const rw [mem_interior] refine ⟨{g : AdelicGL2 (π“ž F) F | AdelicLevel.glFin (π“ž F) F g ∈ AdelicLevel.finiteIntegralGL2 (π“ž F) F} ∩ {g | c < archHeight F (AdelicLevel.glArch (π“ž F) F g)} ∩ {g | βˆ€ v : InfinitePlace F, xWindowSq (AdelicLevel.archComponent F v (AdelicLevel.glArch (π“ž F) F g)) < u ^ 2}, fun g hg => ⟨hg.1.1, hg.1.2.le, fun v => (hg.2 v).le⟩, (hKf.inter hArch).inter hWin, ⟨⟨?_, ?_⟩, ?_⟩⟩ Β· show AdelicLevel.glFin (π“ž F) F 1 ∈ AdelicLevel.finiteIntegralGL2 (π“ž F) F rw [map_one] exact (AdelicLevel.finiteIntegralGL2 (π“ž F) F).one_mem Β· show c < archHeight F (AdelicLevel.glArch (π“ž F) F 1) rw [map_one, archHeight_one] exact hc Β· intro v show xWindowSq (AdelicLevel.archComponent F v (AdelicLevel.glArch (π“ž F) F 1)) < u ^ 2 rw [map_one, map_one, xWindowSq_one] positivity theorem measurableSet_integralWindowedSiegelSet {mS : MeasurableSpace (AdelicGL2 (π“ž F) F)} [BorelSpace (AdelicGL2 (π“ž F) F)] (c u : ℝ) : MeasurableSet (integralWindowedSiegelSet F c u) := by have htop : (⊀ : Ideal (π“ž F)) β‰  βŠ₯ := by simp have h : integralWindowedSiegelSet F c u = {g : AdelicGL2 (π“ž F) F | AdelicLevel.glFin (π“ž F) F g ∈ AdelicLevel.finiteIntegralGL2 (π“ž F) F} ∩ ({g : AdelicGL2 (π“ž F) F | c ≀ archHeight F (AdelicLevel.glArch (π“ž F) F g)} ∩ {g : AdelicGL2 (π“ž F) F | βˆ€ v : InfinitePlace F, xWindowSq (AdelicLevel.archComponent F v (AdelicLevel.glArch (π“ž F) F g)) ≀ u ^ 2}) := rfl rw [h] refine MeasurableSet.inter ?_ (MeasurableSet.inter ?_ ?_) Β· exact ((AdelicLevel.isOpen_finiteLevelZero (π“ž F) F htop).preimage (AdelicLevel.continuous_glFin (π“ž F) F)).measurableSet Β· exact (isClosed_le continuous_const ((continuous_archHeight F).comp (AdelicLevel.continuous_glArch (π“ž F) F))).measurableSet Β· have hset : {g : AdelicGL2 (π“ž F) F | βˆ€ v : InfinitePlace F, xWindowSq (AdelicLevel.archComponent F v (AdelicLevel.glArch (π“ž F) F g)) ≀ u ^ 2} = β‹‚ v : InfinitePlace F, {g : AdelicGL2 (π“ž F) F | xWindowSq (AdelicLevel.archComponent F v (AdelicLevel.glArch (π“ž F) F g)) ≀ u ^ 2} := by ext g simp [Set.mem_iInter] rw [hset] exact MeasurableSet.iInter fun v => (isClosed_le (continuous_xWindowSq.comp ((AdelicLevel.continuous_archComponent F v).comp (AdelicLevel.continuous_glArch (π“ž F) F))) continuous_const).measurableSet theorem exists_isOpen_subset_integralWindowedSiegelSet {c u : ℝ} (hc : c < 1) (hu : u β‰  0) : βˆƒ U : Set (AdelicGL2 (π“ž F) F), IsOpen U ∧ U.Nonempty ∧ U βŠ† integralWindowedSiegelSet F c u := ⟨interior (integralWindowedSiegelSet F c u), isOpen_interior, ⟨1, one_mem_interior_integralWindowedSiegelSet F hc hu⟩, interior_subset⟩ end WindowedSiegel end AutomorphicForm end