FormalConjecturesForMathlib/Combinatorics/Additive/DifferenceBasis.lean

GitHub source file

Explanation legend Lean4 Domain Explanation Language (L4DEL)

L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.

L4DEL
Lean4 Domain Explanation Language

Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.

Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1

5 declarations, 0 contain sorry, 0 declared as axioms

Difference bases

A difference basis for a finite set $S$ is a finite set $A$ such that every element of $S$ can be written as a difference $a - b$ of two elements $a, b \in A$; equivalently $S \subseteq A - A$. The multiplicative version is a ratio basis ($S \subseteq A / A$).

The classical case $S = \{0, 1, \ldots, N\}$ over $\mathbb{Z}$ (or $\mathbb{N}$) recovers the notion of a restricted difference basis, dual to the recreational notion of a sparse ruler: a difference basis for $\{0, \ldots, N\}$ of minimal size is an optimal ruler of length $N$.

Main definitions

Main results

References

Imports (1)
Imported by 1 file
  1. def Finset.IsRatioBasis line 59 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: DecidableEq, Div, Finset

    Proof uses: LE.le, HDiv.hDiv

    5 instances, coercions and auxiliary constants left out.

  2. theorem Finset.isRatioBasis_iff line 65 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: DecidableEq, Div, Finset, Iff, Finset.IsRatioBasis, Membership.mem, Exists, And, Eq, HDiv.hDiv

    Proof uses: of_eq_true, Eq.trans, True, congrFun', congrArg, LE.le, forall_congr, implies_congr, Eq.refl, iff_self

    12 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  3. theorem Finset.IsRatioBasis.mono_left Shrinking the target set preserves being a difference basis line 70 source

    Source documentation

    Shrinking the target set preserves being a difference basis.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: DecidableEq, Div, Finset, Finset.IsRatioBasis, LE.le

    Proof uses: LE.le.trans, HDiv.hDiv

    8 instances, coercions and auxiliary constants left out.

    theorem IsRatioBasis.mono_left (h : IsRatioBasis A S) (hTS : T ⊆ S) : IsRatioBasis A T :=
    …

    Mentions: Finset.IsRatioBasis

  4. theorem Finset.IsRatioBasis.mono_right Enlarging the basis preserves being a difference basis line 75 source

    Source documentation

    Enlarging the basis preserves being a difference basis.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: DecidableEq, Div, Finset, Finset.IsRatioBasis, LE.le

    Proof uses: LE.le.trans, HDiv.hDiv, Finset.div_subset_div

    8 instances, coercions and auxiliary constants left out.

    theorem IsRatioBasis.mono_right (h : IsRatioBasis A S) (hAB : A ⊆ B) : IsRatioBasis B S :=
    …

    Mentions: Finset.IsRatioBasis

  5. theorem Finset.IsRatioBasis.card_le_sq A difference basis for $S$ has at least $\sqrt{|S|}$ elements: $|S| \le |A|^2$ line 80 source

    Source documentation

    A difference basis for $S$ has at least $\sqrt{|S|}$ elements: $|S| \le |A|^2$.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: DecidableEq, Div, Finset, Finset.IsRatioBasis, LE.le, Nat, Finset.card, HPow.hPow, OfNat.ofNat

    Proof uses: Trans.trans, Eq, HMul.hMul, HDiv.hDiv, Finset.card_le_card, Finset.card_div_le, Eq.symm, pow_two

    21 instances, coercions and auxiliary constants left out.

    theorem IsRatioBasis.card_le_sq (h : IsRatioBasis A S) : S.card ≤ A.card ^ 2 :=
    …

    Mentions: Finset.IsRatioBasis