Skip to content

Commit 11fb483

Browse files
committed
GrowthInGroups: Half of lecture 3
1 parent dd5dfd4 commit 11fb483

File tree

9 files changed

+303
-59
lines changed

9 files changed

+303
-59
lines changed
Lines changed: 124 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,102 @@
1-
import Mathlib.Algebra.Group.Subgroup.Defs
21
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
32
import Mathlib.Combinatorics.Additive.SmallTripling
3+
import Mathlib.Tactic.Bound
44
import LeanCamCombi.Mathlib.Algebra.Group.Pointwise.Finset.Basic
55
import LeanCamCombi.Mathlib.Algebra.Group.Pointwise.Set.Basic
6+
import LeanCamCombi.Mathlib.Algebra.Group.Subgroup.Pointwise
67
import LeanCamCombi.Mathlib.Combinatorics.Additive.RuzsaCovering
78
import LeanCamCombi.Mathlib.Data.Finset.Basic
9+
import LeanCamCombi.Mathlib.Data.Set.Basic
10+
import LeanCamCombi.Mathlib.Data.Set.Lattice
11+
import LeanCamCombi.Mathlib.Data.Set.Pointwise.SMul
12+
13+
-- TODO: Unsimp in mathlib
14+
attribute [-simp] Set.image_subset_iff
815

916
open scoped Finset Pointwise
1017

11-
variable {G : Type*} [Group G] {S : Set G} {K L : ℝ} {n : ℕ}
18+
variable {G : Type*} [Group G] {A B : Set G} {K L : ℝ} {m n : ℕ}
1219

13-
structure IsApproximateAddSubgroup {G : Type*} [AddGroup G] (S : Set G) (K : ) : Prop where
14-
nonempty : S.Nonempty
15-
neg_eq_self : -S = S
16-
exists_two_nsmul_subset_add : ∃ F : Finset G, #F ≤ K ∧ 2S ⊆ F + S
20+
structure IsApproximateAddSubgroup {G : Type*} [AddGroup G] (K : ) (A : Set G) : Prop where
21+
nonempty : A.Nonempty
22+
neg_eq_self : -A = A
23+
exists_two_nsmul_subset_add : ∃ F : Finset G, #F ≤ K ∧ 2A ⊆ F + A
1724

1825
@[to_additive]
19-
structure IsApproximateSubgroup (S : Set G) (K : ) : Prop where
20-
nonempty : S.Nonempty
21-
inv_eq_self : S⁻¹ = S
22-
exists_sq_subset_mul : ∃ F : Finset G, #F ≤ K ∧ S ^ 2 ⊆ F * S
26+
structure IsApproximateSubgroup (K : ) (A : Set G) : Prop where
27+
nonempty : A.Nonempty
28+
inv_eq_self : A⁻¹ = A
29+
exists_sq_subset_mul : ∃ F : Finset G, #F ≤ K ∧ A ^ 2 ⊆ F * A
2330

2431
namespace IsApproximateSubgroup
2532

2633
@[to_additive one_le]
27-
lemma one_le (hS : IsApproximateSubgroup S K) : 1 ≤ K := by
28-
obtain ⟨F, hF, hSF⟩ := hS.exists_sq_subset_mul
29-
have hF₀ : F ≠ ∅ := by rintro rfl; simp [hS.nonempty.pow.ne_empty] at hSF
34+
lemma one_le (hA : IsApproximateSubgroup K A) : 1 ≤ K := by
35+
obtain ⟨F, hF, hSF⟩ := hA.exists_sq_subset_mul
36+
have hF₀ : F ≠ ∅ := by rintro rfl; simp [hA.nonempty.pow.ne_empty] at hSF
3037
exact hF.trans' <| by simpa [Finset.nonempty_iff_ne_empty]
3138

3239
@[to_additive]
33-
lemma mono (hKL : K ≤ L) (hS : IsApproximateSubgroup S K) : IsApproximateSubgroup S L where
34-
nonempty := hS.nonempty
35-
inv_eq_self := hS.inv_eq_self
36-
exists_sq_subset_mul := let ⟨F, hF, hSF⟩ := hS.exists_sq_subset_mul; ⟨F, hF.trans hKL, hSF⟩
40+
lemma mono (hKL : K ≤ L) (hA : IsApproximateSubgroup K A) : IsApproximateSubgroup L A where
41+
nonempty := hA.nonempty
42+
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⟩
3744

3845
@[to_additive]
39-
lemma card_pow_le [DecidableEq G] {S : Finset G} (hS : IsApproximateSubgroup (S : Set G) K) :
40-
∀ {n}, #(S ^ n) ≤ K ^ (n - 1) * #S
41-
| 0 => by simpa using hS.nonempty
46+
lemma card_pow_le [DecidableEq G] {A : Finset G} (hA : IsApproximateSubgroup K (A : Set G)) :
47+
∀ {n}, #(A ^ n) ≤ K ^ (n - 1) * #A
48+
| 0 => by simpa using hA.nonempty
4249
| 1 => by simp
4350
| n + 2 => by
44-
obtain ⟨F, hF, hSF⟩ := hS.exists_sq_subset_mul
51+
obtain ⟨F, hF, hSF⟩ := hA.exists_sq_subset_mul
4552
calc
46-
(#(S ^ (n + 2)) : ℝ) ≤ #(F ^ (n + 1) * S) := by
53+
(#(A ^ (n + 2)) : ℝ) ≤ #(F ^ (n + 1) * A) := by
4754
gcongr; exact mod_cast Set.pow_subset_pow_mul_of_sq_subset_mul hSF (by omega)
48-
_ ≤ #(F ^ (n + 1)) * #S := mod_cast Finset.card_mul_le
49-
_ ≤ #F ^ (n + 1) * #S := by gcongr; exact mod_cast Finset.card_pow_le
50-
_ ≤ K ^ (n + 1) * #S := by gcongr
55+
_ ≤ #(F ^ (n + 1)) * #A := mod_cast Finset.card_mul_le
56+
_ ≤ #F ^ (n + 1) * #A := by gcongr; exact mod_cast Finset.card_pow_le
57+
_ ≤ K ^ (n + 1) * #A := by gcongr
5158

5259
@[to_additive]
53-
lemma pi {ι : Type*} {G : ι → Type*} [Fintype ι] [∀ i, Group (G i)] {S : ∀ i, Set (G i)} {K : ι → ℝ}
54-
(hS : ∀ i, IsApproximateSubgroup (S i) (K i)) :
55-
IsApproximateSubgroup (Set.univ.pi S) (∏ i, K i) where
56-
nonempty := Set.univ_pi_nonempty_iff.2 fun i ↦ (hS i).nonempty
57-
inv_eq_self := by simp [(hS _).inv_eq_self]
60+
lemma image {F H : Type*} [Group H] [FunLike F G H] [MonoidHomClass F G H] (f : F)
61+
(hA : IsApproximateSubgroup K A) : IsApproximateSubgroup K (f '' A) where
62+
nonempty := hA.nonempty.image _
63+
inv_eq_self := by simp [← Set.image_inv', hA.inv_eq_self]
5864
exists_sq_subset_mul := by
59-
choose F hF hFS using fun i ↦ (hS i).exists_sq_subset_mul
65+
classical
66+
obtain ⟨F, hF, hAF⟩ := hA.exists_sq_subset_mul
67+
refine ⟨F.image f, ?_, ?_⟩
68+
· calc
69+
(#(F.image f) : ℝ) ≤ #F := mod_cast F.card_image_le
70+
_ ≤ K := hF
71+
· simp only [← Set.image_pow, Finset.coe_image, ← Set.image_mul]
72+
gcongr
73+
74+
@[to_additive]
75+
lemma pi {ι : Type*} {G : ι → Type*} [Fintype ι] [∀ i, Group (G i)] {A : ∀ i, Set (G i)} {K : ι → ℝ}
76+
(hA : ∀ i, IsApproximateSubgroup (K i) (A i)) :
77+
IsApproximateSubgroup (∏ i, K i) (Set.univ.pi A) where
78+
nonempty := Set.univ_pi_nonempty_iff.2 fun i ↦ (hA i).nonempty
79+
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
6082
classical
6183
refine ⟨Fintype.piFinset F, ?_, ?_⟩
6284
· calc
6385
#(Fintype.piFinset F) = ∏ i, (#(F i) : ℝ) := by simp
6486
_ ≤ ∏ i, K i := by gcongr; exact hF _
6587
· sorry
6688

89+
@[to_additive]
90+
lemma subgroup {S : Type*} [SetLike S G] [SubgroupClass S G] {H : S} :
91+
IsApproximateSubgroup 1 (H : Set G) where
92+
nonempty := .of_subtype
93+
inv_eq_self := inv_coe_set
94+
exists_sq_subset_mul := ⟨{1}, by simp⟩
95+
6796
open Finset in
6897
@[to_additive]
6998
lemma of_small_tripling [DecidableEq G] {A : Finset G} (hA₀ : A.Nonempty) (hAsymm : A⁻¹ = A)
70-
(hA : #(A ^ 3) ≤ K * #A) : IsApproximateSubgroup (A ^ 2 : Set G) (K ^ 3) where
99+
(hA : #(A ^ 3) ≤ K * #A) : IsApproximateSubgroup (K ^ 3) (A ^ 2 : Set G) where
71100
nonempty := hA₀.to_set.pow
72101
inv_eq_self := by simp [← inv_pow, hAsymm, ← coe_inv]
73102
exists_sq_subset_mul := by
@@ -78,4 +107,67 @@ lemma of_small_tripling [DecidableEq G] {A : Finset G} (hA₀ : A.Nonempty) (hAs
78107
have hF₀ : F.Nonempty := nonempty_iff_ne_empty.2 <| by rintro rfl; simp [hA₀.ne_empty] at hAF
79108
exact ⟨F, hF, by norm_cast; simpa [div_eq_mul_inv, pow_succ, mul_assoc, hAsymm] using hAF⟩
80109

110+
open Set in
111+
@[to_additive]
112+
lemma exists_pow_inter_pow_subset (hA : IsApproximateSubgroup K A) (hB : IsApproximateSubgroup L B)
113+
(hm : 2 ≤ m) (hn : 2 ≤ n) :
114+
∃ F : Finset G, #F ≤ K ^ (m - 1) * L ^ (n - 1) ∧ A ^ m ∩ B ^ n ⊆ F * (A ^ 2 ∩ B ^ 2) := by
115+
classical
116+
obtain ⟨F₁, hF₁, hAF₁⟩ := hA.exists_sq_subset_mul
117+
obtain ⟨F₂, hF₂, hBF₂⟩ := hB.exists_sq_subset_mul
118+
have := hA.one_le
119+
choose f hf using exists_smul_inter_smul_subset_smul_sq_inter_sq hA.inv_eq_self hB.inv_eq_self
120+
refine ⟨.image₂ f (F₁ ^ (m - 1)) (F₂ ^ (n - 1)), ?_, ?_⟩
121+
· calc
122+
(#(.image₂ f (F₁ ^ (m - 1)) (F₂ ^ (n - 1))) : ℝ)
123+
_ ≤ #(F₁ ^ (m - 1)) * #(F₂ ^ (n - 1)) := mod_cast Finset.card_image₂_le ..
124+
_ ≤ #F₁ ^ (m - 1) * #F₂ ^ (n - 1) := by gcongr <;> exact mod_cast Finset.card_pow_le
125+
_ ≤ K ^ (m - 1) * L ^ (n - 1) := by gcongr
126+
· calc
127+
A ^ m ∩ B ^ n ⊆ (F₁ ^ (m - 1) * A) ∩ (F₂ ^ (n - 1) * B) := by
128+
gcongr <;> apply pow_subset_pow_mul_of_sq_subset_mul <;> assumption
129+
_ = ⋃ (a ∈ F₁ ^ (m - 1)) (b ∈ F₂ ^ (n - 1)), a • A ∩ b • B := by
130+
simp_rw [← smul_eq_mul, ← iUnion_smul_set, iUnion₂_inter_iUnion₂]; norm_cast
131+
_ ⊆ ⋃ (a ∈ F₁ ^ (m - 1)) (b ∈ F₂ ^ (n - 1)), f a b • (A ^ 2 ∩ B ^ 2) := by gcongr; exact hf ..
132+
_ = (Finset.image₂ f (F₁ ^ (m - 1)) (F₂ ^ (n - 1))) * (A ^ 2 ∩ B ^ 2) := by
133+
rw [Finset.coe_image₂, ← smul_eq_mul, ← iUnion_smul_set, biUnion_image2]
134+
simp_rw [Finset.mem_coe]
135+
136+
open Set in
137+
@[to_additive]
138+
lemma pow_inter_pow (hA : IsApproximateSubgroup K A) (hB : IsApproximateSubgroup L B) (hm : 2 ≤ m)
139+
(hn : 2 ≤ n) (hAB : (A ^ m ∩ B ^ n).Nonempty) :
140+
IsApproximateSubgroup (K ^ (2 * m - 1) * L ^ (2 * n - 1)) (A ^ m ∩ B ^ n) where
141+
nonempty := hAB
142+
inv_eq_self := by simp_rw [inter_inv, ← inv_pow, hA.inv_eq_self, hB.inv_eq_self]
143+
exists_sq_subset_mul := by
144+
obtain ⟨F, hF, hABF⟩ := hA.exists_pow_inter_pow_subset hB hm hn
145+
sorry
146+
81147
end IsApproximateSubgroup
148+
149+
@[to_additive (attr := simp)]
150+
lemma isApproximateSubgroup_one {S : Type*} [SetLike S G] [SubgroupClass S G] {A : Set G} :
151+
IsApproximateSubgroup 1 (A : Set G) ↔ ∃ H : Subgroup G, A = H := by
152+
refine ⟨fun hA ↦ ?_, by rintro ⟨H, rfl⟩; exact .subgroup⟩
153+
sorry
154+
155+
open Finset in
156+
open scoped RightActions in
157+
@[to_additive]
158+
lemma exists_isApproximateSubgroup_of_small_doubling [DecidableEq G] {A : Finset G}
159+
(hA₀ : A.Nonempty) (hA : #(A ^ 2) ≤ K * #A) :
160+
∃ S ⊆ (A⁻¹ * A) ^ 2, IsApproximateSubgroup (2 ^ 12 * K ^ 36) (S : Set G) ∧
161+
#S ≤ 16 * K ^ 12 * #A ∧ ∃ a ∈ A, #A / (2 * K) ≤ #(A ∩ S <• a) := by
162+
have hK : 1 ≤ K := sorry
163+
let S : Finset G := {g ∈ A⁻¹ * A | #A / (2 * K) ≤ #(A <• g ∩ A)}
164+
have hS₀ : S.Nonempty := ⟨1, by simp [S, hA₀.ne_empty]; bound⟩
165+
have hSA : S ⊆ A⁻¹ * A := filter_subset ..
166+
have hSsymm : S⁻¹ = S := by ext; simp [S]; simp [← mem_inv']; sorry
167+
have hScard :=
168+
calc
169+
(#S : ℝ) ≤ #(A⁻¹ * A) := by gcongr
170+
_ ≤ K ^ 2 * #A := sorry
171+
refine ⟨S ^ 2, by gcongr, ⟨sorry, sorry, sorry⟩, ?_, ?_⟩
172+
sorry
173+
sorry

LeanCamCombi/GrowthInGroups/Lecture2.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ lemma lemma_4_3_1 (hA : #(A ^ 2) ≤ K * #A) : #(A * A⁻¹) ≤ K ^ 2 * #A := b
3333

3434
lemma lemma_4_4_1 (hm : 3 ≤ m) (hA : #(A ^ 3) ≤ K * #A) (ε : Fin m → ℤ) (hε : ∀ i, |ε i| = 1) :
3535
#((finRange m).map fun i ↦ A ^ ε i).prod ≤ K ^ (3 * (m - 2)) * #A :=
36-
small_alternating_pow_of_small_tripling' hm hA ε hε
36+
small_alternating_pow_of_small_tripling' hm hA ε hε
3737

3838
lemma lemma_4_4_2 (hm : 3 ≤ m) (hA : #(A ^ 3) ≤ K * #A) (hAsymm : A⁻¹ = A) :
3939
#(A ^ m) ≤ K ^ (m - 2) * #A := small_pow_of_small_tripling' hm hA hAsymm

LeanCamCombi/GrowthInGroups/Lecture3.lean

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,36 @@ open Fin Finset List
55
open scoped Pointwise
66

77
namespace GrowthInGroups.Lecture3
8-
variable {G : Type*} [DecidableEq G] [Group G] {A : Finset G} {k K : ℝ} {m : ℕ}
8+
variable {G H : Type*} [Group G] [Group H] {A B : Set G} {K L : ℝ} {m n : ℕ}
99

10-
lemma lemma_5_1 {A : Finset G} (hA₀ : A.Nonempty) (hAsymm : A⁻¹ = A) (hA : #(A ^ 3) ≤ K * #A) :
11-
IsApproximateSubgroup (A ^ 2 : Set G) (K ^ 3) := .of_small_tripling hA₀ hAsymm hA
10+
lemma lemma_5_1 [DecidableEq G] {A : Finset G} (hA₀ : A.Nonempty) (hAsymm : A⁻¹ = A)
11+
(hA : #(A ^ 3) ≤ K * #A) : IsApproximateSubgroup (K ^ 3) (A ^ 2 : Set G) :=
12+
.of_small_tripling hA₀ hAsymm hA
1213

13-
lemma lemma_5_2 {A B : Finset G} (hB : B.Nonempty) (hK : #(A * B) ≤ K * #B) :
14+
lemma lemma_5_2 [DecidableEq G] {A B : Finset G} (hB : B.Nonempty) (hK : #(A * B) ≤ K * #B) :
1415
∃ F ⊆ A, #F ≤ K ∧ A ⊆ F * B / B := ruzsa_covering_mul hB hK
1516

17+
open scoped RightActions
18+
lemma proposition_5_3 [DecidableEq G] {A : Finset G} (hA₀ : A.Nonempty) (hA : #(A ^ 2) ≤ K * #A) :
19+
∃ S ⊆ (A⁻¹ * A) ^ 2, IsApproximateSubgroup (2 ^ 12 * K ^ 36) (S : Set G) ∧
20+
#S ≤ 16 * K ^ 12 * #A ∧ ∃ a ∈ A, #A / (2 * K) ≤ #(A ∩ S <• a) :=
21+
exists_isApproximateSubgroup_of_small_doubling hA₀ hA
22+
23+
lemma fact_5_5 {A : Set G} (hA : IsApproximateSubgroup K A) (π : G →* H) :
24+
IsApproximateSubgroup K (π '' A) := hA.image π
25+
26+
lemma proposition_5_6_1 (hA : IsApproximateSubgroup K A) (hB : IsApproximateSubgroup L B)
27+
(hm : 2 ≤ m) (hn : 2 ≤ n) :
28+
∃ F : Finset G, #F ≤ K ^ (m - 1) * L ^ (n - 1) ∧ A ^ m ∩ B ^ n ⊆ F * (A ^ 2 ∩ B ^ 2) :=
29+
hA.exists_pow_inter_pow_subset hB hm hn
30+
31+
lemma proposition_5_6_2 (hA : IsApproximateSubgroup K A) (hB : IsApproximateSubgroup L B)
32+
(hm : 2 ≤ m) (hn : 2 ≤ n) (hAB : (A ^ m ∩ B ^ n).Nonempty) :
33+
IsApproximateSubgroup (K ^ (2 * m - 1) * L ^ (2 * n - 1)) (A ^ m ∩ B ^ n) :=
34+
hA.pow_inter_pow hB hm hn hAB
35+
36+
lemma lemma_5_7 (hA : A⁻¹ = A) (hB : B⁻¹ = B) (x y : G) :
37+
∃ z : G, x • A ∩ y • B ⊆ z • (A ^ 2 ∩ B ^ 2) :=
38+
Set.exists_smul_inter_smul_subset_smul_sq_inter_sq hA hB x y
39+
1640
end GrowthInGroups.Lecture3

LeanCamCombi/Mathlib/Algebra/Group/Pointwise/Finset/Basic.lean

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ attribute [gcongr] mul_subset_mul_left mul_subset_mul_right div_subset_div_left
1212
end Finset
1313

1414
namespace Finset
15-
variable {α : Type*} [DecidableEq α]
15+
variable {F α β : Type*} [DecidableEq α] [DecidableEq β]
1616

1717
section Monoid
18-
variable [Monoid α] {s t : Finset α} {n : ℕ}
18+
variable [Monoid α] [Monoid β] {s t : Finset α} {n : ℕ}
1919

2020
attribute [simp] one_nonempty
2121

@@ -50,6 +50,37 @@ lemma pow_subset_pow_mul_of_sq_subset_mul (hst : s ^ 2 ⊆ t * s) :
5050
_ ⊆ t ^ (n + 1) * (t * s) := by gcongr
5151
_ = t ^ (n + 2) * s := by rw [← mul_assoc, ← pow_succ]
5252

53+
@[to_additive]
54+
lemma pow_right_mono (hs : 1 ∈ s) : Monotone (s ^ ·) := by
55+
apply monotone_nat_of_le_succ
56+
intro n
57+
rw [pow_succ]
58+
exact subset_mul_left _ hs
59+
60+
@[to_additive (attr := gcongr)]
61+
lemma pow_subset_pow_right (hs : 1 ∈ s) {m n : ℕ} (hmn : m ≤ n) : s ^ m ⊆ s ^ n :=
62+
pow_right_mono hs hmn
63+
64+
-- TODO: Replace `pow_subset_pow`
65+
@[to_additive (attr := gcongr)]
66+
lemma pow_subset_pow_left (hst : s ⊆ t) : ∀ {n : ℕ}, s ^ n ⊆ t ^ n
67+
| 0 => by simp
68+
| n + 1 => by simp_rw [pow_succ]; gcongr; exact pow_subset_pow_left hst
69+
70+
@[to_additive]
71+
lemma pow_left_mono : Monotone fun s : Finset α ↦ s ^ n := fun _s _t hst ↦ pow_subset_pow_left hst
72+
73+
-- TODO: Replace `pow_subset_pow`
74+
@[to_additive (attr := gcongr)]
75+
lemma pow_subset_pow' (hst : s ⊆ t) (ht : 1 ∈ t) {m n : ℕ} (hmn : m ≤ n) : s ^ m ⊆ t ^ n :=
76+
(pow_left_mono hst).trans (pow_subset_pow_right ht hmn)
77+
78+
@[to_additive]
79+
lemma image_pow [FunLike F α β] [MonoidHomClass F α β] (f : F) (s : Finset α) :
80+
∀ n, (s ^ n).image f = s.image f ^ n
81+
| 0 => by simp [singleton_one]
82+
| n + 1 => by simp [image_mul, pow_succ, image_pow]
83+
5384
end Monoid
5485

5586
section DivisionMonoid
@@ -72,4 +103,17 @@ set_option push_neg.use_distrib true in
72103
exact empty_zpow hn
73104

74105
end DivisionMonoid
106+
107+
section Group
108+
variable [Group α] {s t : Finset α}
109+
110+
@[to_additive (attr := simp)]
111+
lemma one_mem_inv_mul_iff : (1 : α) ∈ t⁻¹ * s ↔ ¬Disjoint s t := by
112+
aesop (add simp [not_disjoint_iff_nonempty_inter, mem_mul, mul_eq_one_iff_eq_inv,
113+
Finset.Nonempty])
114+
115+
@[to_additive]
116+
lemma not_one_mem_inv_mul_iff : (1 : α) ∉ t⁻¹ * s ↔ Disjoint s t := one_mem_inv_mul_iff.not_left
117+
118+
end Group
75119
end Finset

0 commit comments

Comments
 (0)