FormalConjecturesForMathlib/Combinatorics/Additive/DifferenceBasis.lean
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
Finset.IsRatioBasis A S(additive:Finset.IsDifferenceBasis A S): $S \subseteq A / A$.
Main results
Finset.isRatioBasis_iff: the elementwise characterization.Finset.IsRatioBasis.mono_left/Finset.IsRatioBasis.mono_right: monotonicity.Finset.IsRatioBasis.card_le_sq: a ratio basis for $S$ has at least $\sqrt{|S|}$ elements, i.e. $|S| \le |A|^2$.
References
- [Wi63] Wichmann, B. "A note on restricted difference bases." Journal of the London Mathematical Society 38 (1963): 465-466.
Imports (1)
Imported by 1 file
- def
Finset.IsRatioBasisline 59 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
DecidableEq,Div,FinsetProof uses:
LE.le,HDiv.hDiv5 instances, coercions and auxiliary constants left out.
- theorem
Finset.isRatioBasis_iffline 65 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
DecidableEq,Div,Finset,Iff, Finset.IsRatioBasis,Membership.mem,Exists,And,Eq,HDiv.hDivProof uses:
of_eq_true,Eq.trans,True,congrFun',congrArg,LE.le,forall_congr,implies_congr,Eq.refl,iff_self12 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
Finset.IsRatioBasis.mono_leftShrinking the target set preserves being a difference basis line 70 sourceSource 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.leProof uses:
LE.le.trans,HDiv.hDiv8 instances, coercions and auxiliary constants left out.
theorem IsRatioBasis.mono_left (h : IsRatioBasis A S) (hTS : T ⊆ S) : IsRatioBasis A T := …
Mentions: Finset.IsRatioBasis
- theorem
Finset.IsRatioBasis.mono_rightEnlarging the basis preserves being a difference basis line 75 sourceSource 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.leProof uses:
LE.le.trans,HDiv.hDiv,Finset.div_subset_div8 instances, coercions and auxiliary constants left out.
theorem IsRatioBasis.mono_right (h : IsRatioBasis A S) (hAB : A ⊆ B) : IsRatioBasis B S := …
Mentions: Finset.IsRatioBasis
- theorem
Finset.IsRatioBasis.card_le_sqA difference basis for $S$ has at least $\sqrt{|S|}$ elements: $|S| \le |A|^2$ line 80 sourceSource 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.ofNatProof uses:
Trans.trans,Eq,HMul.hMul,HDiv.hDiv,Finset.card_le_card,Finset.card_div_le,Eq.symm,pow_two21 instances, coercions and auxiliary constants left out.
theorem IsRatioBasis.card_le_sq (h : IsRatioBasis A S) : S.card ≤ A.card ^ 2 := …
Mentions: Finset.IsRatioBasis