Theorem: IntermediateField.adjoin_minpoly_coeff_of_exists_primitive_element
File: Mathlib/FieldTheory/Adjoin.lean

Proof steps:
state_before: F : Type u_1
inst✝⁷ : Field F
E : Type u_2
inst✝⁶ : Field E
inst✝⁵ : Algebra F E
α : E
K✝ : Type u
inst✝⁴ : Field K✝
inst✝³ : Algebra F K✝
L : Type u_3
inst✝² : Field L
inst✝¹ : Algebra K✝ L
inst✝ : FiniteDimensional F E
hprim : F⟮α⟯ = ⊤
K : IntermediateField F E
⊢ adjoin F ↑(Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)).coeffs = K
state_after: F : Type u_1
inst✝⁷ : Field F
E : Type u_2
inst✝⁶ : Field E
inst✝⁵ : Algebra F E
α : E
K✝ : Type u
inst✝⁴ : Field K✝
inst✝³ : Algebra F K✝
L : Type u_3
inst✝² : Field L
inst✝¹ : Algebra K✝ L
inst✝ : FiniteDimensional F E
hprim : F⟮α⟯ = ⊤
K : IntermediateField F E
g : E[X] := Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)
⊢ adjoin F ↑g.coeffs = K
tactic: set g := (minpoly K α).map (algebraMap K E)
state_before: F : Type u_1
inst✝⁷ : Field F
E : Type u_2
inst✝⁶ : Field E
inst✝⁵ : Algebra F E
α : E
K✝ : Type u
inst✝⁴ : Field K✝
inst✝³ : Algebra F K✝
L : Type u_3
inst✝² : Field L
inst✝¹ : Algebra K✝ L
inst✝ : FiniteDimensional F E
hprim : F⟮α⟯ = ⊤
K : IntermediateField F E
g : E[X] := Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)
⊢ adjoin F ↑g.coeffs = K
state_after: F : Type u_1
inst✝⁷ : Field F
E : Type u_2
inst✝⁶ : Field E
inst✝⁵ : Algebra F E
α : E
K✝ : Type u
inst✝⁴ : Field K✝
inst✝³ : Algebra F K✝
L : Type u_3
inst✝² : Field L
inst✝¹ : Algebra K✝ L
inst✝ : FiniteDimensional F E
hprim : F⟮α⟯ = ⊤
K : IntermediateField F E
g : E[X] := Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)
K' : IntermediateField F E := adjoin F ↑g.coeffs
⊢ K' = K
tactic: set K' : IntermediateField F E := adjoin F g.coeffs
state_before: F : Type u_1
inst✝⁷ : Field F
E : Type u_2
inst✝⁶ : Field E
inst✝⁵ : Algebra F E
α : E
K✝ : Type u
inst✝⁴ : Field K✝
inst✝³ : Algebra F K✝
L : Type u_3
inst✝² : Field L
inst✝¹ : Algebra K✝ L
inst✝ : FiniteDimensional F E
hprim : F⟮α⟯ = ⊤
K : IntermediateField F E
g : E[X] := Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)
K' : IntermediateField F E := adjoin F ↑g.coeffs
⊢ K' = K
state_after: F : Type u_1
inst✝⁷ : Field F
E : Type u_2
inst✝⁶ : Field E
inst✝⁵ : Algebra F E
α : E
K✝ : Type u
inst✝⁴ : Field K✝
inst✝³ : Algebra F K✝
L : Type u_3
inst✝² : Field L
inst✝¹ : Algebra K✝ L
inst✝ : FiniteDimensional F E
hprim : F⟮α⟯ = ⊤
K : IntermediateField F E
g : E[X] := Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)
K' : IntermediateField F E := adjoin F ↑g.coeffs
hsub : K' ≤ K
⊢ K' = K
tactic: have hsub : K' ≤ K := by
    refine adjoin_le_iff.mpr fun x ↦ ?_
    rw [Finset.mem_coe, mem_coeffs_iff]
    rintro ⟨n, -, rfl⟩
    rw [coeff_map]
    apply Subtype.mem
state_before: F : Type u_1
inst✝⁷ : Field F
E : Type u_2
inst✝⁶ : Field E
inst✝⁵ : Algebra F E
α : E
K✝ : Type u
inst✝⁴ : Field K✝
inst✝³ : Algebra F K✝
L : Type u_3
inst✝² : Field L
inst✝¹ : Algebra K✝ L
inst✝ : FiniteDimensional F E
hprim : F⟮α⟯ = ⊤
K : IntermediateField F E
g : E[X] := Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)
K' : IntermediateField F E := adjoin F ↑g.coeffs
hsub : K' ≤ K
⊢ K' = K
state_after: F : Type u_1
inst✝⁷ : Field F
E : Type u_2
inst✝⁶ : Field E
inst✝⁵ : Algebra F E
α : E
K✝ : Type u
inst✝⁴ : Field K✝
inst✝³ : Algebra F K✝
L : Type u_3
inst✝² : Field L
inst✝¹ : Algebra K✝ L
inst✝ : FiniteDimensional F E
hprim : F⟮α⟯ = ⊤
K : IntermediateField F E
g : E[X] := Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)
K' : IntermediateField F E := adjoin F ↑g.coeffs
hsub : K' ≤ K
dvd_g : minpoly (↥K') α ∣ g.toSubring K'.toSubring ⋯
⊢ K' = K
tactic: have dvd_g : minpoly K' α ∣ g.toSubring K'.toSubring (subset_adjoin F _) := by
    apply minpoly.dvd
    erw [aeval_def, eval₂_eq_eval_map, g.map_toSubring K'.toSubring, eval_map, ← aeval_def]
    exact minpoly.aeval K α
state_before: F : Type u_1
inst✝⁷ : Field F
E : Type u_2
inst✝⁶ : Field E
inst✝⁵ : Algebra F E
α : E
K✝ : Type u
inst✝⁴ : Field K✝
inst✝³ : Algebra F K✝
L : Type u_3
inst✝² : Field L
inst✝¹ : Algebra K✝ L
inst✝ : FiniteDimensional F E
hprim : F⟮α⟯ = ⊤
K : IntermediateField F E
g : E[X] := Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)
K' : IntermediateField F E := adjoin F ↑g.coeffs
hsub : K' ≤ K
dvd_g : minpoly (↥K') α ∣ g.toSubring K'.toSubring ⋯
⊢ K' = K
state_after: F : Type u_1
inst✝⁷ : Field F
E : Type u_2
inst✝⁶ : Field E
inst✝⁵ : Algebra F E
α : E
K✝ : Type u
inst✝⁴ : Field K✝
inst✝³ : Algebra F K✝
L : Type u_3
inst✝² : Field L
inst✝¹ : Algebra K✝ L
inst✝ : FiniteDimensional F E
hprim : F⟮α⟯ = ⊤
K : IntermediateField F E
g : E[X] := Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)
K' : IntermediateField F E := adjoin F ↑g.coeffs
hsub : K' ≤ K
dvd_g : minpoly (↥K') α ∣ g.toSubring K'.toSubring ⋯
finrank_eq : ∀ (K : IntermediateField F E), finrank (↥K) E = (minpoly (↥K) α).natDegree
⊢ K' = K
tactic: have finrank_eq : ∀ K : IntermediateField F E, finrank K E = natDegree (minpoly K α) := by
    intro K
    have := adjoin.finrank (.of_finite K α)
    erw [adjoin_eq_top_of_adjoin_eq_top F hprim, finrank_top K E] at this
    exact this
state_before: F : Type u_1
inst✝⁷ : Field F
E : Type u_2
inst✝⁶ : Field E
inst✝⁵ : Algebra F E
α : E
K✝ : Type u
inst✝⁴ : Field K✝
inst✝³ : Algebra F K✝
L : Type u_3
inst✝² : Field L
inst✝¹ : Algebra K✝ L
inst✝ : FiniteDimensional F E
hprim : F⟮α⟯ = ⊤
K : IntermediateField F E
g : E[X] := Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)
K' : IntermediateField F E := adjoin F ↑g.coeffs
hsub : K' ≤ K
dvd_g : minpoly (↥K') α ∣ g.toSubring K'.toSubring ⋯
finrank_eq : ∀ (K : IntermediateField F E), finrank (↥K) E = (minpoly (↥K) α).natDegree
⊢ K' = K
state_after: F : Type u_1
inst✝⁷ : Field F
E : Type u_2
inst✝⁶ : Field E
inst✝⁵ : Algebra F E
α : E
K✝ : Type u
inst✝⁴ : Field K✝
inst✝³ : Algebra F K✝
L : Type u_3
inst✝² : Field L
inst✝¹ : Algebra K✝ L
inst✝ : FiniteDimensional F E
hprim : F⟮α⟯ = ⊤
K : IntermediateField F E
g : E[X] := Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)
K' : IntermediateField F E := adjoin F ↑g.coeffs
hsub : K' ≤ K
dvd_g : minpoly (↥K') α ∣ g.toSubring K'.toSubring ⋯
finrank_eq : ∀ (K : IntermediateField F E), finrank (↥K) E = (minpoly (↥K) α).natDegree
⊢ finrank (↥K') E ≤ finrank (↥K) E
tactic: refine eq_of_le_of_finrank_le' hsub ?_
state_before: F : Type u_1
inst✝⁷ : Field F
E : Type u_2
inst✝⁶ : Field E
inst✝⁵ : Algebra F E
α : E
K✝ : Type u
inst✝⁴ : Field K✝
inst✝³ : Algebra F K✝
L : Type u_3
inst✝² : Field L
inst✝¹ : Algebra K✝ L
inst✝ : FiniteDimensional F E
hprim : F⟮α⟯ = ⊤
K : IntermediateField F E
g : E[X] := Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)
K' : IntermediateField F E := adjoin F ↑g.coeffs
hsub : K' ≤ K
dvd_g : minpoly (↥K') α ∣ g.toSubring K'.toSubring ⋯
finrank_eq : ∀ (K : IntermediateField F E), finrank (↥K) E = (minpoly (↥K) α).natDegree
⊢ finrank (↥K') E ≤ finrank (↥K) E
state_after: F : Type u_1
inst✝⁷ : Field F
E : Type u_2
inst✝⁶ : Field E
inst✝⁵ : Algebra F E
α : E
K✝ : Type u
inst✝⁴ : Field K✝
inst✝³ : Algebra F K✝
L : Type u_3
inst✝² : Field L
inst✝¹ : Algebra K✝ L
inst✝ : FiniteDimensional F E
hprim : F⟮α⟯ = ⊤
K : IntermediateField F E
g : E[X] := Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)
K' : IntermediateField F E := adjoin F ↑g.coeffs
hsub : K' ≤ K
dvd_g : minpoly (↥K') α ∣ g.toSubring K'.toSubring ⋯
finrank_eq : ∀ (K : IntermediateField F E), finrank (↥K) E = (minpoly (↥K) α).natDegree
⊢ (minpoly (↥K') α).natDegree ≤ (minpoly (↥K) α).natDegree
tactic: simp_rw [finrank_eq]
state_before: F : Type u_1
inst✝⁷ : Field F
E : Type u_2
inst✝⁶ : Field E
inst✝⁵ : Algebra F E
α : E
K✝ : Type u
inst✝⁴ : Field K✝
inst✝³ : Algebra F K✝
L : Type u_3
inst✝² : Field L
inst✝¹ : Algebra K✝ L
inst✝ : FiniteDimensional F E
hprim : F⟮α⟯ = ⊤
K : IntermediateField F E
g : E[X] := Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)
K' : IntermediateField F E := adjoin F ↑g.coeffs
hsub : K' ≤ K
dvd_g : minpoly (↥K') α ∣ g.toSubring K'.toSubring ⋯
finrank_eq : ∀ (K : IntermediateField F E), finrank (↥K) E = (minpoly (↥K) α).natDegree
⊢ (minpoly (↥K') α).natDegree ≤ (minpoly (↥K) α).natDegree
state_after: case h.e'_4
F : Type u_1
inst✝⁷ : Field F
E : Type u_2
inst✝⁶ : Field E
inst✝⁵ : Algebra F E
α : E
K✝ : Type u
inst✝⁴ : Field K✝
inst✝³ : Algebra F K✝
L : Type u_3
inst✝² : Field L
inst✝¹ : Algebra K✝ L
inst✝ : FiniteDimensional F E
hprim : F⟮α⟯ = ⊤
K : IntermediateField F E
g : E[X] := Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)
K' : IntermediateField F E := adjoin F ↑g.coeffs
hsub : K' ≤ K
dvd_g : minpoly (↥K') α ∣ g.toSubring K'.toSubring ⋯
finrank_eq : ∀ (K : IntermediateField F E), finrank (↥K) E = (minpoly (↥K) α).natDegree
⊢ (minpoly (↥K) α).natDegree = (g.toSubring K'.toSubring ⋯).natDegree
tactic: convert natDegree_le_of_dvd dvd_g
    ((g.monic_toSubring _ _).mpr <| (minpoly.monic <| .of_finite K α).map _).ne_zero using 1
state_before: case h.e'_4
F : Type u_1
inst✝⁷ : Field F
E : Type u_2
inst✝⁶ : Field E
inst✝⁵ : Algebra F E
α : E
K✝ : Type u
inst✝⁴ : Field K✝
inst✝³ : Algebra F K✝
L : Type u_3
inst✝² : Field L
inst✝¹ : Algebra K✝ L
inst✝ : FiniteDimensional F E
hprim : F⟮α⟯ = ⊤
K : IntermediateField F E
g : E[X] := Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)
K' : IntermediateField F E := adjoin F ↑g.coeffs
hsub : K' ≤ K
dvd_g : minpoly (↥K') α ∣ g.toSubring K'.toSubring ⋯
finrank_eq : ∀ (K : IntermediateField F E), finrank (↥K) E = (minpoly (↥K) α).natDegree
⊢ (minpoly (↥K) α).natDegree = (g.toSubring K'.toSubring ⋯).natDegree
state_after: no goals
tactic: rw [natDegree_toSubring, natDegree_map]