Compfiles/Imo1970P2.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 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
  1. def Imo1970P2.value The real number whose base-c digit string is x m, x (m-1), ..., x 0, i.e. ∑ i ≤ m, x i * c ^ i line 37 source

    Source documentation

    The real number whose base-c digit string is x 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, Real

    Proof uses: Finset.sum, Finset.range, HAdd.hAdd, OfNat.ofNat, HMul.hMul, HPow.hPow

    12 instances, coercions and auxiliary constants left out.

    def value (x : ℕ → ℕ) (c : ℕ) (m : ℕ) : ℝ :=
    …
  2. lemma Imo1970P2.pow_cross_lt For i < n and b < a we have bⁿ aⁱ < aⁿ bⁱ line 43 source

    Source documentation

    For i < n and b < a we have bⁿ aⁱ < aⁿ bⁱ.

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

    Statement uses: Nat, LT.lt, OfNat.ofNat, Real, HMul.hMul, HPow.hPow

    Proof 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.rawCast and 21 more

    77 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
    …
  3. lemma Imo1970P2.value_succ Splitting off the leading digit: value x c n = value x c (n-1) + x n * cⁿ line 62 source

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

    Proof 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_self

    36 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

  4. lemma Imo1970P2.value_pos The full number is positive since its leading digit is nonzero line 67 source

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

    Proof 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 more

    70 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

  5. lemma Imo1970P2.pow_mul_value_lt The crux: bⁿ · B' < aⁿ · A', where A' and B' are the numbers obtained by stripping the leading digit line 79 source

    Source documentation

    The crux: bⁿ · B' < aⁿ · A', where A' and B' are the numbers obtained by stripping the leading digit. Each term of bⁿ · A' is at most the matching term of aⁿ · B', and the i = n-1 term is strict since x_{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.value

    Proof 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_congr and 34 more

    82 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

  6. lemma Imo1970P2.value_mul_lt Cross-multiplied form of the inequality: A' · B < B' · A line 102 source

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

    Proof 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, inferInstance and 49 more

    71 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

  7. lemma Imo1970P2.value_div_lt If b < a then A'/A < B'/B line 113 source

    Source documentation

    If b < a then A'/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.value

    Proof uses: Eq.mpr, HMul.hMul, id, Eq, congrArg, propext, div_lt_div_iff₀, Imo1970P2.value_pos, Imo1970P2.value_mul_lt

    39 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

  8. problem Imo1970P2.imo1970_p2 line 121 source

    standard 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.value

    Proof uses: Iff.intro, Or, Eq, lt_trichotomy, absurd, lt_irrefl, LT.lt.trans, Imo1970P2.value_div_lt, LT.lt.le

    28 instances, coercions and auxiliary constants left out.

    Tactic trace: 13 steps

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