Theorem: Polynomial.content_X_mul
File: Mathlib/RingTheory/Polynomial/Content.lean

tactic: rw [content, content, Finset.gcd_def, Finset.gcd_def]
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
⊢ content (X * p) = content p

tactic: refine' congr rfl _
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
⊢ Multiset.gcd (Multiset.map (coeff (X * p)) (support (X * p)).val) =
    Multiset.gcd (Multiset.map (coeff p) (support p).val)

tactic: rw [h]
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
h : support (X * p) = Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)
⊢ Multiset.map (coeff (X * p)) (support (X * p)).val = Multiset.map (coeff p) (support p).val

tactic: simp only [Finset.map_val, Function.comp_apply, Function.Embedding.coeFn_mk, Multiset.map_map]
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
h : support (X * p) = Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)
⊢ Multiset.map (coeff (X * p)) (Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)).val =
    Multiset.map (coeff p) (support p).val

tactic: refine' congr (congr rfl _) rfl
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
h : support (X * p) = Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)
⊢ Multiset.map (fun x => coeff (X * p) (Nat.succ x)) (support p).val = Multiset.map (coeff p) (support p).val

tactic: ext a
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
h : support (X * p) = Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)
⊢ (fun x => coeff (X * p) (Nat.succ x)) = coeff p

tactic: rw [mul_comm]
state_before: case h
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
h : support (X * p) = Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)
a : ℕ
⊢ coeff (X * p) (Nat.succ a) = coeff p a

tactic: simp [coeff_mul_X]
state_before: case h
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
h : support (X * p) = Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)
a : ℕ
⊢ coeff (p * X) (Nat.succ a) = coeff p a

tactic: ext a
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
⊢ support (X * p) = Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)

tactic: simp only [exists_prop, Finset.mem_map, Function.Embedding.coeFn_mk, Ne.def, mem_support_iff]
state_before: case a
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
a : ℕ
⊢ a ∈ support (X * p) ↔ a ∈ Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)

tactic: cases' a with a
state_before: case a
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
a : ℕ
⊢ ¬coeff (X * p) a = 0 ↔ ∃ a_1, ¬coeff p a_1 = 0 ∧ Nat.succ a_1 = a

tactic: rw [mul_comm, coeff_mul_X]
state_before: case a.succ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
a : ℕ
⊢ ¬coeff (X * p) (Nat.succ a) = 0 ↔ ∃ a_1, ¬coeff p a_1 = 0 ∧ Nat.succ a_1 = Nat.succ a

tactic: constructor
state_before: case a.succ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
a : ℕ
⊢ ¬coeff p a = 0 ↔ ∃ a_1, ¬coeff p a_1 = 0 ∧ Nat.succ a_1 = Nat.succ a

tactic: simp [coeff_X_mul_zero, Nat.succ_ne_zero]
state_before: case a.zero
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
⊢ ¬coeff (X * p) Nat.zero = 0 ↔ ∃ a, ¬coeff p a = 0 ∧ Nat.succ a = Nat.zero

tactic: intro h
state_before: case a.succ.mp
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
a : ℕ
⊢ ¬coeff p a = 0 → ∃ a_2, ¬coeff p a_2 = 0 ∧ Nat.succ a_2 = Nat.succ a

tactic: use a
state_before: case a.succ.mp
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
a : ℕ
h : ¬coeff p a = 0
⊢ ∃ a_1, ¬coeff p a_1 = 0 ∧ Nat.succ a_1 = Nat.succ a

tactic: simp [h]
state_before: case a.succ.mp
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
a : ℕ
h : ¬coeff p a = 0
⊢ ¬coeff p a = 0 ∧ Nat.succ a = Nat.succ a

tactic: rintro ⟨b, ⟨h1, h2⟩⟩
state_before: case a.succ.mpr
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
a : ℕ
⊢ (∃ a_1, ¬coeff p a_1 = 0 ∧ Nat.succ a_1 = Nat.succ a) → ¬coeff p a = 0

tactic: rw [← Nat.succ_injective h2]
state_before: case a.succ.mpr.intro.intro
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
a b : ℕ
h1 : ¬coeff p b = 0
h2 : Nat.succ b = Nat.succ a
⊢ ¬coeff p a = 0

tactic: apply h1
state_before: case a.succ.mpr.intro.intro
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
a b : ℕ
h1 : ¬coeff p b = 0
h2 : Nat.succ b = Nat.succ a
⊢ ¬coeff p b = 0