Module: Mathlib.RingTheory.Polynomial.Resultant.Basic

Goal state before:
pp: case neg
n : ℕ
IH :
  ∀ m < n,
    ∀ {K : Type u_3} [inst : Field K] (f g : K[X]),
      f.Monic →
        g.Monic →
          f.Splits →
            g.Splits →
              g.natDegree ≤ f.natDegree →
                f.natDegree + g.natDegree = m →
                  f.resultant g = (Multiset.map (fun ij ↦ ij.1 - ij.2) (f.roots ×ˢ g.roots)).prod
K : Type u_3
inst✝ : Field K
f g : K[X]
hf : f.Monic
hg : g.Monic
hf' : f.Splits
hg' : g.Splits
hfg : g.natDegree ≤ f.natDegree
hN : f.natDegree + g.natDegree = n
hr✝ : ¬g ∣ f
r : K[X] := C (f %ₘ g).leadingCoeff⁻¹ * (f %ₘ g)
hr₀ : f %ₘ g ≠ 0
hrd : r.natDegree < g.natDegree
hr : r.Monic
L : Type u_3 := r.SplittingField
this✝ :
  (algebraMap K L) (g.resultant (f %ₘ g) g.natDegree r.natDegree) =
    (algebraMap K L) ((f %ₘ g).leadingCoeff ^ g.natDegree) *
      (Multiset.map (fun ij ↦ ij.1 - ij.2) ((map (algebraMap K L) g).roots ×ˢ (map (algebraMap K L) r).roots)).prod
this :
  (Multiset.map (fun x ↦ eval x f) g.roots).prod =
    (f %ₘ g).leadingCoeff ^ g.natDegree * (Multiset.map (fun x ↦ eval x r) g.roots).prod
⊢ (algebraMap K L) ((-1) ^ (g.natDegree * (f.natDegree - r.natDegree))) *
        (algebraMap K L) (g.coeff g.natDegree ^ (f.natDegree - r.natDegree)) *
      ((algebraMap K L) ((-1) ^ (r.natDegree * g.natDegree)) *
        ((algebraMap K L) ((f %ₘ g).leadingCoeff ^ g.natDegree) *
          (Multiset.map (fun x ↦ eval x (map (algebraMap K r.SplittingField) r))
              (Multiset.map (⇑(algebraMap K L)) g.roots)).prod)) =
    (algebraMap K L) ((-1) ^ (g.roots.card * f.roots.card)) *
      (algebraMap K L) (Multiset.map (fun x ↦ eval x f) g.roots).prod

Tactic:
simp only [coeff_natDegree, hg.leadingCoeff, one_pow, map_one, map_multiset_prod,
      ← hf'.natDegree_eq_card_roots, ← hg'.natDegree_eq_card_roots, this, map_mul, Multiset.map_map,
      map_pow, map_neg, mul_one, eval_map_algebraMap, Function.comp_apply]

Goal state after:
case neg
n : ℕ
IH :
  ∀ m < n,
    ∀ {K : Type u_3} [inst : Field K] (f g : K[X]),
      f.Monic →
        g.Monic →
          f.Splits →
            g.Splits →
              g.natDegree ≤ f.natDegree →
                f.natDegree + g.natDegree = m →
                  f.resultant g = (Multiset.map (fun ij ↦ ij.1 - ij.2) (f.roots ×ˢ g.roots)).prod
K : Type u_3
inst✝ : Field K
f g : K[X]
hf : f.Monic
hg : g.Monic
hf' : f.Splits
hg' : g.Splits
hfg : g.natDegree ≤ f.natDegree
hN : f.natDegree + g.natDegree = n
hr✝ : ¬g ∣ f
r : K[X] := C (f %ₘ g).leadingCoeff⁻¹ * (f %ₘ g)
hr₀ : f %ₘ g ≠ 0
hrd : r.natDegree < g.natDegree
hr : r.Monic
L : Type u_3 := r.SplittingField
this✝ :
  (algebraMap K L) (g.resultant (f %ₘ g) g.natDegree r.natDegree) =
    (algebraMap K L) ((f %ₘ g).leadingCoeff ^ g.natDegree) *
      (Multiset.map (fun ij ↦ ij.1 - ij.2) ((map (algebraMap K L) g).roots ×ˢ (map (algebraMap K L) r).roots)).prod
this :
  (Multiset.map (fun x ↦ eval x f) g.roots).prod =
    (f %ₘ g).leadingCoeff ^ g.natDegree * (Multiset.map (fun x ↦ eval x r) g.roots).prod
⊢ (-1) ^ (g.natDegree * (f.natDegree - r.natDegree)) *
      ((-1) ^ (r.natDegree * g.natDegree) *
        ((algebraMap K L) (f %ₘ g).leadingCoeff ^ g.natDegree *
          (Multiset.map (fun x ↦ (aeval ((algebraMap K L) x)) r) g.roots).prod)) =
    (-1) ^ (g.natDegree * f.natDegree) *
      ((algebraMap K L) (f %ₘ g).leadingCoeff ^ g.natDegree *
        (Multiset.map (fun x ↦ (algebraMap K L) (eval x r)) g.roots).prod)