math / data /lean /OAI /NumberTheory /CubicGram /InnerExtension.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
18.6 kB
import Mathlib
import OAI.NumberTheory.CubicGram.SieveImprovement
namespace OAI
/-! Full inner cube covers and sharp coefficient extension bounds. -/
section
noncomputable section
open scoped BigOperators
attribute [local instance] Classical.propDecidable
namespace CubicFirstMoment
lemma complex_norm_sum_sq_le {ΞΉ : Type*} (I : Finset ΞΉ) (v : ΞΉ β†’ β„‚) :
β€–βˆ‘ i ∈ I, v iβ€–^2 ≀ (I.card : ℝ)*βˆ‘ i ∈ I, β€–v iβ€–^2 := by
have ht := norm_sum_le I v
have hc := Finset.sum_mul_sq_le_sq_mul_sq I (fun _ => (1 : ℝ)) (fun i => β€–v iβ€–)
simp only [one_mul,one_pow,Finset.sum_const,nsmul_eq_mul,mul_one] at hc
exact (pow_le_pow_leftβ‚€ (_root_.norm_nonneg _) ht 2).trans hc
lemma innerCubeBlock_fixed_mass (P S : Finset Eisenstein)
(hP : βˆ€ a ∈ P, primary a) (hS : βˆ€ s ∈ S, primary s)
(r : Eisenstein) (v : Eisenstein β†’ β„‚) :
(βˆ‘ a ∈ P, β€–βˆ‘ s ∈ S, v s*cubicSymbol a (r*s)β€–^2) ≀
finiteCubicBound S P * βˆ‘ s ∈ S, β€–v sβ€–^2 := by
apply le_trans _ (finiteCubicBound_controls_mass S P v)
apply Finset.sum_le_sum
intro a ha
have he : (βˆ‘ s ∈ S, v s*cubicSymbol a (r*s)) =
cubicSymbol a r * βˆ‘ s ∈ S, v s*cubicSymbol s a := by
rw [Finset.mul_sum]
apply Finset.sum_congr rfl
intro s hs
rw [cubicSymbol_mul_upper (hP a ha),cubic_reciprocity (hP a ha) (hS s hs)]
ring
rw [he,norm_mul,mul_pow]
apply mul_le_of_le_one_left (sq_nonneg _)
exact (pow_le_pow_leftβ‚€ (_root_.norm_nonneg _) (norm_cubicSymbol_le_one (hP a ha) r) 2).trans_eq (by norm_num)
theorem innerCubeBlock_mass (P S T C : Finset Eisenstein)
(hP : βˆ€ a ∈ P, primary a) (hS : βˆ€ s ∈ S, primary s)
(r : Eisenstein) (v : Eisenstein β†’ Eisenstein β†’ Eisenstein β†’ β„‚)
(D : ℝ) (_hD : 0 ≀ D) (hv : βˆ€ s ∈ S, βˆ€ t ∈ T, βˆ€ c ∈ C, β€–v s t cβ€– ≀ D) :
(βˆ‘ a ∈ P, β€–βˆ‘ t ∈ T, βˆ‘ c ∈ C, βˆ‘ s ∈ S,
v s t c*cubicSymbol a (r*(s*t^2*c^3))β€–^2) ≀
((T.card : ℝ)*C.card)^2 * finiteCubicBound S P * S.card * D^2 := by
have hrow (t : Eisenstein) (ht : t ∈ T) (c : Eisenstein) (hc : c ∈ C) :
(βˆ‘ a ∈ P, β€–βˆ‘ s ∈ S, v s t c*cubicSymbol a (r*(s*t^2*c^3))β€–^2) ≀
finiteCubicBound S P * S.card * D^2 := by
have he : βˆ€ s : Eisenstein, r*(s*t^2*c^3) = (r*t^2*c^3)*s := by intro s; ring
simp_rw [he]
apply (innerCubeBlock_fixed_mass P S hP hS _ (fun s => v s t c)).trans
have hh : (βˆ‘ s ∈ S, β€–v s t cβ€–^2) ≀ (S.card : ℝ)*D^2 := by
calc
_ ≀ βˆ‘ s ∈ S, D^2 := Finset.sum_le_sum (fun s hs =>
pow_le_pow_leftβ‚€ (_root_.norm_nonneg _) (hv s hs t ht c hc) 2)
_ = _ := by simp
exact (mul_le_mul_of_nonneg_left hh (finiteCubicBound_nonneg _ _)).trans_eq (by ring)
have htriangle (a : Eisenstein) :
β€–βˆ‘ t ∈ T, βˆ‘ c ∈ C, βˆ‘ s ∈ S, v s t c*cubicSymbol a (r*(s*t^2*c^3))β€–^2 ≀
((T.card : ℝ)*C.card)*βˆ‘ t ∈ T, βˆ‘ c ∈ C,
β€–βˆ‘ s ∈ S, v s t c*cubicSymbol a (r*(s*t^2*c^3))β€–^2 := by
simpa only [Finset.product_eq_sprod,Finset.sum_product,Finset.card_product,Nat.cast_mul] using
complex_norm_sum_sq_le (T.product C)
(fun z => βˆ‘ s ∈ S, v s z.1 z.2*cubicSymbol a (r*(s*z.1^2*z.2^3)))
calc
_ ≀ βˆ‘ a ∈ P, ((T.card : ℝ)*C.card)*βˆ‘ t ∈ T, βˆ‘ c ∈ C,
β€–βˆ‘ s ∈ S, v s t c*cubicSymbol a (r*(s*t^2*c^3))β€–^2 :=
Finset.sum_le_sum (fun a _ => htriangle a)
_ = ((T.card : ℝ)*C.card)*βˆ‘ t ∈ T, βˆ‘ c ∈ C, βˆ‘ a ∈ P,
β€–βˆ‘ s ∈ S, v s t c*cubicSymbol a (r*(s*t^2*c^3))β€–^2 := by
rw [← Finset.mul_sum,Finset.sum_comm (s := P) (t := T)]
congr 1
apply Finset.sum_congr rfl
intro t ht
exact Finset.sum_comm
_ ≀ ((T.card : ℝ)*C.card)*βˆ‘ t ∈ T, βˆ‘ c ∈ C,
finiteCubicBound S P * S.card * D^2 := by
gcongr with t ht c hc
exact hrow t ht c hc
_ = _ := by simp only [Finset.sum_const,nsmul_eq_mul]; ring
def finiteCoverCoefficient {ΞΉ : Type*} (I : Finset ΞΉ) (f : ΞΉ β†’ Eisenstein)
(H : Finset Eisenstein) (v : Eisenstein β†’ β„‚) (x : ΞΉ) : β„‚ :=
if f x ∈ H then v (f x) / ((I.filter (fun y => f y = f x)).card : β„‚) else 0
lemma finiteCoverCoefficient_norm_le {ΞΉ : Type*} (I : Finset ΞΉ) (f : ΞΉ β†’ Eisenstein)
(H : Finset Eisenstein) (v : Eisenstein β†’ β„‚) (D : ℝ) (hD : 0 ≀ D)
(hv : βˆ€ n ∈ H, β€–v nβ€– ≀ D) {x : ΞΉ} (hx : x ∈ I) :
β€–finiteCoverCoefficient I f H v xβ€– ≀ D := by
unfold finiteCoverCoefficient
split_ifs with h
Β· have hc : 1 ≀ (I.filter (fun y => f y = f x)).card :=
Finset.one_le_card.mpr ⟨x,Finset.mem_filter.mpr ⟨hx,rfl⟩⟩
rw [norm_div,Complex.norm_natCast]
exact (div_le_self (_root_.norm_nonneg _) (by exact_mod_cast hc)).trans (hv _ h)
Β· simpa using hD
lemma finiteCoverCoefficient_sum {ΞΉ : Type*} (I : Finset ΞΉ) (f : ΞΉ β†’ Eisenstein)
(H : Finset Eisenstein) (hcover : H βŠ† I.image f)
(v k : Eisenstein β†’ β„‚) :
(βˆ‘ x ∈ I, finiteCoverCoefficient I f H v x * k (f x)) =
βˆ‘ n ∈ H, v n*k n := by
classical
have he : (βˆ‘ x ∈ I, finiteCoverCoefficient I f H v x * k (f x)) =
βˆ‘ x ∈ I with f x ∈ H,
(v (f x) / ((I.filter (fun y => f y = f x)).card : β„‚))*k (f x) := by
rw [Finset.sum_filter]
apply Finset.sum_congr rfl
intro x hx
simp only [finiteCoverCoefficient,ite_mul,zero_mul]
rw [he,← Finset.sum_fiberwise_eq_sum_filter' I H f
(fun n => (v n / ((I.filter (fun y => f y = n)).card : β„‚))*k n)]
apply Finset.sum_congr rfl
intro n hn
have hc : (I.filter (fun y => f y = n)).card β‰  0 := by
obtain ⟨x,hx,hfx⟩ := Finset.mem_image.mp (hcover hn)
exact Finset.card_ne_zero.mpr ⟨x,Finset.mem_filter.mpr ⟨hx,hfx⟩⟩
have hc' : ((I.filter (fun y => f y = n)).card : β„‚) β‰  0 := by exact_mod_cast hc
simp only [Finset.sum_const,nsmul_eq_mul]
field_simp
abbrev InnerCubeIndex := (_index : β„•Γ—β„•Γ—β„•) Γ— (EisensteinΓ—EisensteinΓ—EisensteinΓ—Eisenstein)
def innerCubeIndices (j : β„•) : Finset InnerCubeIndex :=
(cubeDyadTriples j).sigma (fun z => (nonzeroNormBall 729).product
((squarefreePrimaryDyad z.1).product
((squarefreePrimaryDyad z.2.1).product (frequencyDyad z.2.2))))
def innerCubeValue (q : InnerCubeIndex) : Eisenstein :=
q.2.1*(q.2.2.1*q.2.2.2.1^2*q.2.2.2.2^3)
lemma frequencyDyad_subset_innerCubeImage (j : β„•) :
frequencyDyad j βŠ† (innerCubeIndices j).image innerCubeValue := by
intro n hn
have hh := frequencyDyad_subset_cubeCover j hn
obtain ⟨z,hz,hm⟩ := Finset.mem_biUnion.mp hh
obtain ⟨r,hr,hm⟩ := Finset.mem_biUnion.mp hm
obtain ⟨m,hm,he⟩ := Finset.mem_image.mp hm
obtain ⟨⟨s,t,c⟩,hstc,hem⟩ := Finset.mem_image.mp hm
obtain ⟨hs,htc⟩ := Finset.mem_product.mp hstc
obtain ⟨ht,hc⟩ := Finset.mem_product.mp htc
refine Finset.mem_image.mpr ⟨⟨z,r,s,t,c⟩,?_,?_⟩
· exact Finset.mem_sigma.mpr ⟨hz,Finset.mem_product.mpr ⟨hr,
Finset.mem_product.mpr ⟨hs,Finset.mem_product.mpr ⟨ht,hc⟩⟩⟩⟩
Β· dsimp [innerCubeValue]
rw [← he,← hem]
def innerCubeCoefficient (j : β„•) (v : Eisenstein β†’ β„‚) : InnerCubeIndex β†’ β„‚ :=
finiteCoverCoefficient (innerCubeIndices j) innerCubeValue (frequencyDyad j) v
def innerCubeBlockSum (j : β„•) (v : Eisenstein β†’ β„‚) (a : Eisenstein)
(z : β„•Γ—β„•Γ—β„•) (r : Eisenstein) : β„‚ :=
βˆ‘ t ∈ squarefreePrimaryDyad z.2.1, βˆ‘ c ∈ frequencyDyad z.2.2,
βˆ‘ s ∈ squarefreePrimaryDyad z.1,
innerCubeCoefficient j v ⟨z,r,s,t,c⟩*cubicSymbol a (r*(s*t^2*c^3))
lemma innerCubeCoefficient_sum (j : β„•) (v : Eisenstein β†’ β„‚) (a : Eisenstein) :
(βˆ‘ n ∈ frequencyDyad j, v n*cubicSymbol a n) =
βˆ‘ z ∈ cubeDyadTriples j, βˆ‘ r ∈ nonzeroNormBall 729,
innerCubeBlockSum j v a z r := by
rw [← finiteCoverCoefficient_sum (innerCubeIndices j) innerCubeValue (frequencyDyad j)
(frequencyDyad_subset_innerCubeImage j) v (cubicSymbol a)]
simp only [innerCubeIndices,Finset.sum_sigma,Finset.product_eq_sprod,Finset.sum_product]
apply Finset.sum_congr rfl
intro z hz
apply Finset.sum_congr rfl
intro r hr
dsimp only [innerCubeBlockSum,innerCubeValue,innerCubeCoefficient]
rw [Finset.sum_comm (s := squarefreePrimaryDyad z.1) (t := squarefreePrimaryDyad z.2.1)]
apply Finset.sum_congr rfl
intro t ht
exact Finset.sum_comm
lemma innerCubeCoefficient_block_mass (P : Finset Eisenstein) (hP : βˆ€ a ∈ P, primary a)
(j : β„•) (v : Eisenstein β†’ β„‚) (D : ℝ) (hD : 0 ≀ D)
(hv : βˆ€ n ∈ frequencyDyad j, β€–v nβ€– ≀ D)
(z : β„•Γ—β„•Γ—β„•) (hz : z ∈ cubeDyadTriples j) (r : Eisenstein)
(hr : r ∈ nonzeroNormBall 729) :
(βˆ‘ a ∈ P, β€–innerCubeBlockSum j v a z rβ€–^2) ≀
(((squarefreePrimaryDyad z.2.1).card : ℝ)*(frequencyDyad z.2.2).card)^2 *
finiteCubicBound (squarefreePrimaryDyad z.1) P *
(squarefreePrimaryDyad z.1).card * D^2 := by
apply innerCubeBlock_mass P _ _ _ hP
(fun s hs => (mem_squarefreePrimaryDyad.mp hs).2.1) r
(fun s t c => innerCubeCoefficient j v ⟨z,r,s,t,c⟩) D hD
intro s hs t ht c hc
apply finiteCoverCoefficient_norm_le _ _ _ _ D hD hv
exact Finset.mem_sigma.mpr ⟨hz,Finset.mem_product.mpr ⟨hr,
Finset.mem_product.mpr ⟨hs,Finset.mem_product.mpr ⟨ht,hc⟩⟩⟩⟩
lemma complex_mass_sum_sq_le {ΞΉ ΞΊ : Type*} (I : Finset ΞΉ) (P : Finset ΞΊ)
(F : ΞΊ β†’ ΞΉ β†’ β„‚) :
(βˆ‘ a ∈ P, β€–βˆ‘ i ∈ I, F a iβ€–^2) ≀
(I.card : ℝ)*βˆ‘ i ∈ I, βˆ‘ a ∈ P, β€–F a iβ€–^2 := by
calc
_ ≀ βˆ‘ a ∈ P, (I.card : ℝ)*βˆ‘ i ∈ I, β€–F a iβ€–^2 :=
Finset.sum_le_sum (fun a _ => complex_norm_sum_sq_le I (F a))
_ = _ := by rw [← Finset.mul_sum,Finset.sum_comm]
theorem innerCubeCover_mass (P : Finset Eisenstein) (hP : βˆ€ a ∈ P, primary a)
(j : β„•) (v : Eisenstein β†’ β„‚) (D : ℝ) (hD : 0 ≀ D)
(hv : βˆ€ n ∈ frequencyDyad j, β€–v nβ€– ≀ D) :
(βˆ‘ a ∈ P, β€–βˆ‘ n ∈ frequencyDyad j, v n*cubicSymbol a nβ€–^2) ≀
(cubeDyadTriples j).card * ((nonzeroNormBall 729).card : ℝ)^2 *
βˆ‘ z ∈ cubeDyadTriples j,
(((squarefreePrimaryDyad z.2.1).card : ℝ)*(frequencyDyad z.2.2).card)^2 *
finiteCubicBound (squarefreePrimaryDyad z.1) P *
(squarefreePrimaryDyad z.1).card * D^2 := by
have htriangle := complex_mass_sum_sq_le
((cubeDyadTriples j).product (nonzeroNormBall 729)) P
(fun a q => innerCubeBlockSum j v a q.1 q.2)
simp only [Finset.product_eq_sprod,Finset.sum_product,Finset.card_product,Nat.cast_mul]
at htriangle
simp_rw [innerCubeCoefficient_sum j v]
apply htriangle.trans
calc
_ ≀ ((cubeDyadTriples j).card : ℝ)*(nonzeroNormBall 729).card *
βˆ‘ z ∈ cubeDyadTriples j, βˆ‘ r ∈ nonzeroNormBall 729,
(((squarefreePrimaryDyad z.2.1).card : ℝ)*(frequencyDyad z.2.2).card)^2 *
finiteCubicBound (squarefreePrimaryDyad z.1) P *
(squarefreePrimaryDyad z.1).card * D^2 := by
apply mul_le_mul_of_nonneg_left _ (by positivity)
exact Finset.sum_le_sum (fun z hz => Finset.sum_le_sum (fun r hr =>
innerCubeCoefficient_block_mass P hP j v D hD hv z hz r hr))
_ = _ := by simp only [Finset.sum_const,nsmul_eq_mul,← Finset.mul_sum]; ring
theorem innerCubeBlock_sharp {Ξ΅ : ℝ} (hΞ΅ : 0 < Ξ΅) :
βˆƒ C : ℝ, 0 < C ∧ βˆ€ (P : Finset Eisenstein) (N : ℝ), 1 ≀ N β†’
(βˆ€ a ∈ P, primary a ∧ Squarefree a ∧ norm a ≀ N) β†’
βˆ€ (j : β„•) (z : β„•Γ—β„•Γ—β„•), z ∈ cubeDyadTriples j β†’
(((squarefreePrimaryDyad z.2.1).card : ℝ)*(frequencyDyad z.2.2).card)^2 *
finiteCubicBound (squarefreePrimaryDyad z.1) P *
(squarefreePrimaryDyad z.1).card ≀
C*(N*(128*(2 : ℝ)^j))^Ξ΅*(128*(2 : ℝ)^j)*
(N+128*(2 : ℝ)^j+(N*(128*(2 : ℝ)^j))^(2/3 : ℝ)) := by
obtain ⟨C,hC,hsharp⟩ := finiteCubicBound_sharp Ρ hΡ
refine ⟨18^5*C,by positivity,?_⟩
intro P N hN hP j z hz
let S : ℝ := 2*(2 : ℝ)^z.1
let T : ℝ := 2*(2 : ℝ)^z.2.1
let K : ℝ := 2*(2 : ℝ)^z.2.2
let J : ℝ := 128*(2 : ℝ)^j
have htwo (i : β„•) : (1 : ℝ) ≀ 2*2^i := by
have hh : (1 : ℝ) ≀ 2^i := one_le_powβ‚€ (by norm_num)
linarith
have hS : 1 ≀ S := htwo _
have hT : 1 ≀ T := htwo _
have hK : 1 ≀ K := htwo _
have hp : S*T^2*K^3 ≀ J := cube_scaled_sizes hz
have hSJ : S ≀ J := by
apply le_trans _ hp
exact (le_mul_of_one_le_right (by positivity : 0 ≀ S) (one_le_powβ‚€ hT)).trans
(le_mul_of_one_le_right (by positivity) (one_le_powβ‚€ hK))
have hsf : βˆ€ s ∈ squarefreePrimaryDyad z.1,
primary s ∧ Squarefree s ∧ norm s ≀ S := by
intro s hs
exact ⟨(mem_squarefreePrimaryDyad.mp hs).2.1,(mem_squarefreePrimaryDyad.mp hs).2.2,
(frequencyDyad_norm (mem_squarefreePrimaryDyad.mp hs).1).2⟩
have hb : finiteCubicBound (squarefreePrimaryDyad z.1) P ≀
C*(N*J)^Ξ΅*(N+J+(N*J)^(2/3 : ℝ)) := by
apply (hsharp _ _ N S hN hS hsf hP).trans
gcongr
have hcardS : ((squarefreePrimaryDyad z.1).card : ℝ) ≀ 18*S := by
dsimp [S]; nlinarith [squarefreePrimaryDyad_card_le z.1]
have hcardT : ((squarefreePrimaryDyad z.2.1).card : ℝ) ≀ 18*T := by
dsimp [T]; nlinarith [squarefreePrimaryDyad_card_le z.2.1]
have hcardK : ((frequencyDyad z.2.2).card : ℝ) ≀ 18*K := by
dsimp [K]; nlinarith [frequencyDyad_card_le z.2.2]
have hf : (((squarefreePrimaryDyad z.2.1).card : ℝ)*(frequencyDyad z.2.2).card)^2 *
(squarefreePrimaryDyad z.1).card ≀ 18^5*J := by
calc
_ ≀ ((18*T)*(18*K))^2*(18*S) := by gcongr
_ = 18^5*(S*T^2*K^2) := by ring
_ ≀ 18^5*(S*T^2*K^3) := by
gcongr
norm_num
_ ≀ _ := mul_le_mul_of_nonneg_left hp (by norm_num)
calc
_ = ((((squarefreePrimaryDyad z.2.1).card : ℝ)*(frequencyDyad z.2.2).card)^2 *
(squarefreePrimaryDyad z.1).card)*finiteCubicBound (squarefreePrimaryDyad z.1) P := by ring
_ ≀ (18^5*J)*(C*(N*J)^Ξ΅*(N+J+(N*J)^(2/3 : ℝ))) :=
mul_le_mul hf hb (finiteCubicBound_nonneg _ _) (by positivity)
_ = _ := by dsimp [J]; ring
theorem cubic_inner_extension_scaled {Ξ΅ : ℝ} (hΞ΅ : 0 < Ξ΅) :
βˆƒ C : ℝ, 0 < C ∧ βˆ€ (P : Finset Eisenstein) (N : ℝ), 1 ≀ N β†’
(βˆ€ a ∈ P, primary a ∧ Squarefree a ∧ norm a ≀ N) β†’
βˆ€ (j : β„•) (v : Eisenstein β†’ β„‚) (D : ℝ), 0 ≀ D β†’
(βˆ€ n ∈ frequencyDyad j, β€–v nβ€– ≀ D) β†’
(βˆ‘ a ∈ P, β€–βˆ‘ n ∈ frequencyDyad j, v n*cubicSymbol a nβ€–^2) ≀
C*(N*(128*(2 : ℝ)^j))^Ξ΅*(128*(2 : ℝ)^j)*
(N+128*(2 : ℝ)^j+(N*(128*(2 : ℝ)^j))^(2/3 : ℝ))*D^2 := by
obtain ⟨B,hB,hblock⟩ := innerCubeBlock_sharp (show 0 < Ρ/2 by linarith)
obtain ⟨E,hE,hpoly⟩ := dyadic_polynomial_small_power 6 (show 0 < Ρ/2 by linarith)
let R : ℝ := (nonzeroNormBall 729).card
refine ⟨(R+1)^2*B*E,by dsimp [R]; positivity,?_⟩
intro P N hN hP j v D hD hv
let J : ℝ := 128*(2 : ℝ)^j
let F : ℝ := N+J+(N*J)^(2/3 : ℝ)
have hJpos : 0 < J := by dsimp [J]; positivity
have hNpos : 0 < N := zero_lt_one.trans_le hN
have hF : 0 ≀ F := by dsimp [F]; positivity
have hR : 0 ≀ R := by dsimp [R]; positivity
have hR' : R ≀ R+1 := by linarith
have hcount : ((cubeDyadTriples j).card : ℝ)^2 ≀ E*J^(Ξ΅/2) := by
have hc : ((cubeDyadTriples j).card : ℝ) ≀ ((j : ℝ)+2)^3 := by
exact_mod_cast cubeDyadTriples_card j
calc
_ ≀ (((j : ℝ)+2)^3)^2 := by gcongr
_ = ((j : ℝ)+2)^6 := by ring
_ ≀ E*((2 : ℝ)^j)^(Ξ΅/2) := hpoly j
_ ≀ _ := by
gcongr
dsimp [J]
have hh : (0 : ℝ) ≀ 2^j := by positivity
linarith
have heps : J^(Ξ΅/2)*(N*J)^(Ξ΅/2) ≀ (N*J)^Ξ΅ := by
calc
_ ≀ (N*J)^(Ξ΅/2)*(N*J)^(Ξ΅/2) := by
gcongr
exact le_mul_of_one_le_left hJpos.le hN
_ = _ := by rw [← Real.rpow_add (by positivity)]; congr 1; ring
have hh := innerCubeCover_mass P (fun a ha => (hP a ha).1) j v D hD hv
apply hh.trans
calc
_ ≀ (cubeDyadTriples j).card * R^2 *
βˆ‘ z ∈ cubeDyadTriples j, B*(N*J)^(Ξ΅/2)*J*F*D^2 := by
apply mul_le_mul_of_nonneg_left _ (by positivity)
apply Finset.sum_le_sum
intro z hz
exact mul_le_mul_of_nonneg_right (hblock P N hN hP j z hz) (sq_nonneg D)
_ = ((cubeDyadTriples j).card : ℝ)^2 * R^2 * B*(N*J)^(Ξ΅/2)*J*F*D^2 := by
simp only [Finset.sum_const,nsmul_eq_mul]; ring
_ ≀ (E*J^(Ξ΅/2)) * (R+1)^2 * B*(N*J)^(Ξ΅/2)*J*F*D^2 := by
gcongr
_ = ((R+1)^2*B*E)* (J^(Ξ΅/2)*(N*J)^(Ξ΅/2))*J*F*D^2 := by ring
_ ≀ ((R+1)^2*B*E)* (N*J)^Ξ΅*J*F*D^2 := by gcongr
_ = _ := rfl
theorem cubic_inner_extension {Ξ΅ : ℝ} (hΞ΅ : 0 < Ξ΅) :
βˆƒ C : ℝ, 0 < C ∧ βˆ€ (P : Finset Eisenstein) (N : ℝ), 1 ≀ N β†’
(βˆ€ a ∈ P, primary a ∧ Squarefree a ∧ norm a ≀ N) β†’
βˆ€ (j : β„•) (v : Eisenstein β†’ β„‚) (D : ℝ), 0 ≀ D β†’
(βˆ€ n ∈ frequencyDyad j, β€–v nβ€– ≀ D) β†’
(βˆ‘ a ∈ P, β€–βˆ‘ n ∈ frequencyDyad j, v n*cubicSymbol a nβ€–^2) ≀
C*(N*(2 : ℝ)^j)^Ξ΅*(2 : ℝ)^j*
(N+(2 : ℝ)^j+(N*(2 : ℝ)^j)^(2/3 : ℝ))*D^2 := by
obtain ⟨C,hC,h⟩ := cubic_inner_extension_scaled hΡ
refine ⟨C*128^Ρ*128^2,by positivity,?_⟩
intro P N hN hP j v D hD hv
have hN0 : 0 ≀ N := zero_le_one.trans hN
have hJ0 : 0 < (2 : ℝ)^j := by positivity
have hp : (128 : ℝ)^(2/3 : ℝ) ≀ 128 := by
exact (Real.rpow_le_rpow_of_exponent_le (by norm_num) (by norm_num : (2/3 : ℝ) ≀ 1)).trans_eq (Real.rpow_one _)
have hm : (N*(128*(2 : ℝ)^j))^(2/3 : ℝ) ≀
128*((N*(2 : ℝ)^j)^(2/3 : ℝ)) := by
rw [show N*(128*(2 : ℝ)^j) = 128*(N*(2 : ℝ)^j) by ring,
Real.mul_rpow (by norm_num) (by positivity)]
exact mul_le_mul_of_nonneg_right hp (by positivity)
have hb : N+128*(2 : ℝ)^j+(N*(128*(2 : ℝ)^j))^(2/3 : ℝ) ≀
128*(N+(2 : ℝ)^j+(N*(2 : ℝ)^j)^(2/3 : ℝ)) := by nlinarith
have he : (N*(128*(2 : ℝ)^j))^Ξ΅ = 128^Ξ΅*(N*(2 : ℝ)^j)^Ξ΅ := by
rw [show N*(128*(2 : ℝ)^j) = 128*(N*(2 : ℝ)^j) by ring,
Real.mul_rpow (by norm_num) (by positivity)]
apply (h P N hN hP j v D hD hv).trans
rw [he]
calc
_ ≀ C*(128^Ξ΅*(N*(2 : ℝ)^j)^Ξ΅)*(128*(2 : ℝ)^j)*
(128*(N+(2 : ℝ)^j+(N*(2 : ℝ)^j)^(2/3 : ℝ)))*D^2 := by gcongr
_ = _ := by ring
end CubicFirstMoment
end
end
end OAI