l3lab/ntp-mathlib huggingface dataset:
lemma Algebra.trace_eq_of_equiv_equiv {A₁ B₁ A₂ B₂ : Type*} [CommRing A₁] [CommRing B₁]
    [CommRing A₂] [CommRing B₂] [Algebra A₁ B₁] [Algebra A₂ B₂] (e₁ : A₁ ≃+* A₂) (e₂ : B₁ ≃+* B₂)
    (he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp ↑e₂ (algebraMap A₁ B₁)) (x) :
    Algebra.trace A₁ B₁ x = e₁.symm (Algebra.trace A₂ B₂ (e₂ x)) := by
  letI := (RingHom.comp (e₂ : B₁ →+* B₂) (algebraMap A₁ B₁)).toAlgebra
  let e' : B₁ ≃ₐ[A₁] B₂ := { e₂ with commutes' := fun _ ↦ rfl }
  

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁹ : CommRing R
inst✝¹⁸ : CommRing S
inst✝¹⁷ : CommRing T
inst✝¹⁶ : Algebra R S
inst✝¹⁵ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹⁴ : Field K
inst✝¹³ : Field L
inst✝¹² : Algebra K L
ι κ : Type w
inst✝¹¹ : Fintype ι
F : Type u_6
inst✝¹⁰ : Field F
inst✝⁹ : Algebra R L
inst✝⁸ : Algebra L F
inst✝⁷ : Algebra R F
inst✝⁶ : IsScalarTower R L F
A₁ : Type u_7
B₁ : Type u_8
A₂ : Type u_9
B₂ : Type u_10
inst✝⁵ : CommRing A₁
inst✝⁴ : CommRing B₁
inst✝³ : CommRing A₂
inst✝² : CommRing B₂
inst✝¹ : Algebra A₁ B₁
inst✝ : Algebra A₂ B₂
e₁ : A₁ ≃+* A₂
e₂ : B₁ ≃+* B₂
he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp (↑e₂) (algebraMap A₁ B₁)
x : B₁
this : Algebra A₁ B₂ := RingHom.toAlgebra (RingHom.comp (↑e₂) (algebraMap A₁ B₁))
e' : B₁ ≃ₐ[A₁] B₂ :=
  { toEquiv := e₂.toEquiv,
    map_mul' :=
      (_ : ∀ (x y : B₁), Equiv.toFun e₂.toEquiv (x * y) = Equiv.toFun e₂.toEquiv x * Equiv.toFun e₂.toEquiv y),
    map_add' :=
      (_ : ∀ (x y : B₁), Equiv.toFun e₂.toEquiv (x + y) = Equiv.toFun e₂.toEquiv x + Equiv.toFun e₂.toEquiv y),
    commutes' :=
      (_ : ∀ (x : A₁), Equiv.toFun e₂.toEquiv ((algebraMap A₁ B₁) x) = Equiv.toFun e₂.toEquiv ((algebraMap A₁ B₁) x)) }
⊢ (trace A₁ B₁) x = (RingEquiv.symm e₁) ((trace A₂ B₂) (e₂ x))

Next tactic:
rw [← Algebra.trace_eq_of_ringEquiv e₁ he, ← Algebra.trace_eq_of_algEquiv e',
    RingEquiv.symm_apply_apply]
lemma Algebra.trace_eq_of_equiv_equiv {A₁ B₁ A₂ B₂ : Type*} [CommRing A₁] [CommRing B₁]
    [CommRing A₂] [CommRing B₂] [Algebra A₁ B₁] [Algebra A₂ B₂] (e₁ : A₁ ≃+* A₂) (e₂ : B₁ ≃+* B₂)
    (he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp ↑e₂ (algebraMap A₁ B₁)) (x) :
    Algebra.trace A₁ B₁ x = e₁.symm (Algebra.trace A₂ B₂ (e₂ x)) := by
  letI := (RingHom.comp (e₂ : B₁ →+* B₂) (algebraMap A₁ B₁)).toAlgebra
  let e' : B₁ ≃ₐ[A₁] B₂ := { e₂ with commutes' := fun _ ↦ rfl }
  rw [← Algebra.trace_eq_of_ringEquiv e₁ he, ← Algebra.trace_eq_of_algEquiv e',
    RingEquiv.symm_apply_apply]
  

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁹ : CommRing R
inst✝¹⁸ : CommRing S
inst✝¹⁷ : CommRing T
inst✝¹⁶ : Algebra R S
inst✝¹⁵ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹⁴ : Field K
inst✝¹³ : Field L
inst✝¹² : Algebra K L
ι κ : Type w
inst✝¹¹ : Fintype ι
F : Type u_6
inst✝¹⁰ : Field F
inst✝⁹ : Algebra R L
inst✝⁸ : Algebra L F
inst✝⁷ : Algebra R F
inst✝⁶ : IsScalarTower R L F
A₁ : Type u_7
B₁ : Type u_8
A₂ : Type u_9
B₂ : Type u_10
inst✝⁵ : CommRing A₁
inst✝⁴ : CommRing B₁
inst✝³ : CommRing A₂
inst✝² : CommRing B₂
inst✝¹ : Algebra A₁ B₁
inst✝ : Algebra A₂ B₂
e₁ : A₁ ≃+* A₂
e₂ : B₁ ≃+* B₂
he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp (↑e₂) (algebraMap A₁ B₁)
x : B₁
this : Algebra A₁ B₂ := RingHom.toAlgebra (RingHom.comp (↑e₂) (algebraMap A₁ B₁))
e' : B₁ ≃ₐ[A₁] B₂ :=
  { toEquiv := e₂.toEquiv,
    map_mul' :=
      (_ : ∀ (x y : B₁), Equiv.toFun e₂.toEquiv (x * y) = Equiv.toFun e₂.toEquiv x * Equiv.toFun e₂.toEquiv y),
    map_add' :=
      (_ : ∀ (x y : B₁), Equiv.toFun e₂.toEquiv (x + y) = Equiv.toFun e₂.toEquiv x + Equiv.toFun e₂.toEquiv y),
    commutes' :=
      (_ : ∀ (x : A₁), Equiv.toFun e₂.toEquiv ((algebraMap A₁ B₁) x) = Equiv.toFun e₂.toEquiv ((algebraMap A₁ B₁) x)) }
⊢ (trace A₁ B₂) (e' x) = (trace A₁ B₂) (e₂ x)

Next tactic:
rfl
theorem trace_eq_sum_embeddings_gen (pb : PowerBasis K L)
    (hE : (minpoly K pb.gen).Splits (algebraMap K E)) (hfx : (minpoly K pb.gen).Separable) :
    algebraMap K E (Algebra.trace K L pb.gen) =
      (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).sum fun σ => σ pb.gen := by
  

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁷ : CommRing R
inst✝¹⁶ : CommRing S
inst✝¹⁵ : CommRing T
inst✝¹⁴ : Algebra R S
inst✝¹³ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹² : Field K
inst✝¹¹ : Field L
inst✝¹⁰ : Algebra K L
ι κ : Type w
inst✝⁹ : Fintype ι
F : Type u_6
inst✝⁸ : Field F
inst✝⁷ : Algebra R L
inst✝⁶ : Algebra L F
inst✝⁵ : Algebra R F
inst✝⁴ : IsScalarTower R L F
inst✝³ : Algebra K F
inst✝² : IsScalarTower K L F
E : Type u_7
inst✝¹ : Field E
inst✝ : Algebra K E
pb : PowerBasis K L
hE : Splits (algebraMap K E) (minpoly K pb.gen)
hfx : Separable (minpoly K pb.gen)
⊢ (algebraMap K E) ((Algebra.trace K L) pb.gen) = ∑ σ : L →ₐ[K] E, σ pb.gen

Next tactic:
letI := Classical.decEq E
theorem trace_eq_sum_embeddings_gen (pb : PowerBasis K L)
    (hE : (minpoly K pb.gen).Splits (algebraMap K E)) (hfx : (minpoly K pb.gen).Separable) :
    algebraMap K E (Algebra.trace K L pb.gen) =
      (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).sum fun σ => σ pb.gen := by
  letI := Classical.decEq E
-- Porting note: the following `letI` was not needed.
  

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁷ : CommRing R
inst✝¹⁶ : CommRing S
inst✝¹⁵ : CommRing T
inst✝¹⁴ : Algebra R S
inst✝¹³ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹² : Field K
inst✝¹¹ : Field L
inst✝¹⁰ : Algebra K L
ι κ : Type w
inst✝⁹ : Fintype ι
F : Type u_6
inst✝⁸ : Field F
inst✝⁷ : Algebra R L
inst✝⁶ : Algebra L F
inst✝⁵ : Algebra R F
inst✝⁴ : IsScalarTower R L F
inst✝³ : Algebra K F
inst✝² : IsScalarTower K L F
E : Type u_7
inst✝¹ : Field E
inst✝ : Algebra K E
pb : PowerBasis K L
hE : Splits (algebraMap K E) (minpoly K pb.gen)
hfx : Separable (minpoly K pb.gen)
this : DecidableEq E := Classical.decEq E
⊢ (algebraMap K E) ((Algebra.trace K L) pb.gen) = ∑ σ : L →ₐ[K] E, σ pb.gen

Next tactic:
letI : Fintype (L →ₐ[K] E) := (PowerBasis.AlgHom.fintype pb)
theorem trace_eq_sum_embeddings_gen (pb : PowerBasis K L)
    (hE : (minpoly K pb.gen).Splits (algebraMap K E)) (hfx : (minpoly K pb.gen).Separable) :
    algebraMap K E (Algebra.trace K L pb.gen) =
      (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).sum fun σ => σ pb.gen := by
  letI := Classical.decEq E
-- Porting note: the following `letI` was not needed.
  letI : Fintype (L →ₐ[K] E) := (PowerBasis.AlgHom.fintype pb)
  

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁷ : CommRing R
inst✝¹⁶ : CommRing S
inst✝¹⁵ : CommRing T
inst✝¹⁴ : Algebra R S
inst✝¹³ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹² : Field K
inst✝¹¹ : Field L
inst✝¹⁰ : Algebra K L
ι κ : Type w
inst✝⁹ : Fintype ι
F : Type u_6
inst✝⁸ : Field F
inst✝⁷ : Algebra R L
inst✝⁶ : Algebra L F
inst✝⁵ : Algebra R F
inst✝⁴ : IsScalarTower R L F
inst✝³ : Algebra K F
inst✝² : IsScalarTower K L F
E : Type u_7
inst✝¹ : Field E
inst✝ : Algebra K E
pb : PowerBasis K L
hE : Splits (algebraMap K E) (minpoly K pb.gen)
hfx : Separable (minpoly K pb.gen)
this✝ : DecidableEq E := Classical.decEq E
this : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb
⊢ (algebraMap K E) ((Algebra.trace K L) pb.gen) = ∑ σ : L →ₐ[K] E, σ pb.gen

Next tactic:
rw [pb.trace_gen_eq_sum_roots hE, Fintype.sum_equiv pb.liftEquiv', Finset.sum_mem_multiset,
    Finset.sum_eq_multiset_sum, Multiset.toFinset_val, Multiset.dedup_eq_self.mpr _,
    Multiset.map_id]
theorem trace_eq_sum_embeddings_gen (pb : PowerBasis K L)
    (hE : (minpoly K pb.gen).Splits (algebraMap K E)) (hfx : (minpoly K pb.gen).Separable) :
    algebraMap K E (Algebra.trace K L pb.gen) =
      (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).sum fun σ => σ pb.gen := by
  letI := Classical.decEq E
-- Porting note: the following `letI` was not needed.
  letI : Fintype (L →ₐ[K] E) := (PowerBasis.AlgHom.fintype pb)
  rw [pb.trace_gen_eq_sum_roots hE, Fintype.sum_equiv pb.liftEquiv', Finset.sum_mem_multiset,
    Finset.sum_eq_multiset_sum, Multiset.toFinset_val, Multiset.dedup_eq_self.mpr _,
    Multiset.map_id]
  · 

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁷ : CommRing R
inst✝¹⁶ : CommRing S
inst✝¹⁵ : CommRing T
inst✝¹⁴ : Algebra R S
inst✝¹³ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹² : Field K
inst✝¹¹ : Field L
inst✝¹⁰ : Algebra K L
ι κ : Type w
inst✝⁹ : Fintype ι
F : Type u_6
inst✝⁸ : Field F
inst✝⁷ : Algebra R L
inst✝⁶ : Algebra L F
inst✝⁵ : Algebra R F
inst✝⁴ : IsScalarTower R L F
inst✝³ : Algebra K F
inst✝² : IsScalarTower K L F
E : Type u_7
inst✝¹ : Field E
inst✝ : Algebra K E
pb : PowerBasis K L
hE : Splits (algebraMap K E) (minpoly K pb.gen)
hfx : Separable (minpoly K pb.gen)
this✝ : DecidableEq E := Classical.decEq E
this : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb
⊢ Multiset.Nodup (aroots (minpoly K pb.gen) E)

Next tactic:
exact nodup_roots ((separable_map _).mpr hfx)
theorem trace_eq_sum_embeddings_gen (pb : PowerBasis K L)
    (hE : (minpoly K pb.gen).Splits (algebraMap K E)) (hfx : (minpoly K pb.gen).Separable) :
    algebraMap K E (Algebra.trace K L pb.gen) =
      (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).sum fun σ => σ pb.gen := by
  letI := Classical.decEq E
-- Porting note: the following `letI` was not needed.
  letI : Fintype (L →ₐ[K] E) := (PowerBasis.AlgHom.fintype pb)
  rw [pb.trace_gen_eq_sum_roots hE, Fintype.sum_equiv pb.liftEquiv', Finset.sum_mem_multiset,
    Finset.sum_eq_multiset_sum, Multiset.toFinset_val, Multiset.dedup_eq_self.mpr _,
    Multiset.map_id]
  · exact nodup_roots ((separable_map _).mpr hfx)
-- Porting note: the following goal does not exist in mathlib3.
  · 

Proof state:
case f
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁷ : CommRing R
inst✝¹⁶ : CommRing S
inst✝¹⁵ : CommRing T
inst✝¹⁴ : Algebra R S
inst✝¹³ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹² : Field K
inst✝¹¹ : Field L
inst✝¹⁰ : Algebra K L
ι κ : Type w
inst✝⁹ : Fintype ι
F : Type u_6
inst✝⁸ : Field F
inst✝⁷ : Algebra R L
inst✝⁶ : Algebra L F
inst✝⁵ : Algebra R F
inst✝⁴ : IsScalarTower R L F
inst✝³ : Algebra K F
inst✝² : IsScalarTower K L F
E : Type u_7
inst✝¹ : Field E
inst✝ : Algebra K E
pb : PowerBasis K L
hE : Splits (algebraMap K E) (minpoly K pb.gen)
hfx : Separable (minpoly K pb.gen)
this✝ : DecidableEq E := Classical.decEq E
this : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb
⊢ { x // x ∈ aroots (minpoly K pb.gen) E } → E

Next tactic:
exact (fun x => x.1)
theorem trace_eq_sum_embeddings_gen (pb : PowerBasis K L)
    (hE : (minpoly K pb.gen).Splits (algebraMap K E)) (hfx : (minpoly K pb.gen).Separable) :
    algebraMap K E (Algebra.trace K L pb.gen) =
      (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).sum fun σ => σ pb.gen := by
  letI := Classical.decEq E
-- Porting note: the following `letI` was not needed.
  letI : Fintype (L →ₐ[K] E) := (PowerBasis.AlgHom.fintype pb)
  rw [pb.trace_gen_eq_sum_roots hE, Fintype.sum_equiv pb.liftEquiv', Finset.sum_mem_multiset,
    Finset.sum_eq_multiset_sum, Multiset.toFinset_val, Multiset.dedup_eq_self.mpr _,
    Multiset.map_id]
  · exact nodup_roots ((separable_map _).mpr hfx)
-- Porting note: the following goal does not exist in mathlib3.
  · exact (fun x => x.1)
  · 

Proof state:
case hfg
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁷ : CommRing R
inst✝¹⁶ : CommRing S
inst✝¹⁵ : CommRing T
inst✝¹⁴ : Algebra R S
inst✝¹³ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹² : Field K
inst✝¹¹ : Field L
inst✝¹⁰ : Algebra K L
ι κ : Type w
inst✝⁹ : Fintype ι
F : Type u_6
inst✝⁸ : Field F
inst✝⁷ : Algebra R L
inst✝⁶ : Algebra L F
inst✝⁵ : Algebra R F
inst✝⁴ : IsScalarTower R L F
inst✝³ : Algebra K F
inst✝² : IsScalarTower K L F
E : Type u_7
inst✝¹ : Field E
inst✝ : Algebra K E
pb : PowerBasis K L
hE : Splits (algebraMap K E) (minpoly K pb.gen)
hfx : Separable (minpoly K pb.gen)
this✝ : DecidableEq E := Classical.decEq E
this : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb
⊢ ∀ (x : { x // x ∈ aroots (minpoly K pb.gen) E }), ↑x = _root_.id ↑x

Next tactic:
intro x
theorem trace_eq_sum_embeddings_gen (pb : PowerBasis K L)
    (hE : (minpoly K pb.gen).Splits (algebraMap K E)) (hfx : (minpoly K pb.gen).Separable) :
    algebraMap K E (Algebra.trace K L pb.gen) =
      (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).sum fun σ => σ pb.gen := by
  letI := Classical.decEq E
-- Porting note: the following `letI` was not needed.
  letI : Fintype (L →ₐ[K] E) := (PowerBasis.AlgHom.fintype pb)
  rw [pb.trace_gen_eq_sum_roots hE, Fintype.sum_equiv pb.liftEquiv', Finset.sum_mem_multiset,
    Finset.sum_eq_multiset_sum, Multiset.toFinset_val, Multiset.dedup_eq_self.mpr _,
    Multiset.map_id]
  · exact nodup_roots ((separable_map _).mpr hfx)
-- Porting note: the following goal does not exist in mathlib3.
  · exact (fun x => x.1)
  · intro x; 

Proof state:
case hfg
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁷ : CommRing R
inst✝¹⁶ : CommRing S
inst✝¹⁵ : CommRing T
inst✝¹⁴ : Algebra R S
inst✝¹³ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹² : Field K
inst✝¹¹ : Field L
inst✝¹⁰ : Algebra K L
ι κ : Type w
inst✝⁹ : Fintype ι
F : Type u_6
inst✝⁸ : Field F
inst✝⁷ : Algebra R L
inst✝⁶ : Algebra L F
inst✝⁵ : Algebra R F
inst✝⁴ : IsScalarTower R L F
inst✝³ : Algebra K F
inst✝² : IsScalarTower K L F
E : Type u_7
inst✝¹ : Field E
inst✝ : Algebra K E
pb : PowerBasis K L
hE : Splits (algebraMap K E) (minpoly K pb.gen)
hfx : Separable (minpoly K pb.gen)
this✝ : DecidableEq E := Classical.decEq E
this : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb
x : { x // x ∈ aroots (minpoly K pb.gen) E }
⊢ ↑x = _root_.id ↑x

Next tactic:
rfl
theorem trace_eq_sum_embeddings_gen (pb : PowerBasis K L)
    (hE : (minpoly K pb.gen).Splits (algebraMap K E)) (hfx : (minpoly K pb.gen).Separable) :
    algebraMap K E (Algebra.trace K L pb.gen) =
      (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).sum fun σ => σ pb.gen := by
  letI := Classical.decEq E
-- Porting note: the following `letI` was not needed.
  letI : Fintype (L →ₐ[K] E) := (PowerBasis.AlgHom.fintype pb)
  rw [pb.trace_gen_eq_sum_roots hE, Fintype.sum_equiv pb.liftEquiv', Finset.sum_mem_multiset,
    Finset.sum_eq_multiset_sum, Multiset.toFinset_val, Multiset.dedup_eq_self.mpr _,
    Multiset.map_id]
  · exact nodup_roots ((separable_map _).mpr hfx)
-- Porting note: the following goal does not exist in mathlib3.
  · exact (fun x => x.1)
  · intro x; rfl
  · 

Proof state:
case h
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁷ : CommRing R
inst✝¹⁶ : CommRing S
inst✝¹⁵ : CommRing T
inst✝¹⁴ : Algebra R S
inst✝¹³ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹² : Field K
inst✝¹¹ : Field L
inst✝¹⁰ : Algebra K L
ι κ : Type w
inst✝⁹ : Fintype ι
F : Type u_6
inst✝⁸ : Field F
inst✝⁷ : Algebra R L
inst✝⁶ : Algebra L F
inst✝⁵ : Algebra R F
inst✝⁴ : IsScalarTower R L F
inst✝³ : Algebra K F
inst✝² : IsScalarTower K L F
E : Type u_7
inst✝¹ : Field E
inst✝ : Algebra K E
pb : PowerBasis K L
hE : Splits (algebraMap K E) (minpoly K pb.gen)
hfx : Separable (minpoly K pb.gen)
this✝ : DecidableEq E := Classical.decEq E
this : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb
⊢ ∀ (x : L →ₐ[K] E), x pb.gen = ↑((PowerBasis.liftEquiv' pb) x)

Next tactic:
intro σ
theorem trace_eq_sum_embeddings_gen (pb : PowerBasis K L)
    (hE : (minpoly K pb.gen).Splits (algebraMap K E)) (hfx : (minpoly K pb.gen).Separable) :
    algebraMap K E (Algebra.trace K L pb.gen) =
      (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).sum fun σ => σ pb.gen := by
  letI := Classical.decEq E
-- Porting note: the following `letI` was not needed.
  letI : Fintype (L →ₐ[K] E) := (PowerBasis.AlgHom.fintype pb)
  rw [pb.trace_gen_eq_sum_roots hE, Fintype.sum_equiv pb.liftEquiv', Finset.sum_mem_multiset,
    Finset.sum_eq_multiset_sum, Multiset.toFinset_val, Multiset.dedup_eq_self.mpr _,
    Multiset.map_id]
  · exact nodup_roots ((separable_map _).mpr hfx)
-- Porting note: the following goal does not exist in mathlib3.
  · exact (fun x => x.1)
  · intro x; rfl
  · intro σ
    

Proof state:
case h
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁷ : CommRing R
inst✝¹⁶ : CommRing S
inst✝¹⁵ : CommRing T
inst✝¹⁴ : Algebra R S
inst✝¹³ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹² : Field K
inst✝¹¹ : Field L
inst✝¹⁰ : Algebra K L
ι κ : Type w
inst✝⁹ : Fintype ι
F : Type u_6
inst✝⁸ : Field F
inst✝⁷ : Algebra R L
inst✝⁶ : Algebra L F
inst✝⁵ : Algebra R F
inst✝⁴ : IsScalarTower R L F
inst✝³ : Algebra K F
inst✝² : IsScalarTower K L F
E : Type u_7
inst✝¹ : Field E
inst✝ : Algebra K E
pb : PowerBasis K L
hE : Splits (algebraMap K E) (minpoly K pb.gen)
hfx : Separable (minpoly K pb.gen)
this✝ : DecidableEq E := Classical.decEq E
this : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb
σ : L →ₐ[K] E
⊢ σ pb.gen = ↑((PowerBasis.liftEquiv' pb) σ)

Next tactic:
rw [PowerBasis.liftEquiv'_apply_coe]
theorem sum_embeddings_eq_finrank_mul [FiniteDimensional K F] [IsSeparable K F]
    (pb : PowerBasis K L) :
    ∑ σ : F →ₐ[K] E, σ (algebraMap L F pb.gen) =
      finrank L F •
        (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).sum fun σ : L →ₐ[K] E => σ pb.gen := by
  

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝²⁰ : CommRing R
inst✝¹⁹ : CommRing S
inst✝¹⁸ : CommRing T
inst✝¹⁷ : Algebra R S
inst✝¹⁶ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹⁵ : Field K
inst✝¹⁴ : Field L
inst✝¹³ : Algebra K L
ι κ : Type w
inst✝¹² : Fintype ι
F : Type u_6
inst✝¹¹ : Field F
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra L F
inst✝⁸ : Algebra R F
inst✝⁷ : IsScalarTower R L F
inst✝⁶ : Algebra K F
inst✝⁵ : IsScalarTower K L F
E : Type u_7
inst✝⁴ : Field E
inst✝³ : Algebra K E
inst✝² : IsAlgClosed E
inst✝¹ : FiniteDimensional K F
inst✝ : IsSeparable K F
pb : PowerBasis K L
⊢ ∑ σ : F →ₐ[K] E, σ ((algebraMap L F) pb.gen) = finrank L F • ∑ σ : L →ₐ[K] E, σ pb.gen

Next tactic:
haveI : FiniteDimensional L F := FiniteDimensional.right K L F
theorem sum_embeddings_eq_finrank_mul [FiniteDimensional K F] [IsSeparable K F]
    (pb : PowerBasis K L) :
    ∑ σ : F →ₐ[K] E, σ (algebraMap L F pb.gen) =
      finrank L F •
        (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).sum fun σ : L →ₐ[K] E => σ pb.gen := by
  haveI : FiniteDimensional L F := FiniteDimensional.right K L F
  

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝²⁰ : CommRing R
inst✝¹⁹ : CommRing S
inst✝¹⁸ : CommRing T
inst✝¹⁷ : Algebra R S
inst✝¹⁶ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹⁵ : Field K
inst✝¹⁴ : Field L
inst✝¹³ : Algebra K L
ι κ : Type w
inst✝¹² : Fintype ι
F : Type u_6
inst✝¹¹ : Field F
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra L F
inst✝⁸ : Algebra R F
inst✝⁷ : IsScalarTower R L F
inst✝⁶ : Algebra K F
inst✝⁵ : IsScalarTower K L F
E : Type u_7
inst✝⁴ : Field E
inst✝³ : Algebra K E
inst✝² : IsAlgClosed E
inst✝¹ : FiniteDimensional K F
inst✝ : IsSeparable K F
pb : PowerBasis K L
this : FiniteDimensional L F
⊢ ∑ σ : F →ₐ[K] E, σ ((algebraMap L F) pb.gen) = finrank L F • ∑ σ : L →ₐ[K] E, σ pb.gen

Next tactic:
haveI : IsSeparable L F := isSeparable_tower_top_of_isSeparable K L F
theorem sum_embeddings_eq_finrank_mul [FiniteDimensional K F] [IsSeparable K F]
    (pb : PowerBasis K L) :
    ∑ σ : F →ₐ[K] E, σ (algebraMap L F pb.gen) =
      finrank L F •
        (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).sum fun σ : L →ₐ[K] E => σ pb.gen := by
  haveI : FiniteDimensional L F := FiniteDimensional.right K L F
  haveI : IsSeparable L F := isSeparable_tower_top_of_isSeparable K L F
  

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝²⁰ : CommRing R
inst✝¹⁹ : CommRing S
inst✝¹⁸ : CommRing T
inst✝¹⁷ : Algebra R S
inst✝¹⁶ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹⁵ : Field K
inst✝¹⁴ : Field L
inst✝¹³ : Algebra K L
ι κ : Type w
inst✝¹² : Fintype ι
F : Type u_6
inst✝¹¹ : Field F
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra L F
inst✝⁸ : Algebra R F
inst✝⁷ : IsScalarTower R L F
inst✝⁶ : Algebra K F
inst✝⁵ : IsScalarTower K L F
E : Type u_7
inst✝⁴ : Field E
inst✝³ : Algebra K E
inst✝² : IsAlgClosed E
inst✝¹ : FiniteDimensional K F
inst✝ : IsSeparable K F
pb : PowerBasis K L
this✝ : FiniteDimensional L F
this : IsSeparable L F
⊢ ∑ σ : F →ₐ[K] E, σ ((algebraMap L F) pb.gen) = finrank L F • ∑ σ : L →ₐ[K] E, σ pb.gen

Next tactic:
letI : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb
theorem sum_embeddings_eq_finrank_mul [FiniteDimensional K F] [IsSeparable K F]
    (pb : PowerBasis K L) :
    ∑ σ : F →ₐ[K] E, σ (algebraMap L F pb.gen) =
      finrank L F •
        (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).sum fun σ : L →ₐ[K] E => σ pb.gen := by
  haveI : FiniteDimensional L F := FiniteDimensional.right K L F
  haveI : IsSeparable L F := isSeparable_tower_top_of_isSeparable K L F
  letI : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb
  

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝²⁰ : CommRing R
inst✝¹⁹ : CommRing S
inst✝¹⁸ : CommRing T
inst✝¹⁷ : Algebra R S
inst✝¹⁶ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹⁵ : Field K
inst✝¹⁴ : Field L
inst✝¹³ : Algebra K L
ι κ : Type w
inst✝¹² : Fintype ι
F : Type u_6
inst✝¹¹ : Field F
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra L F
inst✝⁸ : Algebra R F
inst✝⁷ : IsScalarTower R L F
inst✝⁶ : Algebra K F
inst✝⁵ : IsScalarTower K L F
E : Type u_7
inst✝⁴ : Field E
inst✝³ : Algebra K E
inst✝² : IsAlgClosed E
inst✝¹ : FiniteDimensional K F
inst✝ : IsSeparable K F
pb : PowerBasis K L
this✝¹ : FiniteDimensional L F
this✝ : IsSeparable L F
this : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb
⊢ ∑ σ : F →ₐ[K] E, σ ((algebraMap L F) pb.gen) = finrank L F • ∑ σ : L →ₐ[K] E, σ pb.gen

Next tactic:
letI : ∀ f : L →ₐ[K] E, Fintype (haveI := f.toRingHom.toAlgebra; AlgHom L F E) := ?_
theorem sum_embeddings_eq_finrank_mul [FiniteDimensional K F] [IsSeparable K F]
    (pb : PowerBasis K L) :
    ∑ σ : F →ₐ[K] E, σ (algebraMap L F pb.gen) =
      finrank L F •
        (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).sum fun σ : L →ₐ[K] E => σ pb.gen := by
  haveI : FiniteDimensional L F := FiniteDimensional.right K L F
  haveI : IsSeparable L F := isSeparable_tower_top_of_isSeparable K L F
  letI : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb
  letI : ∀ f : L →ₐ[K] E, Fintype (haveI := f.toRingHom.toAlgebra; AlgHom L F E) := ?_
  

Proof state:
case refine_2
R : Type u_1
S : Type u_2
T : Type u_3
inst✝²⁰ : CommRing R
inst✝¹⁹ : CommRing S
inst✝¹⁸ : CommRing T
inst✝¹⁷ : Algebra R S
inst✝¹⁶ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹⁵ : Field K
inst✝¹⁴ : Field L
inst✝¹³ : Algebra K L
ι κ : Type w
inst✝¹² : Fintype ι
F : Type u_6
inst✝¹¹ : Field F
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra L F
inst✝⁸ : Algebra R F
inst✝⁷ : IsScalarTower R L F
inst✝⁶ : Algebra K F
inst✝⁵ : IsScalarTower K L F
E : Type u_7
inst✝⁴ : Field E
inst✝³ : Algebra K E
inst✝² : IsAlgClosed E
inst✝¹ : FiniteDimensional K F
inst✝ : IsSeparable K F
pb : PowerBasis K L
this✝² : FiniteDimensional L F
this✝¹ : IsSeparable L F
this✝ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb
this : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := ?refine_1
⊢ ∑ σ : F →ₐ[K] E, σ ((algebraMap L F) pb.gen) = finrank L F • ∑ σ : L →ₐ[K] E, σ pb.gen
case refine_1
R : Type u_1
S : Type u_2
T : Type u_3
inst✝²⁰ : CommRing R
inst✝¹⁹ : CommRing S
inst✝¹⁸ : CommRing T
inst✝¹⁷ : Algebra R S
inst✝¹⁶ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹⁵ : Field K
inst✝¹⁴ : Field L
inst✝¹³ : Algebra K L
ι κ : Type w
inst✝¹² : Fintype ι
F : Type u_6
inst✝¹¹ : Field F
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra L F
inst✝⁸ : Algebra R F
inst✝⁷ : IsScalarTower R L F
inst✝⁶ : Algebra K F
inst✝⁵ : IsScalarTower K L F
E : Type u_7
inst✝⁴ : Field E
inst✝³ : Algebra K E
inst✝² : IsAlgClosed E
inst✝¹ : FiniteDimensional K F
inst✝ : IsSeparable K F
pb : PowerBasis K L
this✝¹ : FiniteDimensional L F
this✝ : IsSeparable L F
this : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb
⊢ (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E)

Next tactic:
rw [Fintype.sum_equiv algHomEquivSigma (fun σ : F →ₐ[K] E => _) fun σ => σ.1 pb.gen, ←
    Finset.univ_sigma_univ, Finset.sum_sigma, ← Finset.sum_nsmul]