File size: 6,023 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | import Mathlib
namespace OAI
/-! Finite Fourier orthogonality and row-column operator duality. -/
noncomputable section
open scoped BigOperators
open Module Complex UniqueFactorizationMonoid
attribute [local instance] Classical.propDecidable
namespace CubicFirstMoment.SieveFourier
variable {R : Type*} [CommRing R] [Fintype R]
lemma finite_fourier_parseval (Ο : AddChar R β) (hΟ : Ο.IsPrimitive) (f : R β β) :
(β a : R, ββ x : R, f x * Ο (a*x)β^2) =
(Fintype.card R : β) * β x : R, βf xβ^2 := by
classical
have hcomplex :
(β a : R, (β x : R, f x * Ο (a*x)) * star (β x : R, f x * Ο (a*x))) =
(Fintype.card R : β) * β x : R, f x * star (f x) := by
simp_rw [star_sum, Finset.sum_mul_sum]
rw [Finset.sum_comm]
apply Eq.trans (Finset.sum_congr rfl fun x _ => Finset.sum_comm)
have he (x y a : R) :
f x * Ο (a*x) * star (f y * Ο (a*y)) =
(f x * star (f y)) * Ο (a*(x-y)) := by
rw [star_mul]
have hc : star (Ο (a*y)) = Ο (-(a*y)) := by
exact (Ο.map_neg_eq_conj (a*y)).symm
rw [hc]
rw [show f x * Ο (a*x) * (Ο (-(a*y)) * star (f y)) =
(f x * star (f y)) * (Ο (a*x) * Ο (-(a*y))) by ring]
rw [β Ο.map_add_eq_mul]
congr 2
ring
simp_rw [he, β Finset.mul_sum, AddChar.sum_mulShift _ hΟ]
simp only [sub_eq_zero, Nat.cast_ite, Nat.cast_zero, mul_ite, mul_zero]
simp [Finset.mul_sum, mul_comm]
simp only [Complex.star_def, Complex.mul_conj, β Complex.ofReal_sum,
β Complex.ofReal_natCast, β Complex.ofReal_mul] at hcomplex
have hre := congrArg Complex.re hcomplex
simpa only [map_sum, Complex.mul_conj, Complex.ofReal_re, Complex.re_sum,
Complex.mul_re, Complex.natCast_re, Complex.natCast_im, zero_mul, sub_zero,
Complex.normSq_eq_norm_sq] using hre
lemma saturated_gauss_nonunit (Ο : MulChar R β) (Ο : AddChar R β)
(hΟ : Ο.IsPrimitive) (hG : βgaussSum Ο Οβ^2 = (Fintype.card R : β))
{a : R} (ha : Β¬IsUnit a) : gaussSum Ο (Ο.mulShift a) = 0 := by
classical
let d : R β β := fun b => βgaussSum Ο (Ο.mulShift b)β^2 -
(Fintype.card R : β) * βΟ bβ^2
have hd (b : R) : 0 β€ d b := by
by_cases hb : IsUnit b
Β· have he := gaussSum_mulShift_eq Ο Ο hb.unit
rw [hb.unit_spec] at he
have hn : βΟβ»ΒΉ bβ = 1 := by
simpa only [MulChar.coe_equivToUnitHom, hb.unit_spec] using Complex.norm_eq_one_of_mem_rootsOfUnity
(MulChar.apply_mem_rootsOfUnity (Ο := Οβ»ΒΉ) hb.unit)
have hn' : βΟ bβ = 1 := by
simpa only [MulChar.coe_equivToUnitHom, hb.unit_spec] using Complex.norm_eq_one_of_mem_rootsOfUnity
(MulChar.apply_mem_rootsOfUnity (Ο := Ο) hb.unit)
simp [d, he, hn, hn', hG]
Β· simp [d, MulChar.map_nonunit _ hb]
have hs : β b : R, d b = 0 := by
simp only [d, Finset.sum_sub_distrib, β Finset.mul_sum]
have hp := finite_fourier_parseval Ο hΟ Ο
simpa only [gaussSum, AddChar.mulShift_apply, sub_eq_zero] using hp
have hz : d a = 0 := (Finset.sum_eq_zero_iff_of_nonneg (fun b _ => hd b)).mp hs a
(Finset.mem_univ a)
simpa [d, MulChar.map_nonunit _ ha] using hz
lemma saturated_gauss_mulShift (Ο : MulChar R β) (Ο : AddChar R β)
(hΟ : Ο.IsPrimitive) (hG : βgaussSum Ο Οβ^2 = (Fintype.card R : β)) (a : R) :
gaussSum Ο (Ο.mulShift a) = Οβ»ΒΉ a * gaussSum Ο Ο := by
by_cases ha : IsUnit a
Β· simpa [ha.unit_spec] using gaussSum_mulShift_eq Ο Ο ha.unit
Β· rw [saturated_gauss_nonunit Ο Ο hΟ hG ha, MulChar.map_nonunit _ ha, zero_mul]
end CubicFirstMoment.SieveFourier
namespace CubicFirstMoment
namespace SieveOperator
def Bound {ΞΉ ΞΈ : Type*} (H : Finset ΞΉ) (S : Finset ΞΈ) (Ο : ΞΉ β ΞΈ β β) (K : β) : Prop :=
β u : ΞΈ β β, β h β H, ββ a β S, u a * Ο h aβ^2 β€ K * β a β S, βu aβ^2
lemma sum_mul_norm_sq {ΞΉ : Type*} (s : Finset ΞΉ) (f g : ΞΉ β β) :
ββ i β s, f i * g iβ^2 β€ (β i β s, βf iβ^2) * β i β s, βg iβ^2 := by
calc
_ β€ (β i β s, βf iβ*βg iβ)^2 := by
apply pow_le_pow_leftβ (_root_.norm_nonneg _)
simpa only [norm_mul] using norm_sum_le s (fun i => f i*g i)
_ β€ _ := Finset.sum_mul_sq_le_sq_mul_sq s _ _
lemma Bound.transpose {ΞΉ ΞΈ : Type*} {H : Finset ΞΉ} {S : Finset ΞΈ}
{Ο : ΞΉ β ΞΈ β β} {K : β} (hK : 0 β€ K) (h : Bound H S Ο K) :
Bound S H (fun a b => Ο b a) K := by
intro u
let v : ΞΈ β β := fun a => β b β H, u b * Ο b a
let E : β := β a β S, βv aβ^2
have hE : 0 β€ E := Finset.sum_nonneg fun _ _ => sq_nonneg _
have he : (E : β) = β b β H, u b * β a β S, star (v a) * Ο b a := by
change ((β a β S, βv aβ^2 : β) : β) = _
push_cast
have hn (a : ΞΈ) : (βv aβ : β)^2 = v a * star (v a) := by
rw [Complex.star_def, Complex.mul_conj, Complex.normSq_eq_norm_sq, Complex.ofReal_pow]
simp_rw [hn]
dsimp only [v] at *
simp only [Finset.mul_sum, Finset.sum_mul]
rw [Finset.sum_comm]
apply Finset.sum_congr rfl
intro b hb
apply Finset.sum_congr rfl
intro a ha
ring
have hc := sum_mul_norm_sq H u (fun b => β a β S, star (v a) * Ο b a)
have hop := h (fun a => star (v a))
simp only [norm_star] at hop
have hc' : E^2 β€ (β b β H, βu bβ^2) * (K * E) := by
rw [β he, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg hE] at hc
exact hc.trans (mul_le_mul_of_nonneg_left hop (Finset.sum_nonneg fun _ _ => sq_nonneg _))
change E β€ K * β b β H, βu bβ^2
by_cases hE0 : E = 0
Β· rw [hE0]
exact mul_nonneg hK (Finset.sum_nonneg fun _ _ => sq_nonneg _)
Β· apply (mul_le_mul_iff_rightβ (lt_of_le_of_ne hE (Ne.symm hE0))).mp
calc
E*E = E^2 := by ring
_ β€ (β b β H, βu bβ^2) * (K*E) := hc'
_ = E*(K*β b β H, βu bβ^2) := by ring
end SieveOperator
end CubicFirstMoment
end
end OAI
|