FormalConjectures/Mathoverflow/75792.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
22 declarations, 2 contain sorry, 0 declared as axioms
Mathoverflow 75792
Various questions about integer complexity, which is the minimum number of 1s needed to express a natural number using addition, multiplication, and parentheses.
Let ‖n‖ denote the integer complexity of n > 0.
- It is known that
‖3^n‖ = 3nforn > 0. - Is it true that
‖2^n‖ = 2nforn > 0? - The corresponding conjecture for
5is false, because5^6 = 15625 = 1 + 2^3 * 3^2 * (1 + 2^3 * 3^3)!
We have chosen to formalise this using an inductive type.
References:
- mathoverflow/75792 by user Harry Altman
- http://arxiv.org/abs/1203.6462 by Jānis Iraids, Kaspars Balodis, Juris Čerņenoks, Mārtiņš Opmanis, Rihards Opmanis, Kārlis Podnieks
- http://arxiv.org/abs/1207.4841 by Harry Altman, Joshua Zelinsky
- https://oeis.org/A5245 : Mahler-Popken complexity.
Imports (1)
Imported by 1 file
- inductive
Mathoverflow75792.ReachableThe inductively defined predicate thatmis reachable innsteps line 45 sourceSource documentation
The inductively defined predicate that
mis reachable innsteps.no axioms what this means
Statement uses:
Natinductive Reachable : ℕ → ℕ → Prop | one : Reachable 1 1 | add {m n a b} : Reachable m a → Reachable n b → Reachable (m + n) (a + b) | mul {m n a b} : Reachable m a → Reachable n b → Reachable (m * n) (a + b) @[category test, AMS 11] - theorem
Mathoverflow75792.Reachable.selfline 51 sourceno axioms what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat, Mathoverflow75792.ReachableProof uses:
Nat.le_induction,Nat.succ,Mathoverflow75792.Reachable.one,LE.le,Mathoverflow75792.Reachable.add5 instances, coercions and auxiliary constants left out.
- theorem
Mathoverflow75792.not_reachable_zero_fstline 55 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Not, Mathoverflow75792.Reachable,OfNat.ofNatProof uses:
Mathoverflow75792.Reachable.rec,Eq,False,absurd,of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl,HAdd.hAdd,False.elim,Eq.mp,Eq.trans,True,implies_congr,congrArg,And,propext,add_eq_zeroand 8 more32 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
- theorem
Mathoverflow75792.not_reachable_zero_sndline 62 sourcestandard axioms: propext what this means
Statement uses:
Nat,Not, Mathoverflow75792.Reachable,OfNat.ofNatProof uses:
Mathoverflow75792.Reachable.rec,Eq,False,absurd,of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl,HAdd.hAdd,False.elim,Eq.mp,Eq.trans,True,implies_congr,congrArg,And,propext,add_eq_zeroand 4 more16 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
- theorem
Mathoverflow75792.Reachable.decline 69 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Mathoverflow75792.Reachable,Exists,And,Eq,HAdd.hAdd,OfNat.ofNatProof uses:
Nat.casesAuxOn,absurd, Mathoverflow75792.not_reachable_zero_fst, Mathoverflow75792.not_reachable_zero_snd,Exists.intro,And.intro,rfl6 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
- theorem
Mathoverflow75792.Reachable.leline 78 sourcestandard axioms: propext what this means
Statement uses:
Nat,LE.le, Mathoverflow75792.ReachableProof uses:
Nat.le.rec,Nat.le,Eq.mpr,Nat.succ,HMul.hMul,OfNat.ofNat,HAdd.hAdd,eq_of_heq,Eq,HEq,Eq.refl,HEq.refl,Eq.symm,of_eq_true,Eq.trans,True,congrArg,mul_one,eq_self,Mathoverflow75792.Reachable.muland 1 more10 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- theorem
Mathoverflow75792.reachable_iff_of_two_leline 84 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Iff, Mathoverflow75792.Reachable,Exists,LT.lt,And,Eq,HAdd.hAdd,Or,HMul.hMulProof uses:
Iff.intro,Mathoverflow75792.Reachable.rec,absurd,of_decide_eq_true,Not,id,Bool,Decidable.decide,Bool.true,Eq.refl, Mathoverflow75792.Reachable.dec,Exists.intro,Decidable.byContradiction,And.intro,rfl,Or.inl,Nat.casesAuxOn,Eq.mpr,congrArg,Eq.symmand 19 more64 instances, coercions and auxiliary constants left out.
Tactic trace: 37 steps
Open to load the checked before-and-after goal states.
- def
Mathoverflow75792.Reachable.decAuxAuxiliary decision procedure forReachable, taking a fuel argumentfboundingmline 116 sourceSource documentation
Auxiliary decision procedure for
Reachable, taking a fuel argumentfboundingm.reachable_iff_of_two_lereducesReachable m nfor2 ≤ mto statementsReachable m' n'withm' < m, so one unit of fuel per unit ofmalways suffices. Recursing on the fuel rather than onmmakes this structural, soReachable.decidebelow avoids well-founded recursion.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,Decidable, Mathoverflow75792.Reachable4 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.
def Reachable.decAux : ∀ (f m n : ℕ), m ≤ f → Decidable (Reachable m n) | _, 0, n, _ => isFalse (not_reachable_zero_fst n) | _, 1, 0, _ => isFalse (not_reachable_zero_snd 1) | _, 1, _ + 1, _ => isTrue (Reachable.one.le (by lia)) | 0, _ + 2, _, hf => absurd hf (by lia) | f + 1, m + 2, n, hf => by let d : ∀ {m₁} (h : m₁ < m + 2) {n}, Decidable (Reachable m₁ n) := …Mentions: Mathoverflow75792.Reachable, Mathoverflow75792.not_reachable_zero_fst, Mathoverflow75792.not_reachable_zero_snd
- instance
Mathoverflow75792.Reachable.decideline 134 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Decidable, Mathoverflow75792.ReachableProof uses: Mathoverflow75792.Reachable.decAux,
le_rfl1 instances, coercions and auxiliary constants left out.
- def
Mathoverflow75792.complexityThe (Mahler-Popken) complexity ofn: the minimum number of1s needed to express a given number using only addition and multiplication line 141 sourceSource documentation
The (Mahler-Popken) complexity of
n: the minimum number of1s needed to express a given number using only addition and multiplication. E.g.2 = 1 + 1, socomplexity 2 = 2.L4DEL explanation
The (Mahler-Popken) complexity of
n: the minimum number of1s needed to express a given number using only addition and multiplication. E.g.2 = 1 + 1, socomplexity 2 = 2.Sources and attribution: Pinned Lean source (1646ca16afd6)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
dite,Eq,OfNat.ofNat,Not,Nat.find, Mathoverflow75792.Reachable4 instances, coercions and auxiliary constants left out.
def complexity (n : ℕ) : ℕ := …
- theorem
Mathoverflow75792.Reachable.complexity_leline 145 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Mathoverflow75792.Reachable,LE.le, Mathoverflow75792.complexityProof uses:
id,dite,Eq,OfNat.ofNat,Not,Nat.find,Eq.mpr,congrFun',congrArg,dif_pos,absurd, Mathoverflow75792.not_reachable_zero_fst,Eq.symm,dif_neg,Nat.find_min'7 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
- theorem
Mathoverflow75792.Reachable.complexity_eqline 152 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Mathoverflow75792.Reachable,LT.lt,Not,Eq, Mathoverflow75792.complexityProof uses:
le_antisymm, Mathoverflow75792.Reachable.complexity_le,id,LE.le,dite,OfNat.ofNat,Nat.find,Eq.mpr,congrArg,dif_pos,absurd, Mathoverflow75792.not_reachable_zero_fst,Eq.symm,dif_neg,Iff.mpr,Nat.le_find_iff11 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
- theorem
Mathoverflow75792.Reachable.complexityline 161 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat, Mathoverflow75792.Reachable, Mathoverflow75792.complexityProof uses:
id,Eq.mpr,dite,Eq,Not,Nat.find,ne_of_gt,congrArg,dif_neg,Nat.find_spec8 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- theorem
Mathoverflow75792.complexity_zeroline 167 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, Mathoverflow75792.complexity,OfNat.ofNatProof uses:
rfl2 instances, coercions and auxiliary constants left out.
- theorem
Mathoverflow75792.complexity_oneline 170 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, Mathoverflow75792.complexity,OfNat.ofNatProof uses: Mathoverflow75792.Reachable.complexity_eq,
Mathoverflow75792.Reachable.one,LT.lt,Decidable.byContradiction,Not, Mathoverflow75792.Reachable, Mathoverflow75792.not_reachable_zero_snd,Eq.symm6 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- theorem
Mathoverflow75792.complexity_twoline 176 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, Mathoverflow75792.complexity,OfNat.ofNatProof uses: Mathoverflow75792.Reachable.complexity_eq,
HAdd.hAdd,Mathoverflow75792.Reachable.add,Mathoverflow75792.Reachable.one,LT.lt,dite,Not, Mathoverflow75792.Reachable,LE.le,Eq.mpr,Exists,And,Or,HMul.hMul,id,congrArg,propext, Mathoverflow75792.reachable_iff_of_two_le,Decidable.byContradiction,Falseand 11 more20 instances, coercions and auxiliary constants left out.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
- theorem
Mathoverflow75792.Reachable.powline 185 sourcestandard axioms: propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat, Mathoverflow75792.Reachable,HPow.hPow,HMul.hMulProof uses:
Nat.le.rec,Nat.succ,Eq.mpr,eq_of_heq,Eq,HEq,Eq.refl,HEq.refl,Eq.symm,of_eq_true,Eq.trans,True,congrFun',congrArg,zero_add,pow_one,eq_self,mul_one, Mathoverflow75792.Reachable.self,Nat.leand 3 more21 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- theorem
Mathoverflow75792.Reachable.pow'line 191 sourcestandard axioms: propext what this means
Statement uses:
PNat, Mathoverflow75792.Reachable,HPow.hPow,Nat,HMul.hMulProof uses: Mathoverflow75792.Reachable.pow,
PNat.pos8 instances, coercions and auxiliary constants left out.
- theorem
Mathoverflow75792.Reachable.five_pow_six5^6 = 15625 = 1 + 2^3 * 3^2 * (1 + 2^3 * 3^3)! line 196 sourceSource documentation
5^6 = 15625 = 1 + 2^3 * 3^2 * (1 + 2^3 * 3^3)!standard axioms: propext what this means
Statement uses: Mathoverflow75792.Reachable,
HPow.hPow,Nat,OfNat.ofNatProof uses: Mathoverflow75792.Reachable.pow',
PNat,Mathoverflow75792.Reachable.add,HMul.hMul,HAdd.hAdd,Mathoverflow75792.Reachable.one,Mathoverflow75792.Reachable.mul12 instances, coercions and auxiliary constants left out.
theorem Reachable.five_pow_six : Reachable (5^6) 29 := …
Mentions: Mathoverflow75792.Reachable
- theorem
Mathoverflow75792.complexity_five_powIs5nthe complexity of5^nfor0 < n? line 204 sourceSource documentation
Is
5nthe complexity of5^nfor0 < n? Answer: No.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Iff,False,Nat,LT.lt,OfNat.ofNat,Eq, Mathoverflow75792.complexity,HPow.hPow,HMul.hMulProof uses:
id,Eq.mpr,Exists,And,Not,Eq.trans,false_iff,congrArg,funext,Exists.intro,And.intro,of_decide_eq_true,Bool,Decidable.decide,Bool.true,Eq.refl,absurd,LE.le,Eq.rec, Mathoverflow75792.Reachable.complexity_le and 1 more22 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
theorem complexity_five_pow : answer(False) ↔ ∀ n : ℕ, 0 < n → complexity (5 ^ n) = 5 * n := by …
Mentions: Mathoverflow75792.complexity
- theorem
Mathoverflow75792.complexity_three_powIs3nthe complexity of3^nfor0 < n? sorry line 214 sourceSource documentation
Is
3nthe complexity of3^nfor0 < n? Answer: Yes, by John Selfridge.Reference: https://arxiv.org/abs/1207.4841
depends on sorry what this means
Statement uses:
Iff,True,Nat,LT.lt,OfNat.ofNat,Eq, Mathoverflow75792.complexity,HPow.hPow,HMul.hMulProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous16 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem complexity_three_pow : answer(True) ↔ ∀ n : ℕ, 0 < n → complexity (3 ^ n) = 3 * n := by …
Mentions: Mathoverflow75792.complexity
- theorem
Mathoverflow75792.complexity_two_powIs2nthe complexity of2^nfor0 < n? sorry line 219 sourceSource documentation
Is
2nthe complexity of2^nfor0 < n?depends on sorry what this means
Statement uses:
Iff,True,Nat,LT.lt,OfNat.ofNat,Eq, Mathoverflow75792.complexity,HPow.hPow,HMul.hMulProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous16 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem complexity_two_pow : answer(sorry) ↔ ∀ n : ℕ, 0 < n → complexity (2 ^ n) = 2 * n := by …
Mentions: Mathoverflow75792.complexity