Theorem: leadingCoeff_smul_normalizeScaleRoots
File: Mathlib/RingTheory/IntegralClosure/IsIntegralClosure/Basic.lean

Proof steps:
state_before: R : Type u_1
A : Type u_2
B : Type u_3
S : Type u_4
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ f : R →+* S
p✝ : R[X]
x : S
p : R[X]
⊢ p.leadingCoeff • normalizeScaleRoots p = p.scaleRoots p.leadingCoeff
state_after: case a
R : Type u_1
A : Type u_2
B : Type u_3
S : Type u_4
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ f : R →+* S
p✝ : R[X]
x : S
p : R[X]
n✝ : ℕ
⊢ (p.leadingCoeff • normalizeScaleRoots p).coeff n✝ = (p.scaleRoots p.leadingCoeff).coeff n✝
tactic: ext
state_before: case a
R : Type u_1
A : Type u_2
B : Type u_3
S : Type u_4
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ f : R →+* S
p✝ : R[X]
x : S
p : R[X]
n✝ : ℕ
⊢ (p.leadingCoeff • normalizeScaleRoots p).coeff n✝ = (p.scaleRoots p.leadingCoeff).coeff n✝
state_after: case a
R : Type u_1
A : Type u_2
B : Type u_3
S : Type u_4
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ f : R →+* S
p✝ : R[X]
x : S
p : R[X]
n✝ : ℕ
⊢ (if ¬p.coeff n✝ = 0 then
      if n✝ = p.natDegree then p.leadingCoeff • 1
      else p.leadingCoeff • (p.coeff n✝ * p.leadingCoeff ^ (p.natDegree - 1 - n✝))
    else 0) =
    p.coeff n✝ * p.leadingCoeff ^ (p.natDegree - n✝)
tactic: simp only [coeff_scaleRoots, normalizeScaleRoots, coeff_monomial, coeff_smul, Finset.smul_sum,
    Ne, Finset.sum_ite_eq', finset_sum_coeff, smul_ite, smul_zero, mem_support_iff]
state_before: case a
R : Type u_1
A : Type u_2
B : Type u_3
S : Type u_4
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ f : R →+* S
p✝ : R[X]
x : S
p : R[X]
n✝ : ℕ
⊢ (if ¬p.coeff n✝ = 0 then
      if n✝ = p.natDegree then p.leadingCoeff • 1
      else p.leadingCoeff • (p.coeff n✝ * p.leadingCoeff ^ (p.natDegree - 1 - n✝))
    else 0) =
    p.coeff n✝ * p.leadingCoeff ^ (p.natDegree - n✝)
state_after: case a
R : Type u_1
A : Type u_2
B : Type u_3
S : Type u_4
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ f : R →+* S
p✝ : R[X]
x : S
p : R[X]
n✝ : ℕ
⊢ (if p.coeff n✝ = 0 then 0
    else
      if n✝ = p.natDegree then p.leadingCoeff
      else p.leadingCoeff * (p.coeff n✝ * p.leadingCoeff ^ (p.natDegree - 1 - n✝))) =
    p.coeff n✝ * p.leadingCoeff ^ (p.natDegree - n✝)
tactic: simp only [tsub_le_iff_right, smul_eq_mul, mul_ite, mul_one, mul_zero,
    Finset.sum_ite_eq', mem_support_iff, ne_eq, ite_not]
state_before: case a
R : Type u_1
A : Type u_2
B : Type u_3
S : Type u_4
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ f : R →+* S
p✝ : R[X]
x : S
p : R[X]
n✝ : ℕ
⊢ (if p.coeff n✝ = 0 then 0
    else
      if n✝ = p.natDegree then p.leadingCoeff
      else p.leadingCoeff * (p.coeff n✝ * p.leadingCoeff ^ (p.natDegree - 1 - n✝))) =
    p.coeff n✝ * p.leadingCoeff ^ (p.natDegree - n✝)
state_after: case pos
R : Type u_1
A : Type u_2
B : Type u_3
S : Type u_4
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ f : R →+* S
p✝ : R[X]
x : S
p : R[X]
n✝ : ℕ
h₁ : p.coeff n✝ = 0
⊢ 0 = p.coeff n✝ * p.leadingCoeff ^ (p.natDegree - n✝)

case pos
R : Type u_1
A : Type u_2
B : Type u_3
S : Type u_4
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ f : R →+* S
p✝ : R[X]
x : S
p : R[X]
n✝ : ℕ
h₁ : ¬p.coeff n✝ = 0
h₂ : n✝ = p.natDegree
⊢ p.leadingCoeff = p.coeff n✝ * p.leadingCoeff ^ (p.natDegree - n✝)

case neg
R : Type u_1
A : Type u_2
B : Type u_3
S : Type u_4
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ f : R →+* S
p✝ : R[X]
x : S
p : R[X]
n✝ : ℕ
h₁ : ¬p.coeff n✝ = 0
h₂ : ¬n✝ = p.natDegree
⊢ p.leadingCoeff * (p.coeff n✝ * p.leadingCoeff ^ (p.natDegree - 1 - n✝)) =
    p.coeff n✝ * p.leadingCoeff ^ (p.natDegree - n✝)
tactic: split_ifs with h₁ h₂