Documentation

FormalConjecturesForMathlib.Combinatorics.Basic

def IsSumFree {α : Type u_1} [AddCommMonoid α] (A : Set α) :

A set $A$ is said to be sum-free if the sumset $A + A$ is disjoint from $A$, i.e. if the equation $a + b = c$ has no solution with $a, b, c \in A$.

Equations
Instances For
    def allUniqueSums {α : Type u_1} [AddCommMonoid α] (A : Set α) :
    Set α

    allUniqueSums A is the set of elements in α that can be written as the sum of exactly one unordered pair of elements from A.

    Equations
    Instances For

      A set A has no unique representation in its sumset A + A if for every pair of elements a₁, a₂ ∈ A, there exist another pair of elements b₁, b₂ ∈ A such that a₁ + a₂ = b₁ + b₂ and {a₁, a₂} ≠ {b₁, b₂}.

      Equations
      Instances For
        def IsSyndetic (A : Set ) :

        A set $A$ of natural numbers is said to have bounded gaps if there exists an integer $p$ such that $A ∩ [n, n + 1, ..., n + p]$ is nonempty for all $n$.

        Equations
        Instances For
          def IsSidon {α : Type u_1} [AddCommMonoid α] (A : Set α) :

          A Sidon set is a set, such that such that all pairwise sums of elements are distinct apart from coincidences forced by the commutativity of addition.

          Equations
          • IsSidon A = i₁A, j₁A, i₂A, j₂A, i₁ + i₂ = j₁ + j₂i₁ = j₁ i₂ = j₂ i₁ = j₂ i₂ = j₁
          Instances For
            theorem Set.IsSidon.avoids_isAPOfLength_three {A : Set } (hA : IsSidon A) {Y : Set } (hY : Y.IsAPOfLength 3) :
            (A Y).ncard 2
            theorem Set.IsSidon.subset {α : Type u_1} [AddCommMonoid α] {A B : Set α} (hB : IsSidon B) (hAB : A B) :
            theorem Set.IsSidon.insert {α : Type u_1} [AddCommMonoid α] {A : Set α} {m : α} [IsRightCancelAdd α] [IsLeftCancelAdd α] (hA : IsSidon A) :
            IsSidon (A {m}) m A aA, bA, m + m a + b cA, m + a b + c

            Maximal Sidon sets in an interval.

            We follow the convention that IsMaximalSidonSetIn A N means A ⊆ {1, …, N} is Sidon and is inclusion-maximal among subsets of Set.Icc 1 N with the Sidon property.

            IsMaximalSidonSetIn A N means A ⊆ {1, …, N} is Sidon and cannot be extended within {1, …, N} while remaining Sidon.

            Equations
            Instances For
              theorem Set.IsMaximalSidonSetIn.subset {A : Set } {N : } (hA : A.IsMaximalSidonSetIn N) :
              A Icc 1 N

              If A is a maximal Sidon set in {1, …, N}, then A ⊆ {1, …, N}.

              If A is a maximal Sidon set in {1, …, N}, then A is Sidon.

              theorem Set.IsMaximalSidonSetIn.maximal {A : Set } {N : } (hA : A.IsMaximalSidonSetIn N) {x : } (hx : x Icc 1 N) (hxA : xA) :

              Maximality condition unpacked.

              Equations

              The maximum size of a Sidon set in the supplied Finset.

              Equations
              Instances For
                theorem Finset.IsSidon.insert_ge_max' {A : Finset } (h : A.Nonempty) (hA : IsSidon A) {s : } (hs : 2 * A.max' h + 1 s) :
                IsSidon (A {s})

                If A is finite Sidon, then A ∪ {s} is also Sidon provided s ≥ A.max + 1.

                theorem Finset.IsSidon.exists_insert {A : Finset } (h : A.Nonempty) (hA : IsSidon A) :
                mA, IsSidon (A {m})
                theorem Finset.IsSidon.exists_insert_ge {A : Finset } (h : A.Nonempty) (hA : IsSidon A) (s : ) :
                ms, mA IsSidon (A {m})