import OAI.RepresentationTheory.Hecke.RadialDilation.FiniteNormPadicComparison import OAI.RepresentationTheory.Hecke.RadialDilation.FiniteCompletionNorm /-! # Padic Embedding Mem -/ namespace OAI.RepresentationTheory.Hecke.RadialDilation.PadicEmbeddingMem.Realization noncomputable section section /-! Valuation bounds on conjugates imply p-adic bounds for the actual rational scalar matrix. -/ open scoped Classical _root_.Matrix open IsDedekindDomain _root_.NumberField theorem rational_matrix_power_bound_transfer (E : Type*) [Field E] [NumberField E] [Algebra β„š E] (w : HeightOneSpectrum (π“ž E)) (p : β„•) [Fact p.Prime] (hpw : (p : π“ž E) ∈ w.asIdeal) {I : Type*} [Fintype I] [DecidableEq I] (A : Matrix I I β„š) (R : ℝ) (hR : βˆ€ (N : β„•) i j, β€–(A.map (algebraMap β„š (w.adicCompletion E)) ^ N) i jβ€– ≀ R) : βˆƒ T : ℝ, βˆ€ (N : β„•) i j, β€–(A.map (algebraMap β„š β„š_[p]) ^ N) i jβ€– ≀ T := by obtain ⟨c, hc, he⟩ := FiniteNormPadicComparison.Realization.finite_norm_padic_rpow E w p hpw refine ⟨R ^ c, ?_⟩ intro N i j rw [← Matrix.map_pow, Matrix.map_apply] change β€–((A ^ N) i j : β„š_[p])β€– ≀ _ rw [← he] have h := hR N i j rw [← Matrix.map_pow, Matrix.map_apply] at h exact Real.rpow_le_rpow (norm_nonneg _) h hc.le theorem rational_scalar_padic_power_bounds (E : Type*) [Field E] [NumberField E] [Algebra β„š E] [IsGalois β„š E] (w : HeightOneSpectrum (π“ž E)) (p : β„•) [Fact p.Prime] (hpw : (p : π“ž E) ∈ w.asIdeal) {I : Type*} [Fintype I] [DecidableEq I] (e : (Fin 3 β†’ E) ≃ₗ[β„š] (I β†’ β„š)) (r : E) (hr : βˆ€ Οƒ : E ≃ₐ[β„š] E, w.valuation E (Οƒ r) ≀ 1) : βˆƒ R : ℝ, βˆ€ (N : β„•) i j, β€–((RationalCoordinates.Realization.rationalScalarMatrix E e r).map (algebraMap β„š β„š_[p]) ^ N) i jβ€– ≀ R := by obtain ⟨R, hR⟩ := FiniteCompletionNorm.Realization.rational_scalar_finite_completion_bounds E w e r hr exact rational_matrix_power_bound_transfer E w p hpw _ R hR end section /-! Pulling back a finite prime transports local integrality of the CM scalar. -/ open scoped Classical open IsDedekindDomain _root_.NumberField variable (E : Type*) [Field E] [NumberField E] [Algebra β„š E] def galoisPrimePullback (w : HeightOneSpectrum (π“ž E)) (Οƒ : E ≃ₐ[β„š] E) : HeightOneSpectrum (π“ž E) where asIdeal := Ideal.comap (RingOfIntegers.mapRingEquiv Οƒ.toRingEquiv).toRingHom w.asIdeal isPrime := w.isPrime.comap _ ne_bot := fun h => w.ne_bot (Ideal.eq_bot_of_comap_eq_bot' (RingOfIntegers.mapRingEquiv Οƒ.toRingEquiv).surjective h) omit [NumberField E] in theorem galoisPrimePullback_nat_mem (w : HeightOneSpectrum (π“ž E)) (Οƒ : E ≃ₐ[β„š] E) (p : β„•) : (p : π“ž E) ∈ (galoisPrimePullback E w Οƒ).asIdeal ↔ (p : π“ž E) ∈ w.asIdeal := by change (RingOfIntegers.mapRingEquiv Οƒ.toRingEquiv) (p : π“ž E) ∈ w.asIdeal ↔ _ rw [map_natCast] theorem valuation_conjugate_le_one (w : HeightOneSpectrum (π“ž E)) (Οƒ : E ≃ₐ[β„š] E) (r : E) (hr : (galoisPrimePullback E w Οƒ).valuation E r ≀ 1) : w.valuation E (Οƒ r) ≀ 1 := by obtain ⟨n, d, hnd⟩ := (galoisPrimePullback E w Οƒ).exists_primeCompl_mul_eq_of_integer r hr let ΟƒR := RingOfIntegers.mapRingEquiv Οƒ.toRingEquiv have hd : ΟƒR d.val βˆ‰ w.asIdeal := d.property have hdv : w.valuation E (Οƒ (algebraMap (π“ž E) E d.val)) = 1 := (w.valuation_eq_one_iff_notMem).mpr hd have hn : w.valuation E (Οƒ (algebraMap (π“ž E) E n)) ≀ 1 := w.valuation_le_one (ΟƒR n) have he := congrArg (w.valuation E) (congrArg Οƒ hnd) simp only [map_mul] at he rw [hdv, mul_one] at he exact he.trans_le hn omit [NumberField E] [Algebra β„š E] in theorem finite_prime_natPrime_unique (w : HeightOneSpectrum (π“ž E)) (p q : β„•) [Fact p.Prime] [Fact q.Prime] (hp : (p : π“ž E) ∈ w.asIdeal) (hq : (q : π“ž E) ∈ w.asIdeal) : p = q := by by_contra hpq have hcop : Nat.Coprime p q := (Fact.out : p.Prime).coprime_iff_not_dvd.mpr (by intro hd exact hpq (((Nat.dvd_prime (Fact.out : q.Prime)).mp hd).resolve_left (Fact.out : p.Prime).ne_one)) obtain ⟨a, b, hab⟩ := hcop.cast (R := π“ž E) have h1 := w.asIdeal.add_mem (w.asIdeal.mul_mem_left a hp) (w.asIdeal.mul_mem_left b hq) rw [hab] at h1 exact w.isPrime.ne_top (Ideal.eq_top_of_isUnit_mem w.asIdeal h1 isUnit_one) end section /-! Two-prime support gives local integrality of every conjugate away from the supporting rational prime. -/ open scoped Classical open IsDedekindDomain _root_.NumberField theorem conjugates_integral_away_support (E : Type*) [Field E] [NumberField E] [Algebra β„š E] (q p : β„•) [Fact q.Prime] [Fact p.Prime] (hpq : p β‰  q) (wβ‚€ w₁ w : HeightOneSpectrum (π“ž E)) (hqβ‚€ : (q : π“ž E) ∈ wβ‚€.asIdeal) (hq₁ : (q : π“ž E) ∈ w₁.asIdeal) (hpw : (p : π“ž E) ∈ w.asIdeal) (r : E) (hr : βˆ€ v : HeightOneSpectrum (π“ž E), v β‰  wβ‚€ β†’ v β‰  w₁ β†’ v.valuation E r = 1) : βˆ€ Οƒ : E ≃ₐ[β„š] E, w.valuation E (Οƒ r) ≀ 1 := by intro Οƒ apply valuation_conjugate_le_one E w Οƒ r have hwp : (p : π“ž E) ∈ (galoisPrimePullback E w Οƒ).asIdeal := (galoisPrimePullback_nat_mem E w Οƒ p).mpr hpw have hneβ‚€ : galoisPrimePullback E w Οƒ β‰  wβ‚€ := by intro he rw [he] at hwp exact hpq (finite_prime_natPrime_unique E wβ‚€ p q hwp hqβ‚€) have hne₁ : galoisPrimePullback E w Οƒ β‰  w₁ := by intro he rw [he] at hwp exact hpq (finite_prime_natPrime_unique E w₁ p q hwp hq₁) exact (hr _ hneβ‚€ hne₁).le theorem rational_scalar_away_support_power_bounds (E : Type*) [Field E] [NumberField E] [Algebra β„š E] [IsGalois β„š E] (q p : β„•) [Fact q.Prime] [Fact p.Prime] (hpq : p β‰  q) (wβ‚€ w₁ w : HeightOneSpectrum (π“ž E)) (hqβ‚€ : (q : π“ž E) ∈ wβ‚€.asIdeal) (hq₁ : (q : π“ž E) ∈ w₁.asIdeal) (hpw : (p : π“ž E) ∈ w.asIdeal) {I : Type*} [Fintype I] [DecidableEq I] (e : (Fin 3 β†’ E) ≃ₗ[β„š] (I β†’ β„š)) (r : E) (hr : βˆ€ v : HeightOneSpectrum (π“ž E), v β‰  wβ‚€ β†’ v β‰  w₁ β†’ v.valuation E r = 1) : βˆƒ R : ℝ, βˆ€ (N : β„•) i j, β€–((RationalCoordinates.Realization.rationalScalarMatrix E e r).map (algebraMap β„š β„š_[p]) ^ N) i jβ€– ≀ R := rational_scalar_padic_power_bounds E w p hpw e r (conjugates_integral_away_support E q p hpq wβ‚€ w₁ w hqβ‚€ hq₁ hpw r hr) end section /-! Every rational prime has a finite prime above it in a number field. -/ open scoped Classical open IsDedekindDomain _root_.NumberField theorem exists_finite_prime_above_rational (E : Type*) [Field E] [NumberField E] (p : β„•) [Fact p.Prime] : βˆƒ w : HeightOneSpectrum (π“ž E), (p : π“ž E) ∈ w.asIdeal := by let P : Ideal β„€ := Ideal.span {(p : β„€)} have hp0 : (p : β„€) β‰  0 := by exact_mod_cast (Fact.out : p.Prime).ne_zero let : P.IsPrime := (Ideal.span_singleton_prime hp0).mpr (Nat.prime_iff_prime_int.mp (Fact.out : p.Prime)) obtain ⟨Q, hQ, hQP⟩ := Ideal.exists_ideal_over_prime_of_isIntegral_of_isDomain (S := π“ž E) P (by rw [(RingHom.injective_iff_ker_eq_bot _).mp (FaithfulSMul.algebraMap_injective β„€ (π“ž E))] exact bot_le) have hpQ : (p : π“ž E) ∈ Q := by have hpP : (p : β„€) ∈ P := Ideal.subset_span (Set.mem_singleton _) rw [← hQP] at hpP change algebraMap β„€ (π“ž E) (p : β„€) ∈ Q at hpP simpa only [map_natCast] using hpP have hQ0 : Q β‰  βŠ₯ := by intro he rw [he, Ideal.mem_bot] at hpQ exact (Nat.cast_ne_zero.mpr (Fact.out : p.Prime).ne_zero) hpQ exact ⟨⟨Q, hQ, hQ0⟩, hpQ⟩ theorem rational_scalar_all_away_power_bounds (E : Type*) [Field E] [NumberField E] [Algebra β„š E] [IsGalois β„š E] (q : β„•) [Fact q.Prime] (wβ‚€ w₁ : HeightOneSpectrum (π“ž E)) (hqβ‚€ : (q : π“ž E) ∈ wβ‚€.asIdeal) (hq₁ : (q : π“ž E) ∈ w₁.asIdeal) {I : Type*} [Fintype I] [DecidableEq I] (e : (Fin 3 β†’ E) ≃ₗ[β„š] (I β†’ β„š)) (r : E) (hr : βˆ€ v : HeightOneSpectrum (π“ž E), v β‰  wβ‚€ β†’ v β‰  w₁ β†’ v.valuation E r = 1) : βˆ€ (p : β„•) [Fact p.Prime], p β‰  q β†’ βˆƒ R : ℝ, βˆ€ (N : β„•) i j, β€–((RationalCoordinates.Realization.rationalScalarMatrix E e r).map (algebraMap β„š β„š_[p]) ^ N) i jβ€– ≀ R := by intro p hp hpq obtain ⟨w, hpw⟩ := exists_finite_prime_above_rational E p exact rational_scalar_away_support_power_bounds E q p hpq wβ‚€ w₁ w hqβ‚€ hq₁ hpw e r hr end section /-! A p-adic embedding carries algebraic integers into p-adic integers. -/ open scoped Classical open IsDedekindDomain _root_.NumberField variable (q : β„•) [Fact q.Prime] {E : Type*} [Field E] [Algebra β„š E] theorem padic_embedding_integer_norm (Οƒ : E →ₐ[β„š] β„š_[q]) (x : π“ž E) : β€–Οƒ (x : E)β€– ≀ 1 := by have hx : IsIntegral β„€ (Οƒ (x : E)) := map_isIntegral_int Οƒ.toRingHom x.property have hxq : IsIntegral β„€_[q] (Οƒ (x : E)) := hx.tower_top obtain ⟨y, hy⟩ := IsIntegrallyClosed.algebraMap_eq_of_integral hxq rw [← hy] exact y.property def padicEmbeddingIntegers (Οƒ : E →ₐ[β„š] β„š_[q]) : π“ž E β†’+* β„€_[q] where toFun x := βŸ¨Οƒ (x : E), padic_embedding_integer_norm q Οƒ x⟩ map_zero' := Subtype.ext (map_zero Οƒ) map_one' := Subtype.ext (map_one Οƒ) map_add' x y := Subtype.ext (map_add Οƒ (x : E) (y : E)) map_mul' x y := Subtype.ext (map_mul Οƒ (x : E) (y : E)) theorem padicEmbeddingIntegers_mem_maximal (Οƒ : E →ₐ[β„š] β„š_[q]) (x : π“ž E) : padicEmbeddingIntegers q Οƒ x ∈ IsLocalRing.maximalIdeal β„€_[q] ↔ β€–Οƒ (x : E)β€– < 1 := by rw [IsLocalRing.mem_maximalIdeal] change Β¬IsUnit (padicEmbeddingIntegers q Οƒ x) ↔ _ rw [PadicInt.isUnit_iff] change Β¬β€–Οƒ (x : E)β€– = 1 ↔ β€–Οƒ (x : E)β€– < 1 exact ((lt_iff_le_and_ne).trans (and_iff_right (padic_embedding_integer_norm q Οƒ x))).symm end section /-! The finite prime induced by an embedding into the p-adic field. -/ open scoped Classical open IsDedekindDomain _root_.NumberField variable (q : β„•) [Fact q.Prime] {E : Type*} [Field E] [Algebra β„š E] def padicEmbeddingIdeal (Οƒ : E →ₐ[β„š] β„š_[q]) : Ideal (π“ž E) := Ideal.comap (padicEmbeddingIntegers q Οƒ) (IsLocalRing.maximalIdeal β„€_[q]) theorem padicEmbeddingIdeal_mem (Οƒ : E →ₐ[β„š] β„š_[q]) (x : π“ž E) : x ∈ padicEmbeddingIdeal q Οƒ ↔ β€–Οƒ (x : E)β€– < 1 := padicEmbeddingIntegers_mem_maximal q Οƒ x theorem padicEmbeddingIdeal_contains_prime (Οƒ : E →ₐ[β„š] β„š_[q]) : (q : π“ž E) ∈ padicEmbeddingIdeal q Οƒ := by rw [padicEmbeddingIdeal_mem] have h := Padic.norm_p_lt_one (p := q) simpa only [map_natCast] using h def padicEmbeddingPrime (Οƒ : E →ₐ[β„š] β„š_[q]) : HeightOneSpectrum (π“ž E) where asIdeal := padicEmbeddingIdeal q Οƒ isPrime := (inferInstance : (IsLocalRing.maximalIdeal β„€_[q]).IsPrime).comap _ ne_bot := by intro he have h := padicEmbeddingIdeal_contains_prime q Οƒ rw [he, Ideal.mem_bot] at h have hq := congrArg (fun z : π“ž E => Οƒ (z : E)) h change Οƒ (q : E) = Οƒ 0 at hq rw [map_natCast, map_zero] at hq exact (Nat.cast_ne_zero.mpr (Fact.out : q.Prime).ne_zero) hq theorem padicEmbeddingPrime_contains_prime (Οƒ : E →ₐ[β„š] β„š_[q]) : (q : π“ž E) ∈ (padicEmbeddingPrime q Οƒ).asIdeal := padicEmbeddingIdeal_contains_prime q Οƒ theorem padicEmbeddingPrime_mem (Οƒ : E →ₐ[β„š] β„š_[q]) (x : π“ž E) : x ∈ (padicEmbeddingPrime q Οƒ).asIdeal ↔ β€–Οƒ (x : E)β€– < 1 := padicEmbeddingIdeal_mem q Οƒ x theorem padicEmbeddingPrime_notMem (Οƒ : E →ₐ[β„š] β„š_[q]) (x : π“ž E) : x βˆ‰ (padicEmbeddingPrime q Οƒ).asIdeal ↔ β€–Οƒ (x : E)β€– = 1 := by rw [padicEmbeddingPrime_mem, not_lt] exact ⟨fun h => le_antisymm (padic_embedding_integer_norm q Οƒ x) h, fun h => h.ge⟩ end /-! The induced finite prime detects integrality under the p-adic embedding. -/ open scoped Classical open IsDedekindDomain _root_.NumberField theorem valuation_le_one_of_prime_denominator (E : Type*) [Field E] [NumberField E] (w : HeightOneSpectrum (π“ž E)) (r : E) (n d : π“ž E) (hd : d βˆ‰ w.asIdeal) (he : r * algebraMap (π“ž E) E d = algebraMap (π“ž E) E n) : w.valuation E r ≀ 1 := by have h := congrArg (w.valuation E) he rw [map_mul, (w.valuation_eq_one_iff_notMem).mpr hd, mul_one] at h exact h.trans_le (w.valuation_le_one n) variable (q : β„•) [Fact q.Prime] {E : Type*} [Field E] [NumberField E] [Algebra β„š E] theorem padicEmbedding_norm_le_one_of_valuation (Οƒ : E →ₐ[β„š] β„š_[q]) (r : E) (hr : (padicEmbeddingPrime q Οƒ).valuation E r ≀ 1) : β€–Οƒ rβ€– ≀ 1 := by obtain ⟨n, d, he⟩ := (padicEmbeddingPrime q Οƒ).exists_primeCompl_mul_eq_of_integer r hr have hd : β€–Οƒ (d.val : E)β€– = 1 := (padicEmbeddingPrime_notMem q Οƒ d.val).mp d.property have h := congrArg norm (congrArg Οƒ he) simp only [map_mul, norm_mul] at h rw [hd, mul_one] at h exact h.trans_le (padic_embedding_integer_norm q Οƒ n) theorem padicEmbedding_valuation_le_one_of_norm (Οƒ : E →ₐ[β„š] β„š_[q]) (r : E) (hr : β€–Οƒ rβ€– ≀ 1) : (padicEmbeddingPrime q Οƒ).valuation E r ≀ 1 := by obtain ⟨n, d, he | he⟩ := (padicEmbeddingPrime q Οƒ).exists_primeCompl_mul_eq_or_mul_eq r Β· exact valuation_le_one_of_prime_denominator E _ r n d.val d.property he Β· have hd : β€–Οƒ (d.val : E)β€– = 1 := (padicEmbeddingPrime_notMem q Οƒ d.val).mp d.property have h := congrArg norm (congrArg Οƒ he) simp only [map_mul, norm_mul] at h rw [hd] at h have hn : β€–Οƒ (n : E)β€– = 1 := le_antisymm (padic_embedding_integer_norm q Οƒ n) (by rw [← h] exact mul_le_of_le_one_left (norm_nonneg _) hr) exact valuation_le_one_of_prime_denominator E _ r d.val n ((padicEmbeddingPrime_notMem q Οƒ n).mpr hn) he theorem padicEmbedding_valuation_le_one_iff (Οƒ : E →ₐ[β„š] β„š_[q]) (r : E) : (padicEmbeddingPrime q Οƒ).valuation E r ≀ 1 ↔ β€–Οƒ rβ€– ≀ 1 := ⟨padicEmbedding_norm_le_one_of_valuation q Οƒ r, padicEmbedding_valuation_le_one_of_norm q Οƒ r⟩ end end OAI.RepresentationTheory.Hecke.RadialDilation.PadicEmbeddingMem.Realization