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

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
  1. determine Usa2019P6.SolutionSet line 33 source

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

    Statement uses: Set, Polynomial, Real

    Proof uses: Set.ofPred, Exists, Eq, HMul.hMul, RingHom, Polynomial.C, HAdd.hAdd, HPow.hPow, Nat, Polynomial.X, OfNat.ofNat

    18 instances, coercions and auxiliary constants left out.

  2. def Usa2019P6.Qfun The polynomial equation, multiplied through by xyz line 40 source

    Source documentation

    The polynomial equation, multiplied through by xyz. This is the form of the hypothesis that we use below: it says that Q(x, y, z) vanishes, where Q(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, Polynomial

    Proof uses: HSub.hSub, HAdd.hAdd, HMul.hMul, Polynomial.eval

    18 instances, coercions and auxiliary constants left out.

    def Qfun {K : Type*} [Field K] (P : Polynomial K) (x y z : K) : K :=
    …

    Mentions: P

  3. def Usa2019P6.PhiPoly Documented declaration: PhiPoly line 48 source

    Source 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 in y whose coefficients are polynomials in x.

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

    Statement uses: CommRing, Polynomial

    Proof 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.X

    36 instances, coercions and auxiliary constants left out.

    noncomputable def PhiPoly {R : Type*} [CommRing R] (P : Polynomial R) :
        Polynomial (Polynomial R) :=
    …

    Mentions: P

  4. lemma Usa2019P6.qfun_eq_sum Qfun expanded as a sum over the coefficients of P line 61 source

    Source documentation

    Qfun expanded as a sum over the coefficients of P.

    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.hPow

    Proof 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.negOfNat and 39 more

    84 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

  5. lemma Usa2019P6.phiPoly_eval Evaluating PhiPoly at a pair (x, y) with 2xy ≠ 1 gives the cleared value of Qfun at the surface point (x, y, (x+y)/(2xy−1)) line 74 source

    Source documentation

    Evaluating PhiPoly at a pair (x, y) with 2xy ≠ 1 gives the cleared value of Qfun at 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.hDiv

    Proof 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, rfl and 107 more

    144 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

  6. lemma Usa2019P6.phiPoly_eq_zero If Qfun P vanishes at every nonzero real triple on the surface 2xyz = x+y+z, then PhiPoly P is the zero polynomial line 124 source

    Source documentation

    If Qfun P vanishes at every nonzero real triple on the surface 2xyz = x+y+z, then PhiPoly P is 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.PhiPoly

    Proof 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, congrArg and 129 more

    165 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

  7. lemma Usa2019P6.comp_neg_X_of_phiPoly_eq_zero P is even: from PhiPoly P = 0 we get Qfun P t 0 (-t) = 0 for all real t, hence t * (P(t) − P(−t)) = 0 for all t, so P.comp (-X) = P line 179 source

    Source documentation

    P is even: from PhiPoly P = 0 we get Qfun P t 0 (-t) = 0 for all real t, hence t * (P(t) − P(−t)) = 0 for all t, so P.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.X

    Proof 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.rawCast and 93 more

    118 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

  8. lemma Usa2019P6.Fk_natDegree_le The second finite difference (X+h)^k + (X−h)^k − 2X^k has degree at most k−2 (in natural subtraction) line 203 source

    Source documentation

    The second finite difference (X+h)^k + (X−h)^k − 2X^k has degree at most k−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.ofNat

    Proof 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.rawCast and 77 more

    133 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

  9. lemma Usa2019P6.Fk_coeff The leading coefficient of the second finite difference (X+h)^k + (X−h)^k − 2X^k at degree k−2 is k * (k−1) * h² line 247 source

    Source documentation

    The leading coefficient of the second finite difference (X+h)^k + (X−h)^k − 2X^k at degree k−2 is k * (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.ofNat

    Proof 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, inferInstance and 129 more

    185 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

  10. lemma Usa2019P6.phiPoly_map_ofReal PhiPoly commutes with mapping the reals into the complexes line 308 source

    Source documentation

    PhiPoly commutes 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.PhiPoly

    Proof 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_1 and 25 more

    59 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

  11. lemma Usa2019P6.natDegree_le_two The degree bound: if PhiPoly P = 0 and P is even, then P.natDegree ≤ 2 line 323 source

    Source documentation

    The degree bound: if PhiPoly P = 0 and P is even, then P.natDegree ≤ 2. The proof passes to complex polynomials and evaluates Qfun at the surface point (x, h, -h) with h² = −1/2, obtaining that the second finite difference of P at h is constant; comparing leading coefficients then forces deg 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.natDegree

    Proof 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.trans and 217 more

    211 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

  12. problem Usa2019P6.usa2019_p6 line 472 source

    standard 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.hSub

    Proof 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, GroupWithZero and 223 more

    194 instances, coercions and auxiliary constants left out.

    Tactic trace: 56 steps

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