FormalConjectures/Wikipedia/LychrelNumbers.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
12 declarations, 2 contain sorry, 0 declared as axioms
Lychrel numbers in base 10
A (base-10) Lychrel number is a positive integer which never becomes a palindrome under the iteration
$$a_{0} = n, \qquad a_{k+1} = a_k + \operatorname{rev}_{10}(a_k).$$
One commonly stated conjectural direction is that there are no Lychrel numbers in base 10.
The smallest widely studied open case is 196.
References:
Imports (1)
Imported by 2 files
- abbrev
LychrelNumbers.baseThe base (10) used for digit reversal line 44 sourceSource documentation
The base (10) used for digit reversal.
no axioms what this means
Statement uses:
NatProof uses:
OfNat.ofNat1 instances, coercions and auxiliary constants left out.
abbrev base : ℕ := 10
- def
LychrelNumbers.rev10The digit-reversal map $\operatorname{rev}_{10}(n)$ line 53 sourceSource documentation
The digit-reversal map $\operatorname{rev}_{10}(n)$.
Implementation note:
Nat.digits base nreturns the digits ofnin little-endian order. Reversing this list and interpreting it again as little-endian digits gives the usual digit reversal.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Nat.ofDigits, LychrelNumbers.base,List.reverse,Nat.digits1 instances, coercions and auxiliary constants left out.
def rev10 (n : ℕ) : ℕ := …
- def
LychrelNumbers.IsPalindrome10A number is a (base-10) palindrome if it equals its digit reversal line 57 sourceSource documentation
A number is a (base-10) palindrome if it equals its digit reversal.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Eq, LychrelNumbers.rev10def IsPalindrome10 (n : ℕ) : Prop := …
- def
LychrelNumbers.lychrelStepOne step of the Lychrel iteration:n ↦ n + rev10 nline 61 sourceSource documentation
One step of the Lychrel iteration:
n ↦ n + rev10 n.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
HAdd.hAdd, LychrelNumbers.rev102 instances, coercions and auxiliary constants left out.
def lychrelStep (n : ℕ) : ℕ := …
- def
LychrelNumbers.IsLychrel10The number $n$ is a (base-10) Lychrel number if no iterate of the Lychrel process is a palindrome line 65 sourceSource documentation
The number $n$ is a (base-10) Lychrel number if no iterate of the Lychrel process is a palindrome.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Not, LychrelNumbers.IsPalindrome10,Nat.iterate, LychrelNumbers.lychrelStepdef IsLychrel10 (n : ℕ) : Prop := …
- theorem
LychrelNumbers.no_lychrel_numbers_base10Lychrel conjecture (base 10): conjecturally, there are no Lychrel numbers in base 10 sorry line 74 sourceSource documentation
Lychrel conjecture (base 10): conjecturally, there are no Lychrel numbers in base 10.
Equivalently, every positive integer eventually becomes a palindrome under the Lychrel iteration.
depends on sorry what this means
Statement uses:
Iff,True,Nat,LT.lt,OfNat.ofNat,Not, LychrelNumbers.IsLychrel10Proof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous4 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem no_lychrel_numbers_base10 : answer(sorry) ↔ ∀ n : ℕ, 0 < n → ¬ IsLychrel10 n := by …Mentions: LychrelNumbers.IsLychrel10
- theorem
LychrelNumbers.isLychrel10_196The first widely studied open case: whether196is a base-10 Lychrel number sorry line 82 sourceSource documentation
The first widely studied open case: whether
196is a base-10 Lychrel number.depends on sorry what this means
Statement uses:
Iff,True, LychrelNumbers.IsLychrel10,OfNat.ofNat,NatProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous2 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem isLychrel10_196 : answer(sorry) ↔ IsLychrel10 196 := by …
Mentions: LychrelNumbers.IsLychrel10
- theorem
LychrelNumbers.eventually_palindrome_base10An equivalent formulation ofno_lychrel_numbers_base10line 87 sourceSource documentation
An equivalent formulation of
no_lychrel_numbers_base10.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Iff,Nat,LT.lt,OfNat.ofNat,Exists, LychrelNumbers.IsPalindrome10,Nat.iterate, LychrelNumbers.lychrelStep,Not, LychrelNumbers.IsLychrel10Proof uses:
Iff.intro,False,Classical.byContradiction,Exists.intro5 instances, coercions and auxiliary constants left out.
Tactic trace: 12 steps
Open to load the checked before-and-after goal states.
theorem eventually_palindrome_base10 : (∀ n : ℕ, 0 < n → ∃ k : ℕ, IsPalindrome10 (lychrelStep^[k] n)) ↔ (∀ n : ℕ, 0 < n → ¬ IsLychrel10 n) := by …Mentions: LychrelNumbers.IsPalindrome10, LychrelNumbers.lychrelStep, LychrelNumbers.IsLychrel10
- theorem
LychrelNumbers.rev10_120Sanity check: digit reversal of120is21line 104 sourceSource documentation
Sanity check: digit reversal of
120is21.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, LychrelNumbers.rev10,OfNat.ofNatProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl3 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem rev10_120 : rev10 120 = 21 := by …
Mentions: LychrelNumbers.rev10
- theorem
LychrelNumbers.palindrome_121Sanity check:121is a base-10 palindrome line 109 sourceSource documentation
Sanity check:
121is a base-10 palindrome.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: LychrelNumbers.IsPalindrome10,
OfNat.ofNat,NatProof uses:
id,of_decide_eq_true,Eq, LychrelNumbers.rev10,Bool,Decidable.decide,Bool.true,Eq.refl3 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
theorem palindrome_121 : IsPalindrome10 121 := by …
Mentions: LychrelNumbers.IsPalindrome10
- theorem
LychrelNumbers.lychrelIter_56_oneSanity check:56 → 121in one Lychrel step line 115 sourceSource documentation
Sanity check:
56 → 121in one Lychrel step.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat,Nat.iterate, LychrelNumbers.lychrelStep,OfNat.ofNatProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl3 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem lychrelIter_56_one : lychrelStep^[1] 56 = 121 := by …
Mentions: LychrelNumbers.lychrelStep
- theorem
LychrelNumbers.eventually_palindrome_56Sanity check: the Lychrel iteration at56reaches a palindrome line 120 sourceSource documentation
Sanity check: the Lychrel iteration at
56reaches a palindrome.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Exists,Nat, LychrelNumbers.IsPalindrome10,Nat.iterate, LychrelNumbers.lychrelStep,OfNat.ofNatProof uses:
Exists.intro,id,of_decide_eq_true,Eq, LychrelNumbers.rev10,Bool,Decidable.decide,Bool.true,Eq.refl3 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
theorem eventually_palindrome_56 : ∃ k : ℕ, IsPalindrome10 (lychrelStep^[k] 56) := by …
Mentions: LychrelNumbers.IsPalindrome10, LychrelNumbers.lychrelStep