Compfiles/Usa2019P6.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
12 declarations, 0 contain sorry, 0 declared as axioms
USA Mathematical Olympiad 2019, Problem 6
Find all polynomials P with real coefficients such that
P(x)/yz + P(y)/zx + P(z)/xy = P(x − y) + P(y − z) + P(z − x)
for all nonzero real numbers x, y, z obeying 2xyz = x + y + z.
Imports (5)
Imported by 1 file
- determine
Usa2019P6.SolutionSetline 33 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Set,Polynomial,RealProof uses:
Set.ofPred,Exists,Eq,HMul.hMul,RingHom,Polynomial.C,HAdd.hAdd,HPow.hPow,Nat,Polynomial.X,OfNat.ofNat18 instances, coercions and auxiliary constants left out.
- def
Usa2019P6.QfunThe polynomial equation, multiplied through byxyzline 40 sourceSource documentation
The polynomial equation, multiplied through by
xyz. This is the form of the hypothesis that we use below: it says thatQ(x, y, z)vanishes, whereQ(x, y, z) = xP(x) + yP(y) + zP(z) − xyz (P(x−y) + P(y−z) + P(z−x)).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Field,PolynomialProof uses:
HSub.hSub,HAdd.hAdd,HMul.hMul,Polynomial.eval18 instances, coercions and auxiliary constants left out.
def Qfun {K : Type*} [Field K] (P : Polynomial K) (x y z : K) : K := …Mentions: P
- def
Usa2019P6.PhiPolyDocumented declaration: PhiPoly line 48 sourceSource documentation
The "cleared denominator" polynomial: for
n = P.natDegree, the rational function(x, y) ↦ (2xy−1)^(n+1) * Qfun P x y ((x+y)/(2xy−1))is actually a polynomial function, and this is the corresponding polynomial, written as a polynomial inywhose coefficients are polynomials inx.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
CommRing,PolynomialProof uses:
Finset.sum,Nat,Finset.range,HAdd.hAdd,Polynomial.natDegree,OfNat.ofNat,HMul.hMul,RingHom,Polynomial.C,Finsupp,Polynomial.coeff,HSub.hSub,HPow.hPow,Polynomial.X36 instances, coercions and auxiliary constants left out.
noncomputable def PhiPoly {R : Type*} [CommRing R] (P : Polynomial R) : Polynomial (Polynomial R) := …Mentions: P
- lemma
Usa2019P6.qfun_eq_sumQfunexpanded as a sum over the coefficients ofPline 61 sourceSource documentation
Qfunexpanded as a sum over the coefficients ofP.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Field,Polynomial,Eq, Usa2019P6.Qfun,Finset.sum,Nat,Finset.range,HAdd.hAdd,Polynomial.natDegree,OfNat.ofNat,HMul.hMul,Finsupp,Polynomial.coeff,HSub.hSub,HPow.hPowProof uses:
Eq.mpr,Polynomial.eval,id,congrArg,Usa2019P6.Qfun.eq_1,congrFun',Eq.trans,congr,Polynomial.eval_eq_sum_range,Finset.mul_sum,Finset.sum_congr,rfl,Finset,Membership.mem,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Int.rawCast,inferInstance,Ring,Int.negOfNatand 39 more84 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
lemma qfun_eq_sum {K : Type*} [Field K] (P : Polynomial K) (x y z : K) : Qfun P x y z = ∑ k ∈ Finset.range (P.natDegree + 1), P.coeff k * (x * x ^ k + y * y ^ k + z * z ^ k - x * y * z * ((x - y) ^ k + (y - z) ^ k + (z - x) ^ k)) := by …Mentions: P, Usa2019P6.Qfun
- lemma
Usa2019P6.phiPoly_evalEvaluatingPhiPolyat a pair(x, y)with2xy ≠ 1gives the cleared value ofQfunat the surface point(x, y, (x+y)/(2xy−1))line 74 sourceSource documentation
Evaluating
PhiPolyat a pair(x, y)with2xy ≠ 1gives the cleared value ofQfunat the surface point(x, y, (x+y)/(2xy−1)).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Field,Polynomial,Ne,HMul.hMul,OfNat.ofNat,Nat,Eq,Polynomial.eval,Polynomial.map,Polynomial.evalRingHom, Usa2019P6.PhiPoly,HPow.hPow,HSub.hSub,HAdd.hAdd,Polynomial.natDegree, Usa2019P6.Qfun,HDiv.hDivProof uses:
Iff.mpr,sub_ne_zero,Eq.mpr,Polynomial.eval₂,id,congrArg,Polynomial.eval_map,Finset.sum,Finset.range,RingHom,Polynomial.C,Finsupp,Polynomial.coeff,Polynomial.X,Usa2019P6.PhiPoly.eq_1,Polynomial.eval₂_finsetSum, Usa2019P6.qfun_eq_sum,Finset.mul_sum,Finset.sum_congr,rfland 107 more144 instances, coercions and auxiliary constants left out.
Tactic trace: 22 steps
Open to load the checked before-and-after goal states.
lemma phiPoly_eval {K : Type*} [Field K] (P : Polynomial K) (x y : K) (hxy : 2 * x * y ≠ 1) : ((PhiPoly P).map (evalRingHom x)).eval y = (2 * x * y - 1) ^ (P.natDegree + 1) * Qfun P x y ((x + y) / (2 * x * y - 1)) := by …Mentions: P, Usa2019P6.PhiPoly, Usa2019P6.Qfun
- lemma
Usa2019P6.phiPoly_eq_zeroIfQfun Pvanishes at every nonzero real triple on the surface2xyz = x+y+z, thenPhiPoly Pis the zero polynomial line 124 sourceSource documentation
If
Qfun Pvanishes at every nonzero real triple on the surface2xyz = x+y+z, thenPhiPoly Pis the zero polynomial. This is the "real dimension two" argument: a bivariate polynomial vanishing on a cofinite union of points is zero.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Polynomial,Real,Ne,OfNat.ofNat,Eq,HMul.hMul,Nat,HAdd.hAdd, Usa2019P6.Qfun, Usa2019P6.PhiPolyProof uses:
Polynomial.map,Polynomial.evalRingHom,Polynomial.eq_zero_of_infinite_isRoot,LE.le,Set,Compl.compl,Finset,Insert.insert,Neg.neg,Singleton.singleton,Inv.inv,Set.ofPred,Polynomial.IsRoot,Membership.mem,of_eq_true,Eq.trans,Or,True,congr,congrArgand 129 more165 instances, coercions and auxiliary constants left out.
Tactic trace: 46 steps
Open to load the checked before-and-after goal states.
lemma phiPoly_eq_zero (P : Polynomial ℝ) (hQ : ∀ x y z : ℝ, x ≠ 0 → y ≠ 0 → z ≠ 0 → 2 * x * y * z = x + y + z → Qfun P x y z = 0) : PhiPoly P = 0 := by …Mentions: P, Usa2019P6.Qfun, Usa2019P6.PhiPoly
- lemma
Usa2019P6.comp_neg_X_of_phiPoly_eq_zeroPis even: fromPhiPoly P = 0we getQfun P t 0 (-t) = 0for all realt, hencet * (P(t) − P(−t)) = 0for allt, soP.comp (-X) = Pline 179 sourceSource documentation
Pis even: fromPhiPoly P = 0we getQfun P t 0 (-t) = 0for all realt, hencet * (P(t) − P(−t)) = 0for allt, soP.comp (-X) = P.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Polynomial,Real,Eq, Usa2019P6.PhiPoly,OfNat.ofNat,Polynomial.comp,Neg.neg,Polynomial.XProof uses:
Polynomial.eval,HMul.hMul,HSub.hSub,Polynomial.map,Polynomial.evalRingHom,Eq.mpr,id,congrArg,of_eq_true,Eq.trans,True,congrFun',Polynomial.map_zero,Polynomial.eval_zero,eq_self, Usa2019P6.Qfun,Nat,Mathlib.Tactic.Ring.of_eq,HAdd.hAdd,Int.rawCastand 93 more118 instances, coercions and auxiliary constants left out.
Tactic trace: 24 steps
Open to load the checked before-and-after goal states.
lemma comp_neg_X_of_phiPoly_eq_zero (P : Polynomial ℝ) (hPhi : PhiPoly P = 0) : P.comp (-X) = P := by …Mentions: P, Usa2019P6.PhiPoly
- lemma
Usa2019P6.Fk_natDegree_leThe second finite difference(X+h)^k + (X−h)^k − 2X^khas degree at mostk−2(in natural subtraction) line 203 sourceSource documentation
The second finite difference
(X+h)^k + (X−h)^k − 2X^khas degree at mostk−2(in natural subtraction). Expanded via the binomial theorem: the top two terms cancel.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Complex,Nat,LE.le,Polynomial.natDegree,HSub.hSub,Polynomial,HAdd.hAdd,HPow.hPow,Polynomial.X,RingHom,Polynomial.C,HMul.hMul,OfNat.ofNatProof uses:
Nat.casesAuxOn,Eq,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.Common.sub_congr,Nat.rawCast,Mathlib.Tactic.Ring.Common.add_congr,Mathlib.Tactic.Ring.Common.pow_congr,Mathlib.Tactic.Ring.Common.atom_pf,rfl,Eq.mpr,id,congrArg,Eq.symm,Eq.refl,Mathlib.Tactic.Ring.Common.add_pf_add_lt,Mathlib.Tactic.Ring.Common.add_pf_zero_add,Mathlib.Tactic.Ring.cast_zero,Mathlib.Meta.NormNum.isNat_ofNat,Mathlib.Tactic.Ring.Common.pow_zero,Int.rawCastand 77 more133 instances, coercions and auxiliary constants left out.
Tactic trace: 33 steps
Open to load the checked before-and-after goal states.
lemma Fk_natDegree_le (h : ℂ) (k : ℕ) : ((X + C h) ^ k + (X - C h) ^ k - 2 * X ^ k : Polynomial ℂ).natDegree ≤ k - 2 := by …Mentions: h
- lemma
Usa2019P6.Fk_coeffThe leading coefficient of the second finite difference(X+h)^k + (X−h)^k − 2X^kat degreek−2isk * (k−1) * h²line 247 sourceSource documentation
The leading coefficient of the second finite difference
(X+h)^k + (X−h)^k − 2X^kat degreek−2isk * (k−1) * h².standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Complex,Nat,Eq,Finsupp,Polynomial.coeff,HSub.hSub,Polynomial,HAdd.hAdd,HPow.hPow,Polynomial.X,RingHom,Polynomial.C,HMul.hMul,OfNat.ofNatProof uses:
Nat.casesAuxOn,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.Common.sub_congr,Nat.rawCast,Mathlib.Tactic.Ring.Common.add_congr,Mathlib.Tactic.Ring.Common.pow_congr,Mathlib.Tactic.Ring.Common.atom_pf,rfl,Eq.mpr,id,congrArg,Eq.symm,Eq.refl,Mathlib.Tactic.Ring.Common.add_pf_add_lt,Mathlib.Tactic.Ring.Common.add_pf_zero_add,Mathlib.Tactic.Ring.cast_zero,Mathlib.Meta.NormNum.isNat_ofNat,Mathlib.Tactic.Ring.Common.pow_zero,Int.rawCast,inferInstanceand 129 more185 instances, coercions and auxiliary constants left out.
Tactic trace: 50 steps
Open to load the checked before-and-after goal states.
lemma Fk_coeff (h : ℂ) (k : ℕ) : ((X + C h) ^ k + (X - C h) ^ k - 2 * X ^ k : Polynomial ℂ).coeff (k - 2) = (k : ℂ) * ((k : ℂ) - 1) * h ^ 2 := by …Mentions: h
- lemma
Usa2019P6.phiPoly_map_ofRealPhiPolycommutes with mapping the reals into the complexes line 308 sourceSource documentation
PhiPolycommutes with mapping the reals into the complexes.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Polynomial,Real,Eq,Complex,Polynomial.map,Polynomial.mapRingHom,Complex.ofRealHom, Usa2019P6.PhiPolyProof uses:
Function.Injective,Complex.ofReal_injective,Eq.mpr,Finset.sum,Nat,Finset.range,HAdd.hAdd,Polynomial.natDegree,OfNat.ofNat,HMul.hMul,RingHom,Polynomial.C,Finsupp,Polynomial.coeff,HSub.hSub,HPow.hPow,Polynomial.X,id,congrArg,Usa2019P6.PhiPoly.eq_1and 25 more59 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
lemma phiPoly_map_ofReal (P : Polynomial ℝ) : (PhiPoly P).map (mapRingHom Complex.ofRealHom) = PhiPoly (P.map Complex.ofRealHom) := by …Mentions: P, Usa2019P6.PhiPoly
- lemma
Usa2019P6.natDegree_le_twoThe degree bound: ifPhiPoly P = 0andPis even, thenP.natDegree ≤ 2line 323 sourceSource documentation
The degree bound: if
PhiPoly P = 0andPis even, thenP.natDegree ≤ 2. The proof passes to complex polynomials and evaluatesQfunat the surface point(x, h, -h)withh² = −1/2, obtaining that the second finite difference ofPathis constant; comparing leading coefficients then forcesdeg P ≤ 2.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Polynomial,Real,Ne,OfNat.ofNat,Eq, Usa2019P6.PhiPoly,Polynomial.comp,Neg.neg,Polynomial.X,LE.le,Nat,Polynomial.natDegreeProof uses:
Complex,HPow.hPow,HDiv.hDiv,Exists,Exists.intro,HMul.hMul,Complex.I,Real.sqrt,Eq.mpr,id,congrArg,mul_pow,Complex.I_sq,Eq.symm,Complex.ofReal_pow,div_pow,Real.sq_sqrt,zero_le_two,congrFun',Eq.transand 217 more211 instances, coercions and auxiliary constants left out.
Tactic trace: 140 steps
Open to load the checked before-and-after goal states.
lemma natDegree_le_two (P : Polynomial ℝ) (hP0 : P ≠ 0) (hPhi : PhiPoly P = 0) (hEven : P.comp (-X) = P) : P.natDegree ≤ 2 := by …Mentions: P, Usa2019P6.PhiPoly
- problem
Usa2019P6.usa2019_p6line 472 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Polynomial,Real,Iff,Membership.mem,Set, Usa2019P6.SolutionSet,Ne,OfNat.ofNat,Eq,HMul.hMul,Nat,HAdd.hAdd,HDiv.hDiv,Polynomial.eval,HSub.hSubProof uses:
Iff.intro,RingHom,Polynomial.C,HPow.hPow,Polynomial.X,Eq.mpr,id,congr,congrArg,congrFun',Eq.trans,Polynomial.eval_mul,Polynomial.eval_C,Polynomial.eval_add,Polynomial.eval_pow,Polynomial.eval_X,Polynomial.eval_ofNat,inferInstance,CommGroupWithZero,GroupWithZeroand 223 more194 instances, coercions and auxiliary constants left out.
Tactic trace: 56 steps
Open to load the checked before-and-after goal states.