import Definitions.Def_AutomorphicForm_SiegelCoordinates open NumberField IsDedekindDomain Matrix noncomputable section namespace AutomorphicForm namespace SiegelReduction open AutomorphicForm.WindowedSiegel AutomorphicForm.SiegelCoordinates NumberField.AdelicLevel NumberField.InfinitePlace variable (F : Type) [Field F] [NumberField F] theorem archComponent_globalPoints_apply (w : InfinitePlace F) (Ξ³ : GL (Fin 2) F) (i j : Fin 2) : ((archComponent F w (glArch (π“ž F) F (globalPoints (π“ž F) F Ξ³)) : GL (Fin 2) w.Completion) : Matrix (Fin 2) (Fin 2) w.Completion) i j = ((Ξ³ : Matrix (Fin 2) (Fin 2) F) i j : w.Completion) := rfl theorem glFin_globalPoints_apply (Ξ³ : GL (Fin 2) F) (i j : Fin 2) : ((glFin (π“ž F) F (globalPoints (π“ž F) F Ξ³) : GL (Fin 2) (FiniteAdeleRing (π“ž F) F)) : Matrix (Fin 2) (Fin 2) (FiniteAdeleRing (π“ž F) F)) i j = algebraMap F (FiniteAdeleRing (π“ž F) F) ((Ξ³ : Matrix (Fin 2) (Fin 2) F) i j) := rfl omit [NumberField F] in theorem norm_coe_completion (w : InfinitePlace F) (x : F) : β€–(x : w.Completion)β€– = w x := by rw [InfinitePlace.Completion.norm_coe] rfl theorem det_archComponent_globalPoints (w : InfinitePlace F) (Ξ³ : GL (Fin 2) F) : ((archComponent F w (glArch (π“ž F) F (globalPoints (π“ž F) F Ξ³)) : GL (Fin 2) w.Completion) : Matrix (Fin 2) (Fin 2) w.Completion).det = ((Ξ³ : Matrix (Fin 2) (Fin 2) F).det : w.Completion) := by rw [Matrix.det_fin_two, Matrix.det_fin_two] simp only [archComponent_globalPoints_apply, WithAbs.toAbs_sub, WithAbs.toAbs_mul, UniformSpace.Completion.coe_sub, UniformSpace.Completion.coe_mul] apply NumberField.InfinitePlace.Completion.ext rw [← NumberField.InfinitePlace.Completion.equiv_apply, map_sub, map_mul, map_mul] simp only [NumberField.InfinitePlace.Completion.equiv_apply] theorem archHeight_globalPoints_mul_mul_archHeight_le (Ξ³ : GL (Fin 2) F) (hΞ³ : (Ξ³ : Matrix (Fin 2) (Fin 2) F) 1 0 β‰  0) (h : GL (Fin 2) (InfiniteAdeleRing F)) : archHeight F (glArch (π“ž F) F (globalPoints (π“ž F) F Ξ³) * h) * archHeight F h ≀ |(Algebra.norm β„š ((Ξ³ : Matrix (Fin 2) (Fin 2) F).det) : ℝ)| / |(Algebra.norm β„š ((Ξ³ : Matrix (Fin 2) (Fin 2) F) 1 0) : ℝ)| ^ 2 := by have hplace : βˆ€ w : InfinitePlace F, localHeight (archComponent F w (glArch (π“ž F) F (globalPoints (π“ž F) F Ξ³) * h)) * localHeight (archComponent F w h) ≀ w ((Ξ³ : Matrix (Fin 2) (Fin 2) F).det) / w ((Ξ³ : Matrix (Fin 2) (Fin 2) F) 1 0) ^ 2 := by intro w have h10 : ((archComponent F w (glArch (π“ž F) F (globalPoints (π“ž F) F Ξ³)) : GL (Fin 2) w.Completion) : Matrix (Fin 2) (Fin 2) w.Completion) 1 0 β‰  0 := by rw [archComponent_globalPoints_apply, ← norm_pos_iff, norm_coe_completion] exact InfinitePlace.pos_iff.mpr hΞ³ have hle := localHeight_mul_mul_localHeight_le (archComponent F w (glArch (π“ž F) F (globalPoints (π“ž F) F Ξ³))) (archComponent F w h) h10 rw [det_archComponent_globalPoints, archComponent_globalPoints_apply, norm_coe_completion, norm_coe_completion] at hle rwa [map_mul] have hnonneg : βˆ€ w : InfinitePlace F, 0 ≀ localHeight (archComponent F w (glArch (π“ž F) F (globalPoints (π“ž F) F Ξ³) * h)) * localHeight (archComponent F w h) := fun w => mul_nonneg (localHeight_pos _).le (localHeight_pos _).le unfold archHeight rw [← Finset.prod_mul_distrib] calc ∏ w : InfinitePlace F, localHeight (archComponent F w (glArch (π“ž F) F (globalPoints (π“ž F) F Ξ³) * h)) ^ w.mult * localHeight (archComponent F w h) ^ w.mult = ∏ w : InfinitePlace F, (localHeight (archComponent F w (glArch (π“ž F) F (globalPoints (π“ž F) F Ξ³) * h)) * localHeight (archComponent F w h)) ^ w.mult := by refine Finset.prod_congr rfl fun w _ => ?_ rw [mul_pow] _ ≀ ∏ w : InfinitePlace F, (w ((Ξ³ : Matrix (Fin 2) (Fin 2) F).det) / w ((Ξ³ : Matrix (Fin 2) (Fin 2) F) 1 0) ^ 2) ^ w.mult := by refine Finset.prod_le_prod (fun w _ => pow_nonneg (hnonneg w) _) fun w _ => ?_ exact pow_le_pow_leftβ‚€ (hnonneg w) (hplace w) _ _ = (∏ w : InfinitePlace F, w ((Ξ³ : Matrix (Fin 2) (Fin 2) F).det) ^ w.mult) / (∏ w : InfinitePlace F, w ((Ξ³ : Matrix (Fin 2) (Fin 2) F) 1 0) ^ w.mult) ^ 2 := by rw [← Finset.prod_pow, ← Finset.prod_div_distrib] refine Finset.prod_congr rfl fun w _ => ?_ rw [div_pow, ← pow_mul, ← pow_mul, mul_comm 2] _ = |(Algebra.norm β„š ((Ξ³ : Matrix (Fin 2) (Fin 2) F).det) : ℝ)| / |(Algebra.norm β„š ((Ξ³ : Matrix (Fin 2) (Fin 2) F) 1 0) : ℝ)| ^ 2 := by rw [prod_eq_abs_norm, prod_eq_abs_norm, Rat.cast_abs, Rat.cast_abs] theorem mem_range_of_coe_mem_integralFiniteAdeles {x : F} (hx : algebraMap F (FiniteAdeleRing (π“ž F) F) x ∈ integralFiniteAdeles (π“ž F) F) : x ∈ (algebraMap (π“ž F) F).range := by refine HeightOneSpectrum.mem_integers_of_valuation_le_one F x fun v => ?_ rw [← HeightOneSpectrum.valuedAdicCompletion_eq_valuation'] exact valued_apply_le_one hx v theorem mem_range_of_glFin_globalPoints_mem {Ξ³ : GL (Fin 2) F} (hΞ³ : glFin (π“ž F) F (globalPoints (π“ž F) F Ξ³) ∈ finiteIntegralGL2 (π“ž F) F) (i j : Fin 2) : (Ξ³ : Matrix (Fin 2) (Fin 2) F) i j ∈ (algebraMap (π“ž F) F).range ∧ ((γ⁻¹ : GL (Fin 2) F) : Matrix (Fin 2) (Fin 2) F) i j ∈ (algebraMap (π“ž F) F).range := by rw [mem_finiteIntegralGL2_iff] at hΞ³ refine ⟨mem_range_of_coe_mem_integralFiniteAdeles F ?_, mem_range_of_coe_mem_integralFiniteAdeles F ?_⟩ Β· rw [← glFin_globalPoints_apply] exact hΞ³.1 i j Β· rw [← glFin_globalPoints_apply, map_inv, map_inv] exact hΞ³.2 i j theorem abs_norm_eq_one_of_mem_range {x : F} (hx : x ∈ (algebraMap (π“ž F) F).range) (hx' : x⁻¹ ∈ (algebraMap (π“ž F) F).range) (hx0 : x β‰  0) : |Algebra.norm β„š x| = 1 := by obtain ⟨a, rfl⟩ := hx obtain ⟨b, hb⟩ := hx' have hab : a * b = 1 := by apply IsFractionRing.injective (π“ž F) F rw [map_mul, map_one, hb, mul_inv_cancelβ‚€ hx0] have hu : IsUnit a := IsUnit.of_mul_eq_one b hab have h1 := NumberField.isUnit_iff_norm.mp hu rw [RingOfIntegers.coe_norm] at h1 exact h1 theorem one_le_abs_norm_of_mem_range {x : F} (hx : x ∈ (algebraMap (π“ž F) F).range) (hx0 : x β‰  0) : (1 : ℝ) ≀ |(Algebra.norm β„š x : ℝ)| := by obtain ⟨a, rfl⟩ := hx have ha : a β‰  0 := fun h => hx0 (by rw [h, map_zero]) have hz : Algebra.norm β„€ a β‰  0 := Algebra.norm_ne_zero_iff.mpr ha have hq : (Algebra.norm β„š (algebraMap (π“ž F) F a) : ℝ) = ((Algebra.norm β„€ a : β„€) : ℝ) := by rw [show (algebraMap (π“ž F) F a) = ((a : π“ž F) : F) from rfl, ← Algebra.coe_norm_int] push_cast rfl rw [hq, ← Int.cast_abs] exact_mod_cast Int.one_le_abs hz theorem archHeight_mul_mul_archHeight_le_one (Ξ³ : GL (Fin 2) F) (hΞ³ : (Ξ³ : Matrix (Fin 2) (Fin 2) F) 1 0 β‰  0) (g : AdelicGL2 (π“ž F) F) (hg : glFin (π“ž F) F g ∈ finiteIntegralGL2 (π“ž F) F) (hΞ³g : glFin (π“ž F) F (globalPoints (π“ž F) F Ξ³ * g) ∈ finiteIntegralGL2 (π“ž F) F) : archHeight F (glArch (π“ž F) F (globalPoints (π“ž F) F Ξ³ * g)) * archHeight F (glArch (π“ž F) F g) ≀ 1 := by have hΞ³int : glFin (π“ž F) F (globalPoints (π“ž F) F Ξ³) ∈ finiteIntegralGL2 (π“ž F) F := by have h := Subgroup.mul_mem _ hΞ³g (Subgroup.inv_mem _ hg) rwa [map_mul, mul_inv_cancel_right] at h have hdet : ((Ξ³ : Matrix (Fin 2) (Fin 2) F).det) ∈ (algebraMap (π“ž F) F).range := by rw [Matrix.det_fin_two] exact Subring.sub_mem _ (Subring.mul_mem _ (mem_range_of_glFin_globalPoints_mem F hΞ³int 0 0).1 (mem_range_of_glFin_globalPoints_mem F hΞ³int 1 1).1) (Subring.mul_mem _ (mem_range_of_glFin_globalPoints_mem F hΞ³int 0 1).1 (mem_range_of_glFin_globalPoints_mem F hΞ³int 1 0).1) have hdet' : ((Ξ³ : Matrix (Fin 2) (Fin 2) F).det)⁻¹ ∈ (algebraMap (π“ž F) F).range := by have hinv : ((Ξ³ : Matrix (Fin 2) (Fin 2) F).det)⁻¹ = ((γ⁻¹ : GL (Fin 2) F) : Matrix (Fin 2) (Fin 2) F).det := by rw [Matrix.coe_units_inv, Matrix.det_nonsing_inv, Ring.inverse_eq_inv'] rw [hinv, Matrix.det_fin_two] exact Subring.sub_mem _ (Subring.mul_mem _ (mem_range_of_glFin_globalPoints_mem F hΞ³int 0 0).2 (mem_range_of_glFin_globalPoints_mem F hΞ³int 1 1).2) (Subring.mul_mem _ (mem_range_of_glFin_globalPoints_mem F hΞ³int 0 1).2 (mem_range_of_glFin_globalPoints_mem F hΞ³int 1 0).2) have hdet0 : ((Ξ³ : Matrix (Fin 2) (Fin 2) F).det) β‰  0 := (Matrix.isUnits_det_units Ξ³).ne_zero have hN1 : |(Algebra.norm β„š ((Ξ³ : Matrix (Fin 2) (Fin 2) F).det) : ℝ)| = 1 := by have h1 := abs_norm_eq_one_of_mem_range F hdet hdet' hdet0 rw [← Rat.cast_abs, h1, Rat.cast_one] have hN2 : (1 : ℝ) ≀ |(Algebra.norm β„š ((Ξ³ : Matrix (Fin 2) (Fin 2) F) 1 0) : ℝ)| := one_le_abs_norm_of_mem_range F (mem_range_of_glFin_globalPoints_mem F hΞ³int 1 0).1 hΞ³ rw [map_mul] refine (archHeight_globalPoints_mul_mul_archHeight_le F Ξ³ hΞ³ _).trans ?_ rw [hN1, div_le_one (by positivity)] exact one_le_powβ‚€ hN2 end SiegelReduction end AutomorphicForm