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

tactic: refine fun x => ⟨-(minpoly k x).coeff 0, ?_⟩
state_before: k : Type u
inst✝⁴ : Field k
K : Type v
inst✝³ : Field K
inst✝² : IsSepClosed k
inst✝¹ : Algebra k K
inst✝ : IsSeparable k K
⊢ Function.Surjective ⇑(algebraMap k K)
state_after: k : Type u
inst✝⁴ : Field k
K : Type v
inst✝³ : Field K
inst✝² : IsSepClosed k
inst✝¹ : Algebra k K
inst✝ : IsSeparable k K
x : K
⊢ (algebraMap k K) (-(minpoly k x).coeff 0) = x

tactic: have hq : (minpoly k x).leadingCoeff = 1 := minpoly.monic (IsSeparable.isIntegral k x)
state_before: k : Type u
inst✝⁴ : Field k
K : Type v
inst✝³ : Field K
inst✝² : IsSepClosed k
inst✝¹ : Algebra k K
inst✝ : IsSeparable k K
x : K
⊢ (algebraMap k K) (-(minpoly k x).coeff 0) = x
state_after: k : Type u
inst✝⁴ : Field k
K : Type v
inst✝³ : Field K
inst✝² : IsSepClosed k
inst✝¹ : Algebra k K
inst✝ : IsSeparable k K
x : K
hq : (minpoly k x).leadingCoeff = 1
⊢ (algebraMap k K) (-(minpoly k x).coeff 0) = x

tactic: have hsep : (minpoly k x).Separable := IsSeparable.separable k x
state_before: k : Type u
inst✝⁴ : Field k
K : Type v
inst✝³ : Field K
inst✝² : IsSepClosed k
inst✝¹ : Algebra k K
inst✝ : IsSeparable k K
x : K
hq : (minpoly k x).leadingCoeff = 1
⊢ (algebraMap k K) (-(minpoly k x).coeff 0) = x
state_after: k : Type u
inst✝⁴ : Field k
K : Type v
inst✝³ : Field K
inst✝² : IsSepClosed k
inst✝¹ : Algebra k K
inst✝ : IsSeparable k K
x : K
hq : (minpoly k x).leadingCoeff = 1
hsep : (minpoly k x).Separable
⊢ (algebraMap k K) (-(minpoly k x).coeff 0) = x

tactic: have h : (minpoly k x).degree = 1 :=
  degree_eq_one_of_irreducible k (minpoly.irreducible (IsSeparable.isIntegral k x)) hsep
state_before: k : Type u
inst✝⁴ : Field k
K : Type v
inst✝³ : Field K
inst✝² : IsSepClosed k
inst✝¹ : Algebra k K
inst✝ : IsSeparable k K
x : K
hq : (minpoly k x).leadingCoeff = 1
hsep : (minpoly k x).Separable
⊢ (algebraMap k K) (-(minpoly k x).coeff 0) = x
state_after: k : Type u
inst✝⁴ : Field k
K : Type v
inst✝³ : Field K
inst✝² : IsSepClosed k
inst✝¹ : Algebra k K
inst✝ : IsSeparable k K
x : K
hq : (minpoly k x).leadingCoeff = 1
hsep : (minpoly k x).Separable
h : (minpoly k x).degree = 1
⊢ (algebraMap k K) (-(minpoly k x).coeff 0) = x

tactic: have : aeval x (minpoly k x) = 0 := minpoly.aeval k x
state_before: k : Type u
inst✝⁴ : Field k
K : Type v
inst✝³ : Field K
inst✝² : IsSepClosed k
inst✝¹ : Algebra k K
inst✝ : IsSeparable k K
x : K
hq : (minpoly k x).leadingCoeff = 1
hsep : (minpoly k x).Separable
h : (minpoly k x).degree = 1
⊢ (algebraMap k K) (-(minpoly k x).coeff 0) = x
state_after: k : Type u
inst✝⁴ : Field k
K : Type v
inst✝³ : Field K
inst✝² : IsSepClosed k
inst✝¹ : Algebra k K
inst✝ : IsSeparable k K
x : K
hq : (minpoly k x).leadingCoeff = 1
hsep : (minpoly k x).Separable
h : (minpoly k x).degree = 1
this : (aeval x) (minpoly k x) = 0
⊢ (algebraMap k K) (-(minpoly k x).coeff 0) = x

tactic: rw [eq_X_add_C_of_degree_eq_one h, hq, C_1, one_mul, aeval_add, aeval_X, aeval_C,
  add_eq_zero_iff_eq_neg] at this
state_before: k : Type u
inst✝⁴ : Field k
K : Type v
inst✝³ : Field K
inst✝² : IsSepClosed k
inst✝¹ : Algebra k K
inst✝ : IsSeparable k K
x : K
hq : (minpoly k x).leadingCoeff = 1
hsep : (minpoly k x).Separable
h : (minpoly k x).degree = 1
this : (aeval x) (minpoly k x) = 0
⊢ (algebraMap k K) (-(minpoly k x).coeff 0) = x
state_after: k : Type u
inst✝⁴ : Field k
K : Type v
inst✝³ : Field K
inst✝² : IsSepClosed k
inst✝¹ : Algebra k K
inst✝ : IsSeparable k K
x : K
hq : (minpoly k x).leadingCoeff = 1
hsep : (minpoly k x).Separable
h : (minpoly k x).degree = 1
this : x = -(algebraMap k K) ((minpoly k x).coeff 0)
⊢ (algebraMap k K) (-(minpoly k x).coeff 0) = x

tactic: exact (RingHom.map_neg (algebraMap k K) ((minpoly k x).coeff 0)).symm ▸ this.symm
state_before: k : Type u
inst✝⁴ : Field k
K : Type v
inst✝³ : Field K
inst✝² : IsSepClosed k
inst✝¹ : Algebra k K
inst✝ : IsSeparable k K
x : K
hq : (minpoly k x).leadingCoeff = 1
hsep : (minpoly k x).Separable
h : (minpoly k x).degree = 1
this : x = -(algebraMap k K) ((minpoly k x).coeff 0)
⊢ (algebraMap k K) (-(minpoly k x).coeff 0) = x
state_after: no goals