FormalConjectures/ErdosProblems/282.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
9 declarations, 5 contain sorry, 0 declared as axioms
Erdős Problem 282
Reference: erdosproblems.com/282
Imports (1)
Imported by 1 file
- def
Erdos282.greedyUnitFractionRemDocumented declaration: greedyUnitFractionRem line 42 sourceSource documentation
Let $A\subseteq \mathbb{N}$ be an infinite set and consider the following greedy algorithm for a rational $x$: choose the minimal $n\in A$ not used so far such that $n\geq 1/x$ and repeat with $x$ replaced by $x-\frac{1}{n}$.
This process of subtracting unit fractions is modelled in
greedyUnitFractionRem. At each stept : ℕ, the functiongreedyUnitFractionRem A x treturns the remainder ofxwith respect to the firstt + 1unit fractions, with distinct denominators taken fromA. Once the remainder reaches0it stays0, and the process terminates. This corresponds to producing a representation ofxas the sum of distinct unit fractions with denominators fromA, however this function does not return this representation.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Set,Nat,Rat2 instances, coercions and auxiliary constants left out.
noncomputable def greedyUnitFractionRem (A : Set ℕ) (x : ℚ) (t : ℕ) : ℚ := …
- theorem
Erdos282.greedyUnitFractionRem_zeroline 51 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Rat, Erdos282.greedyUnitFractionRem,Set.univ,HDiv.hDiv,OfNat.ofNatProof uses:
of_eq_true,Eq.trans,True,congrFun',congrArg,ite,LE.le,InfSet.sInf,Set.ofPred,And,Membership.mem,Set,HSub.hSub,ite_congr,Inv.inv,one_div,Eq.refl,Not,congr,Set.Iciand 9 more72 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
Erdos282.greedyUnitFractionRem_oneline 55 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Rat, Erdos282.greedyUnitFractionRem,Set.univ,HDiv.hDiv,OfNat.ofNatProof uses:
of_eq_true,Eq.trans,True,congrFun',congrArg,ite,LE.le,InfSet.sInf,Set.ofPred,And,Membership.mem,Set,HSub.hSub,SDiff.sdiff,Singleton.singleton,ite.congr_simp,Inv.inv,one_div,Eq.refl,ite_cond_eq_trueand 11 more77 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
Erdos282.erdos_282Documented declaration: erdos_282 sorry line 67 sourceSource documentation
Let $A\subseteq \mathbb{N}$ be an infinite set and consider the following greedy algorithm for a rational $x\in (0,1)$: choose the minimal $n\in A$ not used so far such that $n\geq 1/x$ and repeat with $x$ replaced by $x-\frac{1}{n}$. If this terminates after finitely many steps then this produces a representation of $x$ as the sum of distinct unit fractions with denominators from $A$.
Does this process always terminate if $x$ has odd denominator and $A$ is the set of odd numbers?
depends on sorry what this means
Statement uses:
Rat,Membership.mem,Set,Set.Ioo,OfNat.ofNat,Odd,Nat,Rat.den,Filter.EventuallyEq,Filter.atTop, Erdos282.greedyUnitFractionRem,Set.ofPredProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous21 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem erdos_282 {x : ℚ} (hx : x ∈ Set.Ioo 0 1) (hx_den : Odd x.den) : greedyUnitFractionRem { n | Odd n } x =ᶠ[atTop] 0 := by …Mentions: Erdos282.greedyUnitFractionRem
- theorem
Erdos282.erdos_282.variants.generalMore generally, for which pairs $x$ and $A$ does this process terminate? sorry line 73 sourceSource documentation
More generally, for which pairs $x$ and $A$ does this process terminate?
depends on sorry what this means
Statement uses:
Rat,Set,Nat,Iff,Filter.EventuallyEq,Filter.atTop, Erdos282.greedyUnitFractionRem,OfNat.ofNat,Membership.mem,Prod,sorryAx,Bool.false,Prod.mkProof uses:
Lean.Name,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous15 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem erdos_282.variants.general (x : ℚ) (A : Set ℕ) : greedyUnitFractionRem A x =ᶠ[atTop] 0 ↔ (x, A) ∈ (answer(sorry) : Set (ℚ × Set ℕ)) := by …Mentions: Erdos282.greedyUnitFractionRem
- theorem
Erdos282.erdos_282.variants.fibonacciIn 1202 Fibonacci observed that this process terminates for any $x$ when $A=\mathbb{N}$ sorry line 79 sourceSource documentation
In 1202 Fibonacci observed that this process terminates for any $x$ when $A=\mathbb{N}$.
depends on sorry what this means
Statement uses:
Rat,Membership.mem,Set,Set.Ioo,OfNat.ofNat,Filter.EventuallyEq,Nat,Filter.atTop, Erdos282.greedyUnitFractionRem,Set.univProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous19 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem erdos_282.variants.fibonacci {x : ℚ} (hx : x ∈ Set.Ioo 0 1) : greedyUnitFractionRem .univ x =ᶠ[atTop] 0 := by …Mentions: Erdos282.greedyUnitFractionRem
- theorem
Erdos282.erdos_282.variants.grahamDocumented declaration: graham sorry line 91 sourceSource documentation
Graham has shown that $\frac{m}{n}$ is the sum of distinct unit fractions with denominators $\equiv a\pmod{d}$ if and only if $$\left(\frac{n}{(n,a,d)},\frac{d}{(a,d)}\right)=1.$$ Does the greedy algorithm always terminate in such cases?
depends on sorry what this means
Statement uses:
Iff,True,Rat,Membership.mem,Set,Set.Ioo,OfNat.ofNat,Nat,LT.lt,Eq,Nat.gcd,HDiv.hDiv,Rat.den,Filter.EventuallyEq,Filter.atTop, Erdos282.greedyUnitFractionRem,Set.ofPred,Nat.ModEqProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous26 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem erdos_282.variants.graham : answer(sorry) ↔ ∀ x : ℚ, x ∈ Set.Ioo 0 1 → ∀ a d : ℕ, 1 < d → (x.den / x.den.gcd (a.gcd d)).gcd (d / a.gcd d) = 1 → greedyUnitFractionRem { n | n ≡ a [MOD d] } x =ᶠ[atTop] 0 := by …Mentions: Erdos282.greedyUnitFractionRem
- theorem
Erdos282.greedyUnitFractionRem_sq_oneline 98 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Rat, Erdos282.greedyUnitFractionRem,Set.ofPred,Nat,IsSquare,OfNat.ofNatProof uses:
InfSet.sInf,And,LE.le,IsLeast.csInf_eq,of_decide_eq_true,IsLeast,id,Bool,Decidable.decide,Bool.true,Eq.refl,of_eq_true,Eq.trans,True,congrFun',congrArg,ite,Membership.mem,Set,HDiv.hDivand 11 more61 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- theorem
Erdos282.erdos_282.variants.sqGraham has also shown that $x$ is the sum of distinct unit fractions with square denominators if and only if $x\in [0,\pi^2/6-1)\cup [1,\pi^2/6)$ sorry line 109 sourceSource documentation
Graham has also shown that $x$ is the sum of distinct unit fractions with square denominators if and only if $x\in [0,\pi^2/6-1)\cup [1,\pi^2/6)$. Does the greedy algorithm for this always terminate? Erdős and Graham believe not - indeed, perhaps it fails to terminate almost always.
depends on sorry what this means
Statement uses:
Iff,True,Rat,Membership.mem,Real,Set,Union.union,Set.Ico,OfNat.ofNat,HSub.hSub,HDiv.hDiv,HPow.hPow,Nat,Real.pi,Filter.EventuallyEq,Filter.atTop, Erdos282.greedyUnitFractionRem,Set.ofPred,IsSquareProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous58 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem erdos_282.variants.sq : answer(sorry) ↔ ∀ x : ℚ, (x : ℝ) ∈ Set.Ico 0 (π ^ 2 / 6 - 1) ∪ Set.Ico 1 (π ^ 2 / 6) → greedyUnitFractionRem { n | IsSquare n } x =ᶠ[atTop] 0 := by …Mentions: Erdos282.greedyUnitFractionRem