-- Mathlib/FieldTheory/Galois/Basic.lean
theorem card_aut_eq_finrank [FiniteDimensional F E] [IsGalois F E] :
    Fintype.card (E ≃ₐ[F] E) = finrank F E

Proof state:
case intro.f
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 :=
  { toFun := fun e => ↑e, invFun := fun e => ⟨e, ⋯⟩, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯,
    commutes' := ⋯ }
H : IsIntegral F α
h_sep : IsSeparable F α
h_splits : Polynomial.Splits (algebraMap F ↥F⟮α⟯) (minpoly F α)
⊢ (E ≃ₐ[F] E) ≃ ↥F⟮α⟯ ≃ₐ[F] ↥F⟮α⟯

Tactic:
apply Equiv.mk (fun ϕ => iso.trans (ϕ.trans iso.symm)) fun ϕ => iso.symm.trans (ϕ.trans iso)

Result:
case intro.f.left_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 :=
  { toFun := fun e => ↑e, invFun := fun e => ⟨e, ⋯⟩, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯,
    commutes' := ⋯ }
H : IsIntegral F α
h_sep : IsSeparable F α
h_splits : Polynomial.Splits (algebraMap F ↥F⟮α⟯) (minpoly F α)
⊢ Function.LeftInverse (fun ϕ => iso.symm.trans (ϕ.trans iso)) fun ϕ => iso.trans (ϕ.trans iso.symm)

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 :=
  { toFun := fun e => ↑e, invFun := fun e => ⟨e, ⋯⟩, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯,
    commutes' := ⋯ }
H : IsIntegral F α
h_sep : IsSeparable F α
h_splits : Polynomial.Splits (algebraMap F ↥F⟮α⟯) (minpoly F α)
⊢ Function.RightInverse (fun ϕ => iso.symm.trans (ϕ.trans iso)) fun ϕ => iso.trans (ϕ.trans iso.symm)

Proof state:
case intro
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 :=
  { toFun := fun e => ↑e, invFun := fun e => ⟨e, ⋯⟩, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯,
    commutes' := ⋯ }
H : IsIntegral F α
h_sep : IsSeparable F α
⊢ Fintype.card (E ≃ₐ[F] E) = finrank F E

Tactic:
have h_splits : (minpoly F α).Splits (algebraMap F E) := IsGalois.splits F α

Result:
case intro
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 :=
  { toFun := fun e => ↑e, invFun := fun e => ⟨e, ⋯⟩, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯,
    commutes' := ⋯ }
H : IsIntegral F α
h_sep : IsSeparable F α
h_splits : Polynomial.Splits (algebraMap F E) (minpoly F α)
⊢ Fintype.card (E ≃ₐ[F] E) = finrank F E

Proof state:
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⟮α⟯ = ⊤
x✝ : ↥F⟮α⟯
⊢ (fun e => ⟨e, ⋯⟩) ((fun e => ↑e) x✝) = x✝

Tactic:
ext

Result:
case a
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⟮α⟯ = ⊤
x✝ : ↥F⟮α⟯
⊢ ↑((fun e => ⟨e, ⋯⟩) ((fun e => ↑e) x✝)) = ↑x✝

Proof state:
case intro.f.left_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 :=
  { toFun := fun e => ↑e, invFun := fun e => ⟨e, ⋯⟩, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯,
    commutes' := ⋯ }
H : IsIntegral F α
h_sep : IsSeparable F α
h_splits : Polynomial.Splits (algebraMap F ↥F⟮α⟯) (minpoly F α)
⊢ Function.LeftInverse (fun ϕ => iso.symm.trans (ϕ.trans iso)) fun ϕ => iso.trans (ϕ.trans iso.symm)

Tactic:
intro ϕ

Result:
case intro.f.left_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 :=
  { toFun := fun e => ↑e, invFun := fun e => ⟨e, ⋯⟩, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯,
    commutes' := ⋯ }
H : IsIntegral F α
h_sep : IsSeparable F α
h_splits : Polynomial.Splits (algebraMap F ↥F⟮α⟯) (minpoly F α)
ϕ : E ≃ₐ[F] E
⊢ (fun ϕ => iso.symm.trans (ϕ.trans iso)) ((fun ϕ => iso.trans (ϕ.trans iso.symm)) ϕ) = ϕ

Proof state:
case intro
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 :=
  { toFun := fun e => ↑e, invFun := fun e => ⟨e, ⋯⟩, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯,
    commutes' := ⋯ }
H : IsIntegral F α
h_sep : IsSeparable F α
h_splits : Polynomial.Splits (algebraMap F ↥F⟮α⟯) (minpoly F α)
⊢ Fintype.card (E ≃ₐ[F] E) = finrank F ↥F⟮α⟯

Tactic:
rw [← IntermediateField.AdjoinSimple.card_aut_eq_finrank F E H h_sep h_splits]

Result:
case intro
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 :=
  { toFun := fun e => ↑e, invFun := fun e => ⟨e, ⋯⟩, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯,
    commutes' := ⋯ }
H : IsIntegral F α
h_sep : IsSeparable F α
h_splits : Polynomial.Splits (algebraMap F ↥F⟮α⟯) (minpoly F α)
⊢ Fintype.card (E ≃ₐ[F] E) = Fintype.card (↥F⟮α⟯ ≃ₐ[F] ↥F⟮α⟯)

Proof state:
case intro
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 :=
  { toFun := fun e => ↑e, invFun := fun e => ⟨e, ⋯⟩, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯,
    commutes' := ⋯ }
H : IsIntegral F α
⊢ Fintype.card (E ≃ₐ[F] E) = finrank F E

Tactic:
have h_sep : IsSeparable F α := IsGalois.separable F α

Result:
case intro
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 :=
  { toFun := fun e => ↑e, invFun := fun e => ⟨e, ⋯⟩, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯,
    commutes' := ⋯ }
H : IsIntegral F α
h_sep : IsSeparable F α
⊢ Fintype.card (E ≃ₐ[F] E) = finrank F E

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 :=
  { toFun := fun e => ↑e, invFun := fun e => ⟨e, ⋯⟩, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯,
    commutes' := ⋯ }
H : IsIntegral F α
h_sep : IsSeparable F α
h_splits : Polynomial.Splits (algebraMap F ↥F⟮α⟯) (minpoly F α)
⊢ Function.RightInverse (fun ϕ => iso.symm.trans (ϕ.trans iso)) fun ϕ => iso.trans (ϕ.trans iso.symm)

Tactic:
intro ϕ

Result:
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 :=
  { toFun := fun e => ↑e, invFun := fun e => ⟨e, ⋯⟩, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯,
    commutes' := ⋯ }
H : IsIntegral F α
h_sep : IsSeparable F α
h_splits : Polynomial.Splits (algebraMap F ↥F⟮α⟯) (minpoly F α)
ϕ : ↥F⟮α⟯ ≃ₐ[F] ↥F⟮α⟯
⊢ (fun ϕ => iso.trans (ϕ.trans iso.symm)) ((fun ϕ => iso.symm.trans (ϕ.trans iso)) ϕ) = ϕ

Proof state:
case a
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⟮α⟯ = ⊤
x✝ : ↥F⟮α⟯
⊢ ↑((fun e => ⟨e, ⋯⟩) ((fun e => ↑e) x✝)) = ↑x✝

Tactic:
rfl

Result:
no goals