File: Mathlib/Algebra/Polynomial/UnitTrinomial.lean

full_name: Polynomial.trinomial
code: /-- Shorthand for a trinomial -/
noncomputable def trinomial 
goal: Polynomial R

full_name: Polynomial.trinomial_def
code: theorem trinomial_def : trinomial k m n u v w = C u * X ^ k + C v * X ^ m + C w * X ^ n 
goal: Polynomial.trinomial k m n u v w =
  Polynomial.C u * Polynomial.X ^ k + Polynomial.C v * Polynomial.X ^ m + Polynomial.C w * Polynomial.X ^ n

full_name: Polynomial.trinomial_leading_coeff'
code: theorem trinomial_leading_coeff' (hkm : k < m) (hmn : m < n) :
    (trinomial k m n u v w).coeff n = w 
goal: (Polynomial.trinomial k m n u v w).coeff n = w

full_name: Polynomial.trinomial_middle_coeff
code: theorem trinomial_middle_coeff (hkm : k < m) (hmn : m < n) :
    (trinomial k m n u v w).coeff m = v 
goal: (Polynomial.trinomial k m n u v w).coeff m = v

full_name: Polynomial.trinomial_trailing_coeff'
code: theorem trinomial_trailing_coeff' (hkm : k < m) (hmn : m < n) :
    (trinomial k m n u v w).coeff k = u 
goal: (Polynomial.trinomial k m n u v w).coeff k = u

full_name: Polynomial.trinomial_natDegree
code: theorem trinomial_natDegree (hkm : k < m) (hmn : m < n) (hw : w ≠ 0) :
    (trinomial k m n u v w).natDegree = n 
goal: (Polynomial.trinomial k m n u v w).natDegree = n

full_name: Polynomial.trinomial_natTrailingDegree
code: theorem trinomial_natTrailingDegree (hkm : k < m) (hmn : m < n) (hu : u ≠ 0) :
    (trinomial k m n u v w).natTrailingDegree = k 
goal: (Polynomial.trinomial k m n u v w).natTrailingDegree = k

full_name: Polynomial.trinomial_leadingCoeff
code: theorem trinomial_leadingCoeff (hkm : k < m) (hmn : m < n) (hw : w ≠ 0) :
    (trinomial k m n u v w).leadingCoeff = w 
goal: (Polynomial.trinomial k m n u v w).leadingCoeff = w

full_name: Polynomial.trinomial_trailingCoeff
code: theorem trinomial_trailingCoeff (hkm : k < m) (hmn : m < n) (hu : u ≠ 0) :
    (trinomial k m n u v w).trailingCoeff = u 
goal: (Polynomial.trinomial k m n u v w).trailingCoeff = u

full_name: Polynomial.trinomial_monic
code: theorem trinomial_monic (hkm : k < m) (hmn : m < n) : (trinomial k m n u v 1).Monic 
goal: (Polynomial.trinomial k m n u v 1).Monic

full_name: Polynomial.trinomial_mirror
code: theorem trinomial_mirror (hkm : k < m) (hmn : m < n) (hu : u ≠ 0) (hw : w ≠ 0) :
    (trinomial k m n u v w).mirror = trinomial k (n - m + k) n w v u 
goal: (Polynomial.trinomial k m n u v w).mirror = Polynomial.trinomial k (n - m + k) n w v u

full_name: Polynomial.trinomial_support
code: theorem trinomial_support (hkm : k < m) (hmn : m < n) (hu : u ≠ 0) (hv : v ≠ 0) (hw : w ≠ 0) :
    (trinomial k m n u v w).support = {k, m, n} 
goal: (Polynomial.trinomial k m n u v w).support = {k, m, n}

full_name: Polynomial.IsUnitTrinomial
code: /-- A unit trinomial is a trinomial with unit coefficients. -/
def IsUnitTrinomial 
goal: Prop

full_name: Polynomial.IsUnitTrinomial.not_isUnit
code: theorem not_isUnit (hp : p.IsUnitTrinomial) : ¬IsUnit p 
goal: ¬IsUnit p

full_name: Polynomial.IsUnitTrinomial.card_support_eq_three
code: theorem card_support_eq_three (hp : p.IsUnitTrinomial) : p.support.card = 3 
goal: p.support.card = 3

full_name: Polynomial.IsUnitTrinomial.ne_zero
code: theorem ne_zero (hp : p.IsUnitTrinomial) : p ≠ 0 
goal: p ≠ 0

full_name: Polynomial.IsUnitTrinomial.coeff_isUnit
code: theorem coeff_isUnit (hp : p.IsUnitTrinomial) {k : ℕ} (hk : k ∈ p.support) :
    IsUnit (p.coeff k) 
goal: IsUnit (p.coeff k)

full_name: Polynomial.IsUnitTrinomial.leadingCoeff_isUnit
code: theorem leadingCoeff_isUnit (hp : p.IsUnitTrinomial) : IsUnit p.leadingCoeff 
goal: IsUnit p.leadingCoeff

full_name: Polynomial.IsUnitTrinomial.trailingCoeff_isUnit
code: theorem trailingCoeff_isUnit (hp : p.IsUnitTrinomial) : IsUnit p.trailingCoeff 
goal: IsUnit p.trailingCoeff

full_name: Polynomial.isUnitTrinomial_iff
code: theorem isUnitTrinomial_iff :
    p.IsUnitTrinomial ↔ p.support.card = 3 ∧ ∀ k ∈ p.support, IsUnit (p.coeff k) 
goal: p.IsUnitTrinomial ↔ p.support.card = 3 ∧ ∀ k ∈ p.support, IsUnit (p.coeff k)

full_name: Polynomial.isUnitTrinomial_iff'
code: theorem isUnitTrinomial_iff' :
    p.IsUnitTrinomial ↔
      (p * p.mirror).coeff (((p * p.mirror).natDegree + (p * p.mirror).natTrailingDegree) / 2) =
        3 
goal: p.IsUnitTrinomial ↔ (p * p.mirror).coeff (((p * p.mirror).natDegree + (p * p.mirror).natTrailingDegree) / 2) = 3

full_name: Polynomial.isUnitTrinomial_iff''
code: theorem isUnitTrinomial_iff'' (h : p * p.mirror = q * q.mirror) :
    p.IsUnitTrinomial ↔ q.IsUnitTrinomial 
goal: p.IsUnitTrinomial ↔ q.IsUnitTrinomial

full_name: Polynomial.IsUnitTrinomial.irreducible_aux1
code: theorem irreducible_aux1 {k m n : ℕ} (hkm : k < m) (hmn : m < n) (u v w : Units ℤ)
    (hp : p = trinomial k m n (u : ℤ) v w) :
    C (v : ℤ) * (C (u : ℤ) * X ^ (m + n) + C (w : ℤ) * X ^ (n - m + k + n)) =
      ⟨Finsupp.filter (· ∈ Set.Ioo (k + n) (n + n)) (p * p.mirror).toFinsupp⟩ 
goal: Polynomial.C ↑v * (Polynomial.C ↑u * Polynomial.X ^ (m + n) + Polynomial.C ↑w * Polynomial.X ^ (n - m + k + n)) =
  { toFinsupp := Finsupp.filter (fun x => x ∈ Set.Ioo (k + n) (n + n)) (p * p.mirror).toFinsupp }

full_name: Polynomial.IsUnitTrinomial.irreducible_aux2
code: theorem irreducible_aux2 {k m m' n : ℕ} (hkm : k < m) (hmn : m < n) (hkm' : k < m') (hmn' : m' < n)
    (u v w : Units ℤ) (hp : p = trinomial k m n (u : ℤ) v w) (hq : q = trinomial k m' n (u : ℤ) v w)
    (h : p * p.mirror = q * q.mirror) : q = p ∨ q = p.mirror 
goal: q = p ∨ q = p.mirror

full_name: Polynomial.IsUnitTrinomial.irreducible_aux3
code: theorem irreducible_aux3 {k m m' n : ℕ} (hkm : k < m) (hmn : m < n) (hkm' : k < m') (hmn' : m' < n)
    (u v w x z : Units ℤ) (hp : p = trinomial k m n (u : ℤ) v w)
    (hq : q = trinomial k m' n (x : ℤ) v z) (h : p * p.mirror = q * q.mirror) :
    q = p ∨ q = p.mirror 
goal: q = p ∨ q = p.mirror

full_name: Polynomial.IsUnitTrinomial.irreducible_of_coprime
code: theorem irreducible_of_coprime (hp : p.IsUnitTrinomial)
    (h : IsRelPrime p p.mirror) : Irreducible p 
goal: Irreducible p

full_name: Polynomial.IsUnitTrinomial.irreducible_of_isCoprime
code: /-- A unit trinomial is irreducible if it is coprime with its mirror -/
theorem irreducible_of_isCoprime (hp : p.IsUnitTrinomial) (h : IsCoprime p p.mirror) :
    Irreducible p 
goal: Irreducible p