Compfiles/Imo2009P5.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 2009, Problem 5

Determine all functions f: ℤ>0 → ℤ>0 such that for all positive integers a and b, the numbers

a, f(b), and f(b + f(a) - 1)

form the sides of a nondegenerate triangle.

Imports (4)
Imported by 1 file
  1. lemma Imo2009P5.exists_sup_fn_fin line 40 source

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

    Statement uses: Nat, Exists, LT.lt, LE.le

    Proof uses: Exists.intro, Finset.sup, Finset.range, Finset.le_sup, Iff.mpr, Membership.mem, Finset, Finset.mem_range

    9 instances, coercions and auxiliary constants left out.

    Tactic trace: 3 steps

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

  2. lemma Imo2009P5.pnat_to_nat_prop line 45 source
  3. lemma Imo2009P5.pnat_to_nat_prop2 line 49 source
  4. lemma Imo2009P5.succ_pnat_add_succ_pnat line 53 source
  5. theorem Imo2009P5.final_solution_nat Final solution, nat version line 62 source

    Source documentation

    Final solution, nat version

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

    Statement uses: Nat, Iff, And, LE.le, HAdd.hAdd, Eq

    Proof uses: Iff.intro, OfNat.ofNat, Mathlib.Tactic.Contrapose.contrapose₁, Eq.mpr, Not, Ne, Exists, LT.lt, id, implies_congr, Eq.refl, Eq.trans, Mathlib.Tactic.Push.not_forall_eq, congrArg, funext, Imo2009P5.exists_sup_fn_fin, Exists.intro, Nat.lt_succ_of_le, add_le_add, Eq.mp and 31 more

    50 instances, coercions and auxiliary constants left out.

    Tactic trace: 50 steps

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

    theorem final_solution_nat (f : ℕ → ℕ) :
      ((∀ x y : ℕ, f (y + f x) ≤ f y + x)
        ∧ (∀ x y : ℕ, x ≤ f y + f (y + f x))
        ∧ (∀ x y : ℕ, f y ≤ f (y + f x) + x))
          ↔ f = λ x ↦ x := by
    …

    Mentions: f

  6. theorem Imo2009P5.final_solution_pnat Final solution, pnat version line 122 source

    Source documentation

    Final solution, pnat version

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

    Statement uses: PNat, Iff, And, LT.lt, HSub.hSub, HAdd.hAdd, OfNat.ofNat, Nat, Eq

    Proof uses: Nat.succPNat, PNat.natPred, Exists, Exists.intro, funext, Eq.mpr, id, congrArg, PNat.succPNat_natPred, Eq.refl, congrFun', congr, forall_congr, Eq.trans, PNat.add_sub, LE.le, Imo2009P5.final_solution_nat, Eq.symm

    41 instances, coercions and auxiliary constants left out.

    Tactic trace: 4 steps

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

    theorem final_solution_pnat (f : ℕ+ → ℕ+) :
        ((∀ x y : ℕ+, f (y + f x - 1) < f y + x)
          ∧ (∀ x y : ℕ+, x < f y + f (y + f x - 1))
          ∧ (∀ x y : ℕ+, f y < f (y + f x - 1) + x))
            ↔ f = λ x ↦ x := by
    …

    Mentions: f

  7. determine Imo2009P5.solution_set line 137 source

    no axioms what this means

    Statement uses: Set, PNat

    Proof uses: Singleton.singleton, id

    1 instances, coercions and auxiliary constants left out.

  8. problem Imo2009P5.imo2009_p5 line 139 source

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

    Statement uses: PNat, Iff, Membership.mem, Set, Imo2009P5.solution_set, And, LT.lt, HSub.hSub, HAdd.hAdd, OfNat.ofNat, Nat

    Proof uses: Eq, Imo2009P5.final_solution_pnat, Iff.intro, id, Iff.mpr, rfl, And.intro, Eq.symm, Eq.mpr, congrArg, Singleton.singleton, propext, Set.mem_singleton_iff, Iff.mp, And.left, And.right

    33 instances, coercions and auxiliary constants left out.

    Tactic trace: 20 steps

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