Theorem: IsGalois.of_card_aut_eq_finrank
File: Mathlib/FieldTheory/Galois.lean

tactic: apply of_fixedField_eq_bot
state_before: F : Type u_1
inst✝³ : Field F
E : Type u_2
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
h : Fintype.card (E ≃ₐ[F] E) = finrank F E
⊢ IsGalois F E
state_after: case h
F : Type u_1
inst✝³ : Field F
E : Type u_2
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
h : Fintype.card (E ≃ₐ[F] E) = finrank F E
⊢ IntermediateField.fixedField ⊤ = ⊥

tactic: have p : 0 < finrank (IntermediateField.fixedField (⊤ : Subgroup (E ≃ₐ[F] E))) E := finrank_pos
state_before: case h
F : Type u_1
inst✝³ : Field F
E : Type u_2
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
h : Fintype.card (E ≃ₐ[F] E) = finrank F E
⊢ IntermediateField.fixedField ⊤ = ⊥
state_after: case h
F : Type u_1
inst✝³ : Field F
E : Type u_2
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
h : Fintype.card (E ≃ₐ[F] E) = finrank F E
p : 0 < finrank (↥(IntermediateField.fixedField ⊤)) E
⊢ IntermediateField.fixedField ⊤ = ⊥

tactic: classical
rw [← IntermediateField.finrank_eq_one_iff, ← mul_left_inj' (ne_of_lt p).symm,
  finrank_mul_finrank, ← h, one_mul, IntermediateField.finrank_fixedField_eq_card]
apply Fintype.card_congr
exact
  { toFun := fun g => ⟨g, Subgroup.mem_top g⟩
    invFun := (↑)
    left_inv := fun g => rfl
    right_inv := fun _ => by ext; rfl }
state_before: case h
F : Type u_1
inst✝³ : Field F
E : Type u_2
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
h : Fintype.card (E ≃ₐ[F] E) = finrank F E
p : 0 < finrank (↥(IntermediateField.fixedField ⊤)) E
⊢ IntermediateField.fixedField ⊤ = ⊥
state_after: no goals

tactic: rw [← IntermediateField.finrank_eq_one_iff, ← mul_left_inj' (ne_of_lt p).symm,
  finrank_mul_finrank, ← h, one_mul, IntermediateField.finrank_fixedField_eq_card]
state_before: case h
F : Type u_1
inst✝³ : Field F
E : Type u_2
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
h : Fintype.card (E ≃ₐ[F] E) = finrank F E
p : 0 < finrank (↥(IntermediateField.fixedField ⊤)) E
⊢ IntermediateField.fixedField ⊤ = ⊥
state_after: case h
F : Type u_1
inst✝³ : Field F
E : Type u_2
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
h : Fintype.card (E ≃ₐ[F] E) = finrank F E
p : 0 < finrank (↥(IntermediateField.fixedField ⊤)) E
⊢ Fintype.card (E ≃ₐ[F] E) = Fintype.card ↥⊤

tactic: apply Fintype.card_congr
state_before: case h
F : Type u_1
inst✝³ : Field F
E : Type u_2
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
h : Fintype.card (E ≃ₐ[F] E) = finrank F E
p : 0 < finrank (↥(IntermediateField.fixedField ⊤)) E
⊢ Fintype.card (E ≃ₐ[F] E) = Fintype.card ↥⊤
state_after: case h.f
F : Type u_1
inst✝³ : Field F
E : Type u_2
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
h : Fintype.card (E ≃ₐ[F] E) = finrank F E
p : 0 < finrank (↥(IntermediateField.fixedField ⊤)) E
⊢ (E ≃ₐ[F] E) ≃ ↥⊤

tactic: exact
  { toFun := fun g => ⟨g, Subgroup.mem_top g⟩
    invFun := (↑)
    left_inv := fun g => rfl
    right_inv := fun _ => by ext; rfl }
state_before: case h.f
F : Type u_1
inst✝³ : Field F
E : Type u_2
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
h : Fintype.card (E ≃ₐ[F] E) = finrank F E
p : 0 < finrank (↥(IntermediateField.fixedField ⊤)) E
⊢ (E ≃ₐ[F] E) ≃ ↥⊤
state_after: no goals

tactic: ext
state_before: F : Type u_1
inst✝³ : Field F
E : Type u_2
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
h : Fintype.card (E ≃ₐ[F] E) = finrank F E
p : 0 < finrank (↥(IntermediateField.fixedField ⊤)) E
x✝ : ↥⊤
⊢ (fun g => ⟨g, ⋯⟩) ↑x✝ = x✝
state_after: case a.h
F : Type u_1
inst✝³ : Field F
E : Type u_2
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
h : Fintype.card (E ≃ₐ[F] E) = finrank F E
p : 0 < finrank (↥(IntermediateField.fixedField ⊤)) E
x✝ : ↥⊤
a✝ : E
⊢ ↑((fun g => ⟨g, ⋯⟩) ↑x✝) a✝ = ↑x✝ a✝

tactic: rfl
state_before: case a.h
F : Type u_1
inst✝³ : Field F
E : Type u_2
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
h : Fintype.card (E ≃ₐ[F] E) = finrank F E
p : 0 < finrank (↥(IntermediateField.fixedField ⊤)) E
x✝ : ↥⊤
a✝ : E
⊢ ↑((fun g => ⟨g, ⋯⟩) ↑x✝) a✝ = ↑x✝ a✝
state_after: no goals