Documentation

CslibFrontier.Foundations.Data.Finset.NatGap

Gaps in finite sets of natural numbers #

A finite set admits a threshold separating its elements by any prescribed gap, with the threshold bounded by the gap width times the number of elements.

Main results #

theorem Finset.exists_gap_le_mul_card (s : Finset ℕ) (d : ℕ) :
∃ D ≤ d * s.card, ∀ t ∈ s, t + d ≤ D ∨ D < t

A finite set of natural numbers has a threshold at most d * s.card such that every element lies at least d below the threshold or strictly above it.