Compfiles/Usa2008P1.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
11 declarations, 0 contain sorry, 0 declared as axioms
USA Mathematical Olympiad 2008, Problem 1
Prove that for each positive integer n, there are pairwise relatively prime integers k₀,k₁,...,kₙ, all strictly greater than 1, such that k₀k₁...kₙ - 1 is a product of two consecutive integers.
Imports (2)
Imported by 1 file
- def
Usa2008P1.kseqDefine the two main sequences line 33 sourceSource comment
Define the two main sequencesstandard axioms: propext what this means
Statement uses:
NatProof uses:
ite,Eq,OfNat.ofNat,HAdd.hAdd,HSub.hSub,HPow.hPow10 instances, coercions and auxiliary constants left out.
def kseq (n : ℕ) : ℕ := …
- def
Usa2008P1.xseqline 35 sourcestandard axioms: propext what this means
Statement uses:
NatProof uses:
HPow.hPow,OfNat.ofNat5 instances, coercions and auxiliary constants left out.
- lemma
Usa2008P1.k_greater_than_oneline 37 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat, Usa2008P1.kseqProof uses:
id,dite,ite,Eq,HAdd.hAdd,HSub.hSub,HPow.hPow,Eq.mpr,congrArg,ite_eq_left,Mathlib.Meta.NormNum.isNat_lt_true,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Bool,Bool.false,Not,ite_eq_right,pow_lt_pow_right₀26 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2008P1.quartic_polynomial_identityMain identity k₀k₁...kₙ - 1 = xₙ (xₙ + 1) line 45 sourceSource comment
Main identity k₀k₁...kₙ - 1 = xₙ (xₙ + 1)standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,HMul.hMul,HAdd.hAdd,HPow.hPow,OfNat.ofNat,HSub.hSubProof uses:
Eq.mpr,Int,id,Eq.trans,congr,congrArg,Nat.cast_mul,Nat.cast_add,congrFun',Nat.cast_pow,Nat.cast_one,Nat.cast_sub,LE.le,le_of_not_gt,LT.lt,Mathlib.Tactic.Linarith.lt_irrefl,Eq.mp,Neg.neg,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.Common.add_congrand 62 more106 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
lemma quartic_polynomial_identity (t : ℕ) : (t^2 + t + 1) * (t^2 - t + 1) = t^4 + t^2 + 1 := by … - lemma
Usa2008P1.main_identityline 50 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Finset.prod,Fin,HAdd.hAdd,OfNat.ofNat,Finset.univ, Usa2008P1.kseq,HPow.hPow, Usa2008P1.xseqProof uses:
Nat.recAux,of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl,Eq.mpr,HMul.hMul,Fin.castSucc,Fin.last,congrArg,Fin.prod_univ_castSucc,congrFun',Finset.prod_congr,Finset,Membership.mem,HSub.hSub,Eq.trans,iteand 34 more65 instances, coercions and auxiliary constants left out.
Tactic trace: 15 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2008P1.kseq_succ_eqkₙ₊₁ = xₙ² - xₙ + 1 line 67 sourceSource comment
kₙ₊₁ = xₙ² - xₙ + 1standard axioms: propext what this means
Statement uses:
Nat,Eq, Usa2008P1.kseq,HAdd.hAdd,OfNat.ofNat,HSub.hSub,HPow.hPow, Usa2008P1.xseqProof uses:
id,ite,Eq.mpr,congrFun',congrArg,Eq.trans,ite_congr,Eq.refl,Not,Nat.add_sub_cancel,Decidable,Nat.succ,ite_eq_right,Nat.succ_ne_zero,of_eq_true,HMul.hMul,True,congr,Nat.rawCast,Mathlib.Tactic.Ring.Common.add_congrand 32 more44 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
lemma kseq_succ_eq (n : ℕ) : kseq (n + 1) = xseq n ^ 2 - xseq n + 1 := by …
Mentions: Usa2008P1.kseq, Usa2008P1.xseq
- lemma
Usa2008P1.gcd_quad_identitygcd(x² + x + 1, x² - x + 1) = 1 line 73 sourceSource comment
gcd(x² + x + 1, x² - x + 1) = 1standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Int,Eq,Nat,Int.gcd,HAdd.hAdd,HPow.hPow,OfNat.ofNat,HSub.hSubProof uses:
Eq.mpr,HMul.hMul,id,congrArg,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Mathlib.Tactic.Ring.Common.add_congr,Mathlib.Tactic.Ring.Common.pow_congr,Mathlib.Tactic.Ring.Common.atom_pf,rfl,Eq.symm,Eq.refl,Mathlib.Tactic.Ring.cast_pos,Mathlib.Meta.NormNum.isNat_ofNat,Mathlib.Tactic.Ring.Common.pow_add,Mathlib.Tactic.Ring.Common.single_pow,Mathlib.Tactic.Ring.Common.mul_pow_mul,Mathlib.Meta.NormNum.IsNat.to_raw_eq,Mathlib.Meta.NormNum.isNat_mul,Mathlib.Meta.NormNum.IsNat.of_rawand 82 more80 instances, coercions and auxiliary constants left out.
Tactic trace: 15 steps
Open to load the checked before-and-after goal states.
lemma gcd_quad_identity (x : ℤ) : Int.gcd (x^2 + x + 1) (x^2 - x + 1) = 1 := by … - lemma
Usa2008P1.gcd_quad_identity_natwe also need an ℕ version of the previous identity line 89 sourceSource comment
we also need an ℕ version of the previous identitystandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Nat.gcd,HAdd.hAdd,HPow.hPow,OfNat.ofNat,HSub.hSubProof uses:
Eq.mpr,Int.gcd,Int,eq_of_heq,HEq,Eq.refl,HEq.refl,Eq.symm,LE.le,le_of_not_gt,LT.lt,Mathlib.Tactic.Linarith.lt_irrefl,Eq.mp,Neg.neg,HMul.hMul,congrArg,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.Common.add_congr,Nat.rawCast,Int.rawCastand 65 more106 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
lemma gcd_quad_identity_nat (x : ℕ) : Nat.gcd (x^2 + x + 1) (x^2 - x + 1) = 1 := by … - lemma
Usa2008P1.k_coprime_with_productkₙ₊₁ is coprime to the product k₀...kₙ line 96 sourceSource comment
kₙ₊₁ is coprime to the product k₀...kₙstandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Nat.Coprime,Finset.prod,Fin,HAdd.hAdd,OfNat.ofNat,Finset.univ, Usa2008P1.kseqProof uses:
Eq.mpr,HPow.hPow, Usa2008P1.xseq,id,Eq,congrArg, Usa2008P1.main_identity,HSub.hSub, Usa2008P1.kseq_succ_eq,Nat.gcd,propext,Nat.coprime_iff_gcd_eq_one, Usa2008P1.gcd_quad_identity_nat18 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
lemma k_coprime_with_product (n : ℕ) : Nat.Coprime (∏ i : Fin (n + 1), kseq ↑i) (kseq (n + 1)) := by …Mentions: Usa2008P1.kseq
- lemma
Usa2008P1.k_are_coprimeShow the main coprime lemma Strategy: kⱼ is coprime to product P := k₀...kⱼ₋₁, and kseq i divides that product line 103 sourceSource comment
Show the main coprime lemma Strategy: kⱼ is coprime to product P := k₀...kⱼ₋₁, and kseq i divides that productstandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,Nat.Coprime, Usa2008P1.kseqProof uses:
Eq,HAdd.hAdd,OfNat.ofNat,Exists,Exists.intro,HSub.hSub,Finset.prod,Fin,Finset.univ,Dvd.dvd,Finset.dvd_prod_of_mem,Fin.mk,Finset.mem_univ, Usa2008P1.k_coprime_with_product,Nat.Coprime.coprime_dvd_left,Eq.symm15 instances, coercions and auxiliary constants left out.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
lemma k_are_coprime (i j : ℕ) (hij: i < j) : Nat.Coprime (kseq i) (kseq j) := by …
Mentions: Usa2008P1.kseq
- problem
Usa2008P1.usa2008_p1line 113 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,Exists,Fin,HAdd.hAdd,And,Ne,Nat.Coprime,Eq,Finset.prod,Finset.univ,HMul.hMulProof uses:
Exists.intro, Usa2008P1.kseq,And.intro, Usa2008P1.k_greater_than_one,Function.Injective.ne,Fin.val_injective,Or,lt_or_gt_of_ne, Usa2008P1.k_are_coprime,Nat.Coprime.symm, Usa2008P1.xseq,Eq.mpr,HPow.hPow,id,congrArg, Usa2008P1.main_identity,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Mathlib.Tactic.Ring.Common.add_congr,Mathlib.Tactic.Ring.Common.pow_congrand 27 more39 instances, coercions and auxiliary constants left out.
Tactic trace: 17 steps
Open to load the checked before-and-after goal states.