theorem card_aut_eq_finrank [FiniteDimensional F E] [IsGalois F E] :
    Fintype.card (E ≃ₐ[F] E) = finrank F E := by
  cases' Field.exists_primitive_element F E with α hα
  let iso : F⟮α⟯ ≃ₐ[F] E :=
    { toFun := fun e => e.val
      invFun := fun e => ⟨e, by rw [hα]; exact IntermediateField.mem_top⟩
      left_inv := fun _ => by ext; rfl
      right_inv := fun _ => rfl
      map_mul' := fun _ _ => rfl
      map_add' := fun _ _ => rfl
      commutes' := fun _ => rfl }
  have H : IsIntegral F α := IsGalois.integral F α
  have h_sep : (minpoly F α).Separable := IsGalois.separable F α
  have h_splits : (minpoly F α).Splits (algebraMap F E) := IsGalois.splits F α
  replace h_splits : Polynomial.Splits (algebraMap F F⟮α⟯) (minpoly F α)
  · simpa using
      Polynomial.splits_comp_of_splits (algebraMap F E) iso.symm.toAlgHom.toRingHom h_splits
  rw [← LinearEquiv.finrank_eq iso.toLinearEquiv]
  rw [← IntermediateField.AdjoinSimple.card_aut_eq_finrank F E H h_sep h_splits]
  apply Fintype.card_congr
  apply Equiv.mk (fun ϕ => iso.trans (ϕ.trans iso.symm)) fun ϕ => iso.symm.trans (ϕ.trans iso)
  · intro ϕ; ext1; simp only [trans_apply, apply_symm_apply]
  · intro ϕ; 

Proof state:
case intro.f.right_inv
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
inst✝¹ : FiniteDimensional F E
inst✝ : IsGalois F E
α : E
hα : F⟮α⟯ = ⊤
iso : ↥F⟮α⟯ ≃ₐ[F] E :=
  {
    toEquiv :=
      { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },
        left_inv := (_ : ∀ (x : ↥F⟮α⟯), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),
        right_inv :=
          (_ :
            ∀ (x : E),
              (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =
                (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) },
    map_mul' :=
      (_ :
        ∀ (x x_1 : ↥F⟮α⟯),
          Equiv.toFun
              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },
                left_inv :=
                  (_ : ∀ (x : ↥F⟮α⟯), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),
                right_inv :=
                  (_ :
                    ∀ (x : E),
                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =
                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }
              (x * x_1) =
            Equiv.toFun
              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },
                left_inv :=
                  (_ : ∀ (x : ↥F⟮α⟯), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),
                right_inv :=
                  (_ :
                    ∀ (x : E),
                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =
                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }
              (x * x_1)),
    map_add' :=
      (_ :
        ∀ (x x_1 : ↥F⟮α⟯),
          Equiv.toFun
              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },
                left_inv :=
                  (_ : ∀ (x : ↥F⟮α⟯), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),
                right_inv :=
                  (_ :
                    ∀ (x : E),
                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =
                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }
              (x + x_1) =
            Equiv.toFun
              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },
                left_inv :=
                  (_ : ∀ (x : ↥F⟮α⟯), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),
                right_inv :=
                  (_ :
                    ∀ (x : E),
                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =
                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }
              (x + x_1)),
    commutes' :=
      (_ :
        ∀ (x : F),
          Equiv.toFun
              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },
                left_inv :=
                  (_ : ∀ (x : ↥F⟮α⟯), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),
                right_inv :=
                  (_ :
                    ∀ (x : E),
                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =
                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }
              ((algebraMap F ↥F⟮α⟯) x) =
            Equiv.toFun
              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },
                left_inv :=
                  (_ : ∀ (x : ↥F⟮α⟯), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),
                right_inv :=
                  (_ :
                    ∀ (x : E),
                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =
                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }
              ((algebraMap F ↥F⟮α⟯) x)) }
H : IsIntegral F α
h_sep : Polynomial.Separable (minpoly F α)
h_splits : Polynomial.Splits (algebraMap F ↥F⟮α⟯) (minpoly F α)
ϕ : ↥F⟮α⟯ ≃ₐ[F] ↥F⟮α⟯
⊢ (fun ϕ => AlgEquiv.trans iso (AlgEquiv.trans ϕ (AlgEquiv.symm iso)))
      ((fun ϕ => AlgEquiv.trans (AlgEquiv.symm iso) (AlgEquiv.trans ϕ iso)) ϕ) =
    ϕ

Next tactic:
ext1