11import Mathlib.Algebra.Order.BigOperators.Ring.Finset
22import Mathlib.Combinatorics.Additive.SmallTripling
33import Mathlib.Tactic.Bound
4- import LeanCamCombi.Mathlib.Algebra.Group.Pointwise.Finset.Basic
54import LeanCamCombi.Mathlib.Algebra.Group.Pointwise.Set.Basic
65import LeanCamCombi.Mathlib.Algebra.Group.Subgroup.Pointwise
76import LeanCamCombi.Mathlib.Combinatorics.Additive.RuzsaCovering
8- import LeanCamCombi.Mathlib.Data.Finset.Basic
97import LeanCamCombi.Mathlib.Data.Set.Basic
108import LeanCamCombi.Mathlib.Data.Set.Lattice
119import LeanCamCombi.Mathlib.Data.Set.Pointwise.SMul
10+ import LeanCamCombi.GrowthInGroups.SMulCover
1211
1312-- TODO: Unsimp in mathlib
1413attribute [-simp] Set.image_subset_iff
@@ -20,35 +19,35 @@ variable {G : Type*} [Group G] {A B : Set G} {K L : ℝ} {m n : ℕ}
2019structure IsApproximateAddSubgroup {G : Type *} [AddGroup G] (K : ℝ) (A : Set G) : Prop where
2120 nonempty : A.Nonempty
2221 neg_eq_self : -A = A
23- exists_two_nsmul_subset_add : ∃ F : Finset G, #F ≤ K ∧ 2 • A ⊆ F + A
22+ two_nsmul_vaddCovered : VAddCovered G K ( 2 • A) A
2423
2524@[to_additive]
2625structure IsApproximateSubgroup (K : ℝ) (A : Set G) : Prop where
2726 nonempty : A.Nonempty
2827 inv_eq_self : A⁻¹ = A
29- exists_sq_subset_mul : ∃ F : Finset G, #F ≤ K ∧ A ^ 2 ⊆ F * A
28+ sq_smulCovered : SMulCovered G K ( A ^ 2 ) A
3029
3130namespace IsApproximateSubgroup
3231
3332@[to_additive one_le]
3433lemma one_le (hA : IsApproximateSubgroup K A) : 1 ≤ K := by
35- obtain ⟨F, hF, hSF⟩ := hA.exists_sq_subset_mul
34+ obtain ⟨F, hF, hSF⟩ := hA.sq_smulCovered
3635 have hF₀ : F ≠ ∅ := by rintro rfl; simp [hA.nonempty.pow.ne_empty] at hSF
3736 exact hF.trans' <| by simpa [Finset.nonempty_iff_ne_empty]
3837
3938@[to_additive]
4039lemma mono (hKL : K ≤ L) (hA : IsApproximateSubgroup K A) : IsApproximateSubgroup L A where
4140 nonempty := hA.nonempty
4241 inv_eq_self := hA.inv_eq_self
43- exists_sq_subset_mul := let ⟨F, hF, hSF⟩ := hA.exists_sq_subset_mul; ⟨F, hF.trans hKL, hSF⟩
42+ sq_smulCovered := hA.sq_smulCovered.mono hKL
4443
4544@[to_additive]
4645lemma card_pow_le [DecidableEq G] {A : Finset G} (hA : IsApproximateSubgroup K (A : Set G)) :
4746 ∀ {n}, #(A ^ n) ≤ K ^ (n - 1 ) * #A
4847 | 0 => by simpa using hA.nonempty
4948 | 1 => by simp
5049 | n + 2 => by
51- obtain ⟨F, hF, hSF⟩ := hA.exists_sq_subset_mul
50+ obtain ⟨F, hF, hSF⟩ := hA.sq_smulCovered
5251 calc
5352 (#(A ^ (n + 2 )) : ℝ) ≤ #(F ^ (n + 1 ) * A) := by
5453 gcongr; exact mod_cast Set.pow_subset_pow_mul_of_sq_subset_mul hSF (by omega)
@@ -61,14 +60,14 @@ lemma image {F H : Type*} [Group H] [FunLike F G H] [MonoidHomClass F G H] (f :
6160 (hA : IsApproximateSubgroup K A) : IsApproximateSubgroup K (f '' A) where
6261 nonempty := hA.nonempty.image _
6362 inv_eq_self := by simp [← Set.image_inv', hA.inv_eq_self]
64- exists_sq_subset_mul := by
63+ sq_smulCovered := by
6564 classical
66- obtain ⟨F, hF, hAF⟩ := hA.exists_sq_subset_mul
65+ obtain ⟨F, hF, hAF⟩ := hA.sq_smulCovered
6766 refine ⟨F.image f, ?_, ?_⟩
6867 · calc
6968 (#(F.image f) : ℝ) ≤ #F := mod_cast F.card_image_le
7069 _ ≤ K := hF
71- · simp only [← Set.image_pow, Finset.coe_image, ← Set.image_mul]
70+ · simp only [← Set.image_pow, Finset.coe_image, ← Set.image_mul, smul_eq_mul] at hAF ⊢
7271 gcongr
7372
7473@[to_additive]
@@ -77,8 +76,8 @@ lemma pi {ι : Type*} {G : ι → Type*} [Fintype ι] [∀ i, Group (G i)] {A :
7776 IsApproximateSubgroup (∏ i, K i) (Set.univ.pi A) where
7877 nonempty := Set.univ_pi_nonempty_iff.2 fun i ↦ (hA i).nonempty
7978 inv_eq_self := by simp [(hA _).inv_eq_self]
80- exists_sq_subset_mul := by
81- choose F hF hFS using fun i ↦ (hA i).exists_sq_subset_mul
79+ sq_smulCovered := by
80+ choose F hF hFS using fun i ↦ (hA i).sq_smulCovered
8281 classical
8382 refine ⟨Fintype.piFinset F, ?_, ?_⟩
8483 · calc
@@ -91,15 +90,15 @@ lemma subgroup {S : Type*} [SetLike S G] [SubgroupClass S G] {H : S} :
9190 IsApproximateSubgroup 1 (H : Set G) where
9291 nonempty := .of_subtype
9392 inv_eq_self := inv_coe_set
94- exists_sq_subset_mul := ⟨{1 }, by simp⟩
93+ sq_smulCovered := ⟨{1 }, by simp⟩
9594
9695open Finset in
9796@[to_additive]
9897lemma of_small_tripling [DecidableEq G] {A : Finset G} (hA₀ : A.Nonempty) (hAsymm : A⁻¹ = A)
9998 (hA : #(A ^ 3 ) ≤ K * #A) : IsApproximateSubgroup (K ^ 3 ) (A ^ 2 : Set G) where
10099 nonempty := hA₀.to_set.pow
101100 inv_eq_self := by simp [← inv_pow, hAsymm, ← coe_inv]
102- exists_sq_subset_mul := by
101+ sq_smulCovered := by
103102 replace hA := calc (#(A ^ 4 * A) : ℝ)
104103 _ = #(A ^ 5 ) := by rw [← pow_succ]
105104 _ ≤ K ^ 3 * #A := small_pow_of_small_tripling' (by omega) hA hAsymm
@@ -113,8 +112,8 @@ lemma exists_pow_inter_pow_subset (hA : IsApproximateSubgroup K A) (hB : IsAppro
113112 (hm : 2 ≤ m) (hn : 2 ≤ n) :
114113 ∃ F : Finset G, #F ≤ K ^ (m - 1 ) * L ^ (n - 1 ) ∧ A ^ m ∩ B ^ n ⊆ F * (A ^ 2 ∩ B ^ 2 ) := by
115114 classical
116- obtain ⟨F₁, hF₁, hAF₁⟩ := hA.exists_sq_subset_mul
117- obtain ⟨F₂, hF₂, hBF₂⟩ := hB.exists_sq_subset_mul
115+ obtain ⟨F₁, hF₁, hAF₁⟩ := hA.sq_smulCovered
116+ obtain ⟨F₂, hF₂, hBF₂⟩ := hB.sq_smulCovered
118117 have := hA.one_le
119118 choose f hf using exists_smul_inter_smul_subset_smul_sq_inter_sq hA.inv_eq_self hB.inv_eq_self
120119 refine ⟨.image₂ f (F₁ ^ (m - 1 )) (F₂ ^ (n - 1 )), ?_, ?_⟩
@@ -140,7 +139,7 @@ lemma pow_inter_pow (hA : IsApproximateSubgroup K A) (hB : IsApproximateSubgroup
140139 IsApproximateSubgroup (K ^ (2 * m - 1 ) * L ^ (2 * n - 1 )) (A ^ m ∩ B ^ n) where
141140 nonempty := hAB
142141 inv_eq_self := by simp_rw [inter_inv, ← inv_pow, hA.inv_eq_self, hB.inv_eq_self]
143- exists_sq_subset_mul := by
142+ sq_smulCovered := by
144143 obtain ⟨F, hF, hABF⟩ := hA.exists_pow_inter_pow_subset hB hm hn
145144 sorry
146145
0 commit comments