Theorem: IntermediateField.splits_of_splits
File: Mathlib/FieldTheory/SplittingField/IsSplittingField.lean

tactic: simp_rw [rootSet, Finset.mem_coe, Multiset.mem_toFinset] at hF
state_before: F✝ : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
p : K[X]
F : IntermediateField K L
h : Splits (algebraMap K L) p
hF : ∀ (x : L), x ∈ rootSet p L → x ∈ F
⊢ Splits (algebraMap K { x // x ∈ F }) p

tactic: rw [splits_iff_exists_multiset]
state_before: F✝ : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
p : K[X]
F : IntermediateField K L
h : Splits (algebraMap K L) p
hF : ∀ (x : L), x ∈ roots (Polynomial.map (algebraMap K L) p) → x ∈ F
⊢ Splits (algebraMap K { x // x ∈ F }) p

tactic: refine' ⟨Multiset.pmap Subtype.mk _ hF, map_injective _ (algebraMap F L).injective _⟩
state_before: F✝ : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
p : K[X]
F : IntermediateField K L
h : Splits (algebraMap K L) p
hF : ∀ (x : L), x ∈ roots (Polynomial.map (algebraMap K L) p) → x ∈ F
⊢ ∃ s,
    Polynomial.map (algebraMap K { x // x ∈ F }) p =
      ↑C (↑(algebraMap K { x // x ∈ F }) (leadingCoeff p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)

tactic: conv_lhs =>
  rw [Polynomial.map_map, ← IsScalarTower.algebraMap_eq, eq_prod_roots_of_splits h, ←
    Multiset.pmap_eq_map _ _ _ hF]
state_before: F✝ : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
p : K[X]
F : IntermediateField K L
h : Splits (algebraMap K L) p
hF : ∀ (x : L), x ∈ roots (Polynomial.map (algebraMap K L) p) → x ∈ F
⊢ Polynomial.map (algebraMap { x // x ∈ F } L) (Polynomial.map (algebraMap K { x // x ∈ F }) p) =
    Polynomial.map (algebraMap { x // x ∈ F } L)
      (↑C (↑(algebraMap K { x // x ∈ F }) (leadingCoeff p)) *
        Multiset.prod
          (Multiset.map (fun a => X - ↑C a) (Multiset.pmap Subtype.mk (roots (Polynomial.map (algebraMap K L) p)) hF)))

tactic: simp_rw [Polynomial.map_mul, Polynomial.map_multiset_prod, Multiset.map_pmap, Polynomial.map_sub,
  map_C, map_X]
state_before: F✝ : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
p : K[X]
F : IntermediateField K L
h : Splits (algebraMap K L) p
hF : ∀ (x : L), x ∈ roots (Polynomial.map (algebraMap K L) p) → x ∈ F
⊢ ↑C (↑(algebraMap K L) (leadingCoeff p)) *
      Multiset.prod (Multiset.pmap (fun a x => X - ↑C a) (roots (Polynomial.map (algebraMap K L) p)) hF) =
    Polynomial.map (algebraMap { x // x ∈ F } L)
      (↑C (↑(algebraMap K { x // x ∈ F }) (leadingCoeff p)) *
        Multiset.prod
          (Multiset.map (fun a => X - ↑C a) (Multiset.pmap Subtype.mk (roots (Polynomial.map (algebraMap K L) p)) hF)))

tactic: rfl
state_before: F✝ : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
p : K[X]
F : IntermediateField K L
h : Splits (algebraMap K L) p
hF : ∀ (x : L), x ∈ roots (Polynomial.map (algebraMap K L) p) → x ∈ F
⊢ ↑C (↑(algebraMap K L) (leadingCoeff p)) *
      Multiset.prod (Multiset.pmap (fun a x => X - ↑C a) (roots (Polynomial.map (algebraMap K L) p)) hF) =
    ↑C (↑(algebraMap { x // x ∈ F } L) (↑(algebraMap K { x // x ∈ F }) (leadingCoeff p))) *
      Multiset.prod
        (Multiset.pmap (fun a h => X - ↑C (↑(algebraMap { x // x ∈ F } L) { val := a, property := h }))
          (roots (Polynomial.map (algebraMap K L) p)) hF)