FormalConjectures/ErdosProblems/282.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

9 declarations, 5 contain sorry, 0 declared as axioms

Erdős Problem 282

Reference: erdosproblems.com/282

Imports (1)
Imported by 1 file
  1. def Erdos282.greedyUnitFractionRem Documented declaration: greedyUnitFractionRem line 42 source

    Source 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 step t : ℕ, the function greedyUnitFractionRem A x t returns the remainder of x with respect to the first t + 1 unit fractions, with distinct denominators taken from A. Once the remainder reaches 0 it stays 0, and the process terminates. This corresponds to producing a representation of x as the sum of distinct unit fractions with denominators from A, however this function does not return this representation.

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

    Statement uses: Set, Nat, Rat

    2 instances, coercions and auxiliary constants left out.

    noncomputable def greedyUnitFractionRem (A : Set ℕ) (x : ℚ) (t : ℕ) : ℚ :=
    …
  2. theorem Erdos282.greedyUnitFractionRem_zero line 51 source

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

    Statement uses: Nat, Eq, Rat, Erdos282.greedyUnitFractionRem, Set.univ, HDiv.hDiv, OfNat.ofNat

    Proof 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.Ici and 9 more

    72 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  3. theorem Erdos282.greedyUnitFractionRem_one line 55 source

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

    Statement uses: Nat, Eq, Rat, Erdos282.greedyUnitFractionRem, Set.univ, HDiv.hDiv, OfNat.ofNat

    Proof 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_true and 11 more

    77 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  4. theorem Erdos282.erdos_282 Documented declaration: erdos_282 sorry line 67 source

    Source 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.ofPred

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    21 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

  5. theorem Erdos282.erdos_282.variants.general More generally, for which pairs $x$ and $A$ does this process terminate? sorry line 73 source

    Source 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.mk

    Proof uses: Lean.Name, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    15 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

  6. theorem Erdos282.erdos_282.variants.fibonacci In 1202 Fibonacci observed that this process terminates for any $x$ when $A=\mathbb{N}$ sorry line 79 source

    Source 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.univ

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    19 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

  7. theorem Erdos282.erdos_282.variants.graham Documented declaration: graham sorry line 91 source

    Source 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.ModEq

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    26 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

  8. theorem Erdos282.greedyUnitFractionRem_sq_one line 98 source

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

    Statement uses: Eq, Rat, Erdos282.greedyUnitFractionRem, Set.ofPred, Nat, IsSquare, OfNat.ofNat

    Proof 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.hDiv and 11 more

    61 instances, coercions and auxiliary constants left out.

    Tactic trace: 3 steps

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

  9. theorem Erdos282.erdos_282.variants.sq 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)$ sorry line 109 source

    Source 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, IsSquare

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    58 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