-- Mathlib/RingTheory/MvPolynomial/MonomialOrder.lean
theorem degree_pow [IsReduced R] (f : MvPolynomial σ R) (n : ℕ) :
    m.degree (f ^ n) = n • m.degree f

Proof state:
case pos
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : f = 0
hn : n = 0
⊢ m.degree (0 ^ n) = 0

Tactic:
rw [hn, pow_zero, degree_one]

Result:
no goals

Proof state:
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : ¬f = 0
a✝ : Nontrivial R
⊢ m.degree (f ^ n) = n • m.degree f

Tactic:
apply degree_pow_of_pow_leadingCoeff_ne_zero

Result:
case hf
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : ¬f = 0
a✝ : Nontrivial R
⊢ m.leadingCoeff f ^ n ≠ 0

Proof state:
case pos
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : f = 0
⊢ m.degree (0 ^ n) = 0

Tactic:
by_cases hn : n = 0

Result:
case pos
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : f = 0
hn : n = 0
⊢ m.degree (0 ^ n) = 0

case neg
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : f = 0
hn : ¬n = 0
⊢ m.degree (0 ^ n) = 0

Proof state:
case neg
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : ¬f = 0
⊢ m.degree (f ^ n) = n • m.degree f

Tactic:
nontriviality R

Result:
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : ¬f = 0
a✝ : Nontrivial R
⊢ m.degree (f ^ n) = n • m.degree f

Proof state:
case neg
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : f = 0
hn : ¬n = 0
⊢ m.degree (0 ^ n) = 0

Tactic:
rw [zero_pow hn, degree_zero]

Result:
no goals

Proof state:
case hf.h
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : ¬f = 0
a✝ : Nontrivial R
⊢ m.leadingCoeff f ≠ 0

Tactic:
rw [leadingCoeff_ne_zero_iff]

Result:
case hf.h
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : ¬f = 0
a✝ : Nontrivial R
⊢ f ≠ 0

Proof state:
case hf.h
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : ¬f = 0
a✝ : Nontrivial R
⊢ f ≠ 0

Tactic:
exact hf

Result:
no goals

Proof state:
case hf
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : ¬f = 0
a✝ : Nontrivial R
⊢ m.leadingCoeff f ^ n ≠ 0

Tactic:
apply IsReduced.pow_ne_zero

Result:
case hf.h
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : ¬f = 0
a✝ : Nontrivial R
⊢ m.leadingCoeff f ≠ 0

Proof state:
case pos
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : f = 0
⊢ m.degree (f ^ n) = n • m.degree f

Tactic:
rw [hf, degree_zero, smul_zero]

Result:
case pos
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : f = 0
⊢ m.degree (0 ^ n) = 0

Proof state:
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
⊢ m.degree (f ^ n) = n • m.degree f

Tactic:
by_cases hf : f = 0

Result:
case pos
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : f = 0
⊢ m.degree (f ^ n) = n • m.degree f

case neg
σ : Type u_1
m : MonomialOrder σ
R : Type u_2
inst✝¹ : CommSemiring R
inst✝ : IsReduced R
f : MvPolynomial σ R
n : ℕ
hf : ¬f = 0
⊢ m.degree (f ^ n) = n • m.degree f