Theorem: Polynomial.IsSeparableContraction.degree_eq
File: Mathlib/FieldTheory/SeparableDegree.lean

tactic: cases hF
state_before: F : Type u_1
inst✝ : Field F
q : ℕ
f : F[X]
hf : HasSeparableContraction q f
hF : ExpChar F q
g : F[X]
hg : IsSeparableContraction q f g
⊢ natDegree g = HasSeparableContraction.degree hf

tactic: rcases hg with ⟨_, m, hm⟩
state_before: case zero
F : Type u_1
inst✝¹ : Field F
f g : F[X]
inst✝ : CharZero F
hf : HasSeparableContraction 1 f
hg : IsSeparableContraction 1 f g
⊢ natDegree g = HasSeparableContraction.degree hf

tactic: rw [one_pow, expand_one] at hm
state_before: case zero.intro.intro
F : Type u_1
inst✝¹ : Field F
f g : F[X]
inst✝ : CharZero F
hf : HasSeparableContraction 1 f
left✝ : Separable g
m : ℕ
hm : ↑(expand F (1 ^ m)) g = f
⊢ natDegree g = HasSeparableContraction.degree hf

tactic: rw [hf.eq_degree, hm]
state_before: case zero.intro.intro
F : Type u_1
inst✝¹ : Field F
f g : F[X]
inst✝ : CharZero F
hf : HasSeparableContraction 1 f
left✝ : Separable g
m : ℕ
hm : g = f
⊢ natDegree g = HasSeparableContraction.degree hf

tactic: rcases hg with ⟨hg, m, hm⟩
state_before: case prime
F : Type u_1
inst✝ : Field F
q : ℕ
f : F[X]
hf : HasSeparableContraction q f
g : F[X]
hg : IsSeparableContraction q f g
hprime✝ : Nat.Prime q
hchar✝ : CharP F q
⊢ natDegree g = HasSeparableContraction.degree hf

tactic: let g' := Classical.choose hf
state_before: case prime.intro.intro
F : Type u_1
inst✝ : Field F
q : ℕ
f : F[X]
hf : HasSeparableContraction q f
g : F[X]
hprime✝ : Nat.Prime q
hchar✝ : CharP F q
hg : Separable g
m : ℕ
hm : ↑(expand F (q ^ m)) g = f
⊢ natDegree g = HasSeparableContraction.degree hf

tactic: cases' (Classical.choose_spec hf).2 with m' hm'
state_before: case prime.intro.intro
F : Type u_1
inst✝ : Field F
q : ℕ
f : F[X]
hf : HasSeparableContraction q f
g : F[X]
hprime✝ : Nat.Prime q
hchar✝ : CharP F q
hg : Separable g
m : ℕ
hm : ↑(expand F (q ^ m)) g = f
g' : F[X] := choose hf
⊢ natDegree g = HasSeparableContraction.degree hf

tactic: haveI : Fact q.Prime := ⟨by assumption⟩
state_before: case prime.intro.intro.intro
F : Type u_1
inst✝ : Field F
q : ℕ
f : F[X]
hf : HasSeparableContraction q f
g : F[X]
hprime✝ : Nat.Prime q
hchar✝ : CharP F q
hg : Separable g
m : ℕ
hm : ↑(expand F (q ^ m)) g = f
g' : F[X] := choose hf
m' : ℕ
hm' : ↑(expand F (q ^ m')) (choose hf) = f
⊢ natDegree g = HasSeparableContraction.degree hf

tactic: apply contraction_degree_eq_or_insep q g g' m m'
state_before: case prime.intro.intro.intro
F : Type u_1
inst✝ : Field F
q : ℕ
f : F[X]
hf : HasSeparableContraction q f
g : F[X]
hprime✝ : Nat.Prime q
hchar✝ : CharP F q
hg : Separable g
m : ℕ
hm : ↑(expand F (q ^ m)) g = f
g' : F[X] := choose hf
m' : ℕ
hm' : ↑(expand F (q ^ m')) (choose hf) = f
this : Fact (Nat.Prime q)
⊢ natDegree g = HasSeparableContraction.degree hf

tactic: rw [hm, hm']
state_before: case prime.intro.intro.intro.h_expand
F : Type u_1
inst✝ : Field F
q : ℕ
f : F[X]
hf : HasSeparableContraction q f
g : F[X]
hprime✝ : Nat.Prime q
hchar✝ : CharP F q
hg : Separable g
m : ℕ
hm : ↑(expand F (q ^ m)) g = f
g' : F[X] := choose hf
m' : ℕ
hm' : ↑(expand F (q ^ m')) (choose hf) = f
this : Fact (Nat.Prime q)
⊢ ↑(expand F (q ^ m)) g = ↑(expand F (q ^ m')) g'

case prime.intro.intro.intro.hg
F : Type u_1
inst✝ : Field F
q : ℕ
f : F[X]
hf : HasSeparableContraction q f
g : F[X]
hprime✝ : Nat.Prime q
hchar✝ : CharP F q
hg : Separable g
m : ℕ
hm : ↑(expand F (q ^ m)) g = f
g' : F[X] := choose hf
m' : ℕ
hm' : ↑(expand F (q ^ m')) (choose hf) = f
this : Fact (Nat.Prime q)
⊢ Separable g

case prime.intro.intro.intro.hg'
F : Type u_1
inst✝ : Field F
q : ℕ
f : F[X]
hf : HasSeparableContraction q f
g : F[X]
hprime✝ : Nat.Prime q
hchar✝ : CharP F q
hg : Separable g
m : ℕ
hm : ↑(expand F (q ^ m)) g = f
g' : F[X] := choose hf
m' : ℕ
hm' : ↑(expand F (q ^ m')) (choose hf) = f
this : Fact (Nat.Prime q)
⊢ Separable g'

tactic: exact hg
state_before: case prime.intro.intro.intro.hg
F : Type u_1
inst✝ : Field F
q : ℕ
f : F[X]
hf : HasSeparableContraction q f
g : F[X]
hprime✝ : Nat.Prime q
hchar✝ : CharP F q
hg : Separable g
m : ℕ
hm : ↑(expand F (q ^ m)) g = f
g' : F[X] := choose hf
m' : ℕ
hm' : ↑(expand F (q ^ m')) (choose hf) = f
this : Fact (Nat.Prime q)
⊢ Separable g

case prime.intro.intro.intro.hg'
F : Type u_1
inst✝ : Field F
q : ℕ
f : F[X]
hf : HasSeparableContraction q f
g : F[X]
hprime✝ : Nat.Prime q
hchar✝ : CharP F q
hg : Separable g
m : ℕ
hm : ↑(expand F (q ^ m)) g = f
g' : F[X] := choose hf
m' : ℕ
hm' : ↑(expand F (q ^ m')) (choose hf) = f
this : Fact (Nat.Prime q)
⊢ Separable g'

tactic: exact (Classical.choose_spec hf).1
state_before: case prime.intro.intro.intro.hg'
F : Type u_1
inst✝ : Field F
q : ℕ
f : F[X]
hf : HasSeparableContraction q f
g : F[X]
hprime✝ : Nat.Prime q
hchar✝ : CharP F q
hg : Separable g
m : ℕ
hm : ↑(expand F (q ^ m)) g = f
g' : F[X] := choose hf
m' : ℕ
hm' : ↑(expand F (q ^ m')) (choose hf) = f
this : Fact (Nat.Prime q)
⊢ Separable g'

tactic: assumption
state_before: F : Type u_1
inst✝ : Field F
q : ℕ
f : F[X]
hf : HasSeparableContraction q f
g : F[X]
hprime✝ : Nat.Prime q
hchar✝ : CharP F q
hg : Separable g
m : ℕ
hm : ↑(expand F (q ^ m)) g = f
g' : F[X] := choose hf
m' : ℕ
hm' : ↑(expand F (q ^ m')) (choose hf) = f
⊢ Nat.Prime q