import Definitions.Def_MeasureTheory_ScalingDichotomy import Definitions.Def_AutomorphicForm_WindowedSiegelTopology import Definitions.Def_NumberField_AdelicCentre open MeasureTheory Set IsDedekindDomain NumberField MeasureTheory.ScalingDichotomy open scoped ENNReal noncomputable section namespace NumberField.AdelicVolume section Adelic open AutomorphicForm AutomorphicForm.WindowedSiegel NumberField.AdelicLevel variable (F : Type) [Field F] [NumberField F] open scoped Classical in def archCentralUnit (vβ‚€ : InfinitePlace F) (a : (vβ‚€.Completion)Λ£) : (AdeleRing (π“ž F) F)Λ£ where val := (Function.update (1 : InfiniteAdeleRing F) vβ‚€ (a : vβ‚€.Completion), 1) inv := (Function.update (1 : InfiniteAdeleRing F) vβ‚€ ((a⁻¹ : (vβ‚€.Completion)Λ£) : vβ‚€.Completion), 1) val_inv := by refine Prod.ext (funext fun v => ?_) (one_mul 1) show Function.update (1 : InfiniteAdeleRing F) vβ‚€ (a : vβ‚€.Completion) v * Function.update (1 : InfiniteAdeleRing F) vβ‚€ ((a⁻¹ : (vβ‚€.Completion)Λ£) : vβ‚€.Completion) v = 1 by_cases hv : v = vβ‚€ Β· subst hv simp Β· simp only [Function.update_of_ne hv] exact mul_one (1 : v.Completion) inv_val := by refine Prod.ext (funext fun v => ?_) (one_mul 1) show Function.update (1 : InfiniteAdeleRing F) vβ‚€ ((a⁻¹ : (vβ‚€.Completion)Λ£) : vβ‚€.Completion) v * Function.update (1 : InfiniteAdeleRing F) vβ‚€ (a : vβ‚€.Completion) v = 1 by_cases hv : v = vβ‚€ Β· subst hv simp Β· simp only [Function.update_of_ne hv] exact mul_one (1 : v.Completion) variable {F} theorem archCentralUnit_snd (vβ‚€ : InfinitePlace F) (a : (vβ‚€.Completion)Λ£) : ((archCentralUnit F vβ‚€ a : (AdeleRing (π“ž F) F)Λ£) : AdeleRing (π“ž F) F).2 = 1 := rfl open scoped Classical in theorem archCentralUnit_fst_self (vβ‚€ : InfinitePlace F) (a : (vβ‚€.Completion)Λ£) : ((archCentralUnit F vβ‚€ a : (AdeleRing (π“ž F) F)Λ£) : AdeleRing (π“ž F) F).1 vβ‚€ = a := by show Function.update (1 : InfiniteAdeleRing F) vβ‚€ (a : vβ‚€.Completion) vβ‚€ = a simp open scoped Classical in theorem archCentralUnit_fst_of_ne (vβ‚€ : InfinitePlace F) (a : (vβ‚€.Completion)Λ£) {v : InfinitePlace F} (hv : v β‰  vβ‚€) : ((archCentralUnit F vβ‚€ a : (AdeleRing (π“ž F) F)Λ£) : AdeleRing (π“ž F) F).1 v = 1 := by show Function.update (1 : InfiniteAdeleRing F) vβ‚€ (a : vβ‚€.Completion) v = 1 rw [Function.update_of_ne hv] rfl theorem archCentralUnit_fst_ne_zero (vβ‚€ : InfinitePlace F) (a : (vβ‚€.Completion)Λ£) (v : InfinitePlace F) : ((archCentralUnit F vβ‚€ a : (AdeleRing (π“ž F) F)Λ£) : AdeleRing (π“ž F) F).1 v β‰  0 := by by_cases hv : v = vβ‚€ Β· subst hv rw [archCentralUnit_fst_self] exact a.ne_zero Β· rw [archCentralUnit_fst_of_ne vβ‚€ a hv] exact one_ne_zero theorem centralScalar_val (w : (AdeleRing (π“ž F) F)Λ£) : ((centralScalar (π“ž F) F w : AdelicGL2 (π“ž F) F) : Matrix (Fin 2) (Fin 2) (AdeleRing (π“ž F) F)) = Matrix.diagonal fun _ => (w : AdeleRing (π“ž F) F) := by show Matrix.scalar (Fin 2) (w : AdeleRing (π“ž F) F) = _ rw [Matrix.scalar_apply] theorem centralScalar_apply_eq (w : (AdeleRing (π“ž F) F)Λ£) (i : Fin 2) : ((centralScalar (π“ž F) F w : AdelicGL2 (π“ž F) F) : Matrix (Fin 2) (Fin 2) (AdeleRing (π“ž F) F)) i i = (w : AdeleRing (π“ž F) F) := by rw [centralScalar_val, Matrix.diagonal_apply_eq] theorem centralScalar_apply_ne (w : (AdeleRing (π“ž F) F)Λ£) {i j : Fin 2} (h : i β‰  j) : ((centralScalar (π“ž F) F w : AdelicGL2 (π“ž F) F) : Matrix (Fin 2) (Fin 2) (AdeleRing (π“ž F) F)) i j = 0 := by rw [centralScalar_val, Matrix.diagonal_apply_ne _ h] omit [NumberField F] in theorem norm_two_completion (vβ‚€ : InfinitePlace F) : β€–(2 : vβ‚€.Completion)β€– = 2 := by rw [← (InfinitePlace.Completion.isometry_extensionEmbedding vβ‚€).norm_map_of_map_zero (map_zero _), map_ofNat, RCLike.norm_ofNat] def archDetNorm (vβ‚€ : InfinitePlace F) (g : AdelicGL2 (π“ž F) F) : ℝ := β€–((archComponent F vβ‚€ (glArch (π“ž F) F g) : GL (Fin 2) vβ‚€.Completion) : Matrix (Fin 2) (Fin 2) vβ‚€.Completion).detβ€– theorem continuous_archDetNorm (vβ‚€ : InfinitePlace F) : Continuous (archDetNorm (F := F) vβ‚€) := continuous_norm.comp ((Units.continuous_val.comp ((continuous_archComponent F vβ‚€).comp (continuous_glArch (π“ž F) F))).matrix_det) theorem archDetNorm_pos (vβ‚€ : InfinitePlace F) (g : AdelicGL2 (π“ž F) F) : 0 < archDetNorm vβ‚€ g := norm_pos_iff.mpr (Matrix.GeneralLinearGroup.det_ne_zero _) theorem archDetNorm_centralScalar_mul (vβ‚€ : InfinitePlace F) (a : (vβ‚€.Completion)Λ£) (g : AdelicGL2 (π“ž F) F) : archDetNorm vβ‚€ (centralScalar (π“ž F) F (archCentralUnit F vβ‚€ a) * g) = (β€–(a : vβ‚€.Completion)β€– * β€–(a : vβ‚€.Completion)β€–) * archDetNorm vβ‚€ g := by unfold archDetNorm rw [map_mul, map_mul, Units.val_mul, Matrix.det_mul, norm_mul] congr 1 set s := archComponent F vβ‚€ (glArch (π“ž F) F (centralScalar (π“ž F) F (archCentralUnit F vβ‚€ a))) have hs : βˆ€ i j : Fin 2, (s : Matrix (Fin 2) (Fin 2) vβ‚€.Completion) i j = if i = j then (a : vβ‚€.Completion) else 0 := by intro i j simp only [s, archComponent_apply, glArch_apply] by_cases h : i = j Β· subst h rw [centralScalar_apply_eq, if_pos rfl] exact archCentralUnit_fst_self vβ‚€ a Β· rw [centralScalar_apply_ne _ h, if_neg h] rfl rw [Matrix.det_fin_two, hs, hs, hs, hs] simp [norm_mul] theorem measure_eq_zero_or_top_of_central_stable [MeasurableSpace (AdelicGL2 (π“ž F) F)] [BorelSpace (AdelicGL2 (π“ž F) F)] (ΞΌ : Measure (AdelicGL2 (π“ž F) F)) [ΞΌ.IsMulLeftInvariant] {D : Set (AdelicGL2 (π“ž F) F)} (hD : MeasurableSet D) (hstab : βˆ€ w : (AdeleRing (π“ž F) F)Λ£, (w : AdeleRing (π“ž F) F).2 = 1 β†’ (βˆ€ v : InfinitePlace F, (w : AdeleRing (π“ž F) F).1 v β‰  0) β†’ βˆ€ g ∈ D, centralScalar (π“ž F) F w * g ∈ D) : ΞΌ D = 0 ∨ ΞΌ D = ⊀ := by obtain ⟨vβ‚€βŸ© := (inferInstance : Nonempty (InfinitePlace F)) have haβ‚€ : (1 : ℝ) < β€–(2 : vβ‚€.Completion)β€– := by rw [norm_two_completion]; norm_num have ha0 : (2 : vβ‚€.Completion) β‰  0 := norm_pos_iff.mp (zero_lt_one.trans haβ‚€) set a : (vβ‚€.Completion)Λ£ := Units.mk0 (2 : vβ‚€.Completion) ha0 set z := centralScalar (π“ž F) F (archCentralUnit F vβ‚€ a) have hzinv : z⁻¹ = centralScalar (π“ž F) F (archCentralUnit F vβ‚€ a⁻¹) := by rw [← map_inv] congr 1 have hzD : (fun g => z * g) ⁻¹' D = D := by ext g simp only [mem_preimage] constructor Β· intro h have := hstab (archCentralUnit F vβ‚€ a⁻¹) (archCentralUnit_snd vβ‚€ a⁻¹) (archCentralUnit_fst_ne_zero vβ‚€ a⁻¹) _ h rwa [← hzinv, inv_mul_cancel_left] at this Β· intro h exact hstab (archCentralUnit F vβ‚€ a) (archCentralUnit_snd vβ‚€ a) (archCentralUnit_fst_ne_zero vβ‚€ a) _ h refine measure_eq_zero_or_top_of_mul_preimage_eq ΞΌ (continuous_archDetNorm vβ‚€).measurable (r := β€–(a : vβ‚€.Completion)β€– * β€–(a : vβ‚€.Completion)β€–) (one_lt_mul_of_le_of_lt haβ‚€.le haβ‚€) (archDetNorm_centralScalar_mul vβ‚€ a) (fun g _ => archDetNorm_pos vβ‚€ g) hD hzD theorem centralScalar_mul_mem_integralWindowedSiegelSet {c u : ℝ} {w : (AdeleRing (π“ž F) F)Λ£} (hwf : (w : AdeleRing (π“ž F) F).2 = 1) (hwa : βˆ€ v : InfinitePlace F, (w : AdeleRing (π“ž F) F).1 v β‰  0) {g : AdelicGL2 (π“ž F) F} (hg : g ∈ integralWindowedSiegelSet F c u) : centralScalar (π“ž F) F w * g ∈ integralWindowedSiegelSet F c u := scalar_smul_mem_integralWindowedSiegelSet F hwf hwa (centralScalar_apply_eq w 0) (centralScalar_apply_ne w (by decide)) (centralScalar_apply_ne w (by decide)) (centralScalar_apply_eq w 1) hg theorem measureZeroOrInfiniteAt [MeasurableSpace (AdelicGL2 (π“ž F) F)] [BorelSpace (AdelicGL2 (π“ž F) F)] (ΞΌ : Measure (AdelicGL2 (π“ž F) F)) [ΞΌ.IsMulLeftInvariant] (c u : ℝ) : MeasureZeroOrInfiniteAt F ΞΌ c u := measure_eq_zero_or_top_of_central_stable ΞΌ (measurableSet_integralWindowedSiegelSet F c u) fun _ hwf hwa _ hg => centralScalar_mul_mem_integralWindowedSiegelSet hwf hwa hg theorem not_pos_and_lt_top_measure_integralWindowedSiegelSet [MeasurableSpace (AdelicGL2 (π“ž F) F)] [BorelSpace (AdelicGL2 (π“ž F) F)] (ΞΌ : Measure (AdelicGL2 (π“ž F) F)) [ΞΌ.IsMulLeftInvariant] (c u : ℝ) : Β¬(0 < ΞΌ (integralWindowedSiegelSet F c u) ∧ ΞΌ (integralWindowedSiegelSet F c u) < ⊀) := not_pos_and_lt_top_of_measureZeroOrInfiniteAt F (measureZeroOrInfiniteAt ΞΌ c u) theorem measure_eq_top_of_central_stable_of_interior [MeasurableSpace (AdelicGL2 (π“ž F) F)] [BorelSpace (AdelicGL2 (π“ž F) F)] (ΞΌ : Measure (AdelicGL2 (π“ž F) F)) [ΞΌ.IsMulLeftInvariant] [ΞΌ.IsOpenPosMeasure] {D : Set (AdelicGL2 (π“ž F) F)} (hD : MeasurableSet D) (hstab : βˆ€ w : (AdeleRing (π“ž F) F)Λ£, (w : AdeleRing (π“ž F) F).2 = 1 β†’ (βˆ€ v : InfinitePlace F, (w : AdeleRing (π“ž F) F).1 v β‰  0) β†’ βˆ€ g ∈ D, centralScalar (π“ž F) F w * g ∈ D) (hU : βˆƒ U : Set (AdelicGL2 (π“ž F) F), IsOpen U ∧ U.Nonempty ∧ U βŠ† D) : ΞΌ D = ⊀ := by obtain ⟨U, hUo, hUne, hUD⟩ := hU have hpos : 0 < ΞΌ D := (hUo.measure_pos ΞΌ hUne).trans_le (measure_mono hUD) exact (measure_eq_zero_or_top_of_central_stable ΞΌ hD hstab).resolve_left hpos.ne' theorem measure_integralWindowedSiegelSet_eq_top [MeasurableSpace (AdelicGL2 (π“ž F) F)] [BorelSpace (AdelicGL2 (π“ž F) F)] (ΞΌ : Measure (AdelicGL2 (π“ž F) F)) [ΞΌ.IsMulLeftInvariant] [ΞΌ.IsOpenPosMeasure] {c u : ℝ} (hc : c < 1) (hu : u β‰  0) : ΞΌ (integralWindowedSiegelSet F c u) = ⊀ := measure_eq_top_of_central_stable_of_interior ΞΌ (measurableSet_integralWindowedSiegelSet F c u) (fun _ hwf hwa _ hg => centralScalar_mul_mem_integralWindowedSiegelSet hwf hwa hg) (exists_isOpen_subset_integralWindowedSiegelSet F hc hu) open NumberField.AdelicCentre in theorem measure_image_mk_integralWindowedSiegelSet_pos {m : MeasurableSpace (AdelicPGL2 (π“ž F) F)} (ΞΌ : Measure (AdelicPGL2 (π“ž F) F)) [ΞΌ.IsOpenPosMeasure] {c u : ℝ} (hc : c < 1) (hu : u β‰  0) : 0 < ΞΌ (QuotientGroup.mk '' integralWindowedSiegelSet F c u) := measure_image_mk_pos (π“ž F) F ΞΌ (exists_isOpen_subset_integralWindowedSiegelSet F hc hu) open NumberField.AdelicCentre in theorem adelicPGLHaar_image_integralWindowedSiegelSet_pos {c u : ℝ} (hc : c < 1) (hu : u β‰  0) : 0 < adelicPGLHaar (π“ž F) F (QuotientGroup.mk '' integralWindowedSiegelSet F c u) := adelicPGLHaar_image_pos (π“ž F) F (exists_isOpen_subset_integralWindowedSiegelSet F hc hu) end Adelic end NumberField.AdelicVolume end