Theorem: IsSepClosed.of_exists_root
File: Mathlib/FieldTheory/IsSepClosed.lean

Proof steps:
state_before: k : Type u
inst✝¹ : Field k
K : Type v
inst✝ : Field K
H : ∀ (p : k[X]), p.Monic → Irreducible p → p.Separable → ∃ x, eval x p = 0
⊢ IsSepClosed k
state_after: k : Type u
inst✝¹ : Field k
K : Type v
inst✝ : Field K
H : ∀ (p : k[X]), p.Monic → Irreducible p → p.Separable → ∃ x, eval x p = 0
p : k[X]
hsep : p.Separable
⊢ ∀ {g : k[X]}, Irreducible g → g ∣ map (RingHom.id k) p → g.degree = 1
tactic: refine ⟨fun p hsep ↦ Or.inr ?_⟩
state_before: k : Type u
inst✝¹ : Field k
K : Type v
inst✝ : Field K
H : ∀ (p : k[X]), p.Monic → Irreducible p → p.Separable → ∃ x, eval x p = 0
p : k[X]
hsep : p.Separable
⊢ ∀ {g : k[X]}, Irreducible g → g ∣ map (RingHom.id k) p → g.degree = 1
state_after: k : Type u
inst✝¹ : Field k
K : Type v
inst✝ : Field K
H : ∀ (p : k[X]), p.Monic → Irreducible p → p.Separable → ∃ x, eval x p = 0
p : k[X]
hsep : p.Separable
q : k[X]
hq : Irreducible q
hdvd : q ∣ map (RingHom.id k) p
⊢ q.degree = 1
tactic: intro q hq hdvd
state_before: k : Type u
inst✝¹ : Field k
K : Type v
inst✝ : Field K
H : ∀ (p : k[X]), p.Monic → Irreducible p → p.Separable → ∃ x, eval x p = 0
p : k[X]
hsep : p.Separable
q : k[X]
hq : Irreducible q
hdvd : q ∣ map (RingHom.id k) p
⊢ q.degree = 1
state_after: k : Type u
inst✝¹ : Field k
K : Type v
inst✝ : Field K
H : ∀ (p : k[X]), p.Monic → Irreducible p → p.Separable → ∃ x, eval x p = 0
p : k[X]
hsep : p.Separable
q : k[X]
hq : Irreducible q
hdvd : q ∣ p
⊢ q.degree = 1
tactic: simp only [map_id] at hdvd
state_before: k : Type u
inst✝¹ : Field k
K : Type v
inst✝ : Field K
H : ∀ (p : k[X]), p.Monic → Irreducible p → p.Separable → ∃ x, eval x p = 0
p : k[X]
hsep : p.Separable
q : k[X]
hq : Irreducible q
hdvd : q ∣ p
⊢ q.degree = 1
state_after: k : Type u
inst✝¹ : Field k
K : Type v
inst✝ : Field K
H : ∀ (p : k[X]), p.Monic → Irreducible p → p.Separable → ∃ x, eval x p = 0
p : k[X]
hsep : p.Separable
q : k[X]
hq : Irreducible q
hdvd : q ∣ p
hlc : IsUnit q.leadingCoeff⁻¹
⊢ q.degree = 1
tactic: have hlc : IsUnit (leadingCoeff q)⁻¹ := IsUnit.inv <| Ne.isUnit <|
    leadingCoeff_ne_zero.2 <| Irreducible.ne_zero hq
state_before: k : Type u
inst✝¹ : Field k
K : Type v
inst✝ : Field K
H : ∀ (p : k[X]), p.Monic → Irreducible p → p.Separable → ∃ x, eval x p = 0
p : k[X]
hsep : p.Separable
q : k[X]
hq : Irreducible q
hdvd : q ∣ p
hlc : IsUnit q.leadingCoeff⁻¹
⊢ q.degree = 1
state_after: k : Type u
inst✝¹ : Field k
K : Type v
inst✝ : Field K
H : ∀ (p : k[X]), p.Monic → Irreducible p → p.Separable → ∃ x, eval x p = 0
p : k[X]
hsep : p.Separable
q : k[X]
hq : Irreducible q
hdvd : q ∣ p
hlc : IsUnit q.leadingCoeff⁻¹
hsep' : (q * C q.leadingCoeff⁻¹).Separable
⊢ q.degree = 1
tactic: have hsep' : Separable (q * C (leadingCoeff q)⁻¹) :=
    Separable.mul (Separable.of_dvd hsep hdvd) ((separable_C _).2 hlc)
    (by simpa only [← isCoprime_mul_unit_right_right (isUnit_C.2 hlc) q 1, one_mul]
      using isCoprime_one_right (x := q))
state_before: k : Type u
inst✝¹ : Field k
K : Type v
inst✝ : Field K
H : ∀ (p : k[X]), p.Monic → Irreducible p → p.Separable → ∃ x, eval x p = 0
p : k[X]
hsep : p.Separable
q : k[X]
hq : Irreducible q
hdvd : q ∣ p
hlc : IsUnit q.leadingCoeff⁻¹
hsep' : (q * C q.leadingCoeff⁻¹).Separable
⊢ q.degree = 1
state_after: k : Type u
inst✝¹ : Field k
K : Type v
inst✝ : Field K
H : ∀ (p : k[X]), p.Monic → Irreducible p → p.Separable → ∃ x, eval x p = 0
p : k[X]
hsep : p.Separable
q : k[X]
hq : Irreducible q
hdvd : q ∣ p
hlc : IsUnit q.leadingCoeff⁻¹
hsep' : (q * C q.leadingCoeff⁻¹).Separable
hirr' : Irreducible q
⊢ q.degree = 1
tactic: have hirr' := hq
state_before: k : Type u
inst✝¹ : Field k
K : Type v
inst✝ : Field K
H : ∀ (p : k[X]), p.Monic → Irreducible p → p.Separable → ∃ x, eval x p = 0
p : k[X]
hsep : p.Separable
q : k[X]
hq : Irreducible q
hdvd : q ∣ p
hlc : IsUnit q.leadingCoeff⁻¹
hsep' : (q * C q.leadingCoeff⁻¹).Separable
hirr' : Irreducible q
⊢ q.degree = 1
state_after: k : Type u
inst✝¹ : Field k
K : Type v
inst✝ : Field K
H : ∀ (p : k[X]), p.Monic → Irreducible p → p.Separable → ∃ x, eval x p = 0
p : k[X]
hsep : p.Separable
q : k[X]
hq : Irreducible q
hdvd : q ∣ p
hlc : IsUnit q.leadingCoeff⁻¹
hsep' : (q * C q.leadingCoeff⁻¹).Separable
hirr' : Irreducible (q * C q.leadingCoeff⁻¹)
⊢ q.degree = 1
tactic: rw [← irreducible_mul_isUnit (isUnit_C.2 hlc)] at hirr'
state_before: k : Type u
inst✝¹ : Field k
K : Type v
inst✝ : Field K
H : ∀ (p : k[X]), p.Monic → Irreducible p → p.Separable → ∃ x, eval x p = 0
p : k[X]
hsep : p.Separable
q : k[X]
hq : Irreducible q
hdvd : q ∣ p
hlc : IsUnit q.leadingCoeff⁻¹
hsep' : (q * C q.leadingCoeff⁻¹).Separable
hirr' : Irreducible (q * C q.leadingCoeff⁻¹)
⊢ q.degree = 1
state_after: case intro
k : Type u
inst✝¹ : Field k
K : Type v
inst✝ : Field K
H : ∀ (p : k[X]), p.Monic → Irreducible p → p.Separable → ∃ x, eval x p = 0
p : k[X]
hsep : p.Separable
q : k[X]
hq : Irreducible q
hdvd : q ∣ p
hlc : IsUnit q.leadingCoeff⁻¹
hsep' : (q * C q.leadingCoeff⁻¹).Separable
hirr' : Irreducible (q * C q.leadingCoeff⁻¹)
x : k
hx : eval x (q * C q.leadingCoeff⁻¹) = 0
⊢ q.degree = 1
tactic: obtain ⟨x, hx⟩ := H (q * C (leadingCoeff q)⁻¹) (monic_mul_leadingCoeff_inv hq.ne_zero) hirr' hsep'
state_before: case intro
k : Type u
inst✝¹ : Field k
K : Type v
inst✝ : Field K
H : ∀ (p : k[X]), p.Monic → Irreducible p → p.Separable → ∃ x, eval x p = 0
p : k[X]
hsep : p.Separable
q : k[X]
hq : Irreducible q
hdvd : q ∣ p
hlc : IsUnit q.leadingCoeff⁻¹
hsep' : (q * C q.leadingCoeff⁻¹).Separable
hirr' : Irreducible (q * C q.leadingCoeff⁻¹)
x : k
hx : eval x (q * C q.leadingCoeff⁻¹) = 0
⊢ q.degree = 1
state_after: no goals
tactic: exact degree_mul_leadingCoeff_inv q hq.ne_zero ▸ degree_eq_one_of_irreducible_of_root hirr' hx