The areas / V30. Combinatorics
Mathlib.Combinatorics.Additive.AP.Three.Defs
77 declarations. Mathlib docs · Source
Sets without arithmetic progressions of length three and Roth numbers
This file defines sets without arithmetic progressions of length three, aka 3AP-free sets, and the Roth number of a set.
The corresponding notion, sets without geometric progressions of length three, are called 3GP-free sets.
The Roth number of a finset is the size of its biggest 3AP-free subset. This is a more general
definition than the one often found in mathematical literature, where the n-th Roth number is
the size of the biggest 3AP-free subset of {0, ..., n - 1}.
Main declarations
ThreeGPFree: Predicate for a set to be 3GP-free.ThreeAPFree: Predicate for a set to be 3AP-free.mulRothNumber: The multiplicative Roth number of a finset.addRothNumber: The additive Roth number of a finset.rothNumberNat: The Roth number of a natural, namelyaddRothNumber (Finset.range n).
TODO
- Can
threeAPFree_iff_eq_rightbe made more general? - Generalize
ThreeGPFree.imageto Freiman homs
References
Tags
3AP-free, Salem-Spencer, Roth, arithmetic progression, average, three-free
def ThreeGPFree E3 #
{α : Type u_2} → [Monoid α] → Set α → Prop
A set is 3GP-free if it does not contain any non-trivial geometric progression of length three.
def ThreeAPFree E3 #
{α : Type u_2} → [AddMonoid α] → Set α → Prop
A set is 3AP-free if it does not contain any non-trivial arithmetic progression of length three.
This is also sometimes called a non-averaging set or Salem-Spencer set.
instance ThreeGPFree.instDecidable E0 #
{α : Type u_2} → [inst : Monoid α] → [DecidableEq α] → {s : Finset α} → Decidable (ThreeGPFree ↑s)
Whether a given finset is 3GP-free is decidable.
instance ThreeAPFree.instDecidable E0 #
{α : Type u_2} → [inst : AddMonoid α] → [DecidableEq α] → {s : Finset α} → Decidable (ThreeAPFree ↑s)
Whether a given finset is 3AP-free is decidable.
theorem ThreeAPFree.mono E1 #
∀ {α : Type u_2} [inst : AddMonoid α] {s t : Set α}, t ⊆ s → ThreeAPFree s → ThreeAPFree t
theorem ThreeGPFree.mono E1 #
∀ {α : Type u_2} [inst : Monoid α] {s t : Set α}, t ⊆ s → ThreeGPFree s → ThreeGPFree t
theorem threeGPFree_empty E0 #
∀ {α : Type u_2} [inst : Monoid α], ThreeGPFree ∅
theorem threeAPFree_empty E0 #
∀ {α : Type u_2} [inst : AddMonoid α], ThreeAPFree ∅
theorem Set.Subsingleton.threeAPFree E1 #
∀ {α : Type u_2} [inst : AddMonoid α] {s : Set α}, s.Subsingleton → ThreeAPFree s
theorem Set.Subsingleton.threeGPFree E1 #
∀ {α : Type u_2} [inst : Monoid α] {s : Set α}, s.Subsingleton → ThreeGPFree s
theorem threeAPFree_singleton E0 #
∀ {α : Type u_2} [inst : AddMonoid α] (a : α), ThreeAPFree {a}
theorem threeGPFree_singleton E0 #
∀ {α : Type u_2} [inst : Monoid α] (a : α), ThreeGPFree {a}
theorem ThreeAPFree.prod E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : AddMonoid α] [inst_1 : AddMonoid β] {s : Set α} {t : Set β},
ThreeAPFree s → ThreeAPFree t → ThreeAPFree (s ×ˢ t)
theorem ThreeGPFree.prod E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : Monoid α] [inst_1 : Monoid β] {s : Set α} {t : Set β},
ThreeGPFree s → ThreeGPFree t → ThreeGPFree (s ×ˢ t)
theorem threeAPFree_pi E1 #
∀ {ι : Type u_4} {α : ι → Type u_5} [inst : (i : ι) → AddMonoid (α i)] {s : (i : ι) → Set (α i)},
(∀ (i : ι), ThreeAPFree (s i)) → ThreeAPFree (Set.univ.pi s)
theorem threeGPFree_pi E1 #
∀ {ι : Type u_4} {α : ι → Type u_5} [inst : (i : ι) → Monoid (α i)] {s : (i : ι) → Set (α i)},
(∀ (i : ι), ThreeGPFree (s i)) → ThreeGPFree (Set.univ.pi s)
theorem ThreeGPFree.of_image E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : CommMonoid α] [inst_1 : CommMonoid β] {s A : Set α} {t : Set β} {f : α → β},
IsMulFreimanHom 2 s t f → Set.InjOn f s → A ⊆ s → ThreeGPFree (f '' A) → ThreeGPFree A
Geometric progressions of length three are reflected under 2-Freiman homomorphisms.
theorem ThreeAPFree.of_image E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : AddCommMonoid α] [inst_1 : AddCommMonoid β] {s A : Set α} {t : Set β}
{f : α → β}, IsAddFreimanHom 2 s t f → Set.InjOn f s → A ⊆ s → ThreeAPFree (f '' A) → ThreeAPFree A
Arithmetic progressions of length three are reflected under 2-Freiman homomorphisms.
theorem threeGPFree_image E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : CommMonoid α] [inst_1 : CommMonoid β] {s A : Set α} {t : Set β} {f : α → β},
IsMulFreimanIso 2 s t f → A ⊆ s → (ThreeGPFree (f '' A) ↔ ThreeGPFree A)
Geometric progressions of length three are unchanged under 2-Freiman isomorphisms.
theorem threeAPFree_image E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : AddCommMonoid α] [inst_1 : AddCommMonoid β] {s A : Set α} {t : Set β}
{f : α → β}, IsAddFreimanIso 2 s t f → A ⊆ s → (ThreeAPFree (f '' A) ↔ ThreeAPFree A)
Arithmetic progressions of length three are unchanged under 2-Freiman isomorphisms.
theorem ThreeGPFree.image E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : CommMonoid α] [inst_1 : CommMonoid β] {s A : Set α} {t : Set β} {f : α → β},
IsMulFreimanIso 2 s t f → A ⊆ s → ThreeGPFree A → ThreeGPFree (f '' A)
Alias of the reverse direction of threeGPFree_image.
Geometric progressions of length three are unchanged under 2-Freiman isomorphisms.
theorem ThreeAPFree.image E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : AddCommMonoid α] [inst_1 : AddCommMonoid β] {s A : Set α} {t : Set β}
{f : α → β}, IsAddFreimanIso 2 s t f → A ⊆ s → ThreeAPFree A → ThreeAPFree (f '' A)
Alias of the reverse direction of threeAPFree_image.
Arithmetic progressions of length three are unchanged under 2-Freiman isomorphisms.
theorem IsMulFreimanHom.threeGPFree E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : CommMonoid α] [inst_1 : CommMonoid β] {s : Set α} {t : Set β} {f : α → β},
IsMulFreimanHom 2 s t f → Set.InjOn f s → ThreeGPFree t → ThreeGPFree s
Geometric progressions of length three are reflected under 2-Freiman homomorphisms.
theorem IsAddFreimanHom.threeAPFree E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : AddCommMonoid α] [inst_1 : AddCommMonoid β] {s : Set α} {t : Set β} {f : α → β},
IsAddFreimanHom 2 s t f → Set.InjOn f s → ThreeAPFree t → ThreeAPFree s
Arithmetic progressions of length three are reflected under 2-Freiman homomorphisms.
theorem IsMulFreimanIso.threeGPFree_congr E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : CommMonoid α] [inst_1 : CommMonoid β] {s : Set α} {t : Set β} {f : α → β},
IsMulFreimanIso 2 s t f → (ThreeGPFree s ↔ ThreeGPFree t)
Geometric progressions of length three are unchanged under 2-Freiman isomorphisms.
theorem IsAddFreimanIso.threeAPFree_congr E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : AddCommMonoid α] [inst_1 : AddCommMonoid β] {s : Set α} {t : Set β} {f : α → β},
IsAddFreimanIso 2 s t f → (ThreeAPFree s ↔ ThreeAPFree t)
Arithmetic progressions of length three are unchanged under 2-Freiman isomorphisms.
theorem ThreeGPFree.image' E1 #
∀ {F : Type u_1} {α : Type u_2} {β : Type u_3} [inst : CommMonoid α] [inst_1 : CommMonoid β] {s : Set α}
[inst_2 : FunLike F α β] [MulHomClass F α β] (f : F), Set.InjOn (⇑f) (s * s) → ThreeGPFree s → ThreeGPFree (⇑f '' s)
Geometric progressions of length three are preserved under semigroup homomorphisms.
theorem ThreeAPFree.image' E1 #
∀ {F : Type u_1} {α : Type u_2} {β : Type u_3} [inst : AddCommMonoid α] [inst_1 : AddCommMonoid β] {s : Set α}
[inst_2 : FunLike F α β] [AddHomClass F α β] (f : F), Set.InjOn (⇑f) (s + s) → ThreeAPFree s → ThreeAPFree (⇑f '' s)
Arithmetic progressions of length three are preserved under semigroup homomorphisms.
theorem threeGPFree_insert E1 #
∀ {α : Type u_2} [inst : CommMonoid α] [IsCancelMul α] {s : Set α} {a : α},
ThreeGPFree (insert a s) ↔
ThreeGPFree s ∧
(∀ ⦃b : α⦄, b ∈ s → ∀ ⦃c : α⦄, c ∈ s → a * c = b * b → a = b) ∧
∀ ⦃b : α⦄, b ∈ s → ∀ ⦃c : α⦄, c ∈ s → b * c = a * a → b = a
theorem threeAPFree_insert E1 #
∀ {α : Type u_2} [inst : AddCommMonoid α] [IsCancelAdd α] {s : Set α} {a : α},
ThreeAPFree (insert a s) ↔
ThreeAPFree s ∧
(∀ ⦃b : α⦄, b ∈ s → ∀ ⦃c : α⦄, c ∈ s → a + c = b + b → a = b) ∧
∀ ⦃b : α⦄, b ∈ s → ∀ ⦃c : α⦄, c ∈ s → b + c = a + a → b = a
theorem ThreeGPFree.smul_set E1 #
∀ {α : Type u_2} [inst : CommMonoid α] [IsCancelMul α] {s : Set α} {a : α}, ThreeGPFree s → ThreeGPFree (a • s)
theorem ThreeAPFree.vadd_set E1 #
∀ {α : Type u_2} [inst : AddCommMonoid α] [IsCancelAdd α] {s : Set α} {a : α}, ThreeAPFree s → ThreeAPFree (a +ᵥ s)
theorem threeAPFree_vadd_set E1 #
∀ {α : Type u_2} [inst : AddCommMonoid α] [IsCancelAdd α] {s : Set α} {a : α}, ThreeAPFree (a +ᵥ s) ↔ ThreeAPFree s
theorem threeGPFree_smul_set E1 #
∀ {α : Type u_2} [inst : CommMonoid α] [IsCancelMul α] {s : Set α} {a : α}, ThreeGPFree (a • s) ↔ ThreeGPFree s
theorem threeGPFree_insert_of_lt E1 #
∀ {α : Type u_2} [inst : CommMonoid α] [inst_1 : PartialOrder α] [IsOrderedCancelMonoid α] {s : Set α} {a : α},
(∀ i ∈ s, i < a) →
(ThreeGPFree (insert a s) ↔ ThreeGPFree s ∧ ∀ ⦃b : α⦄, b ∈ s → ∀ ⦃c : α⦄, c ∈ s → a * c = b * b → a = b)
theorem threeAPFree_insert_of_lt E1 #
∀ {α : Type u_2} [inst : AddCommMonoid α] [inst_1 : PartialOrder α] [IsOrderedCancelAddMonoid α] {s : Set α} {a : α},
(∀ i ∈ s, i < a) →
(ThreeAPFree (insert a s) ↔ ThreeAPFree s ∧ ∀ ⦃b : α⦄, b ∈ s → ∀ ⦃c : α⦄, c ∈ s → a + c = b + b → a = b)
theorem ThreeGPFree.smul_set₀ E1 #
∀ {α : Type u_2} [inst : CommMonoidWithZero α] [IsCancelMulZero α] {s : Set α} {a : α},
ThreeGPFree s → a ≠ 0 → ThreeGPFree (a • s)
theorem threeGPFree_smul_set₀ E1 #
∀ {α : Type u_2} [inst : CommMonoidWithZero α] [IsCancelMulZero α] {s : Set α} {a : α},
a ≠ 0 → (ThreeGPFree (a • s) ↔ ThreeGPFree s)
theorem threeAPFree_iff_eq_right E1 #
∀ {s : Set ℕ}, ThreeAPFree s ↔ ∀ ⦃a : ℕ⦄, a ∈ s → ∀ ⦃b : ℕ⦄, b ∈ s → ∀ ⦃c : ℕ⦄, c ∈ s → a + c = b + b → a = c
def mulRothNumber E3 #
{α : Type u_2} → [DecidableEq α] → [Monoid α] → Finset α →o ℕ
The multiplicative Roth number of a finset is the cardinality of its biggest 3GP-free subset.
def addRothNumber E3 #
{α : Type u_2} → [DecidableEq α] → [AddMonoid α] → Finset α →o ℕ
The additive Roth number of a finset is the cardinality of its biggest 3AP-free subset.
The usual Roth number corresponds to addRothNumber (Finset.range n), see rothNumberNat.
theorem addRothNumber_le E1 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : AddMonoid α] (s : Finset α), addRothNumber s ≤ s.card
theorem mulRothNumber_le E1 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : Monoid α] (s : Finset α), mulRothNumber s ≤ s.card
theorem mulRothNumber_spec E1 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : Monoid α] (s : Finset α),
∃ t ⊆ s, t.card = mulRothNumber s ∧ ThreeGPFree ↑t
theorem addRothNumber_spec E1 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : AddMonoid α] (s : Finset α),
∃ t ⊆ s, t.card = addRothNumber s ∧ ThreeAPFree ↑t
theorem ThreeGPFree.le_mulRothNumber E1 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : Monoid α] {s t : Finset α},
ThreeGPFree ↑s → s ⊆ t → s.card ≤ mulRothNumber t
theorem ThreeAPFree.le_addRothNumber E1 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : AddMonoid α] {s t : Finset α},
ThreeAPFree ↑s → s ⊆ t → s.card ≤ addRothNumber t
theorem ThreeAPFree.addRothNumber_eq E0 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : AddMonoid α] {s : Finset α}, ThreeAPFree ↑s → addRothNumber s = s.card
theorem ThreeGPFree.mulRothNumber_eq E0 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : Monoid α] {s : Finset α}, ThreeGPFree ↑s → mulRothNumber s = s.card
theorem addRothNumber_empty E0 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : AddMonoid α], addRothNumber ∅ = 0
theorem mulRothNumber_empty E0 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : Monoid α], mulRothNumber ∅ = 0
theorem addRothNumber_singleton E0 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : AddMonoid α] (a : α), addRothNumber {a} = 1
theorem mulRothNumber_singleton E0 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : Monoid α] (a : α), mulRothNumber {a} = 1
theorem addRothNumber_union_le E1 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : AddMonoid α] (s t : Finset α),
addRothNumber (s ∪ t) ≤ addRothNumber s + addRothNumber t
theorem mulRothNumber_union_le E1 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : Monoid α] (s t : Finset α),
mulRothNumber (s ∪ t) ≤ mulRothNumber s + mulRothNumber t
theorem le_addRothNumber_product E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : DecidableEq α] [inst_1 : AddMonoid α] [inst_2 : DecidableEq β]
[inst_3 : AddMonoid β] (s : Finset α) (t : Finset β), addRothNumber s * addRothNumber t ≤ addRothNumber (s ×ˢ t)
theorem le_mulRothNumber_product E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : DecidableEq α] [inst_1 : Monoid α] [inst_2 : DecidableEq β] [inst_3 : Monoid β]
(s : Finset α) (t : Finset β), mulRothNumber s * mulRothNumber t ≤ mulRothNumber (s ×ˢ t)
theorem addRothNumber_lt_of_forall_not_threeAPFree E1 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : AddMonoid α] {s : Finset α} {n : ℕ},
(∀ t ∈ Finset.powersetCard n s, ¬ThreeAPFree ↑t) → addRothNumber s < n
theorem mulRothNumber_lt_of_forall_not_threeGPFree E1 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : Monoid α] {s : Finset α} {n : ℕ},
(∀ t ∈ Finset.powersetCard n s, ¬ThreeGPFree ↑t) → mulRothNumber s < n
theorem IsMulFreimanHom.mulRothNumber_mono E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : DecidableEq α] [inst_1 : CommMonoid α] [inst_2 : CommMonoid β]
[inst_3 : DecidableEq β] {A : Finset α} {B : Finset β} {f : α → β},
IsMulFreimanHom 2 (↑A) (↑B) f → Set.BijOn f ↑A ↑B → mulRothNumber B ≤ mulRothNumber A
Arithmetic progressions can be pushed forward along bijective 2-Freiman homs.
theorem IsAddFreimanHom.addRothNumber_mono E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : DecidableEq α] [inst_1 : AddCommMonoid α] [inst_2 : AddCommMonoid β]
[inst_3 : DecidableEq β] {A : Finset α} {B : Finset β} {f : α → β},
IsAddFreimanHom 2 (↑A) (↑B) f → Set.BijOn f ↑A ↑B → addRothNumber B ≤ addRothNumber A
Arithmetic progressions can be pushed forward along bijective 2-Freiman homs.
theorem IsMulFreimanIso.mulRothNumber_congr E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : DecidableEq α] [inst_1 : CommMonoid α] [inst_2 : CommMonoid β]
[inst_3 : DecidableEq β] {A : Finset α} {B : Finset β} {f : α → β},
IsMulFreimanIso 2 (↑A) (↑B) f → mulRothNumber A = mulRothNumber B
Arithmetic progressions are preserved under 2-Freiman isos.
theorem IsAddFreimanIso.addRothNumber_congr E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : DecidableEq α] [inst_1 : AddCommMonoid α] [inst_2 : AddCommMonoid β]
[inst_3 : DecidableEq β] {A : Finset α} {B : Finset β} {f : α → β},
IsAddFreimanIso 2 (↑A) (↑B) f → addRothNumber A = addRothNumber B
Arithmetic progressions are preserved under 2-Freiman isos.
theorem mulRothNumber_map_mul_left E0 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : CancelCommMonoid α] (s : Finset α) (a : α),
mulRothNumber (Finset.map (mulLeftEmbedding a) s) = mulRothNumber s
theorem addRothNumber_map_add_left E0 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : AddCancelCommMonoid α] (s : Finset α) (a : α),
addRothNumber (Finset.map (addLeftEmbedding a) s) = addRothNumber s
theorem addRothNumber_map_add_right E0 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : AddCancelCommMonoid α] (s : Finset α) (a : α),
addRothNumber (Finset.map (addRightEmbedding a) s) = addRothNumber s
theorem mulRothNumber_map_mul_right E0 #
∀ {α : Type u_2} [inst : DecidableEq α] [inst_1 : CancelCommMonoid α] (s : Finset α) (a : α),
mulRothNumber (Finset.map (mulRightEmbedding a) s) = mulRothNumber s
def rothNumberNat E3 #
ℕ →o ℕ
The Roth number of a natural N is the largest integer m for which there is a subset of
range N of size m with no arithmetic progression of length 3.
Trivially, rothNumberNat N ≤ N, but Roth's theorem (proved in 1953) shows that
rothNumberNat N = o(N) and the construction by Behrend gives a lower bound of the form
N * exp(-C sqrt(log(N))) ≤ rothNumberNat N.
A significant refinement of Roth's theorem by Bloom and Sisask announced in 2020 gives
rothNumberNat N = O(N / (log N)^(1+c)) for an absolute constant c.
theorem rothNumberNat_def E0 #
∀ (n : ℕ), rothNumberNat n = addRothNumber (Finset.range n)
theorem rothNumberNat_le E1 #
∀ (N : ℕ), rothNumberNat N ≤ N
theorem rothNumberNat_spec E1 #
∀ (n : ℕ), ∃ t ⊆ Finset.range n, t.card = rothNumberNat n ∧ ThreeAPFree ↑t
theorem ThreeAPFree.le_rothNumberNat E1 #
∀ {k n : ℕ} (s : Finset ℕ), ThreeAPFree ↑s → (∀ x ∈ s, x < n) → s.card = k → k ≤ rothNumberNat n
A verbose specialization of threeAPFree.le_addRothNumber, sometimes convenient in
practice.
theorem rothNumberNat_add_le E2 #
∀ (M N : ℕ), rothNumberNat (M + N) ≤ rothNumberNat M + rothNumberNat N
The Roth number is a subadditive function. Note that by Fekete's lemma this shows that
the limit rothNumberNat N / N exists, but Roth's theorem gives the stronger result that this
limit is actually 0.
theorem rothNumberNat_zero E0 #
rothNumberNat 0 = 0
theorem addRothNumber_Ico E1 #
∀ (a b : ℕ), addRothNumber (Finset.Ico a b) = rothNumberNat (b - a)
theorem Fin.addRothNumber_eq_rothNumberNat E1 #
∀ {n : ℕ} {k : Fin (n + 1)}, 2 * ↑k ≤ n → addRothNumber (Finset.Iio k) = rothNumberNat ↑k
theorem Fin.addRothNumber_le_rothNumberNat E1 #
∀ {n : ℕ} (k : Fin (n + 1)), addRothNumber (Finset.Iio k) ≤ rothNumberNat ↑k