Compfiles/Imo1959P1.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
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
- lemma
Imo1959P1.calculationline 33 sourcestandard axioms: propext what this means
Statement uses:
Nat,Dvd.dvd,HAdd.hAdd,HMul.hMul,OfNat.ofNatProof 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_eqand 13 more29 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- problem
Imo1959P1.imo1959_p1IMO 1959 Problem 1: an irreducible fraction line 50 sourceSource 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.
- 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.
- 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.
- 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.ofNatProof uses:
Nat.coprime_of_dvd',Nat.Prime,Dvd.dvd, Imo1959P1.calculation11 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) := …