Datasets:

Modalities:
Text
Formats:
json
Size:
< 1K
License:
DAPS-Blueprint / full_collection /LeanAPAP.jsonl
zxclara010's picture
Name full collection and document query splits
989cdb8 verified
Raw History Blame Contribute Delete
129 kB
{"id":"dissociated","label":"dissociated","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We say that \\(A\\subseteq G\\) is dissociated if, for any \\(m\\geq 1\\), and any \\(x\\in G\\), there is at most one \\(A'\\subset A\\) of size \\(\\left\\lvert A'\\right\\rvert =m\\) such that \\[ \\sum _{a\\in A'}a=x. \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/AddDissociated","latex_link":"sect0001.html#dissociated","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/AddDissociated","lean_decl_name":"AddDissociated","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"./LeanAPAP/Prereqs/Chang.lean","lean4_code":"lemma AddDissociated.boringEnergy_le [MeasurableSpace G] [DiscreteMeasurableSpace G] [DecidableEq G]\n {s : Finset G} (hs : AddDissociated (s : Set G)) (n : ℕ) :\n boringEnergy n s ≤ changConst ^ n * n ^ n * #s ^ n := by\n obtain rfl | hn := eq_or_ne n 0\n · simp\n calc\n _ = (‖dft (𝟭 s)‖ₙ_[↑(2 * n)] ^ (2 * n) : ℝ) := by rw [cLpNorm_dft_indicate_pow]\n _ ≤ (4 * rexp 2⁻¹ * sqrt ↑(2 * n) * ‖dft (𝟭 s)‖ₙ_[2]) ^ (2 * n) := by\n gcongr\n refine rudin_ineq (le_mul_of_one_le_right zero_le_two <| Nat.one_le_iff_ne_zero.2 hn)\n (dft (𝟭_[ℂ] s)) ?_\n rwa [cft_dft, support_comp_eq_preimage, support_indicate, Set.preimage_comp,\n Set.neg_preimage, addDissociated_neg, AddEquiv.addDissociated_preimage]\n _ = _ := by\n simp_rw [mul_pow, pow_mul, cL2Norm_dft_indicate]\n rw [← exp_nsmul, sq_sqrt (by positivity), sq_sqrt (by positivity)]\n simp_rw [← mul_pow]\n simp [changConst]\n ring_nf\n\nlocal notation:70 s:70 \" ^^ \" n:71 => Fintype.piFinset fun _ : Fin n ↦ s\n\nvariable [MeasurableSpace G] [DiscreteMeasurableSpace G]\n\nprivate lemma α_le_one (f : G → ℂ) : ‖f‖_[1] ^ 2 / ‖f‖_[2] ^ 2 / card G ≤ 1 := by\n refine div_le_one_of_le₀ (div_le_of_le_mul₀ ?_ ?_ ?_) ?_\n any_goals positivity\n rw [dL1Norm_eq_sum_nnnorm, dL2Norm_sq_eq_sum_nnnorm, ← NNReal.coe_le_coe]\n push_cast\n exact sq_sum_le_card_mul_sum_sq\n\n","line":57,"end_line":87,"proof_status":"formalized"}
{"id":"rudin_exp","label":"rudin_exp","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["dissociated","mzi_complex"],"nlp_text":"If the discrete Fourier transform of \\(f : G \\longrightarrow \\mathbb {C}\\) has dissociated support, then \\[ \\mathop{ \\mathchoice {\\vcenter {\\hbox{{\\@tempdima +4\\p@ \\@tempdima 2.0002\\@tempdima \\divide \\@tempdima \\p@ \\@tempcnta \\@tempdima \\@tempdimb \\f@size \\p@ \\def\\@tempa {1.09545}\\@whilenum {\\@tempcnta {\\gt}\\z@ }\\do {\\advance \\m@ne \\@tempdimb 1.09545\\@tempdimb }\\PackageWarning{relsize}{Font size ??? is too small.\\MessageBreak Using 999pt instead}\\@tempdimb =999pt\\def\\@tempa {\\relax }\\@tempdima -\\@m \\p@ \\let\\rs@size \\rs@lookup \\@tempdima 100\\@tempdima }\\relax $\\mathbb {E}$}}} {\\kern 0pt\\mathbb {E}} {\\kern 0pt\\mathbb {E}} {\\kern 0pt\\mathbb {E}} }\\displaylimits \\exp (\\Re f) \\le \\exp \\left(\\frac{\\lVert f\\rVert _2^2}2\\right) \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/rudin_exp_ineq","latex_link":"sect0001.html#rudin_exp","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/rudin_exp_ineq","lean_decl_name":"rudin_exp_ineq","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Prereqs/Rudin.lean","lean4_code":"/-- **Rudin's inequality**, exponential form. -/\nlemma rudin_exp_ineq (f : G → ℂ) (hf : AddDissociated <| support <| cft f) :\n 𝔼 a, exp (f a).re ≤ exp (‖f‖ₙ_[2] ^ 2 / 2) := by\n have (z : ℂ) : exp (re z) ≤ cosh ‖z‖ + re (z / ‖z‖) * sinh ‖z‖ :=\n calc\n _ = _ := by obtain rfl | hz := eq_or_ne z 0 <;> simp [*]\n _ ≤ _ := exp_mul_le_cosh_add_mul_sinh (by simpa using z.abs_re_div_norm_le_one) _\n choose c hc hcf using fun ψ ↦ Complex.exists_norm_mul_eq_self (cft f ψ)\n have hc₀ (ψ) : c ψ ≠ 0 := fun h ↦ by simpa [h] using hc ψ\n have (a : G) :\n exp (f a).re ≤ ∏ ψ, (cosh ‖cft f ψ‖ + (c ψ * sinh ‖cft f ψ‖ * ψ a).re) :=\n calc\n _ = ∏ ψ, exp ((cft f ψ * ψ a).re) := by simp_rw [← exp_sum, ← Complex.re_sum, cft_inversion]\n _ ≤ _ := prod_le_prod (fun _ _ ↦ by positivity) fun _ _ ↦ this _\n _ = ∏ ψ, (cosh ‖cft f ψ‖ + (c ψ * (cft f ψ * ψ a)\n / (c ψ * ↑‖cft f ψ‖)).re * sinh ‖cft f ψ‖) := by\n simp_rw [norm_mul, AddChar.norm_apply, mul_one, mul_div_mul_left _ _ (hc₀ _)]\n _ = _ := by\n congr with ψ\n obtain hψ | hψ := eq_or_ne (cft f ψ) 0\n · simp [hψ]\n · simp only [hcf, mul_left_comm (c _), mul_div_cancel_left₀ _ hψ, ← Complex.re_mul_ofReal,\n mul_right_comm]\n calc\n _ ≤ 𝔼 a, ∏ ψ, (cosh ‖cft f ψ‖ + (c ψ * sinh ‖cft f ψ‖ * ψ a).re) :=\n expect_le_expect fun _ _ ↦ this _\n _ = ∏ ψ, cosh ‖cft f ψ‖ :=\n AddDissociated.randomisation _ _ <| by simpa [-Complex.ofReal_sinh, hc₀]\n _ ≤ ∏ ψ, exp (‖cft f ψ‖ ^ 2 / 2) :=\n prod_le_prod (fun _ _ ↦ by positivity) fun _ _ ↦ cosh_le_exp_half_sq _\n _ = _ := by simp_rw [← exp_sum, ← sum_div, ← dL2Norm_cft, dL2Norm_sq_eq_sum_norm]\n","line":20,"end_line":50,"proof_status":"formalized"}
{"id":"diss_span","label":"diss_span","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["dissociated"],"nlp_text":"If \\(A\\subseteq G\\) contains no dissociated set with \\(\\geq K+1\\) elements, then there is \\(A'\\subseteq A\\) of size \\(\\left\\lvert A'\\right\\rvert \\le K\\) such that \\[ A\\subseteq \\left\\{ \\sum _{a\\in A'}c_aa : c_a\\in \\{ -1,0,1\\} \\right\\} . \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/Finset.exists_subset_addSpan_card_le_of_forall_addDissociated","latex_link":"sect0001.html#diss_span","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/Finset.exists_subset_addSpan_card_le_of_forall_addDissociated","lean_decl_name":"Finset.exists_subset_addSpan_card_le_of_forall_addDissociated","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/leanprover-community/mathlib4/a3a10db0e9d66acbebf76c5e6a135066525ac900/Mathlib/Combinatorics/Additive/Dissociation.lean","lean4_code":"@[to_additive /-- If every dissociated subset of `s` has size at most `d`, then `s` is actually\ngenerated by a subset of size at most `d`.\n\nThis is a dissociation analog of the fact that a set whose linearly independent subspaces all have\nsize at most `d` is of dimension at most `d` itself. -/]","line":130,"end_line":134,"proof_status":"formalized"}
{"id":"rudin","label":"rudin","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["rudin_exp"],"nlp_text":"If the discrete Fourier transform of \\(f : G \\longrightarrow \\mathbb {C}\\) has dissociated support and \\(p \\ge 2\\) is an integer, then \\(\\lVert f\\rVert _p \\le 4\\sqrt{pe} \\lVert f\\rVert _2\\).","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/rudin_ineq","latex_link":"sect0001.html#rudin","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/rudin_ineq","lean_decl_name":"rudin_ineq","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Prereqs/Rudin.lean","lean4_code":"/-- **Rudin's inequality**, usual form. -/\nlemma rudin_ineq (hp : 2 ≤ p) (f : G → ℂ) (hf : AddDissociated <| support <| cft f) :\n ‖f‖ₙ_[p] ≤ 4 * exp 2⁻¹ * sqrt p * ‖f‖ₙ_[2] := by\n have hp₁ : (1 : ℝ≥0∞) ≤ p := by exact_mod_cast one_le_two.trans hp\n calc\n (‖f‖ₙ_[p] : ℝ) = ‖(fun a ↦ ((f a).re : ℂ)) + I • (fun a ↦ ((f a).im : ℂ))‖ₙ_[p]\n := by congr with a; simp [mul_comm I]\n _ ≤ ‖fun a ↦ ((f a).re : ℂ)‖ₙ_[p] + ‖I • (fun a ↦ ((f a).im : ℂ))‖ₙ_[p]\n := cLpNorm_add_le hp₁\n _ = ‖re ∘ f‖ₙ_[p] + ‖re ∘ ((-I) • f)‖ₙ_[p] := by\n rw [cLpNorm_const_smul, Complex.nnnorm_I, one_mul, ← Complex.cLpNorm_coe_comp,\n ← Complex.cLpNorm_coe_comp]\n congr\n ext a : 1\n simp\n _ ≤ 2 * exp 2⁻¹ * sqrt p * ‖f‖ₙ_[2] + 2 * exp 2⁻¹ * sqrt p * ‖(-I) • f‖ₙ_[2]\n := add_le_add (rudin_ineq_aux hp _ hf) <| rudin_ineq_aux hp _ <| by\n rwa [cft_smul, support_const_smul_of_ne_zero]; simp\n _ = 4 * exp 2⁻¹ * sqrt p * ‖f‖ₙ_[2] := by\n rw [cLpNorm_const_smul, nnnorm_neg, Complex.nnnorm_I, one_mul]; ring\n","line":90,"end_line":109,"proof_status":"formalized"}
{"id":"chang","label":"chang","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["diss_span","diss_energy","spec_hoelder"],"nlp_text":"Let \\(G\\) be a finite abelian group and \\(f:G\\to \\mathbb {C}\\). Let \\(\\eta {\\gt}0\\) and \\(\\alpha =N^{-1}\\lVert f\\rVert _1^2/\\lVert f\\rVert _2^2\\). There exists some \\(\\Delta \\subseteq \\Delta _\\eta (f)\\) such that \\[ \\left\\lvert \\Delta \\right\\rvert \\le \\lceil e\\mathcal{L}(\\alpha )\\eta ^{-2}\\rceil \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/chang","latex_link":"sect0001.html#chang","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/chang","lean_decl_name":"chang","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Prereqs/Chang.lean","lean4_code":"lemma chang (hf : f ≠ 0) (hη : 0 < η) :\n ∃ Δ, Δ ⊆ largeSpec f η ∧\n #Δ ≤ ⌈changConst * exp 1 * ⌈𝓛 ↑(‖f‖_[1] ^ 2 / ‖f‖_[2] ^ 2 / card G)⌉₊ / η ^ 2⌉₊ ∧\n largeSpec f η ⊆ Δ.addSpan := by\n refine exists_subset_addSpan_card_le_of_forall_addDissociated fun Δ hΔη hΔ ↦ ?_\n obtain hΔ' | hΔ' := eq_zero_or_pos #Δ\n · simp [hΔ']\n let α := ‖f‖_[1] ^ 2 / ‖f‖_[2] ^ 2 / card G\n have : 0 < α := by positivity\n set β := ⌈𝓛 α⌉₊\n have hβ : 0 < β := Nat.ceil_pos.2 (curlog_pos (by positivity) <| α_le_one _)\n have : 0 < ‖f‖_[1] := by positivity\n refine le_of_pow_le_pow_left₀ hβ.ne' zero_le' <| Nat.cast_le.1 <| le_of_mul_le_mul_right ?_\n (by positivity : 0 < #Δ ^ β * (η ^ (2 * β) * α))\n push_cast\n rw [← mul_assoc, ← pow_add, ← two_mul]\n refine ((spec_hoelder hη.le hΔη hβ.ne').trans <| hΔ.boringEnergy_le _).trans ?_\n refine le_trans ?_ <| mul_le_mul_of_nonneg_right (pow_le_pow_left₀ ?_ (Nat.le_ceil _) _) ?_\n any_goals positivity\n rw [mul_right_comm, div_pow, mul_pow, mul_pow, exp_one_pow, ← pow_mul, mul_div_assoc]\n calc\n _ = (changConst * #Δ * β) ^ β := by ring\n _ ≤ (changConst * #Δ * β) ^ β * (α * exp β) := ?_\n _ ≤ (changConst * #Δ * β) ^ β * ((η / η) ^ (2 * β) * α * exp β) := by\n rw [div_self hη.ne', one_pow, one_mul]\n _ = _ := by ring\n refine le_mul_of_one_le_right (by positivity) ?_\n rw [← inv_le_iff_one_le_mul₀' (by positivity)]\n calc\n α⁻¹ = exp (0 + log α⁻¹) := by\n rw [zero_add, exp_log]\n · norm_cast\n · positivity\n _ ≤ exp ⌈0 + log α⁻¹⌉₊ := by gcongr; exact Nat.le_ceil _\n _ ≤ exp β := by unfold β; gcongr; exact zero_le_one\n","line":167,"end_line":202,"proof_status":"formalized"}
{"id":"diss_energy","label":"diss_energy","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["rudin","energy_alt"],"nlp_text":"If \\(A\\subseteq G\\) is dissociated then \\(E_{2m}(A) \\le (32e m \\left\\lvert A\\right\\rvert )^m\\).","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/AddDissociated.boringEnergy_le","latex_link":"sect0001.html#diss_energy","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/AddDissociated.boringEnergy_le","lean_decl_name":"AddDissociated.boringEnergy_le","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/YaelDillies/LeanAPAP/96167d24d9724269561f5f1ed7d29d779157e4da/LeanAPAP/Prereqs/Chang.lean","lean4_code":"lemma AddDissociated.boringEnergy_le [MeasurableSpace G] [DiscreteMeasurableSpace G] [DecidableEq G]\n [Finite G] {s : Finset G} (hs : AddDissociated (s : Set G)) (n : ℕ) :\n boringEnergy n s ≤ changConst ^ n * n ^ n * #s ^ n := by\n cases nonempty_fintype G\n obtain rfl | hn := eq_or_ne n 0\n · simp\n calc\n _ = (‖dft (𝟭 s)‖ₙ_[↑(2 * n)] ^ (2 * n) : ℝ) := by rw [cLpNorm_dft_indicate_pow]\n _ ≤ (4 * rexp 2⁻¹ * sqrt ↑(2 * n) * ‖dft (𝟭 s)‖ₙ_[2]) ^ (2 * n) := by\n gcongr\n refine rudin_ineq (le_mul_of_one_le_right zero_le_two <| Nat.one_le_iff_ne_zero.2 hn)\n (dft (𝟭_[ℂ] s)) ?_\n rwa [cft_dft, support_comp_eq_preimage, support_indicate, Set.preimage_comp,\n Set.neg_preimage, addDissociated_neg, AddEquiv.addDissociated_preimage]\n _ = _ := by\n simp_rw [mul_pow, pow_mul, cL2Norm_dft_indicate]\n rw [← exp_nsmul, sq_sqrt (by positivity), sq_sqrt (by positivity)]\n simp_rw [← mul_pow]\n simp [changConst]\n ring_nf","line":57,"end_line":76,"proof_status":"formalized"}
{"id":"ap_in_ff","label":"ap_in_ff","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["chang","linfty_ap_boosted"],"nlp_text":"If \\(A_1,A_2,S\\subseteq \\mathbb {F}_q^n\\) are such that \\(A_1\\) and \\(A_2\\) both have density at least \\(\\alpha \\) then there is a subspace \\(V\\) of codimension \\[ \\mathrm{codim}(V)\\leq 2^{27}\\mathcal{L}{(}\\alpha )^2\\mathcal{L}{(}\\epsilon \\alpha )^2\\epsilon ^{-2} \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/ap_in_ff","latex_link":"sect0004.html#ap_in_ff","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/ap_in_ff","lean_decl_name":"ap_in_ff","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/FiniteField.lean","lean4_code":"lemma ap_in_ff [DecidableEq G] (hq₃ : 3 ≤ q) (hq : q.Prime) (hα₀ : 0 < α) (hα₂ : α ≤ 2⁻¹)\n (hε₀ : 0 < ε) (hε₁ : ε ≤ 1) (hαA₁ : α ≤ A₁.dens) (hαA₂ : α ≤ A₂.dens) :\n ∃ (V : Submodule (ZMod q) G) (_ : DecidablePred (· ∈ V)),\n ↑(finrank (ZMod q) G - finrank (ZMod q) V) ≤ 2 ^ 32 * 𝓛 α ^ 2 * 𝓛 (ε * α) ^ 2 * ε⁻¹ ^ 2 ∧\n |∑ x ∈ S, (μ (Set.toFinset V) ∗ μ A₁ ∗ μ A₂) x - ∑ x ∈ S, (μ A₁ ∗ μ A₂) x| ≤ ε := by\n classical\n let _ : MeasurableSpace G := ⊤\n have : Fact (1 < q) := sorry\n have : DiscreteMeasurableSpace G := ⟨fun _ ↦ trivial⟩\n have hA₁ : A₁.Nonempty := by simpa using hα₀.trans_le hαA₁\n have hA₂ : A₂.Nonempty := by simpa using hα₀.trans_le hαA₂\n have hα₁ : α ≤ 1 := hαA₁.trans <| mod_cast A₁.dens_le_one\n have : 0 ≤ log α⁻¹ := by bound\n have : 0 ≤ log (ε * α)⁻¹ := by bound\n obtain rfl | hS := S.eq_empty_or_nonempty\n · exact ⟨⊤, inferInstance, by simp [hε₀.le]; positivity⟩\n have hA₁ : σ[A₁, univ] ≤ α⁻¹ :=\n calc\n _ ≤ (A₁.dens⁻¹ : ℝ) := by norm_cast; exact addConst_le_inv_dens\n _ ≤ α⁻¹ := by gcongr\n let k : ℕ := ⌈𝓛 (ε * α / 4)⌉₊\n have hk₀ : 0 < k := Nat.ceil_pos.2 <| curlog_pos (by positivity) <|\n calc\n ε * α / 4 ≤ ε * 1 / 4 := by gcongr\n _ ≤ 1 := by linarith\n obtain ⟨T, hTcard, hTε⟩ := AlmostPeriodicity.linfty_almost_periodicity_boosted ε hε₀ hε₁ k\n (by positivity) (le_inv_of_le_inv₀ (by positivity) hα₂) hA₁ univ_nonempty S A₂ hS hA₂\n have hT : 0 < (#T : ℝ) := hTcard.trans_lt' (by positivity)\n replace hT : T.Nonempty := by simpa using hT\n let Δ := largeSpec (μ T) 2⁻¹\n let V : Submodule (ZMod q) G := AddSubgroup.toZModSubmodule _ <| ⨅ γ ∈ Δ, γ.toAddMonoidHom.ker\n let V' : Finset G := Set.toFinset V\n refine ⟨V, inferInstance, ?_, ?_⟩\n · obtain ⟨Δ', hΔ'Δ, hΔ'card, hfΔ'⟩ : ∃ Δ' ⊆ Δ, _ := chang (mu_ne_zero.2 hT) (by norm_num)\n let W : Submodule (ZMod q) G := AddSubgroup.toZModSubmodule _ <| ⨅ γ ∈ Δ', γ.toAddMonoidHom.ker\n have mem_W {x} : x ∈ W ↔ ∀ γ ∈ Δ', γ x = 1 := by simp [W]\n have hWV : W ≤ V := by sorry\n have :=\n calc\n log T.dens⁻¹ ≤ log (α⁻¹ ^ (-4096 * ⌈𝓛 (min 1 (#A₂ / #S))⌉ * k ^ 2 / ε ^ 2))⁻¹ := by\n gcongr; rwa [nnratCast_dens, le_div_iff₀]; positivity\n _ = 2 ^ 12 * log α⁻¹ * ⌈𝓛 (min 1 (#A₂ / #S))⌉ * k ^ 2 / ε ^ 2 := by\n rw [log_inv, log_rpow (by positivity)]; ring_nf\n _ ≤ 2 ^ 12 * log α⁻¹ * ⌈𝓛 (min 1 A₂.dens)⌉ * k ^ 2 / ε ^ 2 := by\n rw [nnratCast_dens, ← card_univ]; gcongr; exact S.subset_univ\n _ ≤ 2 ^ 12 * log α⁻¹ * ⌈𝓛 (min 1 α)⌉ * (k) ^ 2 / ε ^ 2 := by gcongr\n _ = 2 ^ 12 * log α⁻¹ * ⌈𝓛 α⌉ * k ^ 2 / ε ^ 2 := by rw [min_eq_right hα₁]\n _ ≤ 2 ^ 12 * 𝓛 α * (2 * 𝓛 α) * (2 ^ 3 * 𝓛 (ε * α)) ^ 2 / ε ^ 2 := by\n gcongr\n · exact le_add_of_nonneg_left zero_le_one\n · exact Int.ceil_le_two_mul <| two_inv_lt_one.le.trans <| one_le_curlog hα₀.le hα₁\n · calc\n k ≤ 2 * 𝓛 (ε * α / 4) :=\n Nat.ceil_le_two_mul <| two_inv_lt_one.le.trans <| one_le_curlog (by positivity)\n sorry\n _ ≤ 2 * (4 * 𝓛 (ε * α)) := by\n gcongr\n exact curlog_div_le (by positivity) (mul_le_one₀ hε₁ hα₀.le hα₁) (by norm_num)\n _ = 2 ^ 3 * 𝓛 (ε * α) := by ring\n _ = 2 ^ 19 * 𝓛 α ^ 2 * 𝓛 (ε * α) ^ 2 * ε⁻¹ ^ 2 := by ring_nf\n calc\n (↑(finrank (ZMod q) G - finrank (ZMod q) V) : ℝ)\n ≤ ↑(finrank (ZMod q) G - finrank (ZMod q) W) := by\n gcongr; exact Submodule.finrank_mono hWV\n _ ≤ #Δ' := sorry\n _ ≤ ⌈changConst * exp 1 * ⌈𝓛 ↑(‖μ T‖_[1] ^ 2 / ‖μ T‖_[2] ^ 2 / card G)⌉₊ / 2⁻¹ ^ 2⌉₊ := by\n gcongr\n _ = ⌈2 ^ 7 * exp 1 ^ 2 * ⌈𝓛 T.dens⌉₊⌉₊ := by\n simp [hT, ← rpow_mul_natCast, dens, changConst, -exp_one_pow, rpow_neg_one]; ring_nf\n _ ≤ ⌈2 ^ 7 * 2 ^ 3 * (2 * 𝓛 T.dens)⌉₊ := by\n gcongr\n · calc\n exp 1 ^ 2 ≤ 2.7182818286 ^ 2 := by gcongr; exact exp_one_lt_d9.le\n _ ≤ 2 ^ 3 := by norm_num\n · exact Nat.ceil_le_two_mul <| two_inv_lt_one.le.trans <|\n one_le_curlog (by positivity) <| mod_cast T.dens_le_one\n _ = ⌈2 ^ 11 * 𝓛 T.dens⌉₊ := by ring_nf\n _ ≤ 2 * (2 ^ 11 * 𝓛 T.dens) := Nat.ceil_le_two_mul <|\n calc\n (2⁻¹ : ℝ) ≤ 2 ^ 11 * 1 := by norm_num\n _ ≤ 2 ^ 11 * 𝓛 T.dens := by\n gcongr; exact one_le_curlog (by positivity) <| mod_cast T.dens_le_one\n _ = 2 ^ 12 * 𝓛 T.dens := by ring\n _ ≤ 2 ^ 12 * (1 + 2 ^ 19 * 𝓛 α ^ 2 * 𝓛 (ε * α) ^ 2 * ε⁻¹ ^ 2) := by gcongr\n _ ≤ 2 ^ 12 * (2 ^ 19 * 𝓛 α ^ 2 * 𝓛 (ε * α) ^ 2 * ε⁻¹ ^ 2 +\n 2 ^ 19 * 𝓛 α ^ 2 * 𝓛 (ε * α) ^ 2 * ε⁻¹ ^ 2) := by\n gcongr\n sorry\n _ = 2 ^ 32 * 𝓛 α ^ 2 * 𝓛 (ε * α) ^ 2 * ε⁻¹ ^ 2 := by ring\n · have : ∑ x ∈ S, (μ_[ℝ] V' ∗ μ A₁ ∗ μ A₂) x = 𝔼 x ∈ V', (μ A₁ ∗ μ A₂ ○ 𝟭 S) x := by\n have : -V' = V' := by ext; simp [V']\n rw [← mu_wInner_one, ← indicate_wInner_one, conv_rotate,\n ← dconv_wInner_one_eq_wInner_one_conv, wInner_one_dconv_eq_conv_wInner_one, ← conv_conjneg,\n conjneg_mu, this, conv_comm]\n have : ∑ x ∈ S, (μ_[ℝ] A₁ ∗ μ A₂) x = (μ_[ℝ] A₁ ∗ μ A₂ ○ 𝟭 S) 0 := by simp [dconv_indicate]\n sorry\n","line":146,"end_line":241,"proof_status":"statement_formalized"}
{"id":"th-ap-int","label":"th-ap-int","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["chang","linfty_ap","bohr-size","bohr-reg-def"],"nlp_text":"There is a constant \\(c{\\gt}0\\) such that the following holds. Let \\(\\epsilon {\\gt}0\\) and \\(B,B'\\subseteq G\\) be regular Bohr sets of rank \\(d\\). Suppose that \\(A_1\\subseteq B\\) with density \\(\\alpha _1\\) and \\(A_2\\) is such that there exists \\(x\\) with \\(A_2\\subseteq B'-x\\) with density \\(\\alpha _2\\). Let \\(S\\) be any set with \\(\\left\\lvert S\\right\\rvert \\leq 2\\left\\lvert B\\right\\rvert \\). There is a regular Bohr set \\(B''\\subseteq B'\\) of rank at most \\[ d+O_\\epsilon (\\mathcal{L}{\\alpha _1}^3\\mathcal{L}{\\alpha _2}) \\]","doc_url":null,"latex_link":"sect0006.html#th-ap-int","lean_link":null,"lean_decl_name":"th-ap-int","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"}
{"id":"weight_energy","label":"weight_energy","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(\\Delta \\subseteq \\widehat{G}\\) and \\(m\\geq 1\\). Let \\(\\nu :G\\to \\mathbb {C}\\). Then \\[ E_{2m}(\\Delta ;\\nu )=\\sum _{\\gamma _1,\\ldots ,\\gamma _{2m}\\in \\Delta }\\left\\lvert \\widehat{\\nu }(\\gamma _1+\\cdots -\\gamma _{2m})\\right\\rvert . \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/energy","latex_link":"sect0001.html#weight_energy","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/energy","lean_decl_name":"energy","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Prereqs/Energy.lean","lean4_code":"def energy (n : ℕ) (s : Finset G) (ν : G → ℂ) : ℝ :=\n ∑ γ ∈ piFinset fun _ : Fin n ↦ s, ∑ δ ∈ piFinset fun _ : Fin n ↦ s, ‖ν (∑ i, γ i - ∑ i, δ i)‖\n","line":12,"end_line":13,"proof_status":"formalized"}
{"id":"general_hoelder","label":"general_hoelder","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["weight_energy","large_spec"],"nlp_text":"Let \\(G\\) be a finite abelian group and \\(f:G\\to \\mathbb {C}\\). Let \\(\\nu :G\\to \\mathbb {R}_{\\geq 0}\\) be such that whenever \\(\\left\\lvert f\\right\\rvert \\neq 0\\) we have \\(\\nu \\geq 1\\). Let \\(\\Delta \\subseteq \\Delta _\\eta (f)\\). Then, for any \\(m\\geq 1\\). \\[ \\eta ^{2m}\\frac{\\lVert f\\rVert _1^2}{\\lVert f\\rVert _2^2}\\left\\lvert \\Delta \\right\\rvert ^{2m}\\le E_{2m}(\\Delta ;\\nu ). \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/general_hoelder","latex_link":"sect0001.html#general_hoelder","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/general_hoelder","lean_decl_name":"general_hoelder","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Prereqs/Chang.lean","lean4_code":" (hΔ : Δ ⊆ largeSpec f η) (hm : m ≠ 0) :\n #Δ ^ (2 * m) * (η ^ (2 * m) * (‖f‖_[1] ^ 2 / ‖f‖_[2] ^ 2)) ≤\n energy m Δ (dft fun a ↦ ν a) := by\n obtain rfl | hf := eq_or_ne f 0\n · simp\n choose c norm_c hc using fun γ ↦ RCLike.exists_norm_eq_mul_self (dft f γ)\n have :=\n calc\n η * ‖f‖_[1] * #Δ ≤ ∑ γ ∈ Δ, ‖dft f γ‖ := ?_\n _ ≤ ‖∑ x, f x * ∑ γ ∈ Δ, c γ * conj (γ x)‖ := ?_\n _ ≤ ∑ x, ‖f x * ∑ γ ∈ Δ, c γ * conj (γ x)‖ := (norm_sum_le _ _)\n _ = ∑ x, ‖f x‖ * ‖∑ γ ∈ Δ, c γ * conj (γ x)‖ := by simp_rw [norm_mul]\n _ ≤ _ := inner_le_weight_mul_Lp_of_nonneg _ (p := m) ?_ _ _ (fun _ ↦ norm_nonneg _)\n fun _ ↦ norm_nonneg _\n _ = ‖f‖_[1] ^ (1 - (m : ℝ)⁻¹) * (∑ x, ‖f x‖ * ‖∑ γ ∈ Δ, c γ * conj (γ x)‖ ^ m) ^ (m⁻¹ : ℝ) :=\n by simp_rw [dL1Norm_eq_sum_norm, rpow_natCast]\n rotate_left\n · rw [← nsmul_eq_mul']\n exact card_nsmul_le_sum _ _ _ fun x hx ↦ mem_largeSpec.1 <| hΔ hx\n · simp_rw [mul_sum, mul_comm (f _), mul_assoc (c _), @sum_comm _ _ G, ← mul_sum, ← inner_apply',\n ← wInner_one_eq_sum, ← dft_apply, ← hc, ← RCLike.ofReal_sum, RCLike.norm_ofReal]\n exact le_abs_self _\n · norm_cast\n exact hm.bot_lt\n replace this := pow_le_pow_left₀ (by positivity) this m\n simp_rw [mul_pow] at this\n rw [rpow_inv_natCast_pow _ hm, ← rpow_mul_natCast, one_sub_mul,\n inv_mul_cancel₀, ← Nat.cast_pred, rpow_natCast, mul_assoc, mul_left_comm, ← pow_sub_one_mul,\n mul_assoc, mul_le_mul_iff_right₀] at this\n any_goals positivity\n replace hfν : ∀ x, ‖f x‖ ≤ ‖f x‖ * sqrt (ν x) := by\n rintro x\n obtain hfx | hfx := eq_or_ne (f x) 0\n · simp [hfx]\n · exact le_mul_of_one_le_right (norm_nonneg _) <| one_le_sqrt.2 <| NNReal.one_le_coe.2 <|\n hfν _ hfx\n replace this :=\n calc\n (‖f‖_[1] * (η ^ m * #Δ ^ m)) ^ 2\n ≤ (∑ x, ‖f x‖ * ‖∑ γ ∈ Δ, c γ * conj (γ x)‖ ^ m) ^ 2 := by gcongr\n _ ≤ (∑ x, ‖f x‖ * sqrt (ν x) * ‖∑ γ ∈ Δ, c γ * conj (γ x)‖ ^ m) ^ 2 := by\n gcongr with x; exact hfν _\n _ = (∑ x, ‖f x‖ * (sqrt (ν x) * ‖∑ γ ∈ Δ, c γ * conj (γ x)‖ ^ m)) ^ 2 := by\n simp_rw [mul_assoc]\n _ ≤ (∑ x, ‖f x‖ ^ 2) * ∑ x, (sqrt (ν x) * ‖∑ γ ∈ Δ, c γ * conj (γ x)‖ ^ m) ^ 2 :=\n sum_mul_sq_le_sq_mul_sq _ _ _\n _ ≤ ‖f‖_[2] ^ 2 * ∑ x, ν x * (‖∑ γ ∈ Δ, c γ * conj (γ x)‖ ^ 2) ^ m := by\n simp_rw [dL2Norm_sq_eq_sum_norm, mul_pow, sq_sqrt (NNReal.coe_nonneg _), pow_right_comm]\n rfl\n rw [mul_rotate', mul_left_comm, mul_pow, mul_pow, ← pow_mul', ← pow_mul',\n ← div_le_iff₀' (by positivity), mul_div_assoc, mul_div_assoc] at this\n calc\n _ ≤ _ := this\n _ = ‖(_ : ℂ)‖ := Eq.symm <| RCLike.norm_of_nonneg <| sum_nonneg fun _ _ ↦ by positivity\n _ = ‖∑ γ ∈ Δ ^^ m, ∑ δ ∈ Δ ^^ m,\n (∏ i, conj (c (γ i)) * c (δ i)) * conj (dft (fun a ↦ ν a) (∑ i, γ i - ∑ i, δ i))‖ := ?_\n _ ≤ ∑ γ ∈ Δ ^^ m, ∑ δ ∈ Δ ^^ m,\n ‖(∏ i, conj (c (γ i)) * c (δ i)) * conj (dft (fun a ↦ ν a) (∑ i, γ i - ∑ i, δ i))‖ :=\n (norm_sum_le _ _).trans <| sum_le_sum fun _ _ ↦ norm_sum_le _ _\n _ = _ := by simp [energy, norm_c, norm_prod]\n · push_cast\n simp_rw [← RCLike.conj_mul, dft_apply, wInner_one_eq_sum, inner_apply', map_sum, map_mul,\n RCLike.conj_conj, mul_pow, sum_pow', sum_mul, mul_sum, @sum_comm _ _ G,\n ← AddChar.inv_apply_eq_conj, ← AddChar.neg_apply', prod_mul_prod_comm, ← AddChar.add_apply,\n ← AddChar.sum_apply, mul_left_comm (Algebra.cast (ν _ : ℝ) : ℂ), ← mul_sum, ← sub_eq_add_neg,\n sum_sub_distrib, Complex.conj_ofReal, mul_comm (Algebra.cast (ν _ : ℝ) : ℂ)]\n rfl\n\n","line":89,"end_line":156,"proof_status":"formalized"}
{"id":"energy","label":"energy","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["weight_energy"],"nlp_text":"Let \\(G\\) be a finite abelian group and \\(A\\subseteq G\\). Let \\(m\\geq 1\\). We define \\[ E_{2m}(A)=\\sum _{a_1,\\ldots ,a_{2m}\\in A}1_{a_1+\\cdots -a_{2m}=0}. \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/boringEnergy","latex_link":"sect0001.html#energy","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/boringEnergy","lean_decl_name":"boringEnergy","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Prereqs/Energy.lean","lean4_code":"def boringEnergy (n : ℕ) (s : Finset G) : ℝ := energy n s trivChar\n","line":28,"end_line":28,"proof_status":"formalized"}
{"id":"spec_hoelder","label":"spec_hoelder","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["general_hoelder","energy"],"nlp_text":"Let \\(G\\) be a finite abelian group and \\(f:G\\to \\mathbb {C}\\). Let \\(\\Delta \\subseteq \\Delta _\\eta (f)\\). Then, for any \\(m\\geq 1\\). \\[ N^{-1}\\eta ^{2m}\\frac{\\lVert f\\rVert _1^2}{\\lVert f\\rVert _2^2}\\left\\lvert \\Delta \\right\\rvert ^{2m}\\le E_{2m}(\\Delta ). \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/spec_hoelder","latex_link":"sect0001.html#spec_hoelder","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/spec_hoelder","lean_decl_name":"spec_hoelder","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Prereqs/Chang.lean","lean4_code":" #Δ ^ (2 * m) * (η ^ (2 * m) * (‖f‖_[1] ^ 2 / ‖f‖_[2] ^ 2 / card G)) ≤ boringEnergy m Δ := by\n have hG : (0 : ℝ) < card G := by positivity\n simpa [boringEnergy, mul_assoc, ← Pi.one_def, ← mul_div_right_comm, ← mul_div_assoc,\n div_le_iff₀ hG, energy_nsmul, -nsmul_eq_mul, ← nsmul_eq_mul'] using\n general_hoelder hη 1 (fun (_ : G) _ ↦ le_rfl) hΔ hm\n\n","line":160,"end_line":165,"proof_status":"formalized"}
{"id":"energy_alt","label":"energy_alt","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["energy"],"nlp_text":"If \\(A\\subset G\\) and \\(m\\geq 1\\) then \\[ E_{2m}(A) = \\sum _x 1_A^{(m)}(x)^2. \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/boringEnergy_eq","latex_link":"sect0001.html#energy_alt","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/boringEnergy_eq","lean_decl_name":"boringEnergy_eq","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Prereqs/Energy.lean","lean4_code":"variable [Fintype G]\n\nlemma boringEnergy_eq (n : ℕ) (s : Finset G) : boringEnergy n s = ∑ x, (𝟭 s ∗^ n) x ^ 2 := by\n classical\n simp only [boringEnergy, energy, apply_ite norm, trivChar_apply, norm_one, norm_zero, sum_boole,\n sub_eq_zero]\n rw [← Finset.sum_fiberwise _ fun f : Fin n → G ↦ ∑ i, f i]\n congr with x\n rw [indicate_iterConv_apply, sq, ← nsmul_eq_mul, ← sum_const]\n refine sum_congr rfl fun f hf ↦ ?_\n","line":32,"end_line":41,"proof_status":"formalized"}
{"id":"mzi_complex","label":"mzi_complex","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["mzi"],"nlp_text":"Let \\(m\\geq 1\\). If \\(f:G\\to \\mathbb {C}\\) is such that \\(\\mathbb {E}_x f(x)=0\\) and \\(\\left\\lvert f(x)\\right\\rvert \\leq 2\\) for all \\(x\\) then \\[ \\mathbb {E}_{x_1,\\ldots ,x_n} \\left\\lvert \\sum _{i=1}^n f(x_i)\\right\\rvert ^{2m} \\leq (8mn)^{m}. \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/RCLike.marcinkiewicz_zygmund","latex_link":"chap-ap.html#mzi_complex","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/RCLike.marcinkiewicz_zygmund","lean_decl_name":"RCLike.marcinkiewicz_zygmund","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Prereqs/MarcinkiewiczZygmund.lean","lean4_code":"/-- The **Marcinkiewicz-Zygmund inequality** for real-valued functions, with a slightly better\nconstant than `Real.marcinkiewicz_zygmund`. -/\ntheorem marcinkiewicz_zygmund' (m : ℕ) (f : ι → ℝ) (hf : ∀ i, ∑ a ∈ A ^^ n, f (a i) = 0) :\n ∑ a ∈ A ^^ n, (∑ i, f (a i)) ^ (2 * m) ≤\n (4 * m) ^ m * ∑ a ∈ A ^^ n, (∑ i, f (a i) ^ 2) ^ m := by\n obtain rfl | hm := m.eq_zero_or_pos\n · simp\n have hm' : 1 ≤ m := by rwa [Nat.succ_le_iff]\n obtain rfl | hA := A.eq_empty_or_nonempty\n · cases n <;> cases m <;> simp\n let B := A ^^ n\n calc\n ∑ a ∈ B, (∑ i, f (a i)) ^ (2 * m)\n ≤ ∑ a ∈ A ^^ n, (∑ b ∈ B, |∑ i, (f (a i) - f (b i))| ^ (2 * m)) / #A ^ n := by\n gcongr; simpa [pow_mul, sq_abs] using step_one' hA f hf (2 * m) _\n _ = (∑ a ∈ A ^^ n, ∑ b ∈ A ^^ n, ∑ k ∈ piAntidiag univ (2 * m) with ∀ i, 2 ∣ k i,\n multinomial univ (fun i ↦ k i) * ∏ t, (f (a t) - f (b t)) ^ k t) / #A ^ n := by\n rw [← sum_div]\n simp only [pow_mul, sq_abs]\n simp only [← pow_mul]\n rw [step_two, step_three, mul_comm, inv_pow, ← div_eq_mul_inv, div_div]\n simp only [step_four, mul_ite, mul_zero, mul_one, ← sum_filter, ← sum_mul, even_iff_two_dvd]\n rw [mul_comm, mul_div_mul_left]\n positivity\n _ = (∑ a ∈ A ^^ n, ∑ b ∈ A ^^ n, ∑ k ∈ (piAntidiag univ m).map\n ⟨(2 • ·), fun _ _ h ↦ funext fun i ↦ mul_right_injective₀ two_ne_zero (congr_fun h i)⟩,\n multinomial univ (fun i ↦ k i) * ∏ t, (f (a t) - f (b t)) ^ k t) / #A ^ n := by\n rw [map_nsmul_piAntidiag_univ m (ι := Fin n) (n := 2) two_ne_zero]\n _ = (∑ a ∈ A ^^ n, ∑ b ∈ A ^^ n, ∑ k ∈ piAntidiag univ m,\n multinomial univ (fun i ↦ 2 * k i) * ∏ t, (f (a t) - f (b t)) ^ (2 * k t)) / #A ^ n := by\n simp\n _ ≤ _ := end_step hm' hA\n","line":182,"end_line":213,"proof_status":"formalized"}
{"id":"random_approx_expect","label":"random_approx_expect","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["mzi_complex"],"nlp_text":"Let \\(\\epsilon {\\gt}0\\) and \\(m\\geq 1\\). Let \\(A\\subseteq G\\) and \\(f:G\\to \\mathbb {C}\\). If \\(k\\geq 64m\\epsilon ^{-2}\\) then the set \\[ L = \\{ {\\vec{a}}\\in A^k : \\| \\tfrac {1}{k}\\sum _{i=1}^k f(x-a_i)-\\mu _A\\ast f\\| _{2m} \\le \\epsilon \\| f\\| _{2m}\\} . \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/AlmostPeriodicity.lemma28","latex_link":"chap-ap.html#random_approx_expect","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/AlmostPeriodicity.lemma28","lean_decl_name":"AlmostPeriodicity.lemma28","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Physics/AlmostPeriodicity.lean","lean4_code":"lemma lemma28 (hε : 0 < ε) (hm : 1 ≤ m) (hk : (64 : ℝ) * m / ε ^ 2 ≤ k) :\n (#A ^ k : ℝ) / 2 ≤ #(l k m ε f A) := by\n have : 0 < k := by\n rw [← @Nat.cast_pos ℝ]\n refine hk.trans_lt' ?_\n refine div_pos (mul_pos (by norm_num1) ?_) (pow_pos hε _)\n rw [Nat.cast_pos, ← Nat.succ_le_iff]\n exact hm\n rcases A.eq_empty_or_nonempty with (rfl | hA)\n · simp [zero_pow this.ne']\n refine lemma28_markov hε hm ?_\n have hm' : 2 * m ≠ 0 := by linarith\n have hmeq : ((2 * m : ℕ) : ℝ≥0∞) = 2 * m := by rw [Nat.cast_mul, Nat.cast_two]\n rw [← hmeq, mul_pow]\n simp only [dLpNorm_pow_eq_sum_norm hm']\n rw [sum_comm]\n have : ∀ x : G, ∑ a ∈ A ^^ k,\n ‖∑ i, f (x - a i) - (k • (mu A ∗ f)) x‖ ^ (2 * m) ≤\n (8 * m) ^ m * k ^ (m - 1) *\n ∑ a ∈ A ^^ k, ∑ i, ‖f (x - a i) - (mu A ∗ f) x‖ ^ (2 * m) :=\n lemma28_part_one hm\n refine (sum_le_sum fun x _ ↦ this x).trans ?_\n rw [← mul_sum]\n simp only [@sum_comm _ _ G]\n have (a : Fin k → G) (i : Fin k) :\n ∑ x, ‖f (x - a i) - (mu A ∗ f) x‖ ^ (2 * m) = ‖τ (a i) f - mu A ∗ f‖_[2 * m] ^ (2 * m) := by\n rw [← hmeq, dLpNorm_pow_eq_sum_norm hm']\n simp only [Pi.sub_apply, translate_apply]\n simp only [this]\n have :\n (8 * m) ^ m * k ^ (m - 1) * ∑ a ∈ A ^^ k, ∑ i, ‖τ (a i) f - mu A ∗ f‖_[2 * m] ^ (2 * m) ≤\n (8 * m) ^ m * k ^ (m - 1) * ∑ a ∈ A ^^ k, ∑ i, (2 * ‖f‖_[2 * m]) ^ (2 * m) :=\n lemma28_part_two hm hA\n refine le_trans (mod_cast this) ?_\n simpa [mul_assoc] using lemma28_end hε hm hk\n","line":269,"end_line":303,"proof_status":"formalized"}
{"id":"lp_ap","label":"lp_ap","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["random_approx_expect","aps_in_translates","lots_of_diagonals"],"nlp_text":"Let \\(\\epsilon \\in (0,1]\\) and \\(m\\geq 1\\). Let \\(K\\geq 2\\) and \\(A,S\\subseteq G\\) with \\(\\lvert A+S\\rvert \\leq K\\lvert A\\rvert \\). Let \\(f:G\\to \\mathbb {C}\\). There exists \\(T\\subseteq G\\) such that \\[ \\lvert T\\rvert \\geq K^{-512m\\epsilon ^{-2}}\\lvert S\\rvert \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/AlmostPeriodicity.almost_periodicity","latex_link":"chap-ap.html#lp_ap","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/AlmostPeriodicity.almost_periodicity","lean_decl_name":"AlmostPeriodicity.almost_periodicity","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Physics/AlmostPeriodicity.lean","lean4_code":"lemma almost_periodicity (ε : ℝ) (hε : 0 < ε) (hε' : ε ≤ 1) (m : ℕ) (f : G → ℂ)\n (hK₂ : 2 ≤ K) (hK : σ[A, S] ≤ K) :\n ∃ T : Finset G,\n K ^ (-512 * m / ε ^ 2 : ℝ) * #S ≤ #T ∧\n ∀ t ∈ T, ‖τ t (mu A ∗ f) - mu A ∗ f‖_[2 * m] ≤ ε * ‖f‖_[2 * m] := by\n obtain rfl | hm := m.eq_zero_or_pos\n · exact ⟨S, by simp⟩\n obtain rfl | hA := A.eq_empty_or_nonempty\n · refine ⟨univ, ?_, fun t _ ↦ ?_⟩\n · have : K ^ ((-512 : ℝ) * m / ε ^ 2) ≤ 1 := by\n refine Real.rpow_le_one_of_one_le_of_nonpos (one_le_two.trans hK₂) ?_\n rw [neg_mul, neg_div, Right.neg_nonpos_iff]\n positivity\n refine (mul_le_mul_of_nonneg_right this (Nat.cast_nonneg _)).trans ?_\n rw [one_mul, Nat.cast_le]\n exact card_le_univ _\n simp only [mu_empty, zero_conv, translate_zero_right, sub_self, dLpNorm_zero]\n positivity\n let k := ⌈(64 : ℝ) * m / (ε / 2) ^ 2⌉₊\n have hk : k ≠ 0 := by positivity\n let L := l k m (ε / 2) f A\n have : (#A : ℝ) ^ k / 2 ≤ #L := lemma28 (half_pos hε) hm (Nat.le_ceil _)\n have hL : L.Nonempty := by\n rw [← card_pos, ← @Nat.cast_pos ℝ]\n exact this.trans_lt' (by positivity)\n obtain ⟨a, ha, hL'⟩ := big_shifts S _ hk hL (filter_subset _ _)\n refine ⟨({t | (a + fun _ ↦ -t) ∈ L} : Finset _), ?_, ?_⟩\n · simp_rw [sub_eq_add_neg] at hL'\n exact T_bound hK₂ #L #S #A #(A + S) _ rfl hL' this\n (by rw [← cast_addConst_mul_card]; gcongr) hA.card_pos hε hε' hm\n intro t ht\n simp only [mem_filter, mem_univ, true_and] at ht\n have := just_the_triangle_inequality ha ht hk.bot_lt hm\n rwa [neg_neg, mul_div_cancel₀ _ (two_ne_zero' ℝ)] at this\n","line":374,"end_line":407,"proof_status":"formalized"}
{"id":"linfty_ap","label":"linfty_ap","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["lp_ap"],"nlp_text":"Let \\(\\epsilon \\in (0,1]\\). Let \\(K\\geq 2\\) and \\(A,S\\subseteq G\\) with \\(\\lvert A+S\\rvert \\leq K\\lvert A\\rvert \\). Let \\(B,C\\subseteq G\\). Let \\(\\eta =\\min (1,\\lvert C\\rvert /\\lvert B\\rvert )\\). There exists \\(T\\subseteq G\\) such that \\[ \\lvert T\\rvert \\geq K^{-4096\\lceil \\mathcal{L}{\\eta }\\rceil \\epsilon ^{-2}}\\lvert S\\rvert \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/AlmostPeriodicity.linfty_almost_periodicity","latex_link":"chap-ap.html#linfty_ap","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/AlmostPeriodicity.linfty_almost_periodicity","lean_decl_name":"AlmostPeriodicity.linfty_almost_periodicity","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Physics/AlmostPeriodicity.lean","lean4_code":"theorem linfty_almost_periodicity (ε : ℝ) (hε₀ : 0 < ε) (hε₁ : ε ≤ 1) (hK₂ : 2 ≤ K)\n (hK : σ[A, S] ≤ K) (B C : Finset G) (hB : B.Nonempty) (hC : C.Nonempty) :\n ∃ T : Finset G,\n K ^ (-4096 * ⌈𝓛 (#C / #B)⌉ / ε ^ 2) * #S ≤ #T ∧\n ∀ t ∈ T, ‖τ t (μ_[ℂ] A ∗ 𝟭 B ∗ μ C) - μ A ∗ 𝟭 B ∗ μ C‖_[∞] ≤ ε := by\n let r : ℝ := min 1 (#C / #B)\n set m : ℝ := 𝓛 (#C / #B)\n have hm₀ : 0 < m := curlog_pos (by positivity)\n have hm₁ : 1 ≤ ⌈m⌉₊ := Nat.one_le_iff_ne_zero.2 <| by positivity\n obtain ⟨T, hKT, hT⟩ := almost_periodicity (ε / exp 1) (by positivity)\n (div_le_one_of_le₀ (hε₁.trans <| one_le_exp zero_le_one) <| by positivity) ⌈m⌉₊ (𝟭 B) hK₂ hK\n norm_cast at hT\n set M : ℕ := 2 * ⌈m⌉₊\n have hM₀ : (M : ℝ≥0) ≠ 0 := by positivity\n have hM₁ : 1 < (M : ℝ≥0) := by norm_cast; simp [← Nat.succ_le_iff, M]; linarith\n have hM : (M : ℝ≥0).HolderConjugate _ := NNReal.HolderConjugate.conjExponent hM₁\n have : (M : ℝ≥0∞).HolderConjugate _ := hM.coe_ennreal\n refine ⟨T, ?_, fun t ht ↦ ?_⟩\n · calc\n _ = K ^(-(512 * 8) / ε ^ 2 * ⌈m⌉₊) * #S := by\n rw [mul_div_right_comm, natCast_ceil_eq_intCast_ceil hm₀.le]; norm_num\n _ ≤ K ^(-(512 * exp 1 ^ 2) / ε ^ 2 * ⌈m⌉₊) * #S := by\n gcongr\n · exact one_le_two.trans hK₂\n calc\n _ ≤ (2.7182818286 : ℝ) ^ 2 := by gcongr; exact exp_one_lt_d9.le\n _ ≤ _ := by norm_num\n _ = _ := by simp [div_div_eq_mul_div, ← mul_div_right_comm, mul_right_comm, div_pow]\n _ ≤ _ := hKT\n set F : G → ℂ := τ t (μ A ∗ 𝟭 B) - μ A ∗ 𝟭 B\n have (x : G) :=\n calc\n (τ t (μ A ∗ 𝟭 B ∗ μ C) - μ A ∗ 𝟭 B ∗ μ C : G → ℂ) x\n = (F ∗ μ C) x := by simp [sub_conv, F]\n _ = ∑ y, F y * μ C (x - y) := conv_eq_sum_sub' ..\n _ = ∑ y, F y * μ (x +ᵥ -C) y := by simp [neg_add_eq_sub]\n rw [MeasureTheory.dLinftyNorm_eq_iSup_norm]\n refine ciSup_le fun x ↦ ?_\n calc\n ‖(τ t (μ A ∗ 𝟭 B ∗ μ C) - μ A ∗ 𝟭 B ∗ μ C : G → ℂ) x‖\n = ‖∑ y, F y * μ (x +ᵥ -C) y‖ := by rw [this]\n _ ≤ ∑ y, ‖F y * μ (x +ᵥ -C) y‖ := norm_sum_le _ _\n _ = ‖F * μ (x +ᵥ -C)‖_[1] := by rw [MeasureTheory.dL1Norm_eq_sum_norm]; rfl\n _ ≤ ‖F‖_[M] * ‖μ_[ℂ] (x +ᵥ -C)‖_[NNReal.conjExponent M] := MeasureTheory.dL1Norm_mul_le _ _\n _ ≤ ε / exp 1 * #B ^ (M : ℝ)⁻¹ * ‖μ_[ℂ] (x +ᵥ -C)‖_[NNReal.conjExponent M] := by\n gcongr\n simpa only [← ENNReal.coe_natCast, MeasureTheory.dLpNorm_indicate hM₀] using hT _ ht\n _ = ε * ((#C / #B) ^ (-(M : ℝ)⁻¹) / exp 1) := by\n rw [← mul_comm_div, MeasureTheory.dLpNorm_mu hM.symm.lt.le hC.neg.vadd_finset,\n card_vadd_finset, card_neg, hM.symm.coe.inv_sub_one, div_rpow, mul_assoc]\n any_goals positivity\n push_cast\n rw [rpow_neg, rpow_neg, ← div_eq_mul_inv, inv_div_inv]\n all_goals positivity\n _ ≤ ε := mul_le_of_le_one_right (by positivity) <| (div_le_one <| by positivity).2 ?_\n calc\n (#C / #B : ℝ) ^ (-(M : ℝ)⁻¹)\n ≤ r ^ (-(M : ℝ)⁻¹) :=\n rpow_le_rpow_of_nonpos (by positivity) inf_le_right <| neg_nonpos.2 <| by positivity\n _ ≤ r ^ (-(1 + log r⁻¹)⁻¹) :=\n rpow_le_rpow_of_exponent_ge (by positivity) inf_le_left <| neg_le_neg <| inv_anti₀\n (by positivity) <| (Nat.le_ceil _).trans <|\n mod_cast Nat.le_mul_of_pos_left _ (by positivity)\n _ ≤ r ^ (-(0 + log r⁻¹)⁻¹) := by\n obtain hr | hr : r = 1 ∨ r < 1 := inf_le_left.eq_or_lt\n · simp [hr]\n have : 0 < log r⁻¹ := log_pos <| (one_lt_inv₀ (by positivity)).2 hr\n exact rpow_le_rpow_of_exponent_ge (by positivity) inf_le_left (by gcongr; exact zero_le_one)\n _ = r ^ (log r)⁻¹ := by simp [inv_neg]\n _ ≤ exp 1 := rpow_inv_log_le_exp_one\n","line":409,"end_line":478,"proof_status":"formalized"}
{"id":"ast_le_circ","label":"ast_le_circ","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For any function \\(f:G\\to \\mathbb {C}\\) and integer \\(k\\geq 1\\) \\[ \\| f\\ast f\\| _{2k}\\leq \\| f\\circ f\\| _{2k}. \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/cLpNorm_cconv_le_cLpNorm_cdconv","latex_link":"sect0004.html#ast_le_circ","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/cLpNorm_cconv_le_cLpNorm_cdconv","lean_decl_name":"cLpNorm_cconv_le_cLpNorm_cdconv","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Prereqs/FourierTransform/Convolution.lean","lean4_code":"lemma cLpNorm_cconv_le_cLpNorm_cdconv (hn₀ : n ≠ 0) (hn : Even n) (f : G → ℂ) :\n ‖f ∗ₙ f‖ₙ_[n] ≤ ‖f ○ₙ f‖ₙ_[n] := by\n refine le_of_pow_le_pow_left₀ hn₀ (by positivity) ?_\n obtain ⟨k, rfl⟩ := hn.two_dvd\n simp only [ne_eq, mul_eq_zero, OfNat.ofNat_ne_zero, false_or] at hn₀\n refine Complex.le_of_eq_sum_of_eq_sum_norm (fun ψ : (Fin k → AddChar G ℂ) × (Fin k → AddChar G ℂ)\n ↦ conj (∏ i, cft f (ψ.1 i) ^ 2) * (∏ i, cft f (ψ.2 i) ^ 2) * 𝔼 x, (∑ i, ψ.2 i - ∑ i, ψ.1 i) x)\n univ (by dsimp; norm_cast; positivity) ?_ ?_\n · simp only [NNReal.val_eq_coe]\n push_cast\n rw [← cft_inversion' (f ∗ₙ f), cLpNorm_two_mul_sum_pow hn₀]\n simp_rw [cft_cconv_apply, ← sq, Fintype.sum_prod_type, mul_expect, AddChar.sub_apply]\n simp [mul_mul_mul_comm, mul_comm, map_neg_eq_conj, prod_mul_distrib]\n · simp only [NNReal.val_eq_coe]\n push_cast\n rw [← cft_inversion' (f ○ₙ f), cLpNorm_two_mul_sum_pow hn₀]\n simp_rw [cft_cdconv_apply, Complex.mul_conj', Fintype.sum_prod_type, mul_expect]\n congr 1 with ψ\n congr 1 with φ\n simp only [Pi.smul_apply, smul_eq_mul, map_mul, map_pow, Complex.conj_ofReal, prod_mul_distrib,\n mul_mul_mul_comm, ← mul_expect, map_prod, sub_apply, AddChar.coe_sum, Finset.prod_apply,\n norm_mul, norm_prod, norm_pow, RCLike.norm_conj, Complex.ofReal_mul, Complex.ofReal_prod,\n Complex.ofReal_pow]\n congr 1\n calc\n 𝔼 x, (∏ i, conj (ψ i x)) * ∏ i, φ i x = 𝔼 x, (∑ i, φ i - ∑ i, ψ i) x := by\n simp [map_neg_eq_conj, mul_comm, AddChar.sub_apply]\n _ = ‖𝔼 x, (∑ i, φ i - ∑ i, ψ i) x‖ := by simp [expect_eq_ite, apply_ite]\n _ = ‖𝔼 x, (∏ i, φ i x) * ∏ i, (ψ i) (-x)‖ := by simp [map_neg_eq_conj, AddChar.sub_apply]\n","line":15,"end_line":43,"proof_status":"formalized"}
{"id":"global_dichotomy","label":"global_dichotomy","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["ast_le_circ","circ_expand","ast_expand"],"nlp_text":"Let \\(\\epsilon {\\gt}0\\) and \\(\\mu \\equiv 1/N\\). If \\(A,C\\subseteq G\\), where \\(C\\) has density at least \\(\\gamma \\), and \\[ \\left\\lvert N\\langle \\mu _A\\ast \\mu _A,\\mu _C\\rangle -1\\right\\rvert {\\gt}\\epsilon \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/global_dichotomy","latex_link":"sect0004.html#global_dichotomy","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/global_dichotomy","lean_decl_name":"global_dichotomy","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/FiniteField.lean","lean4_code":"lemma global_dichotomy [DecidableEq G] [MeasurableSpace G] [DiscreteMeasurableSpace G]\n (hA : A.Nonempty) (hγC : γ ≤ C.dens) (hγ : 0 < γ)\n (hAC : ε ≤ |card G * ⟪μ_[ℝ] A ∗ μ A, μ C⟫_[ℝ] - 1|) :\n ε / (2 * card G) ≤ ‖balance (μ_[ℝ] A) ○ balance (μ A)‖_[↑(2 * ⌈𝓛 γ⌉₊), μ univ] := by\n have hC : C.Nonempty := by simpa using hγ.trans_le hγC\n have hγ₁ : γ ≤ 1 := hγC.trans (by norm_cast; exact dens_le_one)\n set p := 2 * ⌈𝓛 γ⌉₊\n have hp : 1 < p :=\n Nat.succ_le_iff.1 (le_mul_of_one_le_right zero_le' <| Nat.ceil_pos.2 <| curlog_pos hγ.le hγ₁)\n have hp' : (p⁻¹ : ℝ≥0) < 1 := inv_lt_one_of_one_lt₀ <| mod_cast hp\n have hp'' : (p : ℝ≥0).HolderConjugate _ := .conjExponent <| mod_cast hp\n have : (p : ℝ≥0∞).HolderConjugate _ := hp''.coe_ennreal\n rw [mul_comm, ← div_div, div_le_iff₀ (zero_lt_two' ℝ)]\n calc\n _ ≤ _ := div_le_div_of_nonneg_right hAC (card G).cast_nonneg\n _ = |⟪balance (μ A) ∗ balance (μ A), μ C⟫_[ℝ]| := ?_\n _ ≤ ‖balance (μ_[ℝ] A) ∗ balance (μ A)‖_[p] * ‖μ_[ℝ] C‖_[NNReal.conjExponent p] :=\n MeasureTheory.abs_wInner_one_le_dLpNorm_mul_dLpNorm _ _\n _ ≤ ‖balance (μ_[ℝ] A) ○ balance (μ A)‖_[p] * (card G ^ (-(p : ℝ)⁻¹) * γ ^ (-(p : ℝ)⁻¹)) :=\n mul_le_mul (dLpNorm_conv_le_dLpNorm_dconv' (by positivity) (even_two_mul _) _) ?_\n (by positivity) (by positivity)\n _ = ‖balance (μ_[ℝ] A) ○ balance (μ A)‖_[↑(2 * ⌈𝓛 γ⌉₊), μ univ] * γ ^ (-(p : ℝ)⁻¹) := ?_\n _ ≤ _ := mul_le_mul_of_nonneg_left ?_ <| by positivity\n · rw [← balance_conv, balance, wInner_sub_left, wInner_one_const_left, expect_conv, sum_mu ℝ hA,\n expect_mu ℝ hA, sum_mu ℝ hC, conj_trivial, one_mul, one_mul, ← mul_inv_cancel₀, ← mul_sub,\n abs_mul, abs_of_nonneg, mul_div_cancel_left₀] <;> positivity\n · rw [MeasureTheory.dLpNorm_mu hp''.symm.lt.le hC, hp''.symm.coe.inv_sub_one, NNReal.coe_natCast,\n ← mul_rpow]\n any_goals positivity\n rw [nnratCast_dens, le_div_iff₀, mul_comm] at hγC\n any_goals positivity\n refine rpow_le_rpow_of_nonpos ?_ hγC (neg_nonpos.2 ?_) <;> positivity\n · rw [mul_comm, mu_univ_eq_const, wLpNorm_const_right, mul_right_comm, rpow_neg, ← inv_rpow]\n any_goals positivity\n · congr\n · exact ENNReal.natCast_ne_top _\n · have : 1 ≤ γ⁻¹ := (one_le_inv₀ hγ).2 hγ₁\n have : 0 ≤ log γ⁻¹ := by bound\n calc\n γ ^ (-(↑p)⁻¹ : ℝ) = √(γ⁻¹ ^ ((↑⌈1 + log γ⁻¹⌉₊)⁻¹ : ℝ)) := by\n rw [rpow_neg hγ.le, inv_rpow hγ.le]\n unfold p\n push_cast\n rw [mul_inv_rev, rpow_mul, sqrt_eq_rpow, one_div, inv_rpow] <;> positivity\n _ ≤ √(γ⁻¹ ^ ((1 + log γ⁻¹)⁻¹ : ℝ)) := by\n gcongr\n · assumption\n · exact Nat.le_ceil _\n _ ≤ √ (exp 1) := by gcongr; exact rpow_inv_neg_curlog_le hγ.le hγ₁\n _ ≤ √ 2.7182818286 := by gcongr; exact exp_one_lt_d9.le\n _ ≤ 2 := by rw [sqrt_le_iff]; norm_num\n","line":91,"end_line":141,"proof_status":"formalized"}
{"id":"di_in_ff","label":"di_in_ff","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["global_dichotomy","ap_in_ff","unbalancing","sift_cor"],"nlp_text":"Let \\(\\epsilon \\in (0,1)\\). If \\(A,C\\subseteq \\mathbb {F}_q^n\\), where \\(C\\) has density at least \\(\\gamma \\), and \\[ \\left\\lvert N\\langle \\mu _A\\ast \\mu _A,\\mu _C\\rangle -1\\right\\rvert {\\gt} \\epsilon \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/di_in_ff","latex_link":"sect0004.html#di_in_ff","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/di_in_ff","lean_decl_name":"di_in_ff","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/FiniteField.lean","lean4_code":"lemma di_in_ff [DecidableEq G] [MeasurableSpace G] [DiscreteMeasurableSpace G] (hq₃ : 3 ≤ q)\n (hq : q.Prime) (hε₀ : 0 < ε) (hε₁ : ε < 1) (hγC : γ ≤ C.dens) (hγ : 0 < γ)\n (hAC : ε ≤ |card G * ⟪μ_[ℝ] A ∗ μ A, μ C⟫_[ℝ] - 1|) :\n ∃ (V : Submodule (ZMod q) G) (_ : DecidablePred (· ∈ V)),\n ↑(finrank (ZMod q) G - finrank (ZMod q) V) ≤\n 2 ^ 132 * 𝓛 A.dens ^ 4 * 𝓛 γ ^ 4 / ε ^ 16 ∧\n (1 + ε / 32) * A.dens ≤ ‖𝟭_[ℝ] A ∗ μ (Set.toFinset V)‖_[∞] := by\n have hγ₁ : γ ≤ 1 := hγC.trans (by norm_cast; exact dens_le_one)\n let α : ℝ := A.dens\n let p : ℕ := 2 * ⌈𝓛 γ⌉₊\n let f : G → ℝ := balance (μ A)\n obtain rfl | hA₀ := A.eq_empty_or_nonempty\n · exact ⟨⊤, Classical.decPred _, by simp; positivity⟩\n obtain ⟨p', hp', unbalancing⟩ :\n ∃ p' : ℕ, p' ≤ 2 ^ 10 * (ε / 2)⁻¹ ^ 2 * p ∧\n 1 + ε / 2 / 2 ≤ ‖card G • (f ○ f) + 1‖_[p', μ univ] := by\n refine unbalancing _ (mul_ne_zero two_ne_zero (Nat.ceil_pos.2 <| curlog_pos hγ.le hγ₁).ne')\n (ε / 2) (by positivity) (div_le_one_of_le₀ (hε₁.le.trans <| by norm_num) <| by norm_num)\n (card G • (balance (μ A) ○ balance (μ A))) (sqrt (card G) • balance (μ A)) (μ univ) ?_ ?_ ?_\n · ext a : 1\n simp [smul_dconv, dconv_smul, ← mul_assoc, ← sq, ← Complex.ofReal_pow]\n · simp\n · have global_dichotomy := global_dichotomy hA₀ hγC hγ hAC\n simpa [wLpNorm_nsmul, ← nsmul_eq_mul, div_le_iff₀' (show (0 : ℝ) < card G by positivity),\n ← div_div, rpow_neg, inv_rpow] using global_dichotomy\n let q' : ℕ := 2 * ⌈p' + 2 ^ 8 * ε⁻¹ ^ 2 * log (64 / ε)⌉₊\n have : 0 < 𝓛 γ := curlog_pos hγ.le hγ₁\n have hα₀ : 0 < α := by positivity\n have hα₁ : α ≤ 1 := by unfold α; exact mod_cast A.dens_le_one\n have : 0 < p := by positivity\n have : 0 < log (6 / ε) := log_pos <| (one_lt_div hε₀).2 (by linarith)\n have : 0 < p' := pos_iff_ne_zero.2 <| by rintro rfl; simp at unbalancing; linarith\n have : 0 < log (64 / ε) := log_pos <| (one_lt_div hε₀).2 (by linarith)\n have : 1 ≤ 𝓛 γ := one_le_curlog hγ.le hγ₁\n have : 0 < q' := by positivity\n have : 1 ≤ ε⁻¹ := (one_le_inv₀ hε₀).2 hε₁.le\n have :=\n calc\n (q' : ℝ) ≤ ↑(2 * ⌈2 ^ 10 * (ε / 2)⁻¹ ^ 2 * p + 2 ^ 8 * ε⁻¹ ^ 2 * (64 / ε)⌉₊) := by\n unfold q'; gcongr; exact log_le_self (by positivity)\n _ = 2 * ⌈2 ^ 13 * ε⁻¹ ^ 2 * ⌈𝓛 γ⌉₊ + 2 ^ 14 * ε⁻¹ ^ 3 * 1⌉₊ := by\n unfold p; push_cast; ring_nf\n _ ≤ 2 * ⌈2 ^ 13 * ε⁻¹ ^ 3 * (2 * 𝓛 γ) + 2 ^ 14 * ε⁻¹ ^ 3 * 𝓛 γ⌉₊ := by\n gcongr\n · assumption\n · norm_num\n · exact Nat.ceil_le_two_mul <| two_inv_lt_one.le.trans ‹_›\n _ = 2 * ⌈2 ^ 15 * ε⁻¹ ^ 3 * 𝓛 γ⌉₊ := by ring_nf\n _ ≤ 2 * (2 * (2 ^ 15 * ε⁻¹ ^ 3 * 𝓛 γ)) := by\n gcongr\n refine Nat.ceil_le_two_mul ?_\n calc\n (2⁻¹ : ℝ) ≤ 2 ^ 15 * 1 * 1 := by norm_num\n _ ≤ 2 ^ 15 * ε⁻¹ ^ 3 * 𝓛 γ := ?_\n gcongr\n exact one_le_pow₀ ((one_le_inv₀ hε₀).2 hε₁.le)\n _ = 2 ^ 17 * 𝓛 γ / ε ^ 3 := by ring\n obtain ⟨A₁, A₂, hA, hA₁, hA₂⟩ : ∃ (A₁ A₂ : Finset G),\n 1 - ε / 32 ≤ ∑ x ∈ s q' (ε / 16) univ univ A, (μ A₁ ○ μ A₂) x ∧\n (4⁻¹ : ℝ) * A.dens ^ (2 * q') ≤ A₁.dens ∧ (4⁻¹ : ℝ) * A.dens ^ (2 * q') ≤ A₂.dens := by\n refine sifting_cor (ε := ε / 16) (δ := ε / 32) (by positivity) (by linarith)\n (by positivity) (p := q') (even_two_mul _)\n (le_mul_of_one_le_right zero_le_two <| by simp; positivity) ?_ hA₀\n calc\n (ε / 16)⁻¹ * log (2 / (ε / 32)) = 2 ^ 4 * ε⁻¹ ^ 1 * log (64 / ε) := by ring_nf\n _ ≤ 2 ^ 8 * ε⁻¹ ^ 2 * log (64 / ε) := by\n gcongr\n · norm_num\n · norm_num\n · exact (one_le_inv₀ hε₀).2 hε₁.le\n · norm_num\n _ ≤ ⌈2 ^ 8 * ε⁻¹ ^ 2 * log (64 / ε)⌉₊ := Nat.le_ceil _\n _ = ↑(1 * ⌈0 + 2 ^ 8 * ε⁻¹ ^ 2 * log (64 / ε)⌉₊) := by rw [one_mul, zero_add]\n _ ≤ q' := by\n unfold q'\n gcongr\n · norm_num\n · positivity\n have :=\n calc\n p' = 1 * ⌈(p' + 0 : ℝ)⌉₊ := by simp\n _ ≤ q' := by\n unfold q'\n gcongr\n · norm_num\n · positivity\n have : card G • (f ○ f) + 1 = card G • (μ A ○ μ A) := by\n unfold f\n rw [← balance_dconv, balance, smul_sub, smul_const, Fintype.card_smul_expect]\n simp [sum_dconv, hA₀]\n have :=\n calc\n 1 + ε / 4 = 1 + ε / 2 / 2 := by ring\n _ ≤ ‖card G • (f ○ f) + 1‖_[p', μ univ] := unbalancing\n _ = card G • ‖(μ_[ℝ] A ○ μ A)‖_[p', μ univ] := by simp [this, wLpNorm_nsmul, -nsmul_eq_mul]\n _ ≤ card G • ‖(μ_[ℝ] A ○ μ A)‖_[q', μ univ] := by gcongr\n let s' : Finset G := {x | 1 + ε / 8 ≤ card G • (μ A ○ μ A) x}\n have hss' : s q' (ε / 16) univ univ A ⊆ s' := by\n simp only [subset_iff, mem_s', ENNReal.coe_natCast, mu_univ_dconv_mu_univ,\n mem_filter, mem_univ, true_and, s']\n rintro x hx\n calc\n 1 + ε / 8 ≤ (1 - ε / 16) * (1 + ε / 4) := one_add_le_one_sub_mul_one_add <| calc\n ε / 8 + ε / 16 + ε / 16 * (ε / 4) ≤ ε / 8 + ε / 16 + ε / 16 * (1 / 4) := by gcongr\n _ ≤ ε / 4 := by linarith\n _ ≤ (1 - ε / 16) * card G • ‖μ_[ℝ] A ○ μ A‖_[q', μ univ] := by gcongr; linarith\n _ = card G • ((1 - ε / 16) * ‖μ_[ℝ] A ○ μ A‖_[q', μ univ]) := mul_smul_comm ..\n _ ≤ card G • (μ A ○ μ A) x := by gcongr\n obtain ⟨V, _, hVdim, hV⟩ : ∃ (V : Submodule (ZMod q) G) (_ : DecidablePred (· ∈ V)),\n ↑(finrank (ZMod q) G - finrank (ZMod q) V) ≤\n 2 ^ 32 * 𝓛 (4⁻¹ * α ^ (2 * q')) ^ 2 * 𝓛 (ε / 32 * (4⁻¹ * α ^ (2 * q'))) ^ 2 * (ε / 32)⁻¹ ^ 2\n ∧ |∑ x ∈ s', (μ (Set.toFinset V) ∗ μ A₁ ○ μ A₂) x - ∑ x ∈ s', (μ A₁ ○ μ A₂) x| ≤ ε / 32 :=\n ap_in_ff' _ hq₃ hq (by positivity)\n (calc\n 4⁻¹ * (A.dens : ℝ) ^ (2 * q') ≤ 4⁻¹ * 1 := by\n gcongr; exact pow_le_one₀ (by positivity) <| mod_cast A.dens_le_one\n _ ≤ 2⁻¹ := by norm_num) (by positivity) (by linarith) hA₁ hA₂\n replace hV :=\n calc\n 1 - ε / 16 = 1 - ε / 32 - ε / 32 := by ring\n _ ≤ ∑ x ∈ s q' (ε / 16) univ univ A, (μ A₁ ○ μ A₂) x -\n |∑ x ∈ s', (μ (Set.toFinset V) ∗ μ A₁ ○ μ A₂) x - ∑ x ∈ s', (μ A₁ ○ μ A₂) x| := by gcongr\n _ ≤ ∑ x ∈ s', (μ A₁ ○ μ A₂) x -\n -(∑ x ∈ s', (μ (Set.toFinset V) ∗ μ A₁ ○ μ A₂) x - ∑ x ∈ s', (μ A₁ ○ μ A₂) x) := by\n gcongr\n · have : 0 ≤ μ_[ℝ] A₁ ○ μ A₂ := dconv_nonneg mu_nonneg mu_nonneg\n exact fun _ _ _ ↦ this _\n · exact neg_le_abs _\n _ = ∑ x ∈ s', (μ (Set.toFinset V) ∗ μ A₁ ○ μ A₂) x := by ring\n refine ⟨V, inferInstance, ?_, ?_⟩\n · calc\n ↑(finrank (ZMod q) G - finrank (ZMod q) V)\n ≤ 2 ^ 32 * 𝓛 (4⁻¹ * α ^ (2 * q')) ^ 2 *\n 𝓛 (ε / 32 * (4⁻¹ * α ^ (2 * q'))) ^ 2 * (ε / 32)⁻¹ ^ 2 := hVdim\n _ ≤ 2 ^ 32 * (8 * q' * 𝓛 α) ^ 2 *\n (2 ^ 8 * q' * 𝓛 α / ε) ^ 2 * (ε / 32)⁻¹ ^ 2 := by\n have : α ^ (2 * q') ≤ 1 := by bound\n have : 4⁻¹ * α ^ (2 * q') ≤ 1 := by bound\n have : ε / 32 * (4⁻¹ * α ^ (2 * q')) ≤ 1 := by bound\n have : 0 ≤ log (ε / 32 * (4⁻¹ * α ^ (2 * q')))⁻¹ := by bound\n have : 0 ≤ log (4⁻¹ * α ^ (2 * q'))⁻¹ := by bound\n have : 0 ≤ log (α ^ (2 * q'))⁻¹ := by bound\n have :=\n calc\n 𝓛 (4⁻¹ * α ^ (2 * q')) ≤ 4⁻¹⁻¹ * 𝓛 (α ^ (2 * q')) :=\n curlog_mul_le (by norm_num) (by norm_num) (by positivity) ‹_›\n _ ≤ 4⁻¹⁻¹ * (↑(2 * q') * 𝓛 α) := by gcongr; exact curlog_pow_le hα₀ (by positivity)\n _ = 8 * q' * 𝓛 α := by push_cast; ring\n gcongr\n calc\n 𝓛 (ε / 32 * (4⁻¹ * α ^ (2 * q'))) ≤ (ε / 32)⁻¹ * 𝓛 (4⁻¹ * (α ^ (2 * q'))) :=\n curlog_mul_le (by positivity) (by linarith) (by positivity) ‹_›\n _ ≤ (ε / 32)⁻¹ * (8 * q' * 𝓛 α) := by gcongr\n _ = 2 ^ 8 * q' * 𝓛 α / ε := by ring\n _ = 2 ^ 64 * q' ^ 4 * 𝓛 α ^ 4 / ε ^ 4 := by ring\n _ ≤ 2 ^ 64 * (2 ^ 17 * 𝓛 γ / ε ^ 3) ^ 4 * 𝓛 α ^ 4 / ε ^ 4 := by gcongr\n _ = 2 ^ 132 * 𝓛 α ^ 4 * 𝓛 γ ^ 4 / ε ^ 16 := by ring\n · rw [← le_div_iff₀ (by positivity)]\n have : 0 ≤ μ_[ℝ] (Set.toFinset V) ∗ μ A₁ ○ μ A₂ :=\n dconv_nonneg (conv_nonneg mu_nonneg mu_nonneg) mu_nonneg\n calc\n 1 + ε / 32 ≤ (1 + ε / 8) * (1 - ε / 16) := one_add_le_one_add_mul_one_sub <|\n calc\n ε / 32 + ε / 16 + ε / 8 * (ε / 16) ≤ ε / 32 + ε / 16 + ε / 8 * (1 / 16) := by gcongr\n _ ≤ ε / 8 := by linarith\n _ ≤ (1 + ε / 8) * ∑ x ∈ s', (μ (Set.toFinset V) ∗ μ A₁ ○ μ A₂) x := by gcongr\n _ = ∑ x ∈ s', (1 + ε / 8) * (μ (Set.toFinset V) ∗ μ A₁ ○ μ A₂) x := mul_sum ..\n _ ≤ ∑ x ∈ s', card G • (μ A ○ μ A) x * (μ (Set.toFinset V) ∗ μ A₁ ○ μ A₂) x := by\n gcongr with x hx\n · exact this _\n · exact (mem_filter.1 hx).2\n _ ≤ ∑ x, card G • (μ A ○ μ A) x * (μ (Set.toFinset V) ∗ μ A₁ ○ μ A₂) x := by\n gcongr\n · rintro x - -\n have : (0 : ℝ) ≤ _ := this x\n have : 0 ≤ μ_[ℝ] A ○ μ A := dconv_nonneg mu_nonneg mu_nonneg\n have : (0 : ℝ) ≤ _ := this x\n positivity\n · exact subset_univ _\n _ = card G • ⟪μ_[ℝ] (Set.toFinset V) ∗ μ A, μ A ∗ μ A₂ ○ μ A₁⟫_[ℝ] := by\n rw [← wInner_one_dconv_eq_conv_wInner_one, dconv_right_comm, conv_dconv_right_comm (μ A),\n wInner_one_dconv_eq_conv_wInner_one, ← dconv_wInner_one_eq_wInner_one_conv,\n ← conj_wInner_symm]\n simp [wInner_one_eq_sum, smul_sum, mul_assoc]\n congr! 1\n group\n _ ≤ card G • (‖μ_[ℝ] (Set.toFinset V) ∗ μ A‖_[∞] * ‖μ_[ℝ] A ∗ μ A₂ ○ μ A₁‖_[1]) := by\n gcongr; exact MeasureTheory.wInner_one_le_dLpNorm_mul_dLpNorm _ _\n _ = _ := by\n have : 0 < (4 : ℝ)⁻¹ * A.dens ^ (2 * q') := by positivity\n replace hA₁ : A₁.Nonempty := by simpa using this.trans_le hA₁\n replace hA₂ : A₂.Nonempty := by simpa using this.trans_le hA₂\n rw [dL1Norm_dconv, dL1Norm_conv]\n · simp [eq_div_iff, hA₀.dens_ne_zero, hA₀, hA₁, hA₂, ← card_smul_mu, smul_conv,\n MeasureTheory.dLpNorm_nsmul, -nsmul_eq_mul]\n simp [← mul_assoc, mul_comm, conv_comm]\n · exact mu_nonneg\n · exact mu_nonneg\n · exact conv_nonneg mu_nonneg mu_nonneg\n · exact mu_nonneg\n","line":253,"end_line":452,"proof_status":"formalized"}
{"id":"ff","label":"ff","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["di_in_ff","no3aps_inner_prod"],"nlp_text":"Let \\(q\\) be an odd prime power. If \\(A\\subseteq \\mathbb {F}_q^n\\) with \\(\\alpha =\\left\\lvert A\\right\\rvert /q^n\\) has no non-trivial three-term arithmetic progressions then \\[ n \\ll \\mathcal{L}{(}\\alpha )^9. \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/ff","latex_link":"sect0004.html#ff","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/ff","lean_decl_name":"ff","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/FiniteField.lean","lean4_code":"lemma ap_in_ff [DecidableEq G] (hq₃ : 3 ≤ q) (hq : q.Prime) (hα₀ : 0 < α) (hα₂ : α ≤ 2⁻¹)\n (hε₀ : 0 < ε) (hε₁ : ε ≤ 1) (hαA₁ : α ≤ A₁.dens) (hαA₂ : α ≤ A₂.dens) :\n ∃ (V : Submodule (ZMod q) G) (_ : DecidablePred (· ∈ V)),\n ↑(finrank (ZMod q) G - finrank (ZMod q) V) ≤ 2 ^ 32 * 𝓛 α ^ 2 * 𝓛 (ε * α) ^ 2 * ε⁻¹ ^ 2 ∧\n |∑ x ∈ S, (μ (Set.toFinset V) ∗ μ A₁ ∗ μ A₂) x - ∑ x ∈ S, (μ A₁ ∗ μ A₂) x| ≤ ε := by\n classical\n let _ : MeasurableSpace G := ⊤\n have : Fact (1 < q) := sorry\n have : DiscreteMeasurableSpace G := ⟨fun _ ↦ trivial⟩\n have hA₁ : A₁.Nonempty := by simpa using hα₀.trans_le hαA₁\n have hA₂ : A₂.Nonempty := by simpa using hα₀.trans_le hαA₂\n have hα₁ : α ≤ 1 := hαA₁.trans <| mod_cast A₁.dens_le_one\n have : 0 ≤ log α⁻¹ := by bound\n have : 0 ≤ log (ε * α)⁻¹ := by bound\n obtain rfl | hS := S.eq_empty_or_nonempty\n · exact ⟨⊤, inferInstance, by simp [hε₀.le]; positivity⟩\n have hA₁ : σ[A₁, univ] ≤ α⁻¹ :=\n calc\n _ ≤ (A₁.dens⁻¹ : ℝ) := by norm_cast; exact addConst_le_inv_dens\n _ ≤ α⁻¹ := by gcongr\n let k : ℕ := ⌈𝓛 (ε * α / 4)⌉₊\n have hk₀ : 0 < k := Nat.ceil_pos.2 <| curlog_pos (by positivity) <|\n calc\n ε * α / 4 ≤ ε * 1 / 4 := by gcongr\n _ ≤ 1 := by linarith\n obtain ⟨T, hTcard, hTε⟩ := AlmostPeriodicity.linfty_almost_periodicity_boosted ε hε₀ hε₁ k\n (by positivity) (le_inv_of_le_inv₀ (by positivity) hα₂) hA₁ univ_nonempty S A₂ hS hA₂\n have hT : 0 < (#T : ℝ) := hTcard.trans_lt' (by positivity)\n replace hT : T.Nonempty := by simpa using hT\n let Δ := largeSpec (μ T) 2⁻¹\n let V : Submodule (ZMod q) G := AddSubgroup.toZModSubmodule _ <| ⨅ γ ∈ Δ, γ.toAddMonoidHom.ker\n let V' : Finset G := Set.toFinset V\n refine ⟨V, inferInstance, ?_, ?_⟩\n · obtain ⟨Δ', hΔ'Δ, hΔ'card, hfΔ'⟩ : ∃ Δ' ⊆ Δ, _ := chang (mu_ne_zero.2 hT) (by norm_num)\n let W : Submodule (ZMod q) G := AddSubgroup.toZModSubmodule _ <| ⨅ γ ∈ Δ', γ.toAddMonoidHom.ker\n have mem_W {x} : x ∈ W ↔ ∀ γ ∈ Δ', γ x = 1 := by simp [W]\n have hWV : W ≤ V := by sorry\n have :=\n calc\n log T.dens⁻¹ ≤ log (α⁻¹ ^ (-4096 * ⌈𝓛 (min 1 (#A₂ / #S))⌉ * k ^ 2 / ε ^ 2))⁻¹ := by\n gcongr; rwa [nnratCast_dens, le_div_iff₀]; positivity\n _ = 2 ^ 12 * log α⁻¹ * ⌈𝓛 (min 1 (#A₂ / #S))⌉ * k ^ 2 / ε ^ 2 := by\n rw [log_inv, log_rpow (by positivity)]; ring_nf\n _ ≤ 2 ^ 12 * log α⁻¹ * ⌈𝓛 (min 1 A₂.dens)⌉ * k ^ 2 / ε ^ 2 := by\n rw [nnratCast_dens, ← card_univ]; gcongr; exact S.subset_univ\n _ ≤ 2 ^ 12 * log α⁻¹ * ⌈𝓛 (min 1 α)⌉ * (k) ^ 2 / ε ^ 2 := by gcongr\n _ = 2 ^ 12 * log α⁻¹ * ⌈𝓛 α⌉ * k ^ 2 / ε ^ 2 := by rw [min_eq_right hα₁]\n _ ≤ 2 ^ 12 * 𝓛 α * (2 * 𝓛 α) * (2 ^ 3 * 𝓛 (ε * α)) ^ 2 / ε ^ 2 := by\n gcongr\n · exact le_add_of_nonneg_left zero_le_one\n · exact Int.ceil_le_two_mul <| two_inv_lt_one.le.trans <| one_le_curlog hα₀.le hα₁\n · calc\n k ≤ 2 * 𝓛 (ε * α / 4) :=\n Nat.ceil_le_two_mul <| two_inv_lt_one.le.trans <| one_le_curlog (by positivity)\n sorry\n _ ≤ 2 * (4 * 𝓛 (ε * α)) := by\n gcongr\n exact curlog_div_le (by positivity) (mul_le_one₀ hε₁ hα₀.le hα₁) (by norm_num)\n _ = 2 ^ 3 * 𝓛 (ε * α) := by ring\n _ = 2 ^ 19 * 𝓛 α ^ 2 * 𝓛 (ε * α) ^ 2 * ε⁻¹ ^ 2 := by ring_nf\n calc\n (↑(finrank (ZMod q) G - finrank (ZMod q) V) : ℝ)\n ≤ ↑(finrank (ZMod q) G - finrank (ZMod q) W) := by\n gcongr; exact Submodule.finrank_mono hWV\n _ ≤ #Δ' := sorry\n _ ≤ ⌈changConst * exp 1 * ⌈𝓛 ↑(‖μ T‖_[1] ^ 2 / ‖μ T‖_[2] ^ 2 / card G)⌉₊ / 2⁻¹ ^ 2⌉₊ := by\n gcongr\n _ = ⌈2 ^ 7 * exp 1 ^ 2 * ⌈𝓛 T.dens⌉₊⌉₊ := by\n simp [hT, ← rpow_mul_natCast, dens, changConst, -exp_one_pow, rpow_neg_one]; ring_nf\n _ ≤ ⌈2 ^ 7 * 2 ^ 3 * (2 * 𝓛 T.dens)⌉₊ := by\n gcongr\n · calc\n exp 1 ^ 2 ≤ 2.7182818286 ^ 2 := by gcongr; exact exp_one_lt_d9.le\n _ ≤ 2 ^ 3 := by norm_num\n · exact Nat.ceil_le_two_mul <| two_inv_lt_one.le.trans <|\n one_le_curlog (by positivity) <| mod_cast T.dens_le_one\n _ = ⌈2 ^ 11 * 𝓛 T.dens⌉₊ := by ring_nf\n _ ≤ 2 * (2 ^ 11 * 𝓛 T.dens) := Nat.ceil_le_two_mul <|\n calc\n (2⁻¹ : ℝ) ≤ 2 ^ 11 * 1 := by norm_num\n _ ≤ 2 ^ 11 * 𝓛 T.dens := by\n gcongr; exact one_le_curlog (by positivity) <| mod_cast T.dens_le_one\n _ = 2 ^ 12 * 𝓛 T.dens := by ring\n _ ≤ 2 ^ 12 * (1 + 2 ^ 19 * 𝓛 α ^ 2 * 𝓛 (ε * α) ^ 2 * ε⁻¹ ^ 2) := by gcongr\n _ ≤ 2 ^ 12 * (2 ^ 19 * 𝓛 α ^ 2 * 𝓛 (ε * α) ^ 2 * ε⁻¹ ^ 2 +\n 2 ^ 19 * 𝓛 α ^ 2 * 𝓛 (ε * α) ^ 2 * ε⁻¹ ^ 2) := by\n gcongr\n sorry\n _ = 2 ^ 32 * 𝓛 α ^ 2 * 𝓛 (ε * α) ^ 2 * ε⁻¹ ^ 2 := by ring\n · have : ∑ x ∈ S, (μ_[ℝ] V' ∗ μ A₁ ∗ μ A₂) x = 𝔼 x ∈ V', (μ A₁ ∗ μ A₂ ○ 𝟭 S) x := by\n have : -V' = V' := by ext; simp [V']\n rw [← mu_wInner_one, ← indicate_wInner_one, conv_rotate,\n ← dconv_wInner_one_eq_wInner_one_conv, wInner_one_dconv_eq_conv_wInner_one, ← conv_conjneg,\n conjneg_mu, this, conv_comm]\n have : ∑ x ∈ S, (μ_[ℝ] A₁ ∗ μ A₂) x = (μ_[ℝ] A₁ ∗ μ A₂ ○ 𝟭 S) 0 := by simp [dconv_indicate]\n sorry\n","line":146,"end_line":241,"proof_status":"formalized"}
{"id":"linfty_ap_boosted","label":"linfty_ap_boosted","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["linfty_ap"],"nlp_text":"Let \\(\\epsilon \\in (0,1]\\) and \\(k\\geq 1\\). Let \\(K\\geq 2\\) and \\(A,S\\subseteq G\\) with \\(\\lvert A+S\\rvert \\leq K\\lvert A\\rvert \\). Let \\(B,C\\subseteq G\\). Let \\(\\eta =\\min (1,\\lvert C\\rvert /\\lvert B\\rvert )\\). There exists \\(T\\subseteq G\\) such that \\[ \\lvert T\\rvert \\geq K^{-4096\\lceil \\mathcal{L}{\\eta }\\rceil k^2\\epsilon ^{-2}}\\lvert S\\rvert \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/AlmostPeriodicity.linfty_almost_periodicity_boosted","latex_link":"chap-ap.html#linfty_ap_boosted","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/AlmostPeriodicity.linfty_almost_periodicity_boosted","lean_decl_name":"AlmostPeriodicity.linfty_almost_periodicity_boosted","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Physics/AlmostPeriodicity.lean","lean4_code":"theorem linfty_almost_periodicity_boosted (ε : ℝ) (hε₀ : 0 < ε) (hε₁ : ε ≤ 1) (k : ℕ) (hk : k ≠ 0)\n (hK₂ : 2 ≤ K) (hK : σ[A, S] ≤ K) (hS : S.Nonempty)\n (B C : Finset G) (hB : B.Nonempty) (hC : C.Nonempty) :\n ∃ T : Finset G,\n K ^ (-4096 * ⌈𝓛 (#C / #B)⌉ * k ^ 2/ ε ^ 2) * #S ≤ #T ∧\n ‖μ T ∗^ k ∗ (μ_[ℂ] A ∗ 𝟭 B ∗ μ C) - μ A ∗ 𝟭 B ∗ μ C‖_[∞] ≤ ε := by\n obtain ⟨T, hKT, hT⟩ := linfty_almost_periodicity (ε / k) (by positivity)\n (div_le_one_of_le₀ (hε₁.trans <| mod_cast Nat.one_le_iff_ne_zero.2 hk) <| by positivity) hK₂ hK\n _ _ hB hC\n refine ⟨T, by simpa only [div_pow, div_div_eq_mul_div] using hKT, ?_⟩\n set F := μ_[ℂ] A ∗ 𝟭 B ∗ μ C\n have hT' : T.Nonempty := by\n have : (0 : ℝ) < #T := hKT.trans_lt' <| by positivity\n simpa [card_pos] using this\n calc\n (‖μ T ∗^ k ∗ F - F‖_[∞] : ℝ)\n = ‖𝔼 a ∈ T ^^ k, (τ (∑ i, a i) F - F)‖_[∞] := by\n rw [mu_iterConv_conv, expect_sub_distrib, expect_const hT'.piFinset_const]\n _ ≤ 𝔼 a ∈ T ^^ k, ‖τ (∑ i, a i) F - F‖_[∞] := MeasureTheory.dLpNorm_expect_le le_top\n _ ≤ 𝔼 _a ∈ T ^^ k, ε := ?_\n _ = ε := by rw [expect_const hT'.piFinset_const]\n push_cast\n refine expect_le_expect fun x hx ↦\n calc\n (‖τ (∑ i, x i) F - F‖_[⊤] : ℝ)\n _ ≤ ∑ i, ‖τ (x i) F - F‖_[⊤] := MeasureTheory.dLpNorm_translate_sum_sub_le le_top _ _ _\n _ ≤ ∑ _i, ε / k := by push_cast; exact sum_le_sum fun i _ ↦ hT _ <| Fintype.mem_piFinset.1 hx _\n _ = ε := by simp only [sum_const, card_fin, nsmul_eq_mul]; rw [mul_div_cancel₀]; positivity\n","line":480,"end_line":507,"proof_status":"formalized"}
{"id":"aps_in_translates","label":"aps_in_translates","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(A\\subseteq G\\) and \\(f:G\\to \\mathbb {C}\\). Let \\(\\epsilon {\\gt}0\\) and \\(m\\geq 1\\) and \\(k\\geq 1\\). Let \\[ L = \\{ {\\vec{a}}\\in A^k : \\| \\tfrac {1}{k}\\sum _{i=1}^k f(x-a_i) - \\mu _A\\ast f\\| _{2m} \\leq \\epsilon \\| f\\| _{2m}\\} . \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/AlmostPeriodicity.just_the_triangle_inequality","latex_link":"chap-ap.html#aps_in_translates","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/AlmostPeriodicity.just_the_triangle_inequality","lean_decl_name":"AlmostPeriodicity.just_the_triangle_inequality","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Physics/AlmostPeriodicity.lean","lean4_code":"lemma just_the_triangle_inequality {t : G} {a : Fin k → G} (ha : a ∈ l k m ε f A)\n (ha' : (a + fun _ ↦ t) ∈ l k m ε f A) (hk : 0 < k) (hm : 1 ≤ m) :\n ‖τ (-t) (mu A ∗ f) - mu A ∗ f‖_[2 * m] ≤ 2 * ε * ‖f‖_[2 * m] := by\n let f₁ : G → ℂ := fun x ↦ ∑ i, f (x - a i)\n let f₂ : G → ℂ := fun x ↦ ∑ i, f (x - a i - t)\n have hp : (1 : ℝ≥0∞) ≤ 2 * m := by norm_cast; linarith\n have h₁ : ‖f₁ - k • (mu A ∗ f)‖_[2 * m] ≤ k * ε * ‖f‖_[2 * m] := by\n rw [l, Finset.mem_filter] at ha ; exact ha.2\n have h₂ : ‖f₂ - k • (mu A ∗ f)‖_[2 * m] ≤ k * ε * ‖f‖_[2 * m] := by\n rw [l, Finset.mem_filter, LProp] at ha'\n refine ha'.2.trans_eq' ?_\n congr with i : 1\n simp [sub_sub, f₂]\n have h₃ : f₂ = τ t f₁ := by\n ext i : 1\n rw [translate_apply]\n refine Finset.sum_congr rfl fun j _ ↦ ?_\n rw [sub_right_comm]\n have h₄₁ : ‖τ t f₁ - k • (mu A ∗ f)‖_[2 * m] = ‖τ (-t) (τ t f₁ - k • (mu A ∗ f))‖_[2 * m] := by\n rw [dLpNorm_translate]\n have h₄ : ‖τ t f₁ - k • (mu A ∗ f)‖_[2 * m] = ‖f₁ - τ (-t) (k • (mu A ∗ f))‖_[2 * m] := by\n rw [h₄₁, translate_sub_right, translate_translate]\n simp\n have h₅₁ : ‖τ (-t) (k • (mu A ∗ f)) - f₁‖_[2 * m] ≤ k * ε * ‖f‖_[2 * m] := by\n rwa [dLpNorm_sub_comm, ← h₄, ← h₃]\n have : (0 : ℝ) < k := by positivity\n refine le_of_mul_le_mul_left ?_ this\n rw [← nsmul_eq_mul, ← NNReal.coe_nsmul, ← dLpNorm_nsmul _ (_ - mu A ∗ f), nsmul_sub, ←\n translate_smul_right (-t) (mu A ∗ f) k, mul_assoc, mul_left_comm, two_mul ((k : ℝ) * _), ←\n mul_assoc]\n calc\n (‖τ (-t) (k • (μ A ∗ f)) - k • (μ A ∗ f)‖_[2 * m] : ℝ)\n ≤ ↑(‖τ (-t) (k • (μ A ∗ f)) - f₁‖_[2 * m] + ‖f₁ - k • (μ A ∗ f)‖_[2 * m]) := by\n gcongr; exact dLpNorm_sub_le_dLpNorm_sub_add_dLpNorm_sub (mod_cast hp)\n _ ≤ k * ε * ‖f‖_[2 * m] + k * ε * ‖f‖_[2 * m] := by push_cast; gcongr\n","line":306,"end_line":340,"proof_status":"formalized"}
{"id":"prop-it","label":"prop-it","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["th-ap-int","sift"],"nlp_text":"There is a constant \\(c{\\gt}0\\) such that the following holds. Let \\(\\epsilon {\\gt}0\\) and \\(p,k\\geq 1\\) be integers such that \\((k,\\left\\lvert G\\right\\rvert )=1\\). Let \\(B,B',B''\\subseteq G\\) be regular Bohr sets of rank \\(d\\) such that \\(B''\\subseteq B'_{c/d}\\) and \\(A\\subseteq B\\) with relative density \\(\\alpha \\). If \\[ \\lVert \\mu _{A}\\circ \\mu _{A}\\rVert _{p(\\mu _{k\\cdot B'}\\circ \\mu _{k\\cdot B'}\\ast \\mu _{k\\cdot B''}\\circ \\mu _{k\\cdot B''})} \\geq \\left(1+\\epsilon \\right) \\mu (B)^{-1}, \\]","doc_url":null,"latex_link":"sect0006.html#prop-it","lean_link":null,"lean_decl_name":"prop-it","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"}
{"id":"nonneg_moments","label":"nonneg_moments","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For any function \\(f:G\\to \\mathbb {R}\\) and integer \\(k\\geq 0\\) \\[ \\mathbb {E}_x f\\circ f(x)^k\\geq 0. \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/pow_inner_nonneg","latex_link":"sect0002.html#nonneg_moments","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/pow_inner_nonneg","lean_decl_name":"pow_inner_nonneg","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Physics/Unbalancing.lean","lean4_code":"/-- Note that we do the physical proof in order to avoid the Fourier transform. -/\nlemma pow_inner_nonneg' {f : G → ℂ} (hf : g ○ g = f) (hν : h ○ h = (↑) ∘ ν) (k : ℕ) :\n 0 ≤ ⟪f ^ k, (↑) ∘ ν⟫_[ℂ] := by\n calc\n 0 ≤ ∑ z : Fin k → G, (‖∑ x, (∏ i, conj (g (x + z i))) * h x‖ : ℂ) ^ 2 := by positivity\n _ = ∑ x : G, ∑ yz : G × G with yz.1 - yz.2 = x,\n h yz.1 * conj h yz.2 * conj ((g ○ g) (yz.1 - yz.2)) ^ k := ?_\n _ = ∑ x : G, ∑ yz : G × G with yz.1 - yz.2 = x,\n h yz.1 * conj h yz.2 * conj ((g ○ g) x) ^ k := by\n congr! with x _ yz hyz\n simpa using hyz\n _ = _ := by\n rw [← hf, ← hν, wInner_one_eq_sum]\n simp only [Pi.pow_apply, RCLike.inner_apply, map_pow]\n simp_rw [dconv_apply h, sum_mul]\n simp_rw [dconv_apply_sub, sum_fiberwise, ← univ_product_univ, sum_product]\n simp only [sum_pow', sum_mul_sum, map_mul, starRingEnd_self_apply, Fintype.piFinset_univ,\n ← Complex.conj_mul', map_sum, map_prod]\n simp only [mul_sum, @sum_comm _ _ (Fin k → G), mul_comm (conj _), prod_mul_distrib, Pi.conj_apply]\n rw [sum_comm]\n congr with x\n congr with y\n congr with z\n group\n","line":21,"end_line":44,"proof_status":"formalized"}
{"id":"unbalancing","label":"unbalancing","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["nonneg_moments"],"nlp_text":"Let \\(\\epsilon \\in (0,1)\\) and \\(\\nu :G\\to \\mathbb {R}_{\\geq 0}\\) be some probability measure such that \\(\\widehat{\\nu }\\geq 0\\). Let \\(f:G\\to \\mathbb {R}\\). If \\(\\lVert f\\circ f\\rVert _{p(\\nu )}\\geq \\epsilon \\) for some \\(p\\geq 1\\) then \\(\\lVert f\\circ f+1\\rVert _{p'(\\nu )}\\geq 1+\\tfrac {1}{2}\\epsilon \\) for \\(p'=120\\epsilon ^{-1}\\log (3/\\epsilon )\\).","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/unbalancing","latex_link":"sect0002.html#unbalancing","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/unbalancing","lean_decl_name":"unbalancing","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Physics/Unbalancing.lean","lean4_code":"/-- The unbalancing step. Note that we do the physical proof in order to avoid the Fourier\ntransform. -/\nlemma unbalancing' (p : ℕ) (hp : p ≠ 0) (ε : ℝ) (hε₀ : 0 < ε) (hε₁ : ε ≤ 1) (ν : G → ℝ≥0)\n (f : G → ℝ) (g h : G → ℂ) (hf : g ○ g = (↑) ∘ f) (hν : h ○ h = (↑) ∘ ν)\n (hν₁ : ‖((↑) ∘ ν : G → ℝ)‖_[1] = 1) (hε : ε ≤ ‖f‖_[p, ν]) :\n ∃ p' : ℕ, p' ≤ 2 ^ 10 * ε⁻¹ ^ 2 * p ∧ 1 + ε / 2 ≤ ‖f + 1‖_[p', ν] := by\n have := log_ε_pos hε₀ hε₁\n have : 5 ≤ 2 * p + 3 := by omega\n rw [← Nat.one_le_iff_ne_zero] at hp\n refine ⟨⌈120 / ε * log (3 / ε) * p⌉₊, ?_, ?_⟩\n · calc\n (⌈120 / ε * log (3 / ε) * p⌉₊ : ℝ)\n = ⌈120 * ε⁻¹ * log (3 * ε⁻¹) * p⌉₊ := by simp [div_eq_mul_inv]\n _ ≤ 2 * (120 * ε⁻¹ * log (3 * ε⁻¹) * p) := Nat.ceil_le_two_mul <|\n calc\n (2⁻¹ : ℝ) ≤ 120 * 1 * 1 * 1 := by norm_num\n _ ≤ 120 * ε⁻¹ * log (3 * ε⁻¹) * p := by\n gcongr\n · exact (one_le_inv₀ hε₀).2 hε₁\n · rw [← log_exp 1]\n gcongr\n calc\n exp 1 ≤ 2.7182818286 := exp_one_lt_d9.le\n _ ≤ 3 * 1 := by norm_num\n _ ≤ 3 * ε⁻¹ := by gcongr; exact (one_le_inv₀ hε₀).2 hε₁\n · exact mod_cast hp\n _ ≤ 2 * (120 * ε⁻¹ * (3 * ε⁻¹) * p) := by gcongr; exact Real.log_le_self (by positivity)\n _ ≤ 2 * (2 ^ 7 * ε⁻¹ * (2 ^ 2 * ε⁻¹) * p) := by gcongr <;> norm_num\n _ = 2 ^ 10 * ε⁻¹ ^ 2 * p := by ring\n calc\n 1 + ε / 2 ≤ ↑‖f + 1‖_[.ofReal (24 / ε * log (3 / ε) * ↑(2 * p + 3)), ν] :=\n unbalancing'' (2 * p + 3) this ((even_two_mul _).add_odd <| by decide) hε₀ hε₁ hf hν hν₁ <|\n hε.trans <| wLpNorm_mono_right\n (Nat.cast_le.2 <| le_add_of_le_left <| le_mul_of_one_le_left' one_le_two) _ _\n _ ≤ _ := wLpNorm_mono_right ?_ _ _\n norm_cast\n calc\n _ = 24 / ε * log (3 / ε) * ↑(2 * p + 3 * 1) := by simp\n _ ≤ 24 / ε * log (3 / ε) * ↑(2 * p + 3 * p) := by gcongr\n _ = 120 / ε * log (3 / ε) * p := by push_cast; ring\n _ ≤ ⌈120 / ε * log (3 / ε) * p⌉₊ := Nat.le_ceil _\n","line":198,"end_line":238,"proof_status":"formalized"}
{"id":"Lp-orth","label":"Lp-orth","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["unbalancing","reg-conv"],"nlp_text":"There is a constant \\(c{\\gt}0\\) such that the following holds. Let \\(\\epsilon {\\gt}0\\) and \\(p \\geq 2\\) be an integer. Let \\(B \\subseteq G\\) be a regular Bohr set and \\(A\\subseteq B\\) with relative density \\(\\alpha \\). Let \\(\\nu : G \\to \\mathbb {R}_{\\geq 0}\\) be supported on \\(B_\\rho \\), where \\(\\rho \\leq c\\epsilon \\alpha /\\operatorname{rank}(B)\\), such that \\(\\lVert \\nu \\rVert _1=1\\) and \\(\\widehat{\\nu }\\geq 0\\). If \\[ \\lVert (\\mu _A-\\mu _B) \\circ (\\mu _{A}-\\mu _B)\\rVert _{p(\\nu )} \\geq \\epsilon \\, \\mu (B)^{-1}, \\]","doc_url":null,"latex_link":"sect0006.html#Lp-orth","lean_link":null,"lean_decl_name":"Lp-orth","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"}
{"id":"th-int-gen","label":"th-int-gen","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["Lp-orth","flat-on-bohr","pos-def-measures"],"nlp_text":"There is a constant \\(c{\\gt}0\\) such that the following holds. Let \\(\\delta ,\\epsilon \\in (0,1)\\), let \\(p \\geq 1\\) and let \\(k\\) be a positive integer such that \\((k,\\left\\lvert G\\right\\rvert )=1\\). There is a constant \\(C=C(\\epsilon ,\\delta ,k){\\gt}0\\) such that the following holds. For any finite abelian group \\(G\\) and any subset \\(A\\subseteq G\\) with \\(\\left\\lvert A\\right\\rvert =\\alpha \\left\\lvert G\\right\\rvert \\) there exists a regular Bohr set \\(B\\) with \\[ \\operatorname{rank}(B)\\leq Cp^4\\log (2/\\alpha )^5 \\]","doc_url":null,"latex_link":"sect0006.html#th-int-gen","lean_link":null,"lean_decl_name":"th-int-gen","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"}
{"id":"drc","label":"drc","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(p\\geq 2\\) be an even integer. Let \\(B_1,B_2\\subseteq G\\) and \\(\\mu =\\mu _{B_1}\\circ \\mu _{B_2}\\). For any finite set \\(A\\subseteq G\\) and function \\(f:G\\to \\mathbb {R}_{\\geq 0}\\) there exist \\(A_1\\subseteq B_1\\) and \\(A_2\\subseteq B_2\\) such that \\[ \\langle \\mu _{A_1}\\circ \\mu _{A_2}, f\\rangle \\lVert 1_{A}\\circ 1_{A}\\rVert _{p(\\mu )}^p\\leq 2\\langle (1_{A}\\circ 1_{A})^p,f\\rangle _\\mu \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/drc","latex_link":"sect0003.html#drc","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/drc","lean_decl_name":"drc","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Physics/DRC.lean","lean4_code":"lemma drc (hp₂ : 2 ≤ p) (f : G → ℝ≥0) (hf : ∃ x, x ∈ B₁ - B₂ ∧ x ∈ A - A ∧ x ∈ f.support)\n (hB : (B₁ ∩ B₂).Nonempty) (hA : A.Nonempty) :\n ∃ A₁, A₁ ⊆ B₁ ∧ ∃ A₂, A₂ ⊆ B₂ ∧\n ⟪μ_[ℝ] A₁ ○ μ A₂, (↑) ∘ f⟫_[ℝ] * ‖𝟭_[ℝ] A ○ 𝟭 A‖_[p, μ B₁ ○ μ B₂] ^ p\n ≤ 2 * ∑ x, (μ B₁ ○ μ B₂) x * (𝟭_[ℝ] A ○ 𝟭 A) x ^ p * f x ∧\n (4 : ℝ) ⁻¹ * ‖𝟭_[ℝ] A ○ 𝟭 A‖_[p, μ B₁ ○ μ B₂] ^ (2 * p) / #A ^ (2 * p)\n ≤ #A₁ / #B₁ ∧\n (4 : ℝ) ⁻¹ * ‖𝟭_[ℝ] A ○ 𝟭 A‖_[p, μ B₁ ○ μ B₂] ^ (2 * p) / #A ^ (2 * p)\n ≤ #A₂ / #B₂ := by\n have := hB.mono inter_subset_left\n have := hB.mono inter_subset_right\n have hp₀ : p ≠ 0 := by positivity\n have := dLpNorm_conv_pos hp₀ hB hA\n set M : ℝ :=\n 2 ⁻¹ * ‖𝟭_[ℝ] A ○ 𝟭 A‖_[p, μ B₁ ○ μ B₂] ^ p * (sqrt #B₁ * sqrt #B₂) / #A ^ p\n with hM_def\n have hM : 0 < M := by rw [hM_def]; positivity\n replace hf : 0 < ∑ x, (μ_[ℝ] B₁ ○ μ B₂) x * (𝟭 A ○ 𝟭 A) x ^ p * f x := by\n have : 0 ≤ μ_[ℝ] B₁ ○ μ B₂ * (𝟭 A ○ 𝟭 A) ^ p * (↑) ∘ f :=\n mul_nonneg (mul_nonneg (dconv_nonneg mu_nonneg mu_nonneg) <| pow_nonneg\n (dconv_nonneg indicate_nonneg indicate_nonneg) _) fun _ ↦ by simp -- positivity\n refine Fintype.sum_pos <| this.lt_iff_ne'.2 <| support_nonempty_iff.1 ?_\n simp only [support_comp_eq, Set.Nonempty, and_assoc, support_mul', support_dconv,\n indicate_nonneg, mu_nonneg, support_indicate, support_mu, NNReal.coe_eq_zero, iff_self,\n forall_const, Set.mem_inter_iff, ← coe_sub, mem_coe, support_pow' _ hp₀, hf]\n set A₁ := fun s ↦ B₁ ∩ c p A s\n set A₂ := fun s ↦ B₂ ∩ c p A s\n set g : (Fin p → G) → ℝ := fun s ↦ #(A₁ s) * #(A₂ s) with hg_def\n have hg : ∀ s, 0 ≤ g s := fun s ↦ by rw [hg_def]; dsimp; positivity\n have hgB : ∑ s, g s = #B₁ * #B₂ * ‖𝟭_[ℝ] A ○ 𝟭 A‖_[p, μ B₁ ○ μ B₂] ^ p := by\n have hAdconv : 0 ≤ 𝟭_[ℝ] A ○ 𝟭 A := dconv_nonneg indicate_nonneg indicate_nonneg\n simpa only [wLpNorm_pow_eq_sum_norm hp₀, norm_of_nonneg (hAdconv _), NNReal.smul_def,\n NNReal.coe_dconv, NNReal.coe_comp_mu, wInner_one_eq_sum, Pi.one_apply, inner_apply',\n conj_to_real, mul_one, sum_dconv, sum_indicate, nsmul_eq_mul, Nat.cast_mul] using\n lemma_0 p B₁ B₂ A 1\n suffices ∑ s, ⟪𝟭_[ℝ] (A₁ s) ○ 𝟭 (A₂ s), (↑) ∘ f⟫_[ℝ] * ‖𝟭_[ℝ] A ○ 𝟭 A‖_[p, μ B₁ ○ μ B₂] ^ p\n < ∑ s, 𝟭 ({s | M ^ 2 ≤ g s} : Finset _) s * g s *\n (2 * ∑ x, (μ B₁ ○ μ B₂) x * (𝟭_[ℝ] A ○ 𝟭 A) x ^ p * f x) by\n obtain ⟨s, -, hs⟩ := exists_lt_of_sum_lt this\n refine ⟨_, inter_subset_left (s₂ := c p A s), _, inter_subset_left (s₂ := c p A s), ?_⟩\n simp only [indicate_apply, mem_filter, mem_univ, true_and, boole_mul] at hs\n split_ifs at hs with h; swap\n · simp only [zero_mul, wInner_one_eq_sum, Function.comp_apply, RCLike.inner_apply',\n RCLike.conj_to_real] at hs\n have : 0 ≤ 𝟭_[ℝ] (A₁ s) ○ 𝟭 (A₂ s) := dconv_nonneg indicate_nonneg indicate_nonneg\n -- positivity\n cases hs.not_ge <|\n mul_nonneg (sum_nonneg fun x _ ↦ mul_nonneg (this _) <| by positivity) <| by positivity\n have : (4 : ℝ) ⁻¹ * ‖𝟭_[ℝ] A ○ 𝟭 A‖_[p, μ B₁ ○ μ B₂] ^ (2 * p) / #A ^ (2 * p)\n ≤ #(A₁ s) / #B₁ * (#(A₂ s) / #B₂) := by\n rw [div_mul_div_comm, le_div_iff₀ (by positivity)]\n simpa [hg_def, hM_def, mul_pow, div_pow, pow_mul', show (2 : ℝ) ^ 2 = 4 by norm_num,\n mul_div_right_comm] using h\n refine ⟨(lt_of_mul_lt_mul_left (hs.trans_eq' ?_) <| hg s).le, this.trans <|\n mul_le_of_le_one_right ?_ <| div_le_one_of_le₀ ?_ ?_, this.trans <|\n mul_le_of_le_one_left ?_ <| div_le_one_of_le₀ ?_ ?_⟩\n · simp_rw [A₁, A₂, g, ← card_smul_mu, smul_dconv, dconv_smul, ← Nat.cast_smul_eq_nsmul ℝ,\n wInner_smul_left, smul_eq_mul, star_trivial, mul_assoc, A₁, A₂]\n any_goals positivity\n all_goals exact Nat.cast_le.2 <| card_mono inter_subset_left\n rw [← sum_mul, lemma_0, nsmul_eq_mul, Nat.cast_mul, ← sum_mul, mul_right_comm, ← hgB,\n mul_left_comm, ← mul_assoc]\n simp only [indicate_apply, boole_mul, mem_filter, mem_univ, true_and, ← sum_filter,\n mul_lt_mul_iff_left₀ hf, Function.comp_apply]\n by_cases h : ∀ s, g s ≠ 0 → M ^ 2 ≤ g s\n · rw [← sum_filter_ne_zero (s := filter _ _), Finset.filter_comm,\n filter_true_of_mem fun s hs ↦ h s (mem_filter.1 hs).2, ← sum_filter_ne_zero]\n refine lt_mul_of_one_lt_left (sum_pos (fun s hs ↦ (h _ (mem_filter.1 hs).2).trans_lt' <|\n by positivity) ?_) one_lt_two\n rw [← sum_filter_ne_zero] at hgB\n exact nonempty_of_sum_ne_zero <| hgB.trans_ne <| by positivity\n push_neg at h\n obtain ⟨s, hs⟩ := h\n suffices h : (2 : ℝ) * ∑ s with g s < M ^ 2, g s < ∑ s, g s by\n refine (le_or_lt_of_add_le_add ?_).resolve_left h.not_ge\n simp_rw [← not_le, ← compl_filter, ← two_mul, ← mul_add, sum_compl_add_sum]\n rfl\n rw [← lt_div_iff₀' (zero_lt_two' ℝ), div_eq_inv_mul]\n calc\n ∑ s with g s < M ^ 2, g s = ∑ s with g s < M ^ 2 ∧ g s ≠ 0, sqrt (g s) * sqrt (g s)\n := by simp_rw [mul_self_sqrt (hg _), ← filter_filter, sum_filter_ne_zero]\n _ < ∑ s with g s < M ^ 2 ∧ g s ≠ 0, M * sqrt (g s)\n := sum_lt_sum_of_nonempty ⟨s, mem_filter.2 ⟨mem_univ _, hs.symm⟩⟩ ?_\n _ ≤ ∑ s, M * sqrt (g s) := sum_le_univ_sum_of_nonneg fun s ↦ by positivity\n _ = M * (∑ s, sqrt #(A₁ s) * sqrt #(A₂ s))\n := by simp_rw [mul_sum, g, sqrt_mul <| Nat.cast_nonneg _]\n _ ≤ M * (sqrt (∑ s, #(A₁ s)) * sqrt (∑ s, #(A₂ s))) := by\n gcongr; exact sum_sqrt_mul_sqrt_le _ fun i ↦ by positivity fun i ↦ by positivity\n _ = _ := ?_\n · simp only [mem_filter, mem_univ, true_and, and_imp]\n exact fun s hsM hs ↦ mul_lt_mul_of_pos_right ((sqrt_lt' hM).2 hsM) <|\n sqrt_pos.2 <| (hg _).lt_of_ne' hs\n rw [sum_cast_c, sum_cast_c, sqrt_mul', sqrt_mul', mul_mul_mul_comm (sqrt _), mul_self_sqrt,\n ← mul_assoc, hM_def, div_mul_cancel₀, ← sqrt_mul, mul_assoc, mul_self_sqrt, hgB, mul_right_comm,\n mul_assoc]\n all_goals positivity\n","line":73,"end_line":168,"proof_status":"formalized"}
{"id":"sift","label":"sift","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["drc"],"nlp_text":"Let \\(\\epsilon ,\\delta {\\gt}0\\) and \\(p\\geq \\max (2,\\epsilon ^{-1}\\log (2/\\delta ))\\) be an even integer. Let \\(B_1,B_2\\subseteq G\\), and let \\(\\mu =\\mu _{B_1}\\circ \\mu _{B_2}\\). For any finite set \\(A\\subseteq G\\), if \\[ S=\\{ x\\in G: 1_{A}\\circ 1_{A}(x){\\gt}(1-\\epsilon )\\lVert 1_{A}\\circ 1_{A}\\rVert _{p(\\mu )}\\} , \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/sifting","latex_link":"sect0003.html#sift","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/sifting","lean_decl_name":"sifting","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Physics/DRC.lean","lean4_code":"lemma sifting (B₁ B₂ : Finset G) (hε : 0 < ε) (hε₁ : ε ≤ 1) (hδ : 0 < δ) (hp : Even p)\n (hp₂ : 2 ≤ p) (hpε : ε⁻¹ * log (2 / δ) ≤ p) (hB : (B₁ ∩ B₂).Nonempty) (hA : A.Nonempty)\n (hf : ∃ x, x ∈ B₁ - B₂ ∧ x ∈ A - A ∧ x ∉ s p ε B₁ B₂ A) :\n ∃ A₁, A₁ ⊆ B₁ ∧ ∃ A₂, A₂ ⊆ B₂ ∧ 1 - δ ≤ ∑ x ∈ s p ε B₁ B₂ A, (μ A₁ ○ μ A₂) x ∧\n (4 : ℝ)⁻¹ * ‖𝟭_[ℝ] A ○ 𝟭 A‖_[p, μ B₁ ○ μ B₂] ^ (2 * p) / #A ^ (2 * p) ≤\n #A₁ / #B₁ ∧\n (4 : ℝ)⁻¹ * ‖𝟭_[ℝ] A ○ 𝟭 A‖_[p, μ B₁ ○ μ B₂] ^ (2 * p) / #A ^ (2 * p) ≤\n #A₂ / #B₂ := by\n obtain ⟨A₁, hAB₁, A₂, hAB₂, h, hcard₁, hcard₂⟩ :=\n drc hp₂ (𝟭 (s p ε B₁ B₂ A)ᶜ)\n (by simpa only [support_indicate, coe_compl, Set.mem_compl_iff, mem_coe]) hB hA\n refine ⟨A₁, hAB₁, A₂, hAB₂, ?_, hcard₁, hcard₂⟩\n have hp₀ : 0 < p := by positivity\n have aux (c : Finset G) (r)\n (h : (4 : ℝ)⁻¹ * ‖𝟭_[ℝ] A ○ 𝟭 A‖_[p, μ B₁ ○ μ B₂] ^ (2 * p) / #A ^ (2 * p) ≤ #c / r) :\n c.Nonempty := by\n simp_rw [nonempty_iff_ne_empty]\n rintro rfl\n simp [pow_mul', inv_mul_le_iff₀ (zero_lt_four' ℝ), div_nonpos_iff,\n (pow_pos (dLpNorm_conv_pos hp₀.ne' hB hA) 2).not_ge, hp₀.ne', hA.ne_empty] at h\n have hA₁ : A₁.Nonempty := aux _ _ hcard₁\n have hA₂ : A₂.Nonempty := aux _ _ hcard₂\n clear hcard₁ hcard₂ aux\n rw [sub_le_comm]\n calc\n _ = ∑ x ∈ (s p ε B₁ B₂ A)ᶜ, (μ A₁ ○ μ A₂) x := ?_\n _ = ⟪μ_[ℝ] A₁ ○ μ A₂, (↑) ∘ 𝟭_[ℝ≥0] ((s (↑p) ε B₁ B₂ A)ᶜ)⟫_[ℝ] := by\n simp [wInner_one_eq_sum, -mem_compl, -mem_s, indicate_apply]\n _ ≤ _ := (le_div_iff₀ <| dLpNorm_conv_pos hp₀.ne' hB hA).2 h\n _ ≤ _ := ?_\n · simp_rw [sub_eq_iff_eq_add', sum_add_sum_compl, sum_dconv, map_mu]\n rw [sum_mu _ hA₁, sum_mu _ hA₂, one_mul]\n rw [div_le_iff₀ (dLpNorm_conv_pos hp₀.ne' hB hA), ← le_div_iff₀' (zero_lt_two' ℝ)]\n simp only [apply_ite NNReal.toReal, indicate_apply, NNReal.coe_one, NNReal.coe_zero, mul_boole,\n Fintype.sum_ite_mem, mul_div_right_comm]\n calc\n ∑ x ∈ (s p ε B₁ B₂ A)ᶜ, (μ B₁ ○ μ B₂) x * (𝟭 A ○ 𝟭 A) x ^ p ≤\n ∑ x ∈ (s p ε B₁ B₂ A)ᶜ,\n (μ B₁ ○ μ B₂) x * ((1 - ε) * ‖𝟭_[ℝ] A ○ 𝟭 A‖_[p, μ B₁ ○ μ B₂]) ^ p := by\n gcongr with x hx\n · exact dconv_apply_nonneg mu_nonneg mu_nonneg x\n · exact dconv_apply_nonneg indicate_nonneg indicate_nonneg _\n · simpa using hx\n _ ≤ ∑ x, (μ B₁ ○ μ B₂) x * ((1 - ε) * ‖𝟭_[ℝ] A ○ 𝟭 A‖_[p, μ B₁ ○ μ B₂]) ^ p := by\n gcongr\n · intros\n exact mul_nonneg (dconv_apply_nonneg mu_nonneg mu_nonneg _) <| hp.pow_nonneg _\n · exact subset_univ _\n _ = ‖μ_[ℝ] B₁‖_[1] * ‖μ_[ℝ] B₂‖_[1] * ((1 - ε) ^ p * ‖𝟭_[ℝ] A ○ 𝟭 A‖_[p, μ B₁ ○ μ B₂] ^ p)\n := ?_\n _ ≤ _ :=\n mul_le_of_le_one_left (mul_nonneg (hp.pow_nonneg _) <| hp.pow_nonneg _) <|\n mul_le_one₀ dL1Norm_mu_le_one (NNReal.coe_nonneg _) dL1Norm_mu_le_one\n _ ≤ _ := mul_le_mul_of_nonneg_right ?_ <| hp.pow_nonneg _\n · have : 0 ≤ μ_[ℝ] B₁ ○ μ B₂ := dconv_nonneg mu_nonneg mu_nonneg\n simp_rw [← NNReal.coe_mul, ← dL1Norm_dconv mu_nonneg mu_nonneg, dL1Norm_eq_sum_nnnorm,\n nnnorm_of_nonneg (this _), NNReal.coe_sum, sum_mul, mul_pow]\n simp\n calc\n (1 - ε) ^ p ≤ exp (-ε) ^ p := by gcongr; exacts [sub_nonneg.2 hε₁, one_sub_le_exp_neg _]\n _ = exp (-(ε * p)) := by rw [← neg_mul, exp_mul, rpow_natCast]\n _ ≤ exp (-log (2 / δ)) :=\n (exp_monotone <| neg_le_neg <| (inv_mul_le_iff₀ <| by positivity).1 hpε)\n _ = δ / 2 := by rw [exp_neg, exp_log, inv_div]; positivity\n","line":171,"end_line":234,"proof_status":"formalized"}
{"id":"sift_cor","label":"sift_cor","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["sift"],"nlp_text":"Let \\(\\epsilon ,\\delta {\\gt}0\\) and \\(p\\geq \\max (2,\\epsilon ^{-1}\\log (2/\\delta ))\\) be an even integer and \\(\\mu \\equiv 1/N\\). If \\(A\\subseteq G\\) has density \\(\\alpha \\) and \\[ S = \\{ x : \\mu _A\\circ \\mu _A(x) \\geq (1-\\epsilon )\\| \\mu _A\\circ \\mu _A\\| _{p(\\mu )}\\} \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/sifting_cor","latex_link":"sect0003.html#sift_cor","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/sifting_cor","lean_decl_name":"sifting_cor","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Physics/DRC.lean","lean4_code":"/-- Special case of `sifting` when `B₁ = B₂ = univ`. -/\nlemma sifting_cor (hε : 0 < ε) (hε₁ : ε ≤ 1) (hδ : 0 < δ) (hp : Even p) (hp₂ : 2 ≤ p)\n (hpε : ε⁻¹ * log (2 / δ) ≤ p) (hA : A.Nonempty) :\n ∃ A₁ A₂, 1 - δ ≤ ∑ x ∈ s p ε univ univ A, (μ A₁ ○ μ A₂) x ∧\n (4 : ℝ)⁻¹ * A.dens ^ (2 * p) ≤ A₁.dens ∧\n (4 : ℝ)⁻¹ * A.dens ^ (2 * p) ≤ A₂.dens := by\n by_cases hf : ∃ x, x ∈ A - A ∧ (𝟭 A ○ 𝟭 A) x ≤ (1 - ε) * ‖𝟭_[ℝ] A ○ 𝟭 A‖_[p, μ univ]\n · have hp₀ : p ≠ 0 := by positivity\n have :\n (4 : ℝ)⁻¹ * A.dens ^ (2 * p) ≤\n 4⁻¹ * ‖𝟭_[ℝ] A ○ 𝟭 A‖_[p, μ univ] ^ (2 * p) / #A ^ (2 * p) := by\n rw [mul_div_assoc, ← div_pow]\n gcongr\n rw [nnratCast_dens, le_div_iff₀ (by positivity), ← mul_div_right_comm]\n calc\n _ = (‖𝟭_[ℝ] A ○ 𝟭 A‖_[1, μ univ] : ℝ) := by\n simp [mu, wLpNorm_smul_right, dL1Norm_dconv, card_univ, inv_mul_eq_div]\n _ ≤ _ := wLpNorm_mono_right (one_le_two.trans <| by norm_cast) _ _\n obtain ⟨A₁, -, A₂, -, h, hcard₁, hcard₂⟩ :=\n sifting univ univ hε hε₁ hδ hp hp₂ hpε (by simp) hA (by simpa)\n exact ⟨A₁, A₂, h, this.trans <| by simpa [nnratCast_dens] using hcard₁,\n this.trans <| by simpa [nnratCast_dens] using hcard₂⟩\n · refine ⟨A, A, ?_, ?_⟩\n · rw [Fintype.sum_subset]\n · simpa [sum_dconv, sum_mu, hA] using hδ.le\n · simpa [← Function.mem_support, ← coe_sub] using hf\n · rw [and_self]\n calc\n (4 : ℝ)⁻¹ * A.dens ^ (2 * p) ≤ 1 * A.dens ^ 1 := by\n gcongr ?_ * ?_\n · norm_num\n · exact pow_le_pow_of_le_one (by positivity) (mod_cast A.dens_le_one) (by omega)\n _ = A.dens := by simp\n","line":237,"end_line":269,"proof_status":"formalized"}
{"id":"flat-on-bohr","label":"flat-on-bohr","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["prop-it","bourgain-trick"],"nlp_text":"There is a constant \\(c{\\gt}0\\) such that the following holds. Let \\({\\epsilon ,\\delta \\in (0,1)}\\) and \\(p,k\\geq 1\\) be integers such that \\((k,\\left\\lvert G\\right\\rvert )=1\\). For any \\(A\\subseteq G\\) with density \\(\\alpha \\) there is a regular Bohr set \\(B\\) with \\[ d=\\operatorname{rank}(B) =O_{\\epsilon }\\left(\\mathcal{L}{\\alpha }^5p^4\\right) \\quad \\text{and}\\quad \\left\\lvert B\\right\\rvert \\geq \\exp \\left(-O_{\\epsilon ,\\delta }(\\mathcal{L}{\\alpha }^6p^5\\mathcal{L}{\\alpha /p})\\right)\\left\\lvert G\\right\\rvert \\]","doc_url":null,"latex_link":"sect0006.html#flat-on-bohr","lean_link":null,"lean_decl_name":"flat-on-bohr","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"}
{"id":"bohr-size","label":"bohr-size","background_color":"#A3D6FF","border_color":"blue","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["bohr-set"],"nlp_text":"If \\(\\rho \\in (0,1)\\) and \\(\\nu :\\widehat{G}\\to \\mathbb {R}\\) then \\[ \\left\\lvert \\mathrm{Bohr}(\\rho \\cdot \\nu )\\right\\rvert \\geq (\\rho /4)^{\\mathrm{rk}(\\nu )}\\left\\lvert \\mathrm{Bohr}(\\nu )\\right\\rvert . \\]","doc_url":null,"latex_link":"sect0005.html#bohr-size","lean_link":null,"lean_decl_name":"bohr-size","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"}
{"id":"bohr-regularity","label":"bohr-regularity","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["bohr-size","bohr-reg-def"],"nlp_text":"For any \\(\\nu :\\widehat{G}\\to \\mathbb {R}\\) there exists \\(\\rho \\in [\\frac{1}{2},1]\\) such that \\(\\rho \\cdot \\nu \\) is regular.","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/BohrSet.regularity","latex_link":"sect0005.html#bohr-regularity","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/BohrSet.regularity","lean_decl_name":"BohrSet.regularity","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Prereqs/Bohr/Regular.lean","lean4_code":"/-- **Bohr Set Regularity**. Any Bohr set can be dilated by a small amount to become a regular Bohr\nset. -/\nlemma regularity (B : BohrSet G) : ∃ ρ : ℝ, 2⁻¹ ≤ ρ ∧ ρ ≤ 1 ∧ (ρ • B).IsRegular := sorry\n","line":17,"end_line":19,"proof_status":"formalized"}
{"id":"main-int-count","label":"main-int-count","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["th-int-gen","hoelder-lifting"],"nlp_text":"If \\(A\\subseteq \\{ 1,\\ldots ,N\\} \\) has size \\(\\left\\lvert A\\right\\rvert =\\alpha N\\), then \\(A\\) contains at least \\[ \\exp (-O(\\mathcal{L}{\\alpha }^{12}))N^2 \\]","doc_url":null,"latex_link":"sect0006.html#main-int-count","lean_link":null,"lean_decl_name":"main-int-count","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"}
{"id":"bourgain-trick","label":"bourgain-trick","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["reg-conv"],"nlp_text":"There is a constant \\(c{\\gt}0\\) such that the following holds. Let \\(B\\) be a regular Bohr set of rank \\(d\\), suppose \\(A\\subseteq B\\) has density \\(\\alpha \\), let \\(\\epsilon {\\gt}0\\), and suppose \\(B',B''\\subseteq B_\\rho \\) where \\(\\rho \\leq c\\alpha \\epsilon /d\\). Then either there is some translate \\(A'\\) of \\(A\\) such that \\(\\left\\lvert A'\\cap B'\\right\\rvert \\geq (1-\\epsilon )\\alpha \\left\\lvert B'\\right\\rvert \\) and \\(\\left\\lvert A'\\cap B''\\right\\rvert \\geq (1-\\epsilon )\\alpha \\left\\lvert B''\\right\\rvert \\), or \\(\\lVert 1_{A}\\ast \\mu _{B'}\\rVert _\\infty \\geq (1+\\epsilon /2)\\alpha \\), or \\(\\lVert 1_{A}\\ast \\mu _{B''}\\rVert _\\infty \\geq (1+\\epsilon /2)\\alpha \\).","doc_url":null,"latex_link":"sect0005.html#bourgain-trick","lean_link":null,"lean_decl_name":"bourgain-trick","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"}
{"id":"mzi","label":"mzi","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(m\\geq 1\\). If \\(f:G\\to \\mathbb {R}\\) is such that \\(\\mathbb {E}_x f(x)=0\\) and \\(\\left\\lvert f(x)\\right\\rvert \\leq 2\\) for all \\(x\\) then \\[ \\mathbb {E}_{x_1,\\ldots ,x_n} \\left\\lvert \\sum _{i=1}^n f(x_i)\\right\\rvert ^{2m} \\leq (4mn)^{m}. \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/Real.marcinkiewicz_zygmund'","latex_link":"chap-ap.html#mzi","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/Real.marcinkiewicz_zygmund'","lean_decl_name":"Real.marcinkiewicz_zygmund'","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/YaelDillies/LeanAPAP/96167d24d9724269561f5f1ed7d29d779157e4da/LeanAPAP/Prereqs/MarcinkiewiczZygmund.lean","lean4_code":"/-- The **Marcinkiewicz-Zygmund inequality** for real-valued functions, with a slightly better\nconstant than `Real.marcinkiewicz_zygmund`. -/\ntheorem marcinkiewicz_zygmund' (m : ℕ) (f : ι → ℝ) (hf : ∀ i, ∑ a ∈ A ^^ n, f (a i) = 0) :\n ∑ a ∈ A ^^ n, (∑ i, f (a i)) ^ (2 * m) ≤\n (4 * m) ^ m * ∑ a ∈ A ^^ n, (∑ i, f (a i) ^ 2) ^ m := by\n obtain rfl | hm := m.eq_zero_or_pos\n · simp\n have hm' : 1 ≤ m := by rwa [Nat.succ_le_iff]\n obtain rfl | hA := A.eq_empty_or_nonempty\n · cases n <;> cases m <;> simp\n let B := A ^^ n\n calc\n ∑ a ∈ B, (∑ i, f (a i)) ^ (2 * m)\n ≤ ∑ a ∈ A ^^ n, (∑ b ∈ B, |∑ i, (f (a i) - f (b i))| ^ (2 * m)) / #A ^ n := by\n gcongr; simpa [pow_mul, sq_abs] using step_one' hA f hf (2 * m) _\n _ = (∑ a ∈ A ^^ n, ∑ b ∈ A ^^ n, ∑ k ∈ piAntidiag univ (2 * m) with ∀ i, 2 ∣ k i,\n multinomial univ (fun i ↦ k i) * ∏ t, (f (a t) - f (b t)) ^ k t) / #A ^ n := by\n rw [← sum_div]\n simp only [pow_mul, sq_abs]\n simp only [← pow_mul]\n rw [step_two, step_three, mul_comm, inv_pow, ← div_eq_mul_inv, div_div]\n simp only [step_four, mul_ite, mul_zero, mul_one, ← sum_filter, ← sum_mul, even_iff_two_dvd]\n rw [mul_comm, mul_div_mul_left]\n positivity\n _ = (∑ a ∈ A ^^ n, ∑ b ∈ A ^^ n, ∑ k ∈ (piAntidiag univ m).map\n ⟨(2 • ·), fun _ _ h ↦ funext fun i ↦ mul_right_injective₀ two_ne_zero (congr_fun h i)⟩,\n multinomial univ (fun i ↦ k i) * ∏ t, (f (a t) - f (b t)) ^ k t) / #A ^ n := by\n rw [map_nsmul_piAntidiag_univ m (ι := Fin n) (n := 2) two_ne_zero]\n _ = (∑ a ∈ A ^^ n, ∑ b ∈ A ^^ n, ∑ k ∈ piAntidiag univ m,\n multinomial univ (fun i ↦ 2 * k i) * ∏ t, (f (a t) - f (b t)) ^ (2 * k t)) / #A ^ n := by\n simp\n _ ≤ _ := end_step hm' hA","line":182,"end_line":213,"proof_status":"formalized"}
{"id":"lots_of_diagonals","label":"lots_of_diagonals","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(A\\subseteq G\\) and \\(k\\geq 1\\) and \\(L\\subseteq A^k\\). Then there exists some \\({\\vec{a}}\\in L\\) such that \\[ \\# \\{ t\\in G : {\\vec{a}}+(t,\\ldots ,t)\\in L\\} \\geq \\frac{\\lvert L\\rvert }{\\lvert A+S\\rvert ^k}\\lvert S\\rvert . \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/big_shifts","latex_link":"chap-ap.html#lots_of_diagonals","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/big_shifts","lean_decl_name":"big_shifts","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Physics/AlmostPeriodicity.lean","lean4_code":"lemma big_shifts (S : Finset G) (L : Finset (Fin k → G)) (hk : k ≠ 0)\n (hL' : L.Nonempty) (hL : L ⊆ A ^^ k) :\n ∃ a : Fin k → G, a ∈ L ∧\n #L * #S ≤ #(A + S) ^ k * #{t | (a - fun _ ↦ t) ∈ L} := by\n rcases S.eq_empty_or_nonempty with (rfl | hS)\n · simpa only [card_empty, mul_zero, zero_le', and_true] using hL'\n have hS' : 0 < #S := by rwa [card_pos]\n have : #(L + S.piDiag _) ≤ #(A + S) ^ k := by\n refine (card_le_card (add_subset_add_right hL)).trans ?_\n rw [← Fintype.card_piFinset_const]\n refine card_le_card fun i hi ↦ ?_\n simp only [mem_add, mem_piDiag, Fintype.mem_piFinset, exists_exists_and_eq_and] at hi ⊢\n obtain ⟨y, hy, a, ha, rfl⟩ := hi\n intro j\n exact ⟨y j, hy _, a, ha, rfl⟩\n rsuffices ⟨a, ha, h⟩ : ∃ a ∈ L, #L * #S ≤ #(L + S.piDiag _) * #{t | (a - fun _ ↦ t) ∈ L}\n · exact ⟨a, ha, h.trans (Nat.mul_le_mul_right _ this)⟩\n clear! A\n have : #L ^ 2 * #S ≤\n #(L + S.piDiag _) * ∑ l₁ ∈ L, ∑ l₂ ∈ L, ite (l₁ - l₂ ∈ univ.piDiag (Fin k)) 1 0 := by\n refine Nat.le_of_mul_le_mul_left ?_ hS'\n rw [mul_comm, mul_assoc, ← sq, ← mul_pow, mul_left_comm, ← mul_assoc, ← big_shifts_step1 L hk]\n exact_mod_cast @big_shifts_step2 G _ _ _ _ _ L hk\n simp only [reindex_count L hk hL'] at this\n rw [sq, mul_assoc, ← smul_eq_mul, mul_sum] at this\n rw [← sum_const] at this\n exact exists_le_of_sum_le hL' this\n","line":192,"end_line":218,"proof_status":"formalized"}
{"id":"bohr-set","label":"bohr-set","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(\\nu : \\widehat{G} \\to \\mathbb {R}\\). The corresponding Bohr set is defined to be \\[ \\mathrm{Bohr}(\\nu )=\\left\\{ x\\in G : \\left\\lvert 1-\\gamma (x)\\right\\rvert \\leq \\nu (\\gamma )\\textrm{ for all }\\gamma \\in \\Gamma \\right\\} . \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/BohrSet","latex_link":"sect0005.html#bohr-set","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/BohrSet","lean_decl_name":"BohrSet","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Prereqs/Bohr/Basic.lean","lean4_code":"/-- A *Bohr set* `B` on an additive group `G` is a finite set of characters of `G`, called the\n*frequencies*, along with an extended non-negative real number for each frequency `ψ`, called the\n*width of `B` at `ψ`*.\n\nA Bohr set `B` is thought of as the set `{x | ∀ ψ ∈ B.frequencies, ‖1 - ψ x‖ ≤ B.width ψ}`. This is\nthe *chord-length* convention. The arc-length convention would instead be\n`{x | ∀ ψ ∈ B.frequencies, |arg (ψ x)| ≤ B.width ψ}`.\n\nNote that this set **does not** uniquely determine `B` (in particular, it does not uniquely\ndetermine either `B.frequencies` or `B.width`). -/\n@[ext]\nstructure BohrSet (G : Type*) [AddCommGroup G] where\n frequencies : Finset (AddChar G ℂ)\n /-- The width of a Bohr set at a frequency. Note that this width corresponds to chord-length. -/\n ewidth : AddChar G ℂ → ℝ≥0∞\n mem_frequencies : ∀ ψ, ψ ∈ frequencies ↔ ewidth ψ < ⊤\n","line":7,"end_line":22,"proof_status":"formalized"}
{"id":"bohr-reg-def","label":"bohr-reg-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["bohr-set"],"nlp_text":"We say \\(\\nu :\\widehat{G}\\to \\mathbb {R}\\) is regular if, with \\(d=\\mathrm{rk}(\\nu )\\), for all \\(\\kappa \\in \\mathbb {R}\\) with \\(\\left\\lvert \\kappa \\right\\rvert \\leq 1/100d\\) we have \\[ (1-100 d\\left\\lvert \\kappa \\right\\rvert )\\leq \\frac{\\left\\lvert \\mathrm{Bohr}((1+\\kappa )\\nu )\\right\\rvert }{\\left\\lvert \\mathrm{Bohr}(\\nu )\\right\\rvert }\\leq (1+ 100 d\\left\\lvert \\kappa \\right\\rvert ) \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/BohrSet.IsRegular","latex_link":"sect0005.html#bohr-reg-def","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/BohrSet.IsRegular","lean_decl_name":"BohrSet.IsRegular","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Prereqs/Bohr/Regular.lean","lean4_code":"/-- A Bohr set `B` is *regular* if the dilates of `B` by numbers close to `1` are of comparable size\nto `B`. -/\nstructure IsRegular (B : BohrSet G) : Prop where\n le_card_smul (κ : ℝ) (hκ₀ : 0 ≤ κ) (hκ : κ ≤ B.rank / 100) :\n (1 - 100 * B.rank * κ) * Nat.card B ≤ Nat.card ↥((1 - κ) • B)\n card_smul_le (κ : ℝ) (hκ₀ : 0 ≤ κ) (hκ : κ ≤ B.rank / 100) :\n Nat.card ↥((1 + κ) • B) ≤ (1 + 100 * B.rank * κ) * Nat.card B\n","line":9,"end_line":15,"proof_status":"formalized"}
{"id":"hoelder-lifting","label":"hoelder-lifting","background_color":"#A3D6FF","border_color":"blue","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["bohr-reg-def"],"nlp_text":"There is a constant \\(c{\\gt}0\\) such that the following holds. Let \\(\\epsilon {\\gt}0\\). Let \\(B \\subseteq G\\) be a regular Bohr set and \\(A\\subseteq B\\) with relative density \\(\\alpha \\), and let \\(B' \\subseteq B_{c\\epsilon \\alpha /\\operatorname{rank}(B)}\\) be a regular Bohr set and \\(C\\subseteq B'\\) with relative density \\(\\gamma \\). Either \\(\\left\\lvert \\langle \\mu _A*\\mu _A, \\mu _{C} \\rangle - \\mu (B)^{-1} \\right\\rvert \\leq \\epsilon \\mu (B)^{-1}\\) or there is some \\(p \\ll \\mathcal{L}{\\gamma }\\) such that \\(\\lVert (\\mu _A-\\mu _B)*(\\mu _A-\\mu _B)\\rVert _{p(\\mu _{B'})} \\geq \\tfrac {1}{2}\\epsilon \\mu (B)^{-1}\\).","doc_url":null,"latex_link":"sect0006.html#hoelder-lifting","lean_link":null,"lean_decl_name":"hoelder-lifting","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"}
{"id":"reg-conv","label":"reg-conv","background_color":"#A3D6FF","border_color":"blue","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["bohr-reg-def"],"nlp_text":"If \\(B\\) is a regular Bohr set of rank \\(d\\) and \\(\\mu :G\\to \\mathbb {R}_{\\geq 0}\\) is supported on \\(B_\\rho \\), with \\(\\rho \\in (0,1)\\), then \\[ \\lVert \\mu _B*\\mu - \\mu _B \\rVert _{1} \\ll \\rho d\\lVert \\mu \\rVert _1. \\]","doc_url":null,"latex_link":"sect0005.html#reg-conv","lean_link":null,"lean_decl_name":"reg-conv","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"}
{"id":"bohr-majorise","label":"bohr-majorise","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["reg-conv"],"nlp_text":"There is a constant \\(c{\\gt}0\\) such that the following holds. Let \\(B\\) be a regular Bohr set of rank \\(d\\) and \\(L\\geq 1\\) be any integer. If \\(\\nu :G\\to \\mathbb {R}_{\\geq 0}\\) is supported on \\(L B_\\rho \\), where \\(\\rho \\leq c/Ld\\), and \\(\\lVert \\nu \\rVert _1=1\\), then \\[ \\mu _B \\leq 2\\mu _{B_{1+L\\rho }}\\ast \\nu . \\]","doc_url":null,"latex_link":"sect0005.html#bohr-majorise","lean_link":null,"lean_decl_name":"bohr-majorise","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"}
{"id":"int","label":"int","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["main-int-count"],"nlp_text":"If \\(A\\subseteq \\{ 1,\\ldots ,N\\} \\) contains no non-trivial three-term arithmetic progressions then \\[ \\lvert A\\rvert \\leq \\frac{N}{\\exp (-c(\\log N)^{1/12})} \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/int","latex_link":"sect0006.html#int","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/int","lean_decl_name":"int","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Integer.lean","lean4_code":"theorem int {A : Finset ℕ} {N : ℕ} (hAN : A ⊆ range N) (hA : ThreeAPFree (α := ℕ) A) :\n ∃ c > 0, #A ≤ N / exp (- c * log N ^ (12⁻¹ : ℝ)) := sorry\n","line":6,"end_line":7,"proof_status":"formalized"}
{"id":"circ_expand","label":"circ_expand","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For any function \\(f\\) with \\(\\sum f(x)=1\\) \\[ f\\circ f-1/N = (f-1/N)\\circ (f-1/N). \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/balance_dconv","latex_link":"sect0004.html#circ_expand","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/balance_dconv","lean_decl_name":"balance_dconv","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Prereqs/Convolution/Discrete/Basic.lean","lean4_code":"@[simp] lemma balance_dconv (f g : G → R) : balance (f ○ g) = balance f ○ balance g := by\n simpa [balance, dconv_sub, sub_dconv, expect_dconv, map_expect]\n using (mul_smul_comm _ _ _).trans (smul_mul_assoc _ _ _).symm\n","line":142,"end_line":144,"proof_status":"formalized"}
{"id":"large_spec","label":"large_spec","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(G\\) be a finite abelian group and \\(f:G\\to \\mathbb {C}\\). Let \\(\\eta \\in \\mathbb {R}\\). The \\(\\eta \\)-large spectrum is defined to be \\[ \\Delta _\\eta (f) = \\{ \\gamma \\in \\widehat{G} : \\lvert \\widehat{f}(\\gamma )\\rvert \\geq \\eta \\lVert f\\rVert _1\\} . \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/largeSpec","latex_link":"sect0001.html#large_spec","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/largeSpec","lean_decl_name":"largeSpec","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Prereqs/LargeSpec.lean","lean4_code":"/-- The `η`-large spectrum of a function. -/\nnoncomputable def largeSpec (f : G → ℂ) (η : ℝ) : Finset (AddChar G ℂ) :=\n {ψ | η * ‖f‖_[1] ≤ ‖dft f ψ‖}\n","line":13,"end_line":15,"proof_status":"formalized"}
{"id":"pos-def-measures","label":"pos-def-measures","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":["bohr-majorise"],"nlp_text":"There is a constant \\(c{\\gt}0\\) such that the following holds. Let \\(p \\geq 2\\) be an even integer. Let \\(f : G \\to \\mathbb {R}\\), let \\(B \\subseteq G\\) and \\(B', B'' \\subseteq B_{c/\\operatorname{rank}(B)}\\) all be regular Bohr sets. Then \\[ \\lVert f\\circ f \\rVert _{p(\\mu _{B'}\\circ \\mu _{B'}\\ast \\mu _{B''}\\circ \\mu _{B''})} \\geq \\tfrac {1}{2} \\lVert f*f\\rVert _{p(\\mu _B)}. \\]","doc_url":null,"latex_link":"sect0006.html#pos-def-measures","lean_link":null,"lean_decl_name":"pos-def-measures","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"}
{"id":"ast_expand","label":"ast_expand","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For any function \\(f\\) with \\(\\sum f(x)=1\\) \\[ f\\ast f-1/N = (f-1/N)\\ast (f-1/N). \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/balance_conv","latex_link":"sect0004.html#ast_expand","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/balance_conv","lean_decl_name":"balance_conv","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"LeanAPAP","source_path":"LeanAPAP/Prereqs/Convolution/Discrete/Basic.lean","lean4_code":"@[simp] lemma balance_conv (f g : G → R) : balance (f ∗ g) = balance f ∗ balance g := by\n simpa [balance, conv_sub, sub_conv, expect_conv]\n using (mul_smul_comm _ _ _).trans (smul_mul_assoc _ _ _).symm\n","line":136,"end_line":138,"proof_status":"formalized"}
{"id":"no3aps_inner_prod","label":"no3aps_inner_prod","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://YaelDillies.github.io/LeanAPAP/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(A\\subseteq G\\) has no non-trivial three-term arithmetic progressions and \\(G\\) has odd order then \\[ \\langle \\mu _A\\ast \\mu _A,\\mu _{2\\cdot A}\\rangle = 1/\\left\\lvert A\\right\\rvert ^2. \\]","doc_url":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/ThreeAPFree.wInner_one_mu_conv_mu_mu_two_smul_mu","latex_link":"sect0004.html#no3aps_inner_prod","lean_link":"https://YaelDillies.github.io/LeanAPAP/docs/find/#doc/ThreeAPFree.wInner_one_mu_conv_mu_mu_two_smul_mu","lean_decl_name":"ThreeAPFree.wInner_one_mu_conv_mu_mu_two_smul_mu","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/YaelDillies/LeanAPAP/96167d24d9724269561f5f1ed7d29d779157e4da/LeanAPAP/Prereqs/Convolution/ThreeAP.lean","lean4_code":"lemma ThreeAPFree.wInner_one_mu_conv_mu_mu_two_smul_mu (hG : Odd (card G))\n (hs : ThreeAPFree (s : Set G)) :\n ⟪μ_[ℝ] s ∗ μ s, μ (s.image (2 • ·))⟫_[ℝ] = (#s ^ 2 : ℝ)⁻¹ := by\n obtain rfl | hs' := s.eq_empty_or_nonempty\n · simp\n simp only [wInner_one_eq_sum, inner_apply', sum_conv_mul, ← sum_product', RCLike.conj_to_real]\n rw [← diag_union_offDiag univ, sum_union (disjoint_diag_offDiag _), sum_diag, ←\n sum_add_sum_compl s, @sum_eq_card_nsmul _ _ _ _ _ (#s ^ 3 : ℝ)⁻¹, nsmul_eq_mul,\n Finset.sum_eq_zero, Finset.sum_eq_zero, add_zero, add_zero, pow_succ', mul_inv,\n mul_inv_cancel_left₀]\n · exact Nat.cast_ne_zero.2 hs'.card_pos.ne'\n · refine fun i hi ↦ not_ne_iff.1 fun h ↦ (mem_offDiag.1 hi).2.2 ?_\n simp_rw [mul_ne_zero_iff, ← mem_support, support_mu, mem_coe, mem_image, two_smul] at h\n obtain ⟨b, hb, hab⟩ := h.2\n obtain rfl := hs h.1.1 hb h.1.2 hab.symm\n simpa using hab\n · simpa using fun _ ↦ Or.inl\n · rintro a ha\n simp only [mu_apply, ha, if_true, mul_one, mem_image, mul_ite, mul_zero]\n rw [if_pos ⟨_, ha, two_smul _ _⟩, card_image_of_injective, pow_three', mul_inv, mul_inv]\n rw [← Nat.card_eq_fintype_card] at hG\n exact hG.coprime_two_right.nsmul_right_bijective.injective","line":16,"end_line":37,"proof_status":"formalized"}