-- Mathlib/RingTheory/Polynomial/Content.lean
theorem content_mul {p q : R[X]} : (p * q).content = p.content * q.content

Proof state:
case neg.inr.a
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p✝ q✝ : R[X]
n : ℕ
ih : ∀ (p q : R[X]), (p * q).degree < ↑n → (p * q).content = p.content * q.content
p q : R[X]
p0 : ¬p = 0
q0 : ¬q = 0
heq : p.primPart.degree + q.primPart.degree = ↑n
⊢ q.primPart.degree ≠ ⊥

Tactic:
rw [Ne, degree_eq_bot]

Result:
case neg.inr.a
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p✝ q✝ : R[X]
n : ℕ
ih : ∀ (p q : R[X]), (p * q).degree < ↑n → (p * q).content = p.content * q.content
p q : R[X]
p0 : ¬p = 0
q0 : ¬q = 0
heq : p.primPart.degree + q.primPart.degree = ↑n
⊢ ¬q.primPart = 0

Proof state:
case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p✝ q✝ : R[X]
n : ℕ
ih : ∀ (p q : R[X]), (p * q).degree < ↑n → (p * q).content = p.content * q.content
p q : R[X]
hpq : (p * q).degree < ↑(n + 1)
p0 : ¬p = 0
q0 : ¬q = 0
⊢ (p * q).content = p.content * q.content

Tactic:
rw [degree_eq_natDegree (mul_ne_zero p0 q0), Nat.cast_lt,
  Nat.lt_succ_iff_lt_or_eq, ← Nat.cast_lt (α := WithBot ℕ),
  ← degree_eq_natDegree (mul_ne_zero p0 q0), natDegree_mul p0 q0] at hpq

Result:
case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p✝ q✝ : R[X]
n : ℕ
ih : ∀ (p q : R[X]), (p * q).degree < ↑n → (p * q).content = p.content * q.content
p q : R[X]
hpq : (p * q).degree < ↑n ∨ p.natDegree + q.natDegree = n
p0 : ¬p = 0
q0 : ¬q = 0
⊢ (p * q).content = p.content * q.content

Proof state:
case zero
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p q : R[X]
⊢ ∀ (p q : R[X]), (p * q).degree < ↑0 → (p * q).content = p.content * q.content

Tactic:
intro p q hpq

Result:
case zero
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p✝ q✝ p q : R[X]
hpq : (p * q).degree < ↑0
⊢ (p * q).content = p.content * q.content

Proof state:
case neg.inr.a
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p✝ q✝ : R[X]
n : ℕ
ih : ∀ (p q : R[X]), (p * q).degree < ↑n → (p * q).content = p.content * q.content
p q : R[X]
p0 : ¬p = 0
q0 : ¬q = 0
heq : p.primPart.degree + q.primPart.degree = ↑n
⊢ p.primPart.eraseLead.degree < p.primPart.degree

Tactic:
apply degree_erase_lt p.primPart_ne_zero

Result:
no goals

Proof state:
case neg.inl
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p✝ q✝ : R[X]
n : ℕ
ih : ∀ (p q : R[X]), (p * q).degree < ↑n → (p * q).content = p.content * q.content
p q : R[X]
p0 : ¬p = 0
q0 : ¬q = 0
hlt : (p * q).degree < ↑n
⊢ (p * q).content = p.content * q.content

Tactic:
apply ih _ _ hlt

Result:
no goals

Proof state:
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p q : R[X]
⊢ (p * q).content = p.content * q.content

Tactic:
suffices h :
    ∀ (n : ℕ) (p q : R[X]), (p * q).degree < n → (p * q).content = p.content * q.content by
  apply h
  apply lt_of_le_of_lt degree_le_natDegree (WithBot.coe_lt_coe.2 (Nat.lt_succ_self _))

Result:
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p q : R[X]
⊢ ∀ (n : ℕ) (p q : R[X]), (p * q).degree < ↑n → (p * q).content = p.content * q.content

Proof state:
case neg.inr
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p✝ q✝ : R[X]
n : ℕ
ih : ∀ (p q : R[X]), (p * q).degree < ↑n → (p * q).content = p.content * q.content
p q : R[X]
p0 : ¬p = 0
q0 : ¬q = 0
heq : p.primPart.degree + q.primPart.degree = ↑n
⊢ (p * q).content = p.content * q.content

Tactic:
rw [p.eq_C_content_mul_primPart, q.eq_C_content_mul_primPart]

Result:
case neg.inr
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p✝ q✝ : R[X]
n : ℕ
ih : ∀ (p q : R[X]), (p * q).degree < ↑n → (p * q).content = p.content * q.content
p q : R[X]
p0 : ¬p = 0
q0 : ¬q = 0
heq : p.primPart.degree + q.primPart.degree = ↑n
⊢ (C p.content * p.primPart * (C q.content * q.primPart)).content =
    (C p.content * p.primPart).content * (C q.content * q.primPart).content

Proof state:
case neg.inr.a
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p✝ q✝ : R[X]
n : ℕ
ih : ∀ (p q : R[X]), (p * q).degree < ↑n → (p * q).content = p.content * q.content
p q : R[X]
p0 : ¬p = 0
q0 : ¬q = 0
heq : p.primPart.degree + q.primPart.degree = ↑n
⊢ (p.primPart.eraseLead * q.primPart).degree < ↑n

Tactic:
rw [← heq, degree_mul, WithBot.add_lt_add_iff_right]

Result:
case neg.inr.a
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p✝ q✝ : R[X]
n : ℕ
ih : ∀ (p q : R[X]), (p * q).degree < ↑n → (p * q).content = p.content * q.content
p q : R[X]
p0 : ¬p = 0
q0 : ¬q = 0
heq : p.primPart.degree + q.primPart.degree = ↑n
⊢ p.primPart.eraseLead.degree < p.primPart.degree

case neg.inr.a
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p✝ q✝ : R[X]
n : ℕ
ih : ∀ (p q : R[X]), (p * q).degree < ↑n → (p * q).content = p.content * q.content
p q : R[X]
p0 : ¬p = 0
q0 : ¬q = 0
heq : p.primPart.degree + q.primPart.degree = ↑n
⊢ q.primPart.degree ≠ ⊥

Proof state:
case neg.inr.a
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p✝ q✝ : R[X]
n : ℕ
ih : ∀ (p q : R[X]), (p * q).degree < ↑n → (p * q).content = p.content * q.content
p q : R[X]
p0 : ¬p = 0
q0 : ¬q = 0
heq : p.primPart.degree + q.primPart.degree = ↑n
⊢ (q.primPart.eraseLead * p.primPart).degree < ↑n

Tactic:
rw [mul_comm, ← heq, degree_mul, WithBot.add_lt_add_iff_left]

Result:
case neg.inr.a
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p✝ q✝ : R[X]
n : ℕ
ih : ∀ (p q : R[X]), (p * q).degree < ↑n → (p * q).content = p.content * q.content
p q : R[X]
p0 : ¬p = 0
q0 : ¬q = 0
heq : p.primPart.degree + q.primPart.degree = ↑n
⊢ q.primPart.eraseLead.degree < q.primPart.degree

case neg.inr.a
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p✝ q✝ : R[X]
n : ℕ
ih : ∀ (p q : R[X]), (p * q).degree < ↑n → (p * q).content = p.content * q.content
p q : R[X]
p0 : ¬p = 0
q0 : ¬q = 0
heq : p.primPart.degree + q.primPart.degree = ↑n
⊢ p.primPart.degree ≠ ⊥

Proof state:
case neg.inr
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p✝ q✝ : R[X]
n : ℕ
ih : ∀ (p q : R[X]), (p * q).degree < ↑n → (p * q).content = p.content * q.content
p q : R[X]
p0 : ¬p = 0
q0 : ¬q = 0
heq : p.primPart.degree + q.primPart.degree = ↑n
⊢ (q.primPart * p.primPart).content = 1

Tactic:
rw [← normalize_content, normalize_eq_one, isUnit_iff_dvd_one,
  content_eq_gcd_leadingCoeff_content_eraseLead, leadingCoeff_mul, gcd_comm]

Result:
case neg.inr
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p✝ q✝ : R[X]
n : ℕ
ih : ∀ (p q : R[X]), (p * q).degree < ↑n → (p * q).content = p.content * q.content
p q : R[X]
p0 : ¬p = 0
q0 : ¬q = 0
heq : p.primPart.degree + q.primPart.degree = ↑n
⊢ gcd (q.primPart * p.primPart).eraseLead.content (q.primPart.leadingCoeff * p.primPart.leadingCoeff) ∣ 1