Compfiles/Imo1983P3.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

3 declarations, 0 contain sorry, 0 declared as axioms

International Mathematical Olympiad 1983, Problem 3

Let a, b, c be positive integers, no two of which have a common divisor greater than 1. Show that 2abc − ab − bc − ca is the largest integer which cannot be expressed in the form xbc + yca + zab, where x, y, z are non-negative integers.

Imports (2)
Imported by 1 file
  1. lemma Imo1983P3.two_var Two-variable Chicken McNugget over ℤ: for coprime positive b c, every integer M > b*c - b - c is a nonnegative combination of c and b line 31 source

    Source documentation

    Two-variable Chicken McNugget over ℤ: for coprime positive b c, every integer M > b*c - b - c is a nonnegative combination of c and b.

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

    Statement uses: Nat, LT.lt, OfNat.ofNat, Nat.Coprime, Int, GT.gt, HSub.hSub, HMul.hMul, Exists, Eq, HAdd.hAdd

    Proof uses: cast, Eq.symm, Eq.trans, congrFun', congrArg, Nat.cast_zero, Exists.intro, Nat.gcdA, Nat.gcdB, Nat.gcd, Nat.gcd_eq_gcd_ab, Mathlib.Tactic.Linarith.eq_of_not_lt_of_not_gt, Not.intro, Mathlib.Tactic.Linarith.lt_irrefl, Eq.mp, Neg.neg, Mathlib.Tactic.Ring.of_eq, Mathlib.Tactic.Ring.Common.add_congr, HPow.hPow, Nat.rawCast and 74 more

    100 instances, coercions and auxiliary constants left out.

    Tactic trace: 36 steps

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

    lemma two_var {b c : ℕ} (hb : 0 < b) (hc : 0 < c) (hbc : Nat.Coprime b c)
        (M : ℤ) (hM : M > (b : ℤ) * c - b - c) :
        ∃ y z : ℕ, M = y * (c : ℤ) + z * (b : ℤ) := by
    …
  2. lemma Imo1983P3.rep Every integer n > 2*a*b*c - a*b - b*c - c*a is expressible as x * (b*c) + y * (c*a) + z * (a*b) with nonnegative x y z line 74 source

    Source documentation

    Every integer n > 2*a*b*c - a*b - b*c - c*a is expressible as x * (b*c) + y * (c*a) + z * (a*b) with nonnegative x y z.

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

    Statement uses: Nat, LT.lt, OfNat.ofNat, Nat.Coprime, Int, GT.gt, HSub.hSub, HMul.hMul, Exists, Eq, HAdd.hAdd

    Proof uses: cast, Eq.symm, Eq.trans, congrFun', congrArg, Nat.cast_zero, Nat.Coprime.mul_right, Nat.Coprime.symm, Exists.intro, Nat.gcdA, Nat.gcdB, Nat.gcd, Nat.gcd_eq_gcd_ab, Mathlib.Tactic.Linarith.eq_of_not_lt_of_not_gt, Not.intro, Mathlib.Tactic.Linarith.lt_irrefl, Eq.mp, Neg.neg, Mathlib.Tactic.Ring.of_eq, Mathlib.Tactic.Ring.Common.add_congr and 79 more

    106 instances, coercions and auxiliary constants left out.

    Tactic trace: 35 steps

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

    lemma rep {a b c : ℕ} (ha : 0 < a) (hb : 0 < b) (hc : 0 < c)
        (hab : Nat.Coprime a b) (hbc : Nat.Coprime b c) (hca : Nat.Coprime c a)
        (n : ℤ) (hn : n > 2 * (a : ℤ) * b * c - a * b - b * c - c * a) :
        ∃ x y z : ℕ, n = x * ((b : ℤ) * c) + y * ((c : ℤ) * a) + z * ((a : ℤ) * b) := by
    …
  3. problem Imo1983P3.imo1983_p3 line 121 source

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

    Statement uses: Nat, LT.lt, OfNat.ofNat, Nat.Coprime, IsGreatest, Int, Set.ofPred, Not, Exists, Eq, HAdd.hAdd, HMul.hMul, HSub.hSub

    Proof uses: And.intro, Membership.mem, Set, upperBounds, False, Eq.mpr, id, congr, congrArg, Eq.trans, Nat.cast_mul, congrFun', Nat.cast_add, Nat.cast_one, Mathlib.Tactic.Linarith.eq_of_not_lt_of_not_gt, Not.intro, Mathlib.Tactic.Linarith.lt_irrefl, Eq.mp, Neg.neg, Mathlib.Tactic.Ring.of_eq and 75 more

    116 instances, coercions and auxiliary constants left out.

    Tactic trace: 58 steps

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