@@ -21,7 +21,7 @@ open Finset hiding card
2121open scoped ENNReal NNReal BigOperators Combinatorics.Additive Pointwise mu
2222
2323universe u
24- variable {G : Type u} [AddCommGroup G] [DecidableEq G] [ Fintype G] {A C : Finset G} {x y γ ε : ℝ}
24+ variable {G : Type u} [AddCommGroup G] [Fintype G] {A C : Finset G} {x y γ ε : ℝ}
2525
2626local notation "𝓛" x:arg => 1 + log x⁻¹
2727
@@ -37,6 +37,7 @@ private lemma curlog_pos (hx₀ : 0 ≤ x) (hx₁ : x ≤ 1) : 0 < 𝓛 x := by
3737 have : 0 ≤ log x⁻¹ := by bound
3838 positivity
3939
40+ set_option linter.flexible false in
4041private lemma rpow_inv_neg_curlog_le (hx₀ : 0 ≤ x) (hx₁ : x ≤ 1 ) : x⁻¹ ^ (𝓛 x)⁻¹ ≤ exp 1 := by
4142 obtain rfl | hx₀ := hx₀.eq_or_lt
4243 · simp; positivity
@@ -87,8 +88,9 @@ private lemma curlog_rpow_le (hx₀ : 0 < x) (hy : 1 ≤ y) : 𝓛 (x ^ y) ≤ y
8788private lemma curlog_pow_le {n : ℕ} (hx₀ : 0 < x) (hn : n ≠ 0 ) : 𝓛 (x ^ n) ≤ n * 𝓛 x := by
8889 rw [← rpow_natCast]; exact curlog_rpow_le hx₀ <| mod_cast Nat.one_le_iff_ne_zero.2 hn
8990
90- lemma global_dichotomy [MeasurableSpace G] [DiscreteMeasurableSpace G] (hA : A.Nonempty)
91- (hγC : γ ≤ C.dens) (hγ : 0 < γ) (hAC : ε ≤ |card G * ⟪μ_[ℝ] A ∗ μ A, μ C⟫_[ℝ] - 1 |) :
91+ lemma global_dichotomy [DecidableEq G] [MeasurableSpace G] [DiscreteMeasurableSpace G]
92+ (hA : A.Nonempty) (hγC : γ ≤ C.dens) (hγ : 0 < γ)
93+ (hAC : ε ≤ |card G * ⟪μ_[ℝ] A ∗ μ A, μ C⟫_[ℝ] - 1 |) :
9294 ε / (2 * card G) ≤ ‖balance (μ_[ℝ] A) ○ balance (μ A)‖_[↑(2 * ⌈𝓛 γ⌉₊), μ univ] := by
9395 have hC : C.Nonempty := by simpa using hγ.trans_le hγC
9496 have hγ₁ : γ ≤ 1 := hγC.trans (by norm_cast; exact dens_le_one)
@@ -140,8 +142,9 @@ lemma global_dichotomy [MeasurableSpace G] [DiscreteMeasurableSpace G] (hA : A.N
140142
141143variable {q n : ℕ} [Module (ZMod q) G] {A₁ A₂ : Finset G} (S : Finset G) {α : ℝ}
142144
143- lemma ap_in_ff (hq₃ : 3 ≤ q) (hq : q.Prime) (hα₀ : 0 < α) (hα₂ : α ≤ 2 ⁻¹) (hε₀ : 0 < ε)
144- (hε₁ : ε ≤ 1 ) (hαA₁ : α ≤ A₁.dens) (hαA₂ : α ≤ A₂.dens) :
145+ set_option linter.flexible false in
146+ lemma ap_in_ff [DecidableEq G] (hq₃ : 3 ≤ q) (hq : q.Prime) (hα₀ : 0 < α) (hα₂ : α ≤ 2 ⁻¹)
147+ (hε₀ : 0 < ε) (hε₁ : ε ≤ 1 ) (hαA₁ : α ≤ A₁.dens) (hαA₂ : α ≤ A₂.dens) :
145148 ∃ (V : Submodule (ZMod q) G) (_ : DecidablePred (· ∈ V)),
146149 ↑(finrank (ZMod q) G - finrank (ZMod q) V) ≤ 2 ^ 32 * 𝓛 α ^ 2 * 𝓛 (ε * α) ^ 2 * ε⁻¹ ^ 2 ∧
147150 |∑ x ∈ S, (μ (Set.toFinset V) ∗ μ A₁ ∗ μ A₂) x - ∑ x ∈ S, (μ A₁ ∗ μ A₂) x| ≤ ε := by
@@ -237,16 +240,18 @@ lemma ap_in_ff (hq₃ : 3 ≤ q) (hq : q.Prime) (hα₀ : 0 < α) (hα₂ : α
237240 have : ∑ x ∈ S, (μ_[ℝ] A₁ ∗ μ A₂) x = (μ_[ℝ] A₁ ∗ μ A₂ ○ 𝟭 S) 0 := by simp [dconv_indicate]
238241 sorry
239242
240- lemma ap_in_ff' (hq₃ : 3 ≤ q) (hq : q.Prime) (hα₀ : 0 < α) (hα₂ : α ≤ 2 ⁻¹) (hε₀ : 0 < ε )
241- (hε₁ : ε ≤ 1 ) (hαA₁ : α ≤ A₁.dens) (hαA₂ : α ≤ A₂.dens) :
243+ lemma ap_in_ff' [DecidableEq G] (hq₃ : 3 ≤ q) (hq : q.Prime) (hα₀ : 0 < α) (hα₂ : α ≤ 2 ⁻¹)
244+ (hε₀ : 0 < ε) (hε ₁ : ε ≤ 1 ) (hαA₁ : α ≤ A₁.dens) (hαA₂ : α ≤ A₂.dens) :
242245 ∃ (V : Submodule (ZMod q) G) (_ : DecidablePred (· ∈ V)),
243246 ↑(finrank (ZMod q) G - finrank (ZMod q) V) ≤ 2 ^ 32 * 𝓛 α ^ 2 * 𝓛 (ε * α) ^ 2 * ε⁻¹ ^ 2 ∧
244247 |∑ x ∈ S, (μ (Set.toFinset V) ∗ μ A₁ ○ μ A₂) x - ∑ x ∈ S, (μ A₁ ○ μ A₂) x| ≤ ε := by
245248 simpa [← conjneg_mu] using ap_in_ff S hq₃ hq (A₂ := -A₂) hα₀ hα₂ hε₀ hε₁ hαA₁ (by simpa)
246249
250+ set_option linter.flexible false in
247251set_option maxHeartbeats 400000 in
248- lemma di_in_ff [MeasurableSpace G] [DiscreteMeasurableSpace G] (hq₃ : 3 ≤ q) (hq : q.Prime)
249- (hε₀ : 0 < ε) (hε₁ : ε < 1 ) (hγC : γ ≤ C.dens) (hγ : 0 < γ)
252+ -- FIXME: Get rid of raised heartbeats
253+ lemma di_in_ff [DecidableEq G] [MeasurableSpace G] [DiscreteMeasurableSpace G] (hq₃ : 3 ≤ q)
254+ (hq : q.Prime) (hε₀ : 0 < ε) (hε₁ : ε < 1 ) (hγC : γ ≤ C.dens) (hγ : 0 < γ)
250255 (hAC : ε ≤ |card G * ⟪μ_[ℝ] A ∗ μ A, μ C⟫_[ℝ] - 1 |) :
251256 ∃ (V : Submodule (ZMod q) G) (_ : DecidablePred (· ∈ V)),
252257 ↑(finrank (ZMod q) G - finrank (ZMod q) V) ≤
@@ -446,6 +451,7 @@ lemma di_in_ff [MeasurableSpace G] [DiscreteMeasurableSpace G] (hq₃ : 3 ≤ q)
446451 · exact conv_nonneg mu_nonneg mu_nonneg
447452 · exact mu_nonneg
448453
454+ set_option linter.flexible false in
449455theorem ff (hq₃ : 3 ≤ q) (hq : q.Prime) (hA₀ : A.Nonempty) (hA : ThreeAPFree (α := G) A) :
450456 finrank (ZMod q) G ≤ 2 ^ 156 * 𝓛 A.dens ^ 9 := by
451457 let n : ℝ := finrank (ZMod q) G
@@ -487,6 +493,7 @@ theorem ff (hq₃ : 3 ≤ q) (hq : q.Prime) (hA₀ : A.Nonempty) (hA : ThreeAPFr
487493 2 ⁻¹ ≤ card V * ⟪μ_[ℝ] B ∗ μ B, μ (B.image (2 • ·))⟫_[ℝ]) := by
488494 induction i with
489495 | zero =>
496+ classical
490497 exact ⟨G, inferInstance, inferInstance, inferInstance, inferInstance, A, by simp [n], hA,
491498 by simp [α], by simp [α, nnratCast_dens]⟩
492499 | succ i ih =>
@@ -520,7 +527,6 @@ theorem ff (hq₃ : 3 ≤ q) (hq : q.Prime) (hA₀ : A.Nonempty) (hA : ThreeAPFr
520527 · congr 1 with x
521528 simp
522529 · simp
523- simp at hx
524530 refine ⟨V', inferInstance, inferInstance, inferInstance, inferInstance, B', ?_, ?_, ?_,
525531 fun h ↦ ?_⟩
526532 · calc
0 commit comments