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

2 declarations, 0 contain sorry, 0 declared as axioms

International Mathematical Olympiad 1959, Problem 1.

Prove that the fraction (21n+4)/(14n+3) is irreducible for every natural number n.

Imports (4)
Imported by 1 file
  1. lemma Imo1959P1.calculation line 33 source

    standard axioms: propext what this means

    Statement uses: Nat, Dvd.dvd, HAdd.hAdd, HMul.hMul, OfNat.ofNat

    Proof uses: Dvd.dvd.mul_left, Eq, Mathlib.Tactic.Ring.of_eq, Nat.rawCast, HPow.hPow, Mathlib.Tactic.Ring.Common.mul_congr, Mathlib.Tactic.Ring.cast_pos, Mathlib.Meta.NormNum.isNat_ofNat, Eq.refl, Mathlib.Tactic.Ring.Common.add_congr, Mathlib.Tactic.Ring.Common.atom_pf, rfl, Eq.mpr, id, congrArg, Eq.symm, Mathlib.Tactic.Ring.Common.add_mul, Mathlib.Tactic.Ring.Common.mul_add, Mathlib.Tactic.Ring.Common.mul_pf_right, Mathlib.Meta.NormNum.IsNat.to_raw_eq and 13 more

    29 instances, coercions and auxiliary constants left out.

    Tactic trace: 5 steps

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

  2. problem Imo1959P1.imo1959_p1 IMO 1959 Problem 1: an irreducible fraction line 50 source

    Source comment

    Since Lean doesn't have a concept of "irreducible fractions" per se, we just formalize this as saying the numerator and denominator are relatively prime.

    L4DEL explanation

    The fraction (21n+4)/(14n+3) is in lowest terms for every natural number n.

    1. Problem: prove that (21n+4)/(14n+3) is irreducible for all natural n. The formalization states this as Nat.Coprime (21 * n + 4) (14 * n + 3), since Lean has no notion of an irreducible fraction.
    2. Solution (complete, no sorry): if k divides both numbers then it divides 3 * (14n+3) - 2 * (21n+4), and that difference equals 1, so k divides 1.
    3. The file says the solution is imported from the Mathlib Archive (solutionImportedFrom).

    Sources and attribution: Pinned Lean source (47b19bbfe5f3)

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

    Statement uses: Nat, Nat.Coprime, HAdd.hAdd, HMul.hMul, OfNat.ofNat

    Proof uses: Nat.coprime_of_dvd', Nat.Prime, Dvd.dvd, Imo1959P1.calculation

    11 instances, coercions and auxiliary constants left out.

    Nat.Coprime: two natural numbers have no common divisor other than 1, equivalently their gcd is 1.

    problem imo1959_p1 : ∀ n : ℕ, Nat.Coprime (21 * n + 4) (14 * n + 3) :=
    …