Compfiles/Imo1970P2.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 compfiles documentation, Pinned compfiles corpus index
8 declarations, 0 contain sorry, 0 declared as axioms
International Mathematical Olympiad 1970, Problem 2
Let a, b and n be integers greater than 1, and let a and b be the bases of two number systems. A_{n-1} and A_n are numbers in the system with base a, and B_{n-1} and B_n are numbers in the system with base b; these are related as follows:
A_n = x_n x_{n-1} ⋯ x_0, A_{n-1} = x_{n-1} x_{n-2} ⋯ x_0, B_n = x_n x_{n-1} ⋯ x_0, B_{n-1} = x_{n-1} x_{n-2} ⋯ x_0,
(written as digit strings in the respective systems) with x_n ≠ 0 and x_{n-1} ≠ 0.
Prove that A_{n-1}/A_n < B_{n-1}/B_n if and only if a > b.
Imports (2)
Imported by 1 file
- def
Imo1970P2.valueThe real number whose base-cdigit string isx m, x (m-1), ..., x 0, i.e.∑ i ≤ m, x i * c ^ iline 37 sourceSource documentation
The real number whose base-
cdigit string isx m, x (m-1), ..., x 0, i.e.∑ i ≤ m, x i * c ^ i.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,RealProof uses:
Finset.sum,Finset.range,HAdd.hAdd,OfNat.ofNat,HMul.hMul,HPow.hPow12 instances, coercions and auxiliary constants left out.
def value (x : ℕ → ℕ) (c : ℕ) (m : ℕ) : ℝ := …
- lemma
Imo1970P2.pow_cross_ltFori < nandb < awe havebⁿ aⁱ < aⁿ bⁱline 43 sourceSource documentation
For
i < nandb < awe havebⁿ aⁱ < aⁿ bⁱ.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,Real,HMul.hMul,HPow.hPowProof uses:
Iff.mpr,Nat.cast_pos,HSub.hSub,pow_lt_pow_left₀,cast,Eq.symm,LT.lt.le,Eq,Eq.mpr,HAdd.hAdd,id,congrArg,pow_add,Nat.sub_add_cancel,Eq.refl,mul_pos,pow_pos,Trans.trans,Mathlib.Tactic.Ring.of_eq,Nat.rawCastand 21 more77 instances, coercions and auxiliary constants left out.
Tactic trace: 15 steps
Open to load the checked before-and-after goal states.
lemma pow_cross_lt {a b : ℕ} (hb : 1 < b) (hab : b < a) {i n : ℕ} (hin : i < n) : (b : ℝ) ^ n * (a : ℝ) ^ i < (a : ℝ) ^ n * (b : ℝ) ^ i := by … - lemma
Imo1970P2.value_succSplitting off the leading digit:value x c n = value x c (n-1) + x n * cⁿline 62 sourceSource documentation
Splitting off the leading digit:
value x c n = value x c (n-1) + x n * cⁿ.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Eq,Real, Imo1970P2.value,HAdd.hAdd,HSub.hSub,HMul.hMul,HPow.hPowProof uses:
of_eq_true,Eq.trans,Finset.sum,Finset.range,True,congr,congrArg,Finset.sum_range_succ,congrFun',Finset.sum_congr,Finset,Nat.sub_add_cancel,Membership.mem,Eq.refl,eq_self36 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma value_succ (x : ℕ → ℕ) (c n : ℕ) (hn : 1 ≤ n) : value x c n = value x c (n - 1) + (x n : ℝ) * (c : ℝ) ^ n := by …Mentions: Imo1970P2.value
- lemma
Imo1970P2.value_posThe full number is positive since its leading digit is nonzero line 67 sourceSource documentation
The full number is positive since its leading digit is nonzero.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,LE.le,Ne,Real, Imo1970P2.valueProof uses:
Eq.mpr,HAdd.hAdd,HSub.hSub,HMul.hMul,HPow.hPow,id,Eq,congrArg, Imo1970P2.value_succ,Finset.sum_nonneg,Finset.range,Membership.mem,Finset,mul_nonneg,Nat.cast_nonneg,pow_nonneg,Right.add_pos_of_nonneg_of_pos,mul_pos,Iff.mpr,Nat.cast_pos'and 12 more70 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
lemma value_pos (x : ℕ → ℕ) {c n : ℕ} (hc : 1 < c) (hn : 1 ≤ n) (hxn : x n ≠ 0) : 0 < value x c n := by …Mentions: Imo1970P2.value
- lemma
Imo1970P2.pow_mul_value_ltThe crux:bⁿ · B' < aⁿ · A', whereA'andB'are the numbers obtained by stripping the leading digit line 79 sourceSource documentation
The crux:
bⁿ · B' < aⁿ · A', whereA'andB'are the numbers obtained by stripping the leading digit. Each term ofbⁿ · A'is at most the matching term ofaⁿ · B', and thei = n-1term is strict sincex_{n-1} ≠ 0.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,LE.le,Ne,HSub.hSub,Real,HMul.hMul,HPow.hPow, Imo1970P2.valueProof uses:
Eq.mpr,Finset.sum,Finset.range,id,Eq,congr,congrArg,Eq.trans,Finset.sum_congr,HAdd.hAdd,Finset,Nat.sub_add_cancel,Membership.mem,Eq.refl,Finset.mul_sum,Finset.sum_lt_sum,Trans.trans,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Mathlib.Tactic.Ring.Common.mul_congrand 34 more82 instances, coercions and auxiliary constants left out.
Tactic trace: 15 steps
Open to load the checked before-and-after goal states.
lemma pow_mul_value_lt (x : ℕ → ℕ) {a b n : ℕ} (hb : 1 < b) (hab : b < a) (hn : 1 ≤ n) (hxn1 : x (n - 1) ≠ 0) : (b : ℝ) ^ n * value x a (n - 1) < (a : ℝ) ^ n * value x b (n - 1) := by …Mentions: Imo1970P2.value
- lemma
Imo1970P2.value_mul_ltCross-multiplied form of the inequality:A' · B < B' · Aline 102 sourceSource documentation
Cross-multiplied form of the inequality:
A' · B < B' · A. Indeed,B' · A - A' · B = x n * (aⁿ · B' - bⁿ · A') > 0.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,LE.le,Ne,HSub.hSub,Real,HMul.hMul, Imo1970P2.valueProof uses:
Eq.mpr,HAdd.hAdd,HPow.hPow,id,Eq,congrArg, Imo1970P2.value_succ, Imo1970P2.pow_mul_value_lt,mul_lt_mul_of_pos_left,Iff.mpr,Nat.cast_pos,Nat.pos_of_ne_zero,lt_of_not_ge,Mathlib.Tactic.Linarith.lt_irrefl,Eq.mp,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.Common.add_congr,Nat.rawCast,Int.rawCast,inferInstanceand 49 more71 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
lemma value_mul_lt (x : ℕ → ℕ) {a b n : ℕ} (hb : 1 < b) (hn : 1 ≤ n) (hxn : x n ≠ 0) (hxn1 : x (n - 1) ≠ 0) (hab : b < a) : value x a (n - 1) * value x b n < value x b (n - 1) * value x a n := by …Mentions: Imo1970P2.value
- lemma
Imo1970P2.value_div_ltIfb < athenA'/A < B'/Bline 113 sourceSource documentation
If
b < athenA'/A < B'/B.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,LE.le,Ne,HSub.hSub,Real,HDiv.hDiv, Imo1970P2.valueProof uses:
Eq.mpr,HMul.hMul,id,Eq,congrArg,propext,div_lt_div_iff₀, Imo1970P2.value_pos, Imo1970P2.value_mul_lt39 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
lemma value_div_lt (x : ℕ → ℕ) {a b n : ℕ} (ha : 1 < a) (hb : 1 < b) (hn : 1 ≤ n) (hxn : x n ≠ 0) (hxn1 : x (n - 1) ≠ 0) (hab : b < a) : value x a (n - 1) / value x a n < value x b (n - 1) / value x b n := by …Mentions: Imo1970P2.value
- problem
Imo1970P2.imo1970_p2line 121 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,LE.le,Min.min,Ne,HSub.hSub,Iff,Real,HDiv.hDiv, Imo1970P2.valueProof uses:
Iff.intro,Or,Eq,lt_trichotomy,absurd,lt_irrefl,LT.lt.trans, Imo1970P2.value_div_lt,LT.lt.le28 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.