Skip to content

Commit b8d8a5d

Browse files
committed
GrowthInGroups: Cover by translates relation
1 parent 11fb483 commit b8d8a5d

File tree

7 files changed

+89
-31
lines changed

7 files changed

+89
-31
lines changed

LeanCamCombi.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import LeanCamCombi.GrowthInGroups.Lecture2
2121
import LeanCamCombi.GrowthInGroups.Lecture3
2222
import LeanCamCombi.GrowthInGroups.PolynomialLocalization
2323
import LeanCamCombi.GrowthInGroups.PrimeSpectrumPolynomial
24+
import LeanCamCombi.GrowthInGroups.SMulCover
2425
import LeanCamCombi.GrowthInGroups.VerySmallDoubling
2526
import LeanCamCombi.Impact
2627
import LeanCamCombi.Incidence
@@ -56,8 +57,11 @@ import LeanCamCombi.Mathlib.Data.Finset.PosDiffs
5657
import LeanCamCombi.Mathlib.Data.Fintype.Card
5758
import LeanCamCombi.Mathlib.Data.List.DropRight
5859
import LeanCamCombi.Mathlib.Data.Multiset.Basic
60+
import LeanCamCombi.Mathlib.Data.Nat.Cast.Order.Basic
5961
import LeanCamCombi.Mathlib.Data.Prod.Lex
62+
import LeanCamCombi.Mathlib.Data.Set.Basic
6063
import LeanCamCombi.Mathlib.Data.Set.Image
64+
import LeanCamCombi.Mathlib.Data.Set.Lattice
6165
import LeanCamCombi.Mathlib.Data.Set.Pointwise.Finite
6266
import LeanCamCombi.Mathlib.Data.Set.Pointwise.Interval
6367
import LeanCamCombi.Mathlib.Data.Set.Pointwise.SMul

LeanCamCombi/GrowthInGroups/ApproximateSubgroup.lean

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
22
import Mathlib.Combinatorics.Additive.SmallTripling
33
import Mathlib.Tactic.Bound
4-
import LeanCamCombi.Mathlib.Algebra.Group.Pointwise.Finset.Basic
54
import LeanCamCombi.Mathlib.Algebra.Group.Pointwise.Set.Basic
65
import LeanCamCombi.Mathlib.Algebra.Group.Subgroup.Pointwise
76
import LeanCamCombi.Mathlib.Combinatorics.Additive.RuzsaCovering
8-
import LeanCamCombi.Mathlib.Data.Finset.Basic
97
import LeanCamCombi.Mathlib.Data.Set.Basic
108
import LeanCamCombi.Mathlib.Data.Set.Lattice
119
import LeanCamCombi.Mathlib.Data.Set.Pointwise.SMul
10+
import LeanCamCombi.GrowthInGroups.SMulCover
1211

1312
-- TODO: Unsimp in mathlib
1413
attribute [-simp] Set.image_subset_iff
@@ -20,35 +19,35 @@ variable {G : Type*} [Group G] {A B : Set G} {K L : ℝ} {m n : ℕ}
2019
structure 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]
2625
structure 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

3130
namespace IsApproximateSubgroup
3231

3332
@[to_additive one_le]
3433
lemma 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]
4039
lemma 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]
4645
lemma 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

9695
open Finset in
9796
@[to_additive]
9897
lemma 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

LeanCamCombi/GrowthInGroups/Lecture2.lean

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,31 +38,31 @@ lemma lemma_4_4_1 (hm : 3 ≤ m) (hA : #(A ^ 3) ≤ K * #A) (ε : Fin m → ℤ)
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
4040

41-
def def_4_5 (S : Set G) (K : ℝ) : Prop := IsApproximateSubgroup S K
41+
def def_4_5 (S : Set G) (K : ℝ) : Prop := IsApproximateSubgroup K S
4242

4343
lemma two_nsmul_Icc_nat (k : ℕ) : (2 • .Icc (-k) k : Set ℤ) = {(-k : ℤ), (k : ℤ)} + .Icc (-k) k :=
4444
sorry
4545

4646
lemma two_nsmul_Icc_real : (2 • .Icc (-1) 1 : Set ℝ) = {-1, 1} + .Icc (-1) 1 := sorry
4747

48-
lemma remark_4_6_1 (k : ℕ) : IsApproximateAddSubgroup (.Icc (-k) k : Set ℤ) 2 where
48+
lemma remark_4_6_1 (k : ℕ) : IsApproximateAddSubgroup 2 (.Icc (-k) k : Set ℤ) where
4949
nonempty := ⟨0, by simp⟩
5050
neg_eq_self := by simp
51-
exists_two_nsmul_subset_add :=
51+
two_nsmul_vaddCovered :=
5252
⟨{(-k : ℤ), (k : ℤ)}, mod_cast card_le_two, by simp [two_nsmul_Icc_nat]⟩
5353

5454
lemma remark_4_6_2 {ι : Type*} [Fintype ι] (k : ι → ℕ) :
55-
IsApproximateAddSubgroup (Set.univ.pi fun i ↦ .Icc (-k i) (k i) : Set (ι → ℤ))
56-
(2 ^ Fintype.card ι) := by
55+
IsApproximateAddSubgroup (2 ^ Fintype.card ι)
56+
(Set.univ.pi fun i ↦ .Icc (-k i) (k i) : Set (ι → ℤ)) := by
5757
simpa using IsApproximateAddSubgroup.pi fun i ↦ remark_4_6_1 (k i)
5858

59-
lemma remark_4_6_3 : IsApproximateAddSubgroup (.Icc (-1) 1 : Set ℝ) 2 where
59+
lemma remark_4_6_3 : IsApproximateAddSubgroup 2 (.Icc (-1) 1 : Set ℝ) where
6060
nonempty := ⟨0, by simp⟩
6161
neg_eq_self := by simp
62-
exists_two_nsmul_subset_add := ⟨{-1, 1}, mod_cast card_le_two, by simp [two_nsmul_Icc_real]⟩
62+
two_nsmul_vaddCovered := ⟨{-1, 1}, mod_cast card_le_two, by simp [two_nsmul_Icc_real]⟩
6363

6464
lemma lemma_4_7 {A : Finset G} (hA₀ : A.Nonempty) (hsymm : A⁻¹ = A) (hA : #(A ^ 3) ≤ K * #A) :
65-
IsApproximateSubgroup (A ^ 2 : Set G) (K ^ 3) := .of_small_tripling hA₀ hsymm hA
65+
IsApproximateSubgroup (K ^ 3) (A ^ 2 : Set G) := .of_small_tripling hA₀ hsymm hA
6666

6767
lemma lemma_4_8 {A B : Finset G} (hB : B.Nonempty) (hK : #(A * B) ≤ K * #B) :
6868
∃ F ⊆ A, #F ≤ K ∧ A ⊆ F * B / B := ruzsa_covering_mul hB hK
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import Mathlib.Data.Real.Basic
2+
import LeanCamCombi.Mathlib.Algebra.Group.Pointwise.Finset.Basic
3+
import LeanCamCombi.Mathlib.Data.Nat.Cast.Order.Basic
4+
5+
open scoped Finset Pointwise
6+
7+
variable {M N X : Type*} [Monoid M] [Monoid N] [MulAction M X] [MulAction N X] {K L : ℝ}
8+
{A B C : Set X}
9+
10+
variable (M) in
11+
@[to_additive] def SMulCovered (K : ℝ) (A B : Set X) : Prop :=
12+
∃ F : Finset M, #F ≤ K ∧ A ⊆ (F : Set M) • B
13+
14+
@[to_additive (attr := simp, refl)]
15+
lemma SMulCovered.rfl : SMulCovered M 1 A A := ⟨1, by simp⟩
16+
17+
@[to_additive (attr := simp)]
18+
lemma SMulCovered.of_subset (hAB : A ⊆ B) : SMulCovered M 1 A B := ⟨1, by simpa⟩
19+
20+
@[to_additive] lemma SMulCovered.nonneg : SMulCovered M K A B → 0 ≤ K := by
21+
rintro ⟨F, hF, -⟩; exact (#F).cast_nonneg.trans hF
22+
23+
@[to_additive (attr := simp)]
24+
lemma smulCovered_zero : SMulCovered M 0 A B ↔ A = ∅ := by simp [SMulCovered]
25+
26+
@[to_additive]
27+
lemma SMulCovered.mono (hKL : K ≤ L) : SMulCovered M K A B → SMulCovered M L A B := by
28+
rintro ⟨F, hF, hFAB⟩; exact ⟨F, hF.trans hKL, hFAB⟩
29+
30+
@[to_additive] lemma SMulCovered.trans [MulAction M N] [IsScalarTower M N X]
31+
(hAB : SMulCovered M K A B) (hBC : SMulCovered N L B C) : SMulCovered N (K * L) A C := by
32+
classical
33+
have := hAB.nonneg
34+
obtain ⟨F₁, hF₁, hFAB⟩ := hAB
35+
obtain ⟨F₂, hF₂, hFBC⟩ := hBC
36+
refine ⟨F₁ • F₂, ?_, ?_⟩
37+
· calc
38+
(#(F₁ • F₂) : ℝ) ≤ #F₁ * #F₂ := mod_cast Finset.card_smul_le
39+
_ ≤ K * L := by gcongr
40+
· calc
41+
A ⊆ (F₁ : Set M) • B := hFAB
42+
_ ⊆ (F₁ : Set M) • (F₂ : Set N) • C := by gcongr
43+
_ = (↑(F₁ • F₂) : Set N) • C := by simp

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

Lines changed: 11 additions & 4 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 {F α β : Type*} [DecidableEq α] [DecidableEq β]
15+
variable {F α β : Type*}
1616

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

2020
attribute [simp] one_nonempty
2121

@@ -84,7 +84,7 @@ lemma image_pow [FunLike F α β] [MonoidHomClass F α β] (f : F) (s : Finset
8484
end Monoid
8585

8686
section DivisionMonoid
87-
variable [DivisionMonoid α] {s t : Finset α} {n : ℤ}
87+
variable [DecidableEq α] [DivisionMonoid α] {s t : Finset α} {n : ℤ}
8888

8989
@[to_additive]
9090
lemma Nonempty.zpow (hs : s.Nonempty) : ∀ {n : ℤ}, (s ^ n).Nonempty
@@ -105,7 +105,7 @@ set_option push_neg.use_distrib true in
105105
end DivisionMonoid
106106

107107
section Group
108-
variable [Group α] {s t : Finset α}
108+
variable [DecidableEq α] [Group α] {s t : Finset α}
109109

110110
@[to_additive (attr := simp)]
111111
lemma one_mem_inv_mul_iff : (1 : α) ∈ t⁻¹ * s ↔ ¬Disjoint s t := by
@@ -116,4 +116,11 @@ lemma one_mem_inv_mul_iff : (1 : α) ∈ t⁻¹ * s ↔ ¬Disjoint s t := by
116116
lemma not_one_mem_inv_mul_iff : (1 : α) ∉ t⁻¹ * s ↔ Disjoint s t := one_mem_inv_mul_iff.not_left
117117

118118
end Group
119+
120+
section MulAction
121+
variable [DecidableEq β] [Monoid α] [MulAction α β] {s : Finset α} {t : Finset β}
122+
123+
@[to_additive] lemma card_smul_le : #(s • t) ≤ #s * #t := card_image₂_le ..
124+
125+
end MulAction
119126
end Finset

LeanCamCombi/Mathlib/Algebra/Group/Subgroup/Pointwise.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ variable {G S : Type*} [Group G] [SetLike S G] [SubgroupClass S G] {s : Set G} {
2424

2525
set_option linter.unusedVariables false in
2626
@[to_additive (attr := simp)]
27-
lemma coe_pow : ∀ {n} (hn : n ≠ 0) (H : S), (H ^ n : Set G) = H
27+
lemma coe_set_pow : ∀ {n} (hn : n ≠ 0) (H : S), (H ^ n : Set G) = H
2828
| 1, _, H => by simp
29-
| n + 2, _, H => by rw [pow_succ, coe_pow n.succ_ne_zero, coe_mul_coe]
29+
| n + 2, _, H => by rw [pow_succ, coe_set_pow n.succ_ne_zero, coe_mul_coe]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Mathlib.Data.Nat.Cast.Order.Basic
2+
3+
@[simp]
4+
lemma Nat.cast_nonpos {α : Type*} [AddMonoidWithOne α] [PartialOrder α] [AddLeftMono α]
5+
[ZeroLEOneClass α] [CharZero α] {n : ℕ} : (n : α) ≤ 0 ↔ n ≤ 0 := by norm_cast

0 commit comments

Comments
 (0)