Documentation

FormalConjectures.ForMathlib.Combinatorics.Basic

def IsSidon {ι : Type u_1} {α : Type u_2} [Preorder ι] [Preorder α] [Add α] (a : ι →o α) :

A Sidon sequence (also called a Sidon set) is a sequence of natural numbers $a_0, a_1, ...$ such that all pairwise sums $a_i + a_j$ are distinct for $i ≤ j$.

In other words, all pairwise sums of elements are distinct apart from coincidences forced by the commutativity of addition.

Equations
  • IsSidon a = ∀ (i₁ j₁ i₂ j₂ : ι), i₁ j₁i₂ j₂a i₁ + a j₁ = a i₂ + a j₂i₁ = i₂ j₁ = j₂
Instances For
    theorem IsSidon.injective {ι : Type u_1} {α : Type u_2} [Preorder ι] [Preorder α] [Add α] (a : ι →o α) (ha : IsSidon a) :
    def Set.IsAPOfLength {α : Type u_1} [AddCommMonoid α] (s : Set α) (l : ℕ∞) :

    The predicate that a set s is an arithmetic progression of length l (possibly infinite).

    Equations
    Instances For
      theorem Set.IsAPOfLength.card {α : Type u_1} [AddCommMonoid α] (s : Set α) (l : ℕ∞) (hs : s.IsAPOfLength l) :
      ENat.card s = l
      theorem IsSidon.avoids_isAPOfLength_three {α : Type u_2} [OrderedAddCommMonoid α] (A : →o α) (hA : IsSidon A) (Y : Set α) :
      Y.IsAPOfLength 3(Set.range A Y).ncard 2