File: Mathlib/Combinatorics/Additive/AP/Three/Defs.lean

full_name: ThreeAPFree
code: /-- A set is **3GP-free** if it does not contain any non-trivial geometric progression of length
three. -/
@[to_additive "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**."]
def ThreeGPFree : Prop 
goal: Prop

full_name: ThreeGPFree
code: /-- A set is **3GP-free** if it does not contain any non-trivial geometric progression of length
three. -/
@[to_additive "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**."]
def ThreeGPFree : Prop 
goal: Prop

full_name: ThreeGPFree.instDecidable
code: /-- Whether a given finset is 3GP-free is decidable. -/
@[to_additive "Whether a given finset is 3AP-free is decidable."]
instance ThreeGPFree.instDecidable [DecidableEq α] {s : Finset α} :
    Decidable (ThreeGPFree (s : Set α)) 
goal: Decidable (ThreeGPFree ↑s)

full_name: ThreeAPFree.instDecidable
code: /-- Whether a given finset is 3GP-free is decidable. -/
@[to_additive "Whether a given finset is 3AP-free is decidable."]
instance ThreeGPFree.instDecidable [DecidableEq α] {s : Finset α} :
    Decidable (ThreeGPFree (s : Set α)) 
goal: Decidable (ThreeAPFree ↑s)

full_name: ThreeAPFree.mono
code: @[to_additive]
theorem ThreeGPFree.mono (h : t ⊆ s) (hs : ThreeGPFree s) : ThreeGPFree t 
goal: ThreeAPFree t

full_name: ThreeGPFree.mono
code: @[to_additive]
theorem ThreeGPFree.mono (h : t ⊆ s) (hs : ThreeGPFree s) : ThreeGPFree t 
goal: ThreeGPFree t

full_name: threeGPFree_empty
code: @[to_additive (attr := simp)]
theorem threeGPFree_empty : ThreeGPFree (∅ : Set α) 
goal: ThreeGPFree ∅

full_name: threeAPFree_empty
code: @[to_additive (attr := simp)]
theorem threeGPFree_empty : ThreeGPFree (∅ : Set α) 
goal: ThreeAPFree ∅

full_name: Set.Subsingleton.threeGPFree
code: @[to_additive]
theorem Set.Subsingleton.threeGPFree (hs : s.Subsingleton) : ThreeGPFree s 
goal: ThreeGPFree s

full_name: Set.Subsingleton.threeAPFree
code: @[to_additive]
theorem Set.Subsingleton.threeGPFree (hs : s.Subsingleton) : ThreeGPFree s 
goal: ThreeAPFree s

full_name: threeAPFree_singleton
code: @[to_additive (attr := simp)]
theorem threeGPFree_singleton (a : α) : ThreeGPFree ({a} : Set α) 
goal: ThreeAPFree {a}

full_name: threeGPFree_singleton
code: @[to_additive (attr := simp)]
theorem threeGPFree_singleton (a : α) : ThreeGPFree ({a} : Set α) 
goal: ThreeGPFree {a}

full_name: ThreeAPFree.prod
code: @[to_additive ThreeAPFree.prod]
theorem ThreeGPFree.prod {t : Set β} (hs : ThreeGPFree s) (ht : ThreeGPFree t) :
    ThreeGPFree (s ×ˢ t) 
goal: ThreeAPFree (s ×ˢ t)

full_name: ThreeGPFree.prod
code: @[to_additive ThreeAPFree.prod]
theorem ThreeGPFree.prod {t : Set β} (hs : ThreeGPFree s) (ht : ThreeGPFree t) :
    ThreeGPFree (s ×ˢ t) 
goal: ThreeGPFree (s ×ˢ t)

full_name: threeAPFree_pi
code: @[to_additive]
theorem threeGPFree_pi {ι : Type*} {α : ι → Type*} [∀ i, Monoid (α i)] {s : ∀ i, Set (α i)}
    (hs : ∀ i, ThreeGPFree (s i)) : ThreeGPFree ((univ : Set ι).pi s) 
goal: ThreeAPFree (Set.univ.pi s)

full_name: threeGPFree_pi
code: @[to_additive]
theorem threeGPFree_pi {ι : Type*} {α : ι → Type*} [∀ i, Monoid (α i)] {s : ∀ i, Set (α i)}
    (hs : ∀ i, ThreeGPFree (s i)) : ThreeGPFree ((univ : Set ι).pi s) 
goal: ThreeGPFree (Set.univ.pi s)

full_name: ThreeAPFree.of_image
code: /-- Arithmetic progressions of length three are preserved under `2`-Freiman homomorphisms. -/
@[to_additive
"Arithmetic progressions of length three are preserved under `2`-Freiman homomorphisms."]
lemma ThreeGPFree.of_image (hf : IsMulFreimanHom 2 s t f) (hf' : s.InjOn f) (hAs : A ⊆ s)
    (hA : ThreeGPFree (f '' A)) : ThreeGPFree A 
goal: ThreeAPFree A

full_name: ThreeGPFree.of_image
code: /-- Arithmetic progressions of length three are preserved under `2`-Freiman homomorphisms. -/
@[to_additive
"Arithmetic progressions of length three are preserved under `2`-Freiman homomorphisms."]
lemma ThreeGPFree.of_image (hf : IsMulFreimanHom 2 s t f) (hf' : s.InjOn f) (hAs : A ⊆ s)
    (hA : ThreeGPFree (f '' A)) : ThreeGPFree A 
goal: ThreeGPFree A

full_name: threeAPFree_image
code: /-- Arithmetic progressions of length three are preserved under `2`-Freiman isomorphisms. -/
@[to_additive
"Arithmetic progressions of length three are preserved under `2`-Freiman isomorphisms."]
lemma threeGPFree_image (hf : IsMulFreimanIso 2 s t f) (hAs : A ⊆ s) :
    ThreeGPFree (f '' A) ↔ ThreeGPFree A 
goal: ThreeAPFree (f '' A) ↔ ThreeAPFree A

full_name: threeGPFree_image
code: /-- Arithmetic progressions of length three are preserved under `2`-Freiman isomorphisms. -/
@[to_additive
"Arithmetic progressions of length three are preserved under `2`-Freiman isomorphisms."]
lemma threeGPFree_image (hf : IsMulFreimanIso 2 s t f) (hAs : A ⊆ s) :
    ThreeGPFree (f '' A) ↔ ThreeGPFree A 
goal: ThreeGPFree (f '' A) ↔ ThreeGPFree A

full_name: IsMulFreimanHom.threeGPFree
code: /-- Arithmetic progressions of length three are preserved under `2`-Freiman homomorphisms. -/
@[to_additive]
lemma IsMulFreimanHom.threeGPFree (hf : IsMulFreimanHom 2 s t f) (hf' : s.InjOn f)
    (ht : ThreeGPFree t) : ThreeGPFree s 
goal: ThreeGPFree s

full_name: IsAddFreimanHom.threeAPFree
code: /-- Arithmetic progressions of length three are preserved under `2`-Freiman homomorphisms. -/
@[to_additive]
lemma IsMulFreimanHom.threeGPFree (hf : IsMulFreimanHom 2 s t f) (hf' : s.InjOn f)
    (ht : ThreeGPFree t) : ThreeGPFree s 
goal: ThreeAPFree s

full_name: IsAddFreimanIso.threeAPFree_congr
code: /-- Arithmetic progressions of length three are preserved under `2`-Freiman isomorphisms. -/
@[to_additive]
lemma IsMulFreimanIso.threeGPFree_congr (hf : IsMulFreimanIso 2 s t f) :
    ThreeGPFree s ↔ ThreeGPFree t 
goal: ThreeAPFree s ↔ ThreeAPFree t

full_name: IsMulFreimanIso.threeGPFree_congr
code: /-- Arithmetic progressions of length three are preserved under `2`-Freiman isomorphisms. -/
@[to_additive]
lemma IsMulFreimanIso.threeGPFree_congr (hf : IsMulFreimanIso 2 s t f) :
    ThreeGPFree s ↔ ThreeGPFree t 
goal: ThreeGPFree s ↔ ThreeGPFree t

full_name: ThreeGPFree.image'
code: @[to_additive]
theorem ThreeGPFree.image' [FunLike F α β] [MulHomClass F α β] (f : F) (hf : (s * s).InjOn f)
    (h : ThreeGPFree s) : ThreeGPFree (f '' s) 
goal: ThreeGPFree (⇑f '' s)

full_name: ThreeAPFree.image'
code: @[to_additive]
theorem ThreeGPFree.image' [FunLike F α β] [MulHomClass F α β] (f : F) (hf : (s * s).InjOn f)
    (h : ThreeGPFree s) : ThreeGPFree (f '' s) 
goal: ThreeAPFree (⇑f '' s)

full_name: ThreeGPFree.eq_right
code: lemma ThreeGPFree.eq_right (hs : ThreeGPFree s) :
    ∀ ⦃a⦄, a ∈ s → ∀ ⦃b⦄, b ∈ s → ∀ ⦃c⦄, c ∈ s → a * c = b * b → b = c 
goal: a ∈ s → ∀ ⦃b : α⦄, b ∈ s → ∀ ⦃c : α⦄, c ∈ s → a * c = b * b → b = c

full_name: threeAPFree_insert
code: @[to_additive] lemma threeGPFree_insert :
    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 
goal: 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

full_name: threeGPFree_insert
code: @[to_additive] lemma threeGPFree_insert :
    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 
goal: 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

full_name: ThreeGPFree.smul_set
code: @[to_additive]
theorem ThreeGPFree.smul_set (hs : ThreeGPFree s) : ThreeGPFree (a • s) 
goal: ThreeGPFree (a • s)

full_name: ThreeAPFree.vadd_set
code: @[to_additive]
theorem ThreeGPFree.smul_set (hs : ThreeGPFree s) : ThreeGPFree (a • s) 
goal: ThreeAPFree (a +ᵥ s)

full_name: threeAPFree_vadd_set
code: @[to_additive] lemma threeGPFree_smul_set : ThreeGPFree (a • s) ↔ ThreeGPFree s 
goal: ThreeAPFree (a +ᵥ s) ↔ ThreeAPFree s

full_name: threeGPFree_smul_set
code: @[to_additive] lemma threeGPFree_smul_set : ThreeGPFree (a • s) ↔ ThreeGPFree s 
goal: ThreeGPFree (a • s) ↔ ThreeGPFree s

full_name: threeGPFree_insert_of_lt
code: @[to_additive]
theorem threeGPFree_insert_of_lt (hs : ∀ i ∈ s, i < a) :
    ThreeGPFree (insert a s) ↔
      ThreeGPFree s ∧ ∀ ⦃b⦄, b ∈ s → ∀ ⦃c⦄, c ∈ s → a * c = b * b → a = b 
goal: ThreeGPFree (insert a s) ↔ ThreeGPFree s ∧ ∀ ⦃b : α⦄, b ∈ s → ∀ ⦃c : α⦄, c ∈ s → a * c = b * b → a = b

full_name: threeAPFree_insert_of_lt
code: @[to_additive]
theorem threeGPFree_insert_of_lt (hs : ∀ i ∈ s, i < a) :
    ThreeGPFree (insert a s) ↔
      ThreeGPFree s ∧ ∀ ⦃b⦄, b ∈ s → ∀ ⦃c⦄, c ∈ s → a * c = b * b → a = b 
goal: ThreeAPFree (insert a s) ↔ ThreeAPFree s ∧ ∀ ⦃b : α⦄, b ∈ s → ∀ ⦃c : α⦄, c ∈ s → a + c = b + b → a = b

full_name: ThreeGPFree.smul_set₀
code: lemma ThreeGPFree.smul_set₀ (hs : ThreeGPFree s) (ha : a ≠ 0) : ThreeGPFree (a • s) 
goal: ThreeGPFree (a • s)

full_name: threeGPFree_smul_set₀
code: theorem threeGPFree_smul_set₀ (ha : a ≠ 0) : ThreeGPFree (a • s) ↔ ThreeGPFree s 
goal: ThreeGPFree (a • s) ↔ ThreeGPFree s

full_name: threeAPFree_iff_eq_right
code: theorem threeAPFree_iff_eq_right {s : Set ℕ} :
    ThreeAPFree s ↔ ∀ ⦃a⦄, a ∈ s → ∀ ⦃b⦄, b ∈ s → ∀ ⦃c⦄, c ∈ s → a + c = b + b → a = c 
goal: ThreeAPFree s ↔ ∀ ⦃a : ℕ⦄, a ∈ s → ∀ ⦃b : ℕ⦄, b ∈ s → ∀ ⦃c : ℕ⦄, c ∈ s → a + c = b + b → a = c

full_name: mulRothNumber
code: /-- The multiplicative Roth number of a finset is the cardinality of its biggest 3GP-free subset. -/
@[to_additive "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`."]
def mulRothNumber : Finset α →o ℕ 
goal: Finset α →o ℕ

full_name: addRothNumber
code: /-- The multiplicative Roth number of a finset is the cardinality of its biggest 3GP-free subset. -/
@[to_additive "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`."]
def mulRothNumber : Finset α →o ℕ 
goal: Finset α →o ℕ

full_name: addRothNumber_le
code: @[to_additive]
theorem mulRothNumber_le : mulRothNumber s ≤ s.card 
goal: addRothNumber s ≤ s.card

full_name: mulRothNumber_le
code: @[to_additive]
theorem mulRothNumber_le : mulRothNumber s ≤ s.card 
goal: mulRothNumber s ≤ s.card

full_name: addRothNumber_spec
code: @[to_additive]
theorem mulRothNumber_spec :
    ∃ t ⊆ s, t.card = mulRothNumber s ∧ ThreeGPFree (t : Set α) 
goal: ∃ t ⊆ s, t.card = addRothNumber s ∧ ThreeAPFree ↑t

full_name: mulRothNumber_spec
code: @[to_additive]
theorem mulRothNumber_spec :
    ∃ t ⊆ s, t.card = mulRothNumber s ∧ ThreeGPFree (t : Set α) 
goal: ∃ t ⊆ s, t.card = mulRothNumber s ∧ ThreeGPFree ↑t

full_name: ThreeAPFree.le_addRothNumber
code: @[to_additive]
theorem ThreeGPFree.le_mulRothNumber (hs : ThreeGPFree (s : Set α)) (h : s ⊆ t) :
    s.card ≤ mulRothNumber t 
goal: s.card ≤ addRothNumber t

full_name: ThreeGPFree.le_mulRothNumber
code: @[to_additive]
theorem ThreeGPFree.le_mulRothNumber (hs : ThreeGPFree (s : Set α)) (h : s ⊆ t) :
    s.card ≤ mulRothNumber t 
goal: s.card ≤ mulRothNumber t

full_name: ThreeAPFree.addRothNumber_eq
code: @[to_additive]
theorem ThreeGPFree.mulRothNumber_eq (hs : ThreeGPFree (s : Set α)) :
    mulRothNumber s = s.card 
goal: addRothNumber s = s.card

full_name: ThreeGPFree.mulRothNumber_eq
code: @[to_additive]
theorem ThreeGPFree.mulRothNumber_eq (hs : ThreeGPFree (s : Set α)) :
    mulRothNumber s = s.card 
goal: mulRothNumber s = s.card

full_name: addRothNumber_empty
code: @[to_additive (attr := simp)]
theorem mulRothNumber_empty : mulRothNumber (∅ : Finset α) = 0 
goal: addRothNumber ∅ = 0

full_name: mulRothNumber_empty
code: @[to_additive (attr := simp)]
theorem mulRothNumber_empty : mulRothNumber (∅ : Finset α) = 0 
goal: mulRothNumber ∅ = 0

full_name: addRothNumber_singleton
code: @[to_additive (attr := simp)]
theorem mulRothNumber_singleton (a : α) : mulRothNumber ({a} : Finset α) = 1 
goal: addRothNumber {a} = 1

full_name: mulRothNumber_singleton
code: @[to_additive (attr := simp)]
theorem mulRothNumber_singleton (a : α) : mulRothNumber ({a} : Finset α) = 1 
goal: mulRothNumber {a} = 1

full_name: mulRothNumber_union_le
code: @[to_additive]
theorem mulRothNumber_union_le (s t : Finset α) :
    mulRothNumber (s ∪ t) ≤ mulRothNumber s + mulRothNumber t 
goal: mulRothNumber (s ∪ t) ≤ mulRothNumber s + mulRothNumber t

full_name: addRothNumber_union_le
code: @[to_additive]
theorem mulRothNumber_union_le (s t : Finset α) :
    mulRothNumber (s ∪ t) ≤ mulRothNumber s + mulRothNumber t 
goal: addRothNumber (s ∪ t) ≤ addRothNumber s + addRothNumber t

full_name: le_addRothNumber_product
code: @[to_additive]
theorem le_mulRothNumber_product (s : Finset α) (t : Finset β) :
    mulRothNumber s * mulRothNumber t ≤ mulRothNumber (s ×ˢ t) 
goal: addRothNumber s * addRothNumber t ≤ addRothNumber (s ×ˢ t)

full_name: le_mulRothNumber_product
code: @[to_additive]
theorem le_mulRothNumber_product (s : Finset α) (t : Finset β) :
    mulRothNumber s * mulRothNumber t ≤ mulRothNumber (s ×ˢ t) 
goal: mulRothNumber s * mulRothNumber t ≤ mulRothNumber (s ×ˢ t)

full_name: mulRothNumber_lt_of_forall_not_threeGPFree
code: @[to_additive]
theorem mulRothNumber_lt_of_forall_not_threeGPFree
    (h : ∀ t ∈ powersetCard n s, ¬ThreeGPFree ((t : Finset α) : Set α)) :
    mulRothNumber s < n 
goal: mulRothNumber s < n

full_name: addRothNumber_lt_of_forall_not_threeAPFree
code: @[to_additive]
theorem mulRothNumber_lt_of_forall_not_threeGPFree
    (h : ∀ t ∈ powersetCard n s, ¬ThreeGPFree ((t : Finset α) : Set α)) :
    mulRothNumber s < n 
goal: addRothNumber s < n

full_name: IsMulFreimanHom.mulRothNumber_mono
code: /-- Arithmetic progressions can be pushed forward along bijective 2-Freiman homs. -/
@[to_additive "Arithmetic progressions can be pushed forward along bijective 2-Freiman homs."]
lemma IsMulFreimanHom.mulRothNumber_mono (hf : IsMulFreimanHom 2 A B f) (hf' : Set.BijOn f A B) :
    mulRothNumber B ≤ mulRothNumber A 
goal: mulRothNumber B ≤ mulRothNumber A

full_name: IsAddFreimanHom.addRothNumber_mono
code: /-- Arithmetic progressions can be pushed forward along bijective 2-Freiman homs. -/
@[to_additive "Arithmetic progressions can be pushed forward along bijective 2-Freiman homs."]
lemma IsMulFreimanHom.mulRothNumber_mono (hf : IsMulFreimanHom 2 A B f) (hf' : Set.BijOn f A B) :
    mulRothNumber B ≤ mulRothNumber A 
goal: addRothNumber B ≤ addRothNumber A

full_name: IsMulFreimanIso.mulRothNumber_congr
code: /-- Arithmetic progressions are preserved under 2-Freiman isos. -/
@[to_additive "Arithmetic progressions are preserved under 2-Freiman isos."]
lemma IsMulFreimanIso.mulRothNumber_congr (hf : IsMulFreimanIso 2 A B f) :
    mulRothNumber A = mulRothNumber B 
goal: mulRothNumber A = mulRothNumber B

full_name: IsAddFreimanIso.addRothNumber_congr
code: /-- Arithmetic progressions are preserved under 2-Freiman isos. -/
@[to_additive "Arithmetic progressions are preserved under 2-Freiman isos."]
lemma IsMulFreimanIso.mulRothNumber_congr (hf : IsMulFreimanIso 2 A B f) :
    mulRothNumber A = mulRothNumber B 
goal: addRothNumber A = addRothNumber B

full_name: addRothNumber_map_add_left
code: @[to_additive (attr := simp)]
theorem mulRothNumber_map_mul_left :
    mulRothNumber (s.map <| mulLeftEmbedding a) = mulRothNumber s 
goal: addRothNumber (Finset.map (addLeftEmbedding a) s) = addRothNumber s

full_name: mulRothNumber_map_mul_left
code: @[to_additive (attr := simp)]
theorem mulRothNumber_map_mul_left :
    mulRothNumber (s.map <| mulLeftEmbedding a) = mulRothNumber s 
goal: mulRothNumber (Finset.map (mulLeftEmbedding a) s) = mulRothNumber s

full_name: addRothNumber_map_add_right
code: @[to_additive (attr := simp)]
theorem mulRothNumber_map_mul_right :
    mulRothNumber (s.map <| mulRightEmbedding a) = mulRothNumber s 
goal: addRothNumber (Finset.map (addRightEmbedding a) s) = addRothNumber s

full_name: mulRothNumber_map_mul_right
code: @[to_additive (attr := simp)]
theorem mulRothNumber_map_mul_right :
    mulRothNumber (s.map <| mulRightEmbedding a) = mulRothNumber s 
goal: mulRothNumber (Finset.map (mulRightEmbedding a) s) = mulRothNumber s

full_name: rothNumberNat
code: /-- 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`. -/
def rothNumberNat : ℕ →o ℕ 
goal: ℕ →o ℕ

full_name: rothNumberNat_def
code: theorem rothNumberNat_def (n : ℕ) : rothNumberNat n = addRothNumber (range n) 
goal: rothNumberNat n = addRothNumber (Finset.range n)

full_name: rothNumberNat_le
code: theorem rothNumberNat_le (N : ℕ) : rothNumberNat N ≤ N 
goal: rothNumberNat N ≤ N

full_name: rothNumberNat_spec
code: theorem rothNumberNat_spec (n : ℕ) :
    ∃ t ⊆ range n, t.card = rothNumberNat n ∧ ThreeAPFree (t : Set ℕ) 
goal: ∃ t ⊆ Finset.range n, t.card = rothNumberNat n ∧ ThreeAPFree ↑t

full_name: ThreeAPFree.le_rothNumberNat
code: /-- A verbose specialization of `threeAPFree.le_addRothNumber`, sometimes convenient in
practice. -/
theorem ThreeAPFree.le_rothNumberNat (s : Finset ℕ) (hs : ThreeAPFree (s : Set ℕ))
    (hsn : ∀ x ∈ s, x < n) (hsk : s.card = k) : k ≤ rothNumberNat n 
goal: k ≤ rothNumberNat n

full_name: rothNumberNat_add_le
code: /-- 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_add_le (M N : ℕ) :
    rothNumberNat (M + N) ≤ rothNumberNat M + rothNumberNat N 
goal: rothNumberNat (M + N) ≤ rothNumberNat M + rothNumberNat N

full_name: rothNumberNat_zero
code: @[simp]
theorem rothNumberNat_zero : rothNumberNat 0 = 0 
goal: rothNumberNat 0 = 0

full_name: addRothNumber_Ico
code: theorem addRothNumber_Ico (a b : ℕ) : addRothNumber (Ico a b) = rothNumberNat (b - a) 
goal: addRothNumber (Finset.Ico a b) = rothNumberNat (b - a)

full_name: Fin.addRothNumber_eq_rothNumberNat
code: lemma Fin.addRothNumber_eq_rothNumberNat (hkn : 2 * k ≤ n) :
    addRothNumber (Iio k : Finset (Fin n.succ)) = rothNumberNat k 
goal: addRothNumber (Finset.Iio ↑k) = rothNumberNat k

full_name: Fin.addRothNumber_le_rothNumberNat
code: lemma Fin.addRothNumber_le_rothNumberNat (k n : ℕ) (hkn : k ≤ n) :
    addRothNumber (Iio k : Finset (Fin n.succ)) ≤ rothNumberNat k 
goal: addRothNumber (Finset.Iio ↑k) ≤ rothNumberNat k