cfahlgren1's picture
download
raw
12.1 kB
import Mathlib
import OAI.NumberTheory.CubicGram.MixedPoisson
namespace OAI
/-! The literal character Gram kernel and normalized radial Poisson expansion. -/
section
noncomputable section
open scoped BigOperators FourierTransform SchwartzMap
open Set Filter MeasureTheory Topology
attribute [local instance] Classical.propDecidable
noncomputable section
open Filter
open scoped ContDiff
namespace CubicFirstMoment
lemma hasCompactSupport_normProfile {W : ℝ → ℂ} (hW : HasCompactSupport W)
{Z : ℝ} (hZ : 0 < Z) :
HasCompactSupport (fun z : ℂ => W (Complex.normSq z / Z)) := by
have hT := Complex.tendsto_normSq_cocompact_atTop.atTop_div_const hZ
have hW' : W =ᶠ[cocompact ℝ] 0 := by
simpa only [coclosedCompact_eq_cocompact] using
(hasCompactSupport_iff_eventuallyEq.mp hW)
apply hasCompactSupport_iff_eventuallyEq.mpr
rw [coclosedCompact_eq_cocompact]
exact (hW'.filter_mono atTop_le_cocompact).comp_tendsto hT
lemma contDiff_normProfile {W : ℝ → ℂ} (hW : ContDiff ℝ ∞ W) (Z : ℝ) :
ContDiff ℝ ∞ (fun z : ℂ => W (Complex.normSq z / Z)) := by
have hr : ContDiff ℝ ∞ (fun z : ℂ => z.re) := Complex.reCLM.contDiff
have hi : ContDiff ℝ ∞ (fun z : ℂ => z.im) := Complex.imCLM.contDiff
exact hW.comp (((hr.mul hr).add (hi.mul hi)).div_const Z)
end CubicFirstMoment
namespace CubicFirstMoment
def primaryCharacterGram (p p' : Eisenstein) (W : ℝ → ℂ) (Z : ℝ) : ℂ :=
∑' n : Eisenstein, if primary n then
W (norm n / Z) * cubicSymbol p n * star (cubicSymbol p' n) else 0
def gramDyad (P : ℝ) (p : Eisenstein) : Prop :=
primary p ∧ Squarefree p ∧ P ≤ norm p ∧ norm p < 2*P
def CharacterGramStatement : Prop :=
∀ (W : ℝ → ℂ), ContDiff ℝ ∞ W → HasCompactSupport W →
tsupport W ⊆ Set.Ioi (0 : ℝ) →
∀ ε : ℝ, 0 < ε → ∃ C : ℝ, 0 < C ∧
∀ (P Z : ℝ) (p : Eisenstein), 1 ≤ P → 1 ≤ Z → gramDyad P p →
(∑' p' : Eisenstein, if gramDyad P p' ∧ p' ≠ p then
‖primaryCharacterGram p p' W Z‖^2 else 0) ≤
C * (P*Z)^ε * Z * (P+(P^3/Z)^(2/3 : ℝ))
def primaryCosetMap (c : Eisenstein) (hc : primary c) (s : Eisenstein) :
{n : Eisenstein // primary n} :=
⟨c+3*s, by
obtain ⟨t, ht⟩ := hc
use t+s
rw [sub_eq_iff_eq_add] at ht
rw [ht]
ring⟩
lemma primaryCosetMap_bijective (c : Eisenstein) (hc : primary c) :
Function.Bijective (primaryCosetMap c hc) := by
constructor
· intro s t hst
have he : c+3*s=c+3*t := congrArg Subtype.val hst
have hn : (3 : Eisenstein) ≠ 0 := by norm_num
exact mul_left_cancel₀ hn (add_left_cancel he)
· intro n
obtain ⟨u, hu⟩ := n.property
obtain ⟨v, hv⟩ := hc
refine ⟨u-v, Subtype.ext ?_⟩
change c+3*(u-v) = n.val
linear_combination hv - hu
lemma tsum_primary_eq_coset (c : Eisenstein) (hc : primary c) (F : Eisenstein → ℂ) :
(∑' n : Eisenstein, if primary n then F n else 0) =
∑' s : Eisenstein, F (c+3*s) := by
have he := (Equiv.ofBijective (primaryCosetMap c hc)
(primaryCosetMap_bijective c hc)).tsum_eq (fun n => F n.val)
change (∑' n : Eisenstein, Set.indicator {n | primary n} F n) = _
rw [← tsum_subtype]
exact he.symm
def normProfileSchwartz (W : ℝ → ℂ) (hW : HasCompactSupport W)
(hW' : ContDiff ℝ ∞ W) (Z : ℝ) (hZ : 0 < Z) : 𝓢(ℂ, ℂ) :=
(hasCompactSupport_normProfile hW hZ).toSchwartzMap (contDiff_normProfile hW' Z)
@[simp] lemma normProfileSchwartz_apply (W : ℝ → ℂ) (hW : HasCompactSupport W)
(hW' : ContDiff ℝ ∞ W) (Z : ℝ) (hZ : 0 < Z) (z : ℂ) :
normProfileSchwartz W hW hW' Z hZ z = W (Complex.normSq z / Z) := rfl
def normProfileFourier (W : ℝ → ℂ) (y : ℂ) : ℂ :=
(2 / Real.sqrt 3 : ℝ) • traceFourier (fun z => W (Complex.normSq z)) y
lemma primaryMixedFourier_zero {a b : Eisenstein} (ha : primary a)
(hb : primary b) (hab : a ≠ b) (hsa : Squarefree a) (hsb : Squarefree b)
(hc : IsCoprime a b) : primaryMixedFourier a b 0 = 0 := by
rw [primaryMixedFourier_eq ha hb, mixedFrequencyGauss_zero ha hb hsa hsb hc hab,
mul_zero]
end CubicFirstMoment
namespace CubicFirstMoment
lemma traceFourier_normProfile (W : ℝ → ℂ) (hW : HasCompactSupport W)
(hW' : ContDiff ℝ ∞ W) {Z : ℝ} (hZ : 0 < Z) (w : ℂ) :
traceFourier (normProfileSchwartz W hW hW' Z hZ) w =
Z • traceFourier (fun z : ℂ => W (Complex.normSq z)) ((Real.sqrt Z : ℂ)*w) := by
have hs : Real.sqrt Z ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr hZ)
have hs' : (Real.sqrt Z : ℂ) ≠ 0 := by exact_mod_cast hs
have hn : Complex.normSq ((Real.sqrt Z : ℂ)⁻¹) = Z⁻¹ := by
rw [Complex.normSq_inv, Complex.normSq_ofReal, Real.mul_self_sqrt (le_of_lt hZ)]
have hf : (normProfileSchwartz W hW hW' Z hZ : ℂ → ℂ) =
fun z : ℂ => W (Complex.normSq ((Real.sqrt Z : ℂ)⁻¹*z)) := by
funext z
simp only [normProfileSchwartz_apply, Complex.normSq_mul, hn]
congr 1
ring
rw [hf, traceFourier_complexMul _ (inv_ne_zero hs')
(fun z => W (Complex.normSq z)) w, hn, inv_inv]
congr 2
simp only [div_inv_eq_mul, mul_comm]
theorem primaryCharacterGram_poisson {a b : Eisenstein} (ha : primary a)
(hb : primary b) (hsa : Squarefree a) (hsb : Squarefree b)
(hab : IsCoprime a b) (W : ℝ → ℂ) (hW : HasCompactSupport W)
(hW' : ContDiff ℝ ∞ W) {Z : ℝ} (hZ : 0 < Z) :
primaryCharacterGram a b W Z =
(2 / (Real.sqrt 3 * norm (a*b) * 9) : ℝ) • ∑' h : Eisenstein,
((Real.sqrt (norm (a*b)) : ℂ) * (gauss a * star (gauss b)) *
(star (cubicSymbol a h) * cubicSymbol b h)) *
(Real.fourierChar (tracePair (h : ℂ) (1 / (3*traceLambda))) : ℂ) *
(Z • traceFourier (fun z : ℂ => W (Complex.normSq z))
((Real.sqrt Z : ℂ) * ((h : ℂ) / (3*((a*b : Eisenstein) : ℂ)*traceLambda)))) := by
unfold primaryCharacterGram
rw [tsum_primary_eq_coset (a*b) (primary_mul ha hb)
(fun n => W (norm n / Z) * cubicSymbol a n * star (cubicSymbol b n))]
have he := poisson_primary_mixed_squarefree ha hb hsa hsb hab
(normProfileSchwartz W hW hW' Z hZ)
simp_rw [traceFourier_normProfile W hW hW' hZ] at he
convert he using 1
apply tsum_congr
intro s
simp only [normProfileSchwartz_apply, mixedSymbol, norm]
ring
end CubicFirstMoment
namespace CubicFirstMoment
def gramDualTerm (a b : Eisenstein) (W : ℝ → ℂ) (Z : ℝ) (h : Eisenstein) : ℂ :=
(star (cubicSymbol a h) * cubicSymbol b h) *
(Real.fourierChar (tracePair (h : ℂ) (1 / (3*traceLambda))) : ℂ) *
normProfileFourier W
((Real.sqrt Z : ℂ) * ((h : ℂ) / (3*((a*b : Eisenstein) : ℂ)*traceLambda)))
lemma norm_gramGauss_scalar {a b : Eisenstein} (ha : primary a)
(hb : primary b) (hsa : Squarefree a) (hsb : Squarefree b) :
‖gauss a * star (gauss b)‖ = 1 := by
rw [norm_mul, norm_star, norm_gauss_of_squarefree ha hsa,
norm_gauss_of_squarefree hb hsb, one_mul]
lemma gramDualTerm_zero {a b : Eisenstein} (ha : primary a)
(hb : primary b) (hsa : Squarefree a) (hsb : Squarefree b)
(hab : IsCoprime a b) (hne : a ≠ b) (W : ℝ → ℂ) (Z : ℝ) :
gramDualTerm a b W Z 0 = 0 := by
have hz := mixedFrequencyGauss_zero ha hb hsa hsb hab hne
rw [mixedFrequencyGauss_squarefree ha hb hsa hsb hab] at hz
have hg : gauss a * star (gauss b) ≠ 0 := by
intro h
have hn := norm_gramGauss_scalar ha hb hsa hsb
rw [h, norm_zero] at hn
norm_num at hn
have hχ := (mul_eq_zero.mp hz).resolve_left hg
simp only [gramDualTerm, hχ, zero_mul]
theorem primaryCharacterGram_poisson_normalized {a b : Eisenstein} (ha : primary a)
(hb : primary b) (hsa : Squarefree a) (hsb : Squarefree b)
(hab : IsCoprime a b) (W : ℝ → ℂ) (hW : HasCompactSupport W)
(hW' : ContDiff ℝ ∞ W) {Z : ℝ} (hZ : 0 < Z) :
primaryCharacterGram a b W Z =
((Z / (9*Real.sqrt (norm (a*b))) : ℝ) : ℂ) * (gauss a * star (gauss b)) *
∑' h : Eisenstein, gramDualTerm a b W Z h := by
have hN : 0 < norm (a*b) := Complex.normSq_pos.mpr
(fun h => primary_ne_zero (primary_mul ha hb) (Subtype.ext h))
have hsqrt : Real.sqrt (norm (a*b)) ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr hN)
have h3 : Real.sqrt 3 ≠ 0 := by positivity
have hc : (2 / (Real.sqrt 3 * norm (a*b) * 9)) * Real.sqrt (norm (a*b)) * Z =
(Z / (9*Real.sqrt (norm (a*b)))) * (2 / Real.sqrt 3) := by
nth_rw 1 [← Real.sq_sqrt (le_of_lt hN)]
field_simp
have hc' := congrArg (fun x : ℝ => (x : ℂ)) hc
push_cast at hc'
rw [primaryCharacterGram_poisson ha hb hsa hsb hab W hW hW' hZ]
simp only [Complex.real_smul, ← tsum_mul_left]
apply tsum_congr
intro h
simp only [gramDualTerm, normProfileFourier, Complex.real_smul]
push_cast
linear_combination (gauss a * star (gauss b) *
(star (cubicSymbol a h) * cubicSymbol b h) *
(Real.fourierChar (tracePair (h : ℂ) (1 / (3*traceLambda))) : ℂ) *
traceFourier (fun z : ℂ => W (Complex.normSq z))
((Real.sqrt Z : ℂ) * ((h : ℂ) / (3*((a*b : Eisenstein) : ℂ)*traceLambda)))) * hc'
theorem norm_primaryCharacterGram_poisson {a b : Eisenstein} (ha : primary a)
(hb : primary b) (hsa : Squarefree a) (hsb : Squarefree b)
(hab : IsCoprime a b) (W : ℝ → ℂ) (hW : HasCompactSupport W)
(hW' : ContDiff ℝ ∞ W) {Z : ℝ} (hZ : 0 < Z) :
‖primaryCharacterGram a b W Z‖ =
(Z / (9*Real.sqrt (norm (a*b)))) *
‖∑' h : Eisenstein, gramDualTerm a b W Z h‖ := by
rw [primaryCharacterGram_poisson_normalized ha hb hsa hsb hab W hW hW' hZ,
norm_mul, norm_mul, norm_gramGauss_scalar ha hb hsa hsb, mul_one,
Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (by positivity)]
end CubicFirstMoment
namespace CubicFirstMoment
lemma normProfileFourier_mul_unit (W : ℝ → ℂ) {u : ℂ}
(hu : Complex.normSq u = 1) (w : ℂ) :
normProfileFourier W (u*w) = normProfileFourier W w := by
have hu0 : u ≠ 0 := by
intro he
simp [he] at hu
have hf : (fun z : ℂ => W (Complex.normSq (u⁻¹*z))) =
(fun z : ℂ => W (Complex.normSq z)) := by
funext z
simp only [Complex.normSq_mul, Complex.normSq_inv, hu, inv_one, one_mul]
have he := traceFourier_complexMul u⁻¹ (inv_ne_zero hu0)
(fun z : ℂ => W (Complex.normSq z)) w
rw [hf, Complex.normSq_inv, hu, inv_one, inv_one, one_smul] at he
unfold normProfileFourier
congr 1
simpa only [div_inv_eq_mul, mul_comm] using he.symm
lemma normProfileFourier_eq_of_normSq_eq (W : ℝ → ℂ) {y y' : ℂ}
(hy : Complex.normSq y = Complex.normSq y') :
normProfileFourier W y = normProfileFourier W y' := by
by_cases hy0 : y' = 0
· have hy1 : y = 0 := Complex.normSq_eq_zero.mp (by simpa [hy0] using hy)
rw [hy0, hy1]
· have hu : Complex.normSq (y / y') = 1 := by
rw [Complex.normSq_div, hy, div_self (mt Complex.normSq_eq_zero.mp hy0)]
simpa only [div_mul_cancel₀ _ hy0] using normProfileFourier_mul_unit W hu y'
def radialDualProfile (W : ℝ → ℂ) (t : ℝ) : ℂ :=
normProfileFourier W (Real.sqrt t : ℂ)
lemma normProfileFourier_radial (W : ℝ → ℂ) (y : ℂ) :
normProfileFourier W y = radialDualProfile W (Complex.normSq y) := by
apply normProfileFourier_eq_of_normSq_eq
rw [Complex.normSq_ofReal, Real.mul_self_sqrt (Complex.normSq_nonneg y)]
lemma gramDualTerm_radial (a b : Eisenstein) (W : ℝ → ℂ) {Z : ℝ}
(hZ : 0 ≤ Z) (h : Eisenstein) :
gramDualTerm a b W Z h =
(star (cubicSymbol a h) * cubicSymbol b h) *
(Real.fourierChar (tracePair (h : ℂ) (1 / (3*traceLambda))) : ℂ) *
radialDualProfile W (Z * norm h / (27 * norm (a*b))) := by
rw [gramDualTerm, normProfileFourier_radial]
congr 2
simp only [Complex.normSq_mul, Complex.normSq_div, Complex.normSq_ofReal,
Real.mul_self_sqrt hZ, Complex.normSq_ofNat]
have hl : Complex.normSq traceLambda = 3 := by
rw [traceLambda_eq]
simp [Complex.normSq_mul, Complex.normSq_ofReal, Real.mul_self_sqrt]
rw [hl]
dsimp [norm]
ring
end CubicFirstMoment
end
end
end
end OAI

Xet Storage Details

Size:
12.1 kB
·
Xet hash:
d00d68d693579528021c50c601fb94ce495ff2a25d7666d770eba7640e543617

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.