Documentation

Mathlib.Combinatorics.Schnirelmann

Schnirelmann density #

We define the Schnirelmann density of a set A of natural numbers as $inf_{n > 0} |A โˆฉ {1,...,n}| / n$. As this density is very sensitive to changes in small values, we must exclude 0 from the infimum, and from the intersection.

Main statements #

Implementation notes #

Despite the definition being noncomputable, we include a decidable instance argument, since this makes the definition easier to use in explicit cases. Further, we use Finset.Ioc rather than a set intersection since the set is finite by construction, which reduces the proof obligations later that would arise with Nat.card.

TODO #

References #

noncomputable def schnirelmannDensity (A : Set โ„•) [DecidablePred fun (x : โ„•) => x โˆˆ A] :

The Schnirelmann density is defined as the infimum of |A โˆฉ {1, ..., n}| / n as n ranges over the positive naturals.

Equations
    Instances For
      theorem schnirelmannDensity_le_div {A : Set โ„•} [DecidablePred fun (x : โ„•) => x โˆˆ A] {n : โ„•} (hn : n โ‰  0) :
      schnirelmannDensity A โ‰ค โ†‘{a โˆˆ Finset.Ioc 0 n | a โˆˆ A}.card / โ†‘n
      theorem schnirelmannDensity_mul_le_card_filter {A : Set โ„•} [DecidablePred fun (x : โ„•) => x โˆˆ A] {n : โ„•} :
      schnirelmannDensity A * โ†‘n โ‰ค โ†‘{a โˆˆ Finset.Ioc 0 n | a โˆˆ A}.card

      For any natural n, the Schnirelmann density multiplied by n is bounded by |A โˆฉ {1, ..., n}|. Note this property fails for the natural density.

      theorem schnirelmannDensity_le_of_le {A : Set โ„•} [DecidablePred fun (x : โ„•) => x โˆˆ A] {x : โ„} (n : โ„•) (hn : n โ‰  0) (hx : โ†‘{a โˆˆ Finset.Ioc 0 n | a โˆˆ A}.card / โ†‘n โ‰ค x) :

      To show the Schnirelmann density is upper bounded by x, it suffices to show |A โˆฉ {1, ..., n}| / n โ‰ค x, for any chosen positive value of n.

      We provide n explicitly here to make this lemma more easily usable in apply or refine. This lemma is analogous to ciInf_le_of_le.

      theorem schnirelmannDensity_le_of_notMem {A : Set โ„•} [DecidablePred fun (x : โ„•) => x โˆˆ A] {k : โ„•} (hk : k โˆ‰ A) :

      If k is omitted from the set, its Schnirelmann density is upper bounded by 1 - kโปยน.

      The Schnirelmann density of a set not containing 1 is 0.

      The Schnirelmann density is increasing with the set.

      The Schnirelmann density of A is 1 if and only if A contains all the positive naturals.

      The Schnirelmann density of A containing 0 is 1 if and only if A is the naturals.

      theorem le_schnirelmannDensity_iff {A : Set โ„•} [DecidablePred fun (x : โ„•) => x โˆˆ A] {x : โ„} :
      x โ‰ค schnirelmannDensity A โ†” โˆ€ (n : โ„•), 0 < n โ†’ x โ‰ค โ†‘{a โˆˆ Finset.Ioc 0 n | a โˆˆ A}.card / โ†‘n
      theorem schnirelmannDensity_lt_iff {A : Set โ„•} [DecidablePred fun (x : โ„•) => x โˆˆ A] {x : โ„} :
      schnirelmannDensity A < x โ†” โˆƒ (n : โ„•), 0 < n โˆง โ†‘{a โˆˆ Finset.Ioc 0 n | a โˆˆ A}.card / โ†‘n < x
      theorem schnirelmannDensity_le_iff_forall {A : Set โ„•} [DecidablePred fun (x : โ„•) => x โˆˆ A] {x : โ„} :
      schnirelmannDensity A โ‰ค x โ†” โˆ€ (ฮต : โ„), 0 < ฮต โ†’ โˆƒ (n : โ„•), 0 < n โˆง โ†‘{a โˆˆ Finset.Ioc 0 n | a โˆˆ A}.card / โ†‘n < x + ฮต
      @[simp]

      The Schnirelmann density is unaffected by adding 0.

      The Schnirelmann density is unaffected by removing 0.

      theorem exists_of_schnirelmannDensity_eq_zero {A : Set โ„•} [DecidablePred fun (x : โ„•) => x โˆˆ A] {ฮต : โ„} (hฮต : 0 < ฮต) (hA : schnirelmannDensity A = 0) :
      โˆƒ (n : โ„•), 0 < n โˆง โ†‘{a โˆˆ Finset.Ioc 0 n | a โˆˆ A}.card / โ†‘n < ฮต

      If the Schnirelmann density is 0, there is a positive natural for which |A โˆฉ {1, ..., n}| / n < ฮต, for any positive ฮต. Note this cannot be improved to โˆƒแถ  n : โ„• in atTop, as can be seen by A = {1}แถœ.

      The Schnirelmann density of any finset is 0.

      The Schnirelmann density of any finite set is 0.

      The Schnirelmann density of the set of naturals which are 1 mod m is mโปยน, for any m โ‰  1.

      Note that if m = 1, this set is empty.