File: Mathlib/RingTheory/Polynomial/Content.lean

full_name: Polynomial.IsPrimitive
code: /-- A polynomial is primitive when the only constant polynomials dividing it are units -/
def IsPrimitive (p : R[X]) : Prop 
goal: Prop

full_name: Polynomial.isPrimitive_iff_isUnit_of_C_dvd
code: theorem isPrimitive_iff_isUnit_of_C_dvd {p : R[X]} : p.IsPrimitive ↔ ∀ r : R, C r ∣ p → IsUnit r 
goal: p.IsPrimitive ↔ ∀ (r : R), Polynomial.C r ∣ p → IsUnit r

full_name: Polynomial.isPrimitive_one
code: @[simp]
theorem isPrimitive_one : IsPrimitive (1 : R[X]) 
goal: Polynomial.IsPrimitive 1

full_name: Polynomial.Monic.isPrimitive
code: theorem Monic.isPrimitive {p : R[X]} (hp : p.Monic) : p.IsPrimitive 
goal: p.IsPrimitive

full_name: Polynomial.IsPrimitive.ne_zero
code: theorem IsPrimitive.ne_zero [Nontrivial R] {p : R[X]} (hp : p.IsPrimitive) : p ≠ 0 
goal: p ≠ 0

full_name: Polynomial.isPrimitive_of_dvd
code: theorem isPrimitive_of_dvd {p q : R[X]} (hp : IsPrimitive p) (hq : q ∣ p) : IsPrimitive q 
goal: q.IsPrimitive

full_name: Polynomial.content
code: /-- `p.content` is the `gcd` of the coefficients of `p`. -/
def content (p : R[X]) : R 
goal: R

full_name: Polynomial.content_dvd_coeff
code: theorem content_dvd_coeff {p : R[X]} (n : ℕ) : p.content ∣ p.coeff n 
goal: p.content ∣ p.coeff n

full_name: Polynomial.content_C
code: @[simp]
theorem content_C {r : R} : (C r).content = normalize r 
goal: (Polynomial.C r).content = normalize r

full_name: Polynomial.content_zero
code: @[simp]
theorem content_zero : content (0 : R[X]) = 0 
goal: Polynomial.content 0 = 0

full_name: Polynomial.content_one
code: @[simp]
theorem content_one : content (1 : R[X]) = 1 
goal: Polynomial.content 1 = 1

full_name: Polynomial.content_X_mul
code: theorem content_X_mul {p : R[X]} : content (X * p) = content p 
goal: (Polynomial.X * p).content = p.content

full_name: Polynomial.content_X_pow
code: @[simp]
theorem content_X_pow {k : ℕ} : content ((X : R[X]) ^ k) = 1 
goal: (Polynomial.X ^ k).content = 1

full_name: Polynomial.content_X
code: @[simp]
theorem content_X : content (X : R[X]) = 1 
goal: Polynomial.X.content = 1

full_name: Polynomial.content_C_mul
code: theorem content_C_mul (r : R) (p : R[X]) : (C r * p).content = normalize r * p.content 
goal: (Polynomial.C r * p).content = normalize r * p.content

full_name: Polynomial.content_monomial
code: @[simp]
theorem content_monomial {r : R} {k : ℕ} : content (monomial k r) = normalize r 
goal: ((Polynomial.monomial k) r).content = normalize r

full_name: Polynomial.content_eq_zero_iff
code: theorem content_eq_zero_iff {p : R[X]} : content p = 0 ↔ p = 0 
goal: p.content = 0 ↔ p = 0

full_name: Polynomial.normalize_content
code: theorem normalize_content {p : R[X]} : normalize p.content = p.content 
goal: normalize p.content = p.content

full_name: Polynomial.normUnit_content
code: @[simp]
theorem normUnit_content {p : R[X]} : normUnit (content p) = 1 
goal: normUnit p.content = 1

full_name: Polynomial.content_eq_gcd_range_of_lt
code: theorem content_eq_gcd_range_of_lt (p : R[X]) (n : ℕ) (h : p.natDegree < n) :
    p.content = (Finset.range n).gcd p.coeff 
goal: p.content = (Finset.range n).gcd p.coeff

full_name: Polynomial.content_eq_gcd_range_succ
code: theorem content_eq_gcd_range_succ (p : R[X]) :
    p.content = (Finset.range p.natDegree.succ).gcd p.coeff 
goal: p.content = (Finset.range p.natDegree.succ).gcd p.coeff

full_name: Polynomial.content_eq_gcd_leadingCoeff_content_eraseLead
code: theorem content_eq_gcd_leadingCoeff_content_eraseLead (p : R[X]) :
    p.content = GCDMonoid.gcd p.leadingCoeff (eraseLead p).content 
goal: p.content = gcd p.leadingCoeff p.eraseLead.content

full_name: Polynomial.dvd_content_iff_C_dvd
code: theorem dvd_content_iff_C_dvd {p : R[X]} {r : R} : r ∣ p.content ↔ C r ∣ p 
goal: r ∣ p.content ↔ Polynomial.C r ∣ p

full_name: Polynomial.C_content_dvd
code: theorem C_content_dvd (p : R[X]) : C p.content ∣ p 
goal: Polynomial.C p.content ∣ p

full_name: Polynomial.isPrimitive_iff_content_eq_one
code: theorem isPrimitive_iff_content_eq_one {p : R[X]} : p.IsPrimitive ↔ p.content = 1 
goal: p.IsPrimitive ↔ p.content = 1

full_name: Polynomial.IsPrimitive.content_eq_one
code: theorem IsPrimitive.content_eq_one {p : R[X]} (hp : p.IsPrimitive) : p.content = 1 
goal: p.content = 1

full_name: Polynomial.primPart
code: /-- The primitive part of a polynomial `p` is the primitive polynomial gained by dividing `p` by
  `p.content`. If `p = 0`, then `p.primPart = 1`.  -/
noncomputable def primPart (p : R[X]) : R[X] 
goal: Polynomial R

full_name: Polynomial.eq_C_content_mul_primPart
code: theorem eq_C_content_mul_primPart (p : R[X]) : p = C p.content * p.primPart 
goal: p = Polynomial.C p.content * p.primPart

full_name: Polynomial.primPart_zero
code: @[simp]
theorem primPart_zero : primPart (0 : R[X]) = 1 
goal: Polynomial.primPart 0 = 1

full_name: Polynomial.isPrimitive_primPart
code: theorem isPrimitive_primPart (p : R[X]) : p.primPart.IsPrimitive 
goal: p.primPart.IsPrimitive

full_name: Polynomial.content_primPart
code: theorem content_primPart (p : R[X]) : p.primPart.content = 1 
goal: p.primPart.content = 1

full_name: Polynomial.primPart_ne_zero
code: theorem primPart_ne_zero (p : R[X]) : p.primPart ≠ 0 
goal: p.primPart ≠ 0

full_name: Polynomial.natDegree_primPart
code: theorem natDegree_primPart (p : R[X]) : p.primPart.natDegree = p.natDegree 
goal: p.primPart.natDegree = p.natDegree

full_name: Polynomial.IsPrimitive.primPart_eq
code: @[simp]
theorem IsPrimitive.primPart_eq {p : R[X]} (hp : p.IsPrimitive) : p.primPart = p 
goal: p.primPart = p

full_name: Polynomial.isUnit_primPart_C
code: theorem isUnit_primPart_C (r : R) : IsUnit (C r).primPart 
goal: IsUnit (Polynomial.C r).primPart

full_name: Polynomial.primPart_dvd
code: theorem primPart_dvd (p : R[X]) : p.primPart ∣ p 
goal: p.primPart ∣ p

full_name: Polynomial.aeval_primPart_eq_zero
code: theorem aeval_primPart_eq_zero {S : Type*} [Ring S] [IsDomain S] [Algebra R S]
    [NoZeroSMulDivisors R S] {p : R[X]} {s : S} (hpzero : p ≠ 0) (hp : aeval s p = 0) :
    aeval s p.primPart = 0 
goal: (Polynomial.aeval s) p.primPart = 0

full_name: Polynomial.eval₂_primPart_eq_zero
code: theorem eval₂_primPart_eq_zero {S : Type*} [CommRing S] [IsDomain S] {f : R →+* S}
    (hinj : Function.Injective f) {p : R[X]} {s : S} (hpzero : p ≠ 0) (hp : eval₂ f s p = 0) :
    eval₂ f s p.primPart = 0 
goal: Polynomial.eval₂ f s p.primPart = 0

full_name: Polynomial.gcd_content_eq_of_dvd_sub
code: theorem gcd_content_eq_of_dvd_sub {a : R} {p q : R[X]} (h : C a ∣ p - q) :
    GCDMonoid.gcd a p.content = GCDMonoid.gcd a q.content 
goal: gcd a p.content = gcd a q.content

full_name: Polynomial.content_mul_aux
code: theorem content_mul_aux {p q : R[X]} :
    GCDMonoid.gcd (p * q).eraseLead.content p.leadingCoeff =
      GCDMonoid.gcd (p.eraseLead * q).content p.leadingCoeff 
goal: gcd (p * q).eraseLead.content p.leadingCoeff = gcd (p.eraseLead * q).content p.leadingCoeff

full_name: Polynomial.content_mul
code: @[simp]
theorem content_mul {p q : R[X]} : (p * q).content = p.content * q.content 
goal: (p * q).content = p.content * q.content

full_name: Polynomial.IsPrimitive.mul
code: theorem IsPrimitive.mul {p q : R[X]} (hp : p.IsPrimitive) (hq : q.IsPrimitive) :
    (p * q).IsPrimitive 
goal: (p * q).IsPrimitive

full_name: Polynomial.primPart_mul
code: @[simp]
theorem primPart_mul {p q : R[X]} (h0 : p * q ≠ 0) :
    (p * q).primPart = p.primPart * q.primPart 
goal: (p * q).primPart = p.primPart * q.primPart

full_name: Polynomial.IsPrimitive.dvd_primPart_iff_dvd
code: theorem IsPrimitive.dvd_primPart_iff_dvd {p q : R[X]} (hp : p.IsPrimitive) (hq : q ≠ 0) :
    p ∣ q.primPart ↔ p ∣ q 
goal: p ∣ q.primPart ↔ p ∣ q

full_name: Polynomial.exists_primitive_lcm_of_isPrimitive
code: theorem exists_primitive_lcm_of_isPrimitive {p q : R[X]} (hp : p.IsPrimitive) (hq : q.IsPrimitive) :
    ∃ r : R[X], r.IsPrimitive ∧ ∀ s : R[X], p ∣ s ∧ q ∣ s ↔ r ∣ s 
goal: ∃ r, r.IsPrimitive ∧ ∀ (s : Polynomial R), p ∣ s ∧ q ∣ s ↔ r ∣ s

full_name: Polynomial.dvd_iff_content_dvd_content_and_primPart_dvd_primPart
code: theorem dvd_iff_content_dvd_content_and_primPart_dvd_primPart {p q : R[X]} (hq : q ≠ 0) :
    p ∣ q ↔ p.content ∣ q.content ∧ p.primPart ∣ q.primPart 
goal: p ∣ q ↔ p.content ∣ q.content ∧ p.primPart ∣ q.primPart

full_name: Polynomial.normalizedGcdMonoid
code: noncomputable instance (priority := 100) normalizedGcdMonoid : NormalizedGCDMonoid R[X] 
goal: NormalizedGCDMonoid (Polynomial R)

full_name: Polynomial.degree_gcd_le_left
code: theorem degree_gcd_le_left {p : R[X]} (hp : p ≠ 0) (q) : (gcd p q).degree ≤ p.degree 
goal: (gcd p q).degree ≤ p.degree

full_name: Polynomial.degree_gcd_le_right
code: theorem degree_gcd_le_right (p) {q : R[X]} (hq : q ≠ 0) : (gcd p q).degree ≤ q.degree 
goal: (gcd p q).degree ≤ q.degree