Theorem: Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly
File: Mathlib/FieldTheory/IsAlgClosed/Basic.lean

tactic: have hFK := Algebra.isAlgebraic_iff_isIntegral.1 hK
state_before: k : Type u
inst✝⁶ : Field k
F : Type u_1
K : Type u_2
A : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K
inst✝³ : Field A
inst✝² : IsAlgClosed A
inst✝¹ : Algebra F K
hK : IsAlgebraic F K
inst✝ : Algebra F A
x : K
⊢ (Set.range fun ψ => ↑ψ x) = rootSet (minpoly F x) A

tactic: ext a
state_before: k : Type u
inst✝⁶ : Field k
F : Type u_1
K : Type u_2
A : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K
inst✝³ : Field A
inst✝² : IsAlgClosed A
inst✝¹ : Algebra F K
hK : IsAlgebraic F K
inst✝ : Algebra F A
x : K
hFK : Algebra.IsIntegral F K
⊢ (Set.range fun ψ => ↑ψ x) = rootSet (minpoly F x) A

tactic: rw [mem_rootSet_of_ne (minpoly.ne_zero (hFK x))]
state_before: case h
k : Type u
inst✝⁶ : Field k
F : Type u_1
K : Type u_2
A : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K
inst✝³ : Field A
inst✝² : IsAlgClosed A
inst✝¹ : Algebra F K
hK : IsAlgebraic F K
inst✝ : Algebra F A
x : K
hFK : Algebra.IsIntegral F K
a : (fun x => A) x
⊢ (a ∈ Set.range fun ψ => ↑ψ x) ↔ a ∈ rootSet (minpoly F x) A

tactic: refine' ⟨_, fun ha => _⟩
state_before: case h
k : Type u
inst✝⁶ : Field k
F : Type u_1
K : Type u_2
A : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K
inst✝³ : Field A
inst✝² : IsAlgClosed A
inst✝¹ : Algebra F K
hK : IsAlgebraic F K
inst✝ : Algebra F A
x : K
hFK : Algebra.IsIntegral F K
a : (fun x => A) x
⊢ (a ∈ Set.range fun ψ => ↑ψ x) ↔ ↑(aeval a) (minpoly F x) = 0

tactic: let Fx := AdjoinRoot (minpoly F x)
state_before: case h.refine'_2
k : Type u
inst✝⁶ : Field k
F : Type u_1
K : Type u_2
A : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K
inst✝³ : Field A
inst✝² : IsAlgClosed A
inst✝¹ : Algebra F K
hK : IsAlgebraic F K
inst✝ : Algebra F A
x : K
hFK : Algebra.IsIntegral F K
a : (fun x => A) x
ha : ↑(aeval a) (minpoly F x) = 0
⊢ a ∈ Set.range fun ψ => ↑ψ x

tactic: have hx : aeval x (minpoly F x) = 0 := minpoly.aeval F x
state_before: case h.refine'_2
k : Type u
inst✝⁶ : Field k
F : Type u_1
K : Type u_2
A : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K
inst✝³ : Field A
inst✝² : IsAlgClosed A
inst✝¹ : Algebra F K
hK : IsAlgebraic F K
inst✝ : Algebra F A
x : K
hFK : Algebra.IsIntegral F K
a : (fun x => A) x
ha : ↑(aeval a) (minpoly F x) = 0
Fx : Type u_1 := AdjoinRoot (minpoly F x)
⊢ a ∈ Set.range fun ψ => ↑ψ x

tactic: letI : Algebra Fx A := (AdjoinRoot.lift (algebraMap F A) a ha).toAlgebra
state_before: case h.refine'_2
k : Type u
inst✝⁶ : Field k
F : Type u_1
K : Type u_2
A : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K
inst✝³ : Field A
inst✝² : IsAlgClosed A
inst✝¹ : Algebra F K
hK : IsAlgebraic F K
inst✝ : Algebra F A
x : K
hFK : Algebra.IsIntegral F K
a : (fun x => A) x
ha : ↑(aeval a) (minpoly F x) = 0
Fx : Type u_1 := AdjoinRoot (minpoly F x)
hx : ↑(aeval x) (minpoly F x) = 0
⊢ a ∈ Set.range fun ψ => ↑ψ x

tactic: letI : Algebra Fx K := (AdjoinRoot.lift (algebraMap F K) x hx).toAlgebra
state_before: case h.refine'_2
k : Type u
inst✝⁶ : Field k
F : Type u_1
K : Type u_2
A : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K
inst✝³ : Field A
inst✝² : IsAlgClosed A
inst✝¹ : Algebra F K
hK : IsAlgebraic F K
inst✝ : Algebra F A
x : K
hFK : Algebra.IsIntegral F K
a : (fun x => A) x
ha : ↑(aeval a) (minpoly F x) = 0
Fx : Type u_1 := AdjoinRoot (minpoly F x)
hx : ↑(aeval x) (minpoly F x) = 0
this : Algebra Fx A := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F A) a ha)
⊢ a ∈ Set.range fun ψ => ↑ψ x

tactic: haveI : IsScalarTower F Fx A := IsScalarTower.of_ring_hom (AdjoinRoot.liftHom _ a ha)
state_before: case h.refine'_2
k : Type u
inst✝⁶ : Field k
F : Type u_1
K : Type u_2
A : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K
inst✝³ : Field A
inst✝² : IsAlgClosed A
inst✝¹ : Algebra F K
hK : IsAlgebraic F K
inst✝ : Algebra F A
x : K
hFK : Algebra.IsIntegral F K
a : (fun x => A) x
ha : ↑(aeval a) (minpoly F x) = 0
Fx : Type u_1 := AdjoinRoot (minpoly F x)
hx : ↑(aeval x) (minpoly F x) = 0
this✝ : Algebra Fx A := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F A) a ha)
this : Algebra Fx K := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F K) x hx)
⊢ a ∈ Set.range fun ψ => ↑ψ x

tactic: haveI : IsScalarTower F Fx K := IsScalarTower.of_ring_hom (AdjoinRoot.liftHom _ x hx)
state_before: case h.refine'_2
k : Type u
inst✝⁶ : Field k
F : Type u_1
K : Type u_2
A : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K
inst✝³ : Field A
inst✝² : IsAlgClosed A
inst✝¹ : Algebra F K
hK : IsAlgebraic F K
inst✝ : Algebra F A
x : K
hFK : Algebra.IsIntegral F K
a : (fun x => A) x
ha : ↑(aeval a) (minpoly F x) = 0
Fx : Type u_1 := AdjoinRoot (minpoly F x)
hx : ↑(aeval x) (minpoly F x) = 0
this✝¹ : Algebra Fx A := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F A) a ha)
this✝ : Algebra Fx K := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F K) x hx)
this : IsScalarTower F Fx A
⊢ a ∈ Set.range fun ψ => ↑ψ x

tactic: haveI : Fact (Irreducible <| minpoly F x) := ⟨minpoly.irreducible <| hFK x⟩
state_before: case h.refine'_2
k : Type u
inst✝⁶ : Field k
F : Type u_1
K : Type u_2
A : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K
inst✝³ : Field A
inst✝² : IsAlgClosed A
inst✝¹ : Algebra F K
hK : IsAlgebraic F K
inst✝ : Algebra F A
x : K
hFK : Algebra.IsIntegral F K
a : (fun x => A) x
ha : ↑(aeval a) (minpoly F x) = 0
Fx : Type u_1 := AdjoinRoot (minpoly F x)
hx : ↑(aeval x) (minpoly F x) = 0
this✝² : Algebra Fx A := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F A) a ha)
this✝¹ : Algebra Fx K := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F K) x hx)
this✝ : IsScalarTower F Fx A
this : IsScalarTower F Fx K
⊢ a ∈ Set.range fun ψ => ↑ψ x

tactic: let ψ₀ : K →ₐ[Fx] A := IsAlgClosed.lift (Algebra.isAlgebraic_of_larger_base F Fx hK)
state_before: case h.refine'_2
k : Type u
inst✝⁶ : Field k
F : Type u_1
K : Type u_2
A : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K
inst✝³ : Field A
inst✝² : IsAlgClosed A
inst✝¹ : Algebra F K
hK : IsAlgebraic F K
inst✝ : Algebra F A
x : K
hFK : Algebra.IsIntegral F K
a : (fun x => A) x
ha : ↑(aeval a) (minpoly F x) = 0
Fx : Type u_1 := AdjoinRoot (minpoly F x)
hx : ↑(aeval x) (minpoly F x) = 0
this✝³ : Algebra Fx A := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F A) a ha)
this✝² : Algebra Fx K := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F K) x hx)
this✝¹ : IsScalarTower F Fx A
this✝ : IsScalarTower F Fx K
this : Fact (Irreducible (minpoly F x))
⊢ a ∈ Set.range fun ψ => ↑ψ x

tactic: exact
  ⟨ψ₀.restrictScalars F,
    (congr_arg ψ₀ (AdjoinRoot.lift_root hx).symm).trans <|
      (ψ₀.commutes _).trans <| AdjoinRoot.lift_root ha⟩
state_before: case h.refine'_2
k : Type u
inst✝⁶ : Field k
F : Type u_1
K : Type u_2
A : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K
inst✝³ : Field A
inst✝² : IsAlgClosed A
inst✝¹ : Algebra F K
hK : IsAlgebraic F K
inst✝ : Algebra F A
x : K
hFK : Algebra.IsIntegral F K
a : (fun x => A) x
ha : ↑(aeval a) (minpoly F x) = 0
Fx : Type u_1 := AdjoinRoot (minpoly F x)
hx : ↑(aeval x) (minpoly F x) = 0
this✝³ : Algebra Fx A := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F A) a ha)
this✝² : Algebra Fx K := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F K) x hx)
this✝¹ : IsScalarTower F Fx A
this✝ : IsScalarTower F Fx K
this : Fact (Irreducible (minpoly F x))
ψ₀ : K →ₐ[Fx] A := IsAlgClosed.lift (_ : IsAlgebraic Fx K)
⊢ a ∈ Set.range fun ψ => ↑ψ x

tactic: rintro ⟨ψ, rfl⟩
state_before: case h.refine'_1
k : Type u
inst✝⁶ : Field k
F : Type u_1
K : Type u_2
A : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K
inst✝³ : Field A
inst✝² : IsAlgClosed A
inst✝¹ : Algebra F K
hK : IsAlgebraic F K
inst✝ : Algebra F A
x : K
hFK : Algebra.IsIntegral F K
a : (fun x => A) x
⊢ (a ∈ Set.range fun ψ => ↑ψ x) → ↑(aeval a) (minpoly F x) = 0

tactic: rw [aeval_algHom_apply ψ x, minpoly.aeval, map_zero]
state_before: case h.refine'_1.intro
k : Type u
inst✝⁶ : Field k
F : Type u_1
K : Type u_2
A : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K
inst✝³ : Field A
inst✝² : IsAlgClosed A
inst✝¹ : Algebra F K
hK : IsAlgebraic F K
inst✝ : Algebra F A
x : K
hFK : Algebra.IsIntegral F K
ψ : K →ₐ[F] A
⊢ ↑(aeval ((fun ψ => ↑ψ x) ψ)) (minpoly F x) = 0