l3lab/ntp-mathlib huggingface dataset:
instance distribMulAction₀ : DistribMulAction (ConjAct K) K :=
  { ConjAct.mulAction₀ with
    smul_zero := by
      simp only [smul_def]
      simp only [mul_zero, zero_mul, «forall», forall_const]
    smul_add := by
      simp only [smul_def]
      

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : DivisionRing K
src✝ : MulAction (ConjAct K) K := mulAction₀
⊢ ∀ (a : ConjAct K) (x y : K),
    ofConjAct a * (x + y) * (ofConjAct a)⁻¹ = ofConjAct a * x * (ofConjAct a)⁻¹ + ofConjAct a * y * (ofConjAct a)⁻¹

Next tactic:
simp only [mul_add, add_mul, forall_const, «forall»]
instance : MulDistribMulAction (ConjAct G) G where
  smul_mul := by
    simp only [smul_def]
    simp only [mul_assoc, inv_mul_cancel_left, forall_const, «forall»]
  smul_one := by simp only [smul_def, mul_one, mul_right_inv, «forall», forall_const]
  one_smul := by 

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Group G
⊢ ∀ (b : G), 1 • b = b

Next tactic:
simp only [smul_def, ofConjAct_one, one_mul, inv_one, mul_one, forall_const]
instance : MulDistribMulAction (ConjAct G) G where
  smul_mul := by
    simp only [smul_def]
    simp only [mul_assoc, inv_mul_cancel_left, forall_const, «forall»]
  smul_one := by simp only [smul_def, mul_one, mul_right_inv, «forall», forall_const]
  one_smul := by simp only [smul_def, ofConjAct_one, one_mul, inv_one, mul_one, forall_const]
  mul_smul := by
    

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Group G
⊢ ∀ (x y : ConjAct G) (b : G), (x * y) • b = x • y • b

Next tactic:
simp only [smul_def]
instance : MulDistribMulAction (ConjAct G) G where
  smul_mul := by
    simp only [smul_def]
    simp only [mul_assoc, inv_mul_cancel_left, forall_const, «forall»]
  smul_one := by simp only [smul_def, mul_one, mul_right_inv, «forall», forall_const]
  one_smul := by simp only [smul_def, ofConjAct_one, one_mul, inv_one, mul_one, forall_const]
  mul_smul := by
    simp only [smul_def]
    

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Group G
⊢ ∀ (x y : ConjAct G) (b : G),
    ofConjAct (x * y) * b * (ofConjAct (x * y))⁻¹ = ofConjAct x * (ofConjAct y * b * (ofConjAct y)⁻¹) * (ofConjAct x)⁻¹

Next tactic:
simp only [map_mul, mul_assoc, mul_inv_rev, forall_const, «forall»]
instance : MulDistribMulAction (ConjAct G) G where
  smul_mul := by
    

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Group G
⊢ ∀ (r : ConjAct G) (x y : G), r • (x * y) = r • x * r • y

Next tactic:
simp only [smul_def]
instance : MulDistribMulAction (ConjAct G) G where
  smul_mul := by
    simp only [smul_def]
    

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Group G
⊢ ∀ (r : ConjAct G) (x y : G),
    ofConjAct r * (x * y) * (ofConjAct r)⁻¹ = ofConjAct r * x * (ofConjAct r)⁻¹ * (ofConjAct r * y * (ofConjAct r)⁻¹)

Next tactic:
simp only [mul_assoc, inv_mul_cancel_left, forall_const, «forall»]
instance : MulDistribMulAction (ConjAct G) G where
  smul_mul := by
    simp only [smul_def]
    simp only [mul_assoc, inv_mul_cancel_left, forall_const, «forall»]
  smul_one := by 

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Group G
⊢ ∀ (r : ConjAct G), r • 1 = 1

Next tactic:
simp only [smul_def, mul_one, mul_right_inv, «forall», forall_const]
instance smulCommClass [SMul α G] [SMulCommClass α G G] [IsScalarTower α G G] :
    SMulCommClass α (ConjAct G) G where
  smul_comm a ug g := by 

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝³ : Group G
inst✝² : SMul α G
inst✝¹ : SMulCommClass α G G
inst✝ : IsScalarTower α G G
a : α
ug : ConjAct G
g : G
⊢ a • ug • g = ug • a • g

Next tactic:
rw [smul_def, smul_def, mul_smul_comm, smul_mul_assoc]
/-- The set of fixed points of the conjugation action of `G` on itself is the center of `G`. -/
theorem fixedPoints_eq_center : fixedPoints (ConjAct G) G = center G := by
  

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Group G
⊢ fixedPoints (ConjAct G) G = ↑(center G)

Next tactic:
ext x
/-- The set of fixed points of the conjugation action of `G` on itself is the center of `G`. -/
theorem fixedPoints_eq_center : fixedPoints (ConjAct G) G = center G := by
  ext x
  

Proof state:
case h
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Group G
x : G
⊢ x ∈ fixedPoints (ConjAct G) G ↔ x ∈ ↑(center G)

Next tactic:
simp [mem_center_iff, smul_def, mul_inv_eq_iff_eq_mul]
@[simp]
theorem mem_orbit_conjAct {g h : G} : g ∈ orbit (ConjAct G) h ↔ IsConj g h := by
  

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Group G
g h : G
⊢ g ∈ orbit (ConjAct G) h ↔ IsConj g h

Next tactic:
rw [isConj_comm, isConj_iff, mem_orbit_iff]
@[simp]
theorem mem_orbit_conjAct {g h : G} : g ∈ orbit (ConjAct G) h ↔ IsConj g h := by
  rw [isConj_comm, isConj_iff, mem_orbit_iff]; 

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Group G
g h : G
⊢ (∃ x, x • h = g) ↔ ∃ c, c * h * c⁻¹ = g

Next tactic:
rfl
theorem orbitRel_conjAct : (orbitRel (ConjAct G) G).Rel = IsConj :=
  funext₂ fun g h => by 

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Group G
g h : G
⊢ Setoid.Rel (orbitRel (ConjAct G) G) g h = IsConj g h

Next tactic:
rw [orbitRel_apply, mem_orbit_conjAct]
theorem orbit_eq_carrier_conjClasses [Group G] (g : G) :
    orbit (ConjAct G) g = (ConjClasses.mk g).carrier := by
  

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝¹ inst✝ : Group G
g : G
⊢ orbit (ConjAct G) g = ConjClasses.carrier (ConjClasses.mk g)

Next tactic:
ext h
theorem orbit_eq_carrier_conjClasses [Group G] (g : G) :
    orbit (ConjAct G) g = (ConjClasses.mk g).carrier := by
  ext h
  

Proof state:
case h
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝¹ inst✝ : Group G
g h : G
⊢ h ∈ orbit (ConjAct G) g ↔ h ∈ ConjClasses.carrier (ConjClasses.mk g)

Next tactic:
rw [ConjClasses.mem_carrier_iff_mk_eq, ConjClasses.mk_eq_mk_iff_isConj, mem_orbit_conjAct]
@[simp]
theorem _root_.MulAut.conjNormal_symm_apply {H : Subgroup G} [H.Normal] (g : G) (h : H) :
    ↑((MulAut.conjNormal g).symm h) = g⁻¹ * h * g := by
  

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
g : G
h : ↥H
⊢ ↑((MulEquiv.symm (MulAut.conjNormal g)) h) = g⁻¹ * ↑h * g

Next tactic:
change _ * _⁻¹⁻¹ = _
@[simp]
theorem _root_.MulAut.conjNormal_symm_apply {H : Subgroup G} [H.Normal] (g : G) (h : H) :
    ↑((MulAut.conjNormal g).symm h) = g⁻¹ * h * g := by
  change _ * _⁻¹⁻¹ = _
  

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
g : G
h : ↥H
⊢ ofConjAct ((MulEquiv.toMonoidHom toConjAct) g)⁻¹ * ↑h * ((MulEquiv.toMonoidHom toConjAct) g)⁻¹⁻¹ = g⁻¹ * ↑h * g

Next tactic:
rw [inv_inv]
@[simp]
theorem _root_.MulAut.conjNormal_symm_apply {H : Subgroup G} [H.Normal] (g : G) (h : H) :
    ↑((MulAut.conjNormal g).symm h) = g⁻¹ * h * g := by
  change _ * _⁻¹⁻¹ = _
  rw [inv_inv]
  

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
g : G
h : ↥H
⊢ ofConjAct ((MulEquiv.toMonoidHom toConjAct) g)⁻¹ * ↑h * (MulEquiv.toMonoidHom toConjAct) g = g⁻¹ * ↑h * g

Next tactic:
rfl
instance normal_of_characteristic_of_normal {H : Subgroup G} [hH : H.Normal] {K : Subgroup H}
    [h : K.Characteristic] : (K.map H.subtype).Normal :=
  ⟨fun a ha b => by
    

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K✝ : Type u_6
inst✝ : Group G
H : Subgroup G
hH : Normal H
K : Subgroup ↥H
h : Characteristic K
a : G
ha : a ∈ map (Subgroup.subtype H) K
b : G
⊢ b * a * b⁻¹ ∈ map (Subgroup.subtype H) K

Next tactic:
obtain ⟨a, ha, rfl⟩ := ha
instance normal_of_characteristic_of_normal {H : Subgroup G} [hH : H.Normal] {K : Subgroup H}
    [h : K.Characteristic] : (K.map H.subtype).Normal :=
  ⟨fun a ha b => by
    obtain ⟨a, ha, rfl⟩ := ha
    

Proof state:
case intro.intro
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K✝ : Type u_6
inst✝ : Group G
H : Subgroup G
hH : Normal H
K : Subgroup ↥H
h : Characteristic K
b : G
a : ↥H
ha : a ∈ ↑K
⊢ b * (Subgroup.subtype H) a * b⁻¹ ∈ map (Subgroup.subtype H) K

Next tactic:
exact K.apply_coe_mem_map H.subtype
      ⟨_, (SetLike.ext_iff.mp (h.fixed (MulAut.conjNormal b)) a).mpr ha⟩
/-- The stabilizer of `Mˣ` acting on itself by conjugation at `x : Mˣ` is exactly the
units of the centralizer of `x : M`. -/
@[simps! apply_coe_val symm_apply_val_coe]
def unitsCentralizerEquiv (x : Mˣ) :
    (Submonoid.centralizer ({↑x} : Set M))ˣ ≃* MulAction.stabilizer (ConjAct Mˣ) x :=
  MulEquiv.symm
  { toFun := MonoidHom.toHomUnits <|
      { toFun := fun u ↦ ⟨↑(ConjAct.ofConjAct u.1 : Mˣ), by
          

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Monoid M
x : Mˣ
u : ↥(MulAction.stabilizer (ConjAct Mˣ) x)
⊢ ↑(ConjAct.ofConjAct ↑u) ∈ Submonoid.centralizer {↑x}

Next tactic:
rintro x ⟨rfl⟩
/-- The stabilizer of `Mˣ` acting on itself by conjugation at `x : Mˣ` is exactly the
units of the centralizer of `x : M`. -/
@[simps! apply_coe_val symm_apply_val_coe]
def unitsCentralizerEquiv (x : Mˣ) :
    (Submonoid.centralizer ({↑x} : Set M))ˣ ≃* MulAction.stabilizer (ConjAct Mˣ) x :=
  MulEquiv.symm
  { toFun := MonoidHom.toHomUnits <|
      { toFun := fun u ↦ ⟨↑(ConjAct.ofConjAct u.1 : Mˣ), by
          rintro x ⟨rfl⟩
          

Proof state:
case refl
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Monoid M
x : Mˣ
u : ↥(MulAction.stabilizer (ConjAct Mˣ) x)
⊢ ↑x * ↑(ConjAct.ofConjAct ↑u) = ↑(ConjAct.ofConjAct ↑u) * ↑x

Next tactic:
have : (u : ConjAct Mˣ) • x = x := u.2
/-- The stabilizer of `Mˣ` acting on itself by conjugation at `x : Mˣ` is exactly the
units of the centralizer of `x : M`. -/
@[simps! apply_coe_val symm_apply_val_coe]
def unitsCentralizerEquiv (x : Mˣ) :
    (Submonoid.centralizer ({↑x} : Set M))ˣ ≃* MulAction.stabilizer (ConjAct Mˣ) x :=
  MulEquiv.symm
  { toFun := MonoidHom.toHomUnits <|
      { toFun := fun u ↦ ⟨↑(ConjAct.ofConjAct u.1 : Mˣ), by
          rintro x ⟨rfl⟩
          have : (u : ConjAct Mˣ) • x = x := u.2
          

Proof state:
case refl
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Monoid M
x : Mˣ
u : ↥(MulAction.stabilizer (ConjAct Mˣ) x)
this : ↑u • x = x
⊢ ↑x * ↑(ConjAct.ofConjAct ↑u) = ↑(ConjAct.ofConjAct ↑u) * ↑x

Next tactic:
rwa [ConjAct.smul_def, mul_inv_eq_iff_eq_mul, Units.ext_iff, eq_comm] at this
/-- The stabilizer of `Mˣ` acting on itself by conjugation at `x : Mˣ` is exactly the
units of the centralizer of `x : M`. -/
@[simps! apply_coe_val symm_apply_val_coe]
def unitsCentralizerEquiv (x : Mˣ) :
    (Submonoid.centralizer ({↑x} : Set M))ˣ ≃* MulAction.stabilizer (ConjAct Mˣ) x :=
  MulEquiv.symm
  { toFun := MonoidHom.toHomUnits <|
      { toFun := fun u ↦ ⟨↑(ConjAct.ofConjAct u.1 : Mˣ), by
          rintro x ⟨rfl⟩
          have : (u : ConjAct Mˣ) • x = x := u.2
          rwa [ConjAct.smul_def, mul_inv_eq_iff_eq_mul, Units.ext_iff, eq_comm] at this⟩,
        map_one' := rfl,
        map_mul' := fun a b ↦ rfl }
    invFun := fun u ↦
      ⟨ConjAct.toConjAct (Units.map (Submonoid.centralizer ({↑x} : Set M)).subtype u), by
      

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Monoid M
x : Mˣ
u : (↥(Submonoid.centralizer {↑x}))ˣ
⊢ ConjAct.toConjAct ((Units.map (Submonoid.subtype (Submonoid.centralizer {↑x}))) u) ∈
    MulAction.stabilizer (ConjAct Mˣ) x

Next tactic:
change _ • _ = _
/-- The stabilizer of `Mˣ` acting on itself by conjugation at `x : Mˣ` is exactly the
units of the centralizer of `x : M`. -/
@[simps! apply_coe_val symm_apply_val_coe]
def unitsCentralizerEquiv (x : Mˣ) :
    (Submonoid.centralizer ({↑x} : Set M))ˣ ≃* MulAction.stabilizer (ConjAct Mˣ) x :=
  MulEquiv.symm
  { toFun := MonoidHom.toHomUnits <|
      { toFun := fun u ↦ ⟨↑(ConjAct.ofConjAct u.1 : Mˣ), by
          rintro x ⟨rfl⟩
          have : (u : ConjAct Mˣ) • x = x := u.2
          rwa [ConjAct.smul_def, mul_inv_eq_iff_eq_mul, Units.ext_iff, eq_comm] at this⟩,
        map_one' := rfl,
        map_mul' := fun a b ↦ rfl }
    invFun := fun u ↦
      ⟨ConjAct.toConjAct (Units.map (Submonoid.centralizer ({↑x} : Set M)).subtype u), by
      change _ • _ = _
      

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Monoid M
x : Mˣ
u : (↥(Submonoid.centralizer {↑x}))ˣ
⊢ ConjAct.toConjAct ((Units.map (Submonoid.subtype (Submonoid.centralizer {↑x}))) u) • x = x

Next tactic:
simp only [ConjAct.smul_def, ConjAct.ofConjAct_toConjAct, mul_inv_eq_iff_eq_mul]
/-- The stabilizer of `Mˣ` acting on itself by conjugation at `x : Mˣ` is exactly the
units of the centralizer of `x : M`. -/
@[simps! apply_coe_val symm_apply_val_coe]
def unitsCentralizerEquiv (x : Mˣ) :
    (Submonoid.centralizer ({↑x} : Set M))ˣ ≃* MulAction.stabilizer (ConjAct Mˣ) x :=
  MulEquiv.symm
  { toFun := MonoidHom.toHomUnits <|
      { toFun := fun u ↦ ⟨↑(ConjAct.ofConjAct u.1 : Mˣ), by
          rintro x ⟨rfl⟩
          have : (u : ConjAct Mˣ) • x = x := u.2
          rwa [ConjAct.smul_def, mul_inv_eq_iff_eq_mul, Units.ext_iff, eq_comm] at this⟩,
        map_one' := rfl,
        map_mul' := fun a b ↦ rfl }
    invFun := fun u ↦
      ⟨ConjAct.toConjAct (Units.map (Submonoid.centralizer ({↑x} : Set M)).subtype u), by
      change _ • _ = _
      simp only [ConjAct.smul_def, ConjAct.ofConjAct_toConjAct, mul_inv_eq_iff_eq_mul]
      

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Monoid M
x : Mˣ
u : (↥(Submonoid.centralizer {↑x}))ˣ
⊢ (Units.map (Submonoid.subtype (Submonoid.centralizer {↑x}))) u * x =
    x * (Units.map (Submonoid.subtype (Submonoid.centralizer {↑x}))) u

Next tactic:
exact Units.ext <| (u.1.2 x <| Set.mem_singleton _).symm
/-- The stabilizer of `Mˣ` acting on itself by conjugation at `x : Mˣ` is exactly the
units of the centralizer of `x : M`. -/
@[simps! apply_coe_val symm_apply_val_coe]
def unitsCentralizerEquiv (x : Mˣ) :
    (Submonoid.centralizer ({↑x} : Set M))ˣ ≃* MulAction.stabilizer (ConjAct Mˣ) x :=
  MulEquiv.symm
  { toFun := MonoidHom.toHomUnits <|
      { toFun := fun u ↦ ⟨↑(ConjAct.ofConjAct u.1 : Mˣ), by
          rintro x ⟨rfl⟩
          have : (u : ConjAct Mˣ) • x = x := u.2
          rwa [ConjAct.smul_def, mul_inv_eq_iff_eq_mul, Units.ext_iff, eq_comm] at this⟩,
        map_one' := rfl,
        map_mul' := fun a b ↦ rfl }
    invFun := fun u ↦
      ⟨ConjAct.toConjAct (Units.map (Submonoid.centralizer ({↑x} : Set M)).subtype u), by
      change _ • _ = _
      simp only [ConjAct.smul_def, ConjAct.ofConjAct_toConjAct, mul_inv_eq_iff_eq_mul]
      exact Units.ext <| (u.1.2 x <| Set.mem_singleton _).symm⟩
    left_inv := fun _ ↦ by 

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Monoid M
x : Mˣ
x✝ : ↥(MulAction.stabilizer (ConjAct Mˣ) x)
⊢ (fun u =>
        { val := ConjAct.toConjAct ((Units.map (Submonoid.subtype (Submonoid.centralizer {↑x}))) u),
          property :=
            (_ : ConjAct.toConjAct ((Units.map (Submonoid.subtype (Submonoid.centralizer {↑x}))) u) • x = x) })
      ((MonoidHom.toHomUnits
          {
            toOneHom :=
              {
                toFun := fun u =>
                  { val := ↑(ConjAct.ofConjAct ↑u),
                    property := (_ : ∀ x_1 ∈ {↑x}, x_1 * ↑(ConjAct.ofConjAct ↑u) = ↑(ConjAct.ofConjAct ↑u) * x_1) },
                map_one' := ?m.103451 },
            map_mul' :=
              (_ :
                ∀ (a b : ↥(MulAction.stabilizer (ConjAct Mˣ) x)),
                  OneHom.toFun { toFun := fun u => ?m.103416 u, map_one' := ?m.103451 } (a * b) =
                    OneHom.toFun { toFun := fun u => ?m.103416 u, map_one' := ?m.103451 } a *
                      OneHom.toFun { toFun := fun u => ?m.103416 u, map_one' := ?m.103451 } b) })
        x✝) =
    x✝

Next tactic:
ext
/-- The stabilizer of `Mˣ` acting on itself by conjugation at `x : Mˣ` is exactly the
units of the centralizer of `x : M`. -/
@[simps! apply_coe_val symm_apply_val_coe]
def unitsCentralizerEquiv (x : Mˣ) :
    (Submonoid.centralizer ({↑x} : Set M))ˣ ≃* MulAction.stabilizer (ConjAct Mˣ) x :=
  MulEquiv.symm
  { toFun := MonoidHom.toHomUnits <|
      { toFun := fun u ↦ ⟨↑(ConjAct.ofConjAct u.1 : Mˣ), by
          rintro x ⟨rfl⟩
          have : (u : ConjAct Mˣ) • x = x := u.2
          rwa [ConjAct.smul_def, mul_inv_eq_iff_eq_mul, Units.ext_iff, eq_comm] at this⟩,
        map_one' := rfl,
        map_mul' := fun a b ↦ rfl }
    invFun := fun u ↦
      ⟨ConjAct.toConjAct (Units.map (Submonoid.centralizer ({↑x} : Set M)).subtype u), by
      change _ • _ = _
      simp only [ConjAct.smul_def, ConjAct.ofConjAct_toConjAct, mul_inv_eq_iff_eq_mul]
      exact Units.ext <| (u.1.2 x <| Set.mem_singleton _).symm⟩
    left_inv := fun _ ↦ by ext; 

Proof state:
case a
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Monoid M
x : Mˣ
x✝ : ↥(MulAction.stabilizer (ConjAct Mˣ) x)
⊢ ↑((fun u =>
          { val := ConjAct.toConjAct ((Units.map (Submonoid.subtype (Submonoid.centralizer {↑x}))) u),
            property :=
              (_ : ConjAct.toConjAct ((Units.map (Submonoid.subtype (Submonoid.centralizer {↑x}))) u) • x = x) })
        ((MonoidHom.toHomUnits
            {
              toOneHom :=
                {
                  toFun := fun u =>
                    { val := ↑(ConjAct.ofConjAct ↑u),
                      property := (_ : ∀ x_1 ∈ {↑x}, x_1 * ↑(ConjAct.ofConjAct ↑u) = ↑(ConjAct.ofConjAct ↑u) * x_1) },
                  map_one' := ?m.103451 },
              map_mul' :=
                (_ :
                  ∀ (a b : ↥(MulAction.stabilizer (ConjAct Mˣ) x)),
                    OneHom.toFun { toFun := fun u => ?m.103416 u, map_one' := ?m.103451 } (a * b) =
                      OneHom.toFun { toFun := fun u => ?m.103416 u, map_one' := ?m.103451 } a *
                        OneHom.toFun { toFun := fun u => ?m.103416 u, map_one' := ?m.103451 } b) })
          x✝)) =
    ↑x✝

Next tactic:
rfl
/-- The stabilizer of `Mˣ` acting on itself by conjugation at `x : Mˣ` is exactly the
units of the centralizer of `x : M`. -/
@[simps! apply_coe_val symm_apply_val_coe]
def unitsCentralizerEquiv (x : Mˣ) :
    (Submonoid.centralizer ({↑x} : Set M))ˣ ≃* MulAction.stabilizer (ConjAct Mˣ) x :=
  MulEquiv.symm
  { toFun := MonoidHom.toHomUnits <|
      { toFun := fun u ↦ ⟨↑(ConjAct.ofConjAct u.1 : Mˣ), by
          rintro x ⟨rfl⟩
          have : (u : ConjAct Mˣ) • x = x := u.2
          rwa [ConjAct.smul_def, mul_inv_eq_iff_eq_mul, Units.ext_iff, eq_comm] at this⟩,
        map_one' := rfl,
        map_mul' := fun a b ↦ rfl }
    invFun := fun u ↦
      ⟨ConjAct.toConjAct (Units.map (Submonoid.centralizer ({↑x} : Set M)).subtype u), by
      change _ • _ = _
      simp only [ConjAct.smul_def, ConjAct.ofConjAct_toConjAct, mul_inv_eq_iff_eq_mul]
      exact Units.ext <| (u.1.2 x <| Set.mem_singleton _).symm⟩
    left_inv := fun _ ↦ by ext; rfl
    right_inv := fun _ ↦ by 

Proof state:
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Monoid M
x : Mˣ
x✝ : (↥(Submonoid.centralizer {↑x}))ˣ
⊢ (MonoidHom.toHomUnits
        {
          toOneHom :=
            {
              toFun := fun u =>
                { val := ↑(ConjAct.ofConjAct ↑u),
                  property := (_ : ∀ x_1 ∈ {↑x}, x_1 * ↑(ConjAct.ofConjAct ↑u) = ↑(ConjAct.ofConjAct ↑u) * x_1) },
              map_one' := ?m.103451 },
          map_mul' :=
            (_ :
              ∀ (a b : ↥(MulAction.stabilizer (ConjAct Mˣ) x)),
                OneHom.toFun { toFun := fun u => ?m.103416 u, map_one' := ?m.103451 } (a * b) =
                  OneHom.toFun { toFun := fun u => ?m.103416 u, map_one' := ?m.103451 } a *
                    OneHom.toFun { toFun := fun u => ?m.103416 u, map_one' := ?m.103451 } b) })
      ((fun u =>
          { val := ConjAct.toConjAct ((Units.map (Submonoid.subtype (Submonoid.centralizer {↑x}))) u),
            property :=
              (_ : ConjAct.toConjAct ((Units.map (Submonoid.subtype (Submonoid.centralizer {↑x}))) u) • x = x) })
        x✝) =
    x✝

Next tactic:
ext
/-- The stabilizer of `Mˣ` acting on itself by conjugation at `x : Mˣ` is exactly the
units of the centralizer of `x : M`. -/
@[simps! apply_coe_val symm_apply_val_coe]
def unitsCentralizerEquiv (x : Mˣ) :
    (Submonoid.centralizer ({↑x} : Set M))ˣ ≃* MulAction.stabilizer (ConjAct Mˣ) x :=
  MulEquiv.symm
  { toFun := MonoidHom.toHomUnits <|
      { toFun := fun u ↦ ⟨↑(ConjAct.ofConjAct u.1 : Mˣ), by
          rintro x ⟨rfl⟩
          have : (u : ConjAct Mˣ) • x = x := u.2
          rwa [ConjAct.smul_def, mul_inv_eq_iff_eq_mul, Units.ext_iff, eq_comm] at this⟩,
        map_one' := rfl,
        map_mul' := fun a b ↦ rfl }
    invFun := fun u ↦
      ⟨ConjAct.toConjAct (Units.map (Submonoid.centralizer ({↑x} : Set M)).subtype u), by
      change _ • _ = _
      simp only [ConjAct.smul_def, ConjAct.ofConjAct_toConjAct, mul_inv_eq_iff_eq_mul]
      exact Units.ext <| (u.1.2 x <| Set.mem_singleton _).symm⟩
    left_inv := fun _ ↦ by ext; rfl
    right_inv := fun _ ↦ by ext; 

Proof state:
case a.a
α : Type u_1
M : Type u_2
G : Type u_3
G₀ : Type u_4
R : Type u_5
K : Type u_6
inst✝ : Monoid M
x : Mˣ
x✝ : (↥(Submonoid.centralizer {↑x}))ˣ
⊢ ↑↑((MonoidHom.toHomUnits
            {
              toOneHom :=
                {
                  toFun := fun u =>
                    { val := ↑(ConjAct.ofConjAct ↑u),
                      property := (_ : ∀ x_1 ∈ {↑x}, x_1 * ↑(ConjAct.ofConjAct ↑u) = ↑(ConjAct.ofConjAct ↑u) * x_1) },
                  map_one' := ?m.103451 },
              map_mul' :=
                (_ :
                  ∀ (a b : ↥(MulAction.stabilizer (ConjAct Mˣ) x)),
                    OneHom.toFun { toFun := fun u => ?m.103416 u, map_one' := ?m.103451 } (a * b) =
                      OneHom.toFun { toFun := fun u => ?m.103416 u, map_one' := ?m.103451 } a *
                        OneHom.toFun { toFun := fun u => ?m.103416 u, map_one' := ?m.103451 } b) })
          ((fun u =>
              { val := ConjAct.toConjAct ((Units.map (Submonoid.subtype (Submonoid.centralizer {↑x}))) u),
                property :=
                  (_ : ConjAct.toConjAct ((Units.map (Submonoid.subtype (Submonoid.centralizer {↑x}))) u) • x = x) })
            x✝)) =
    ↑↑x✝

Next tactic:
rfl
theorem comp_apply_eq {x : R₁} : σ' (σ x) = x := by
  

Proof state:
R₁ : Type u_1
R₂ : Type u_2
R₃ : Type u_3
inst✝³ : Semiring R₁
inst✝² : Semiring R₂
inst✝¹ : Semiring R₃
σ₁₂ : R₁ →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R₁ →+* R₃
σ : R₁ →+* R₂
σ' : R₂ →+* R₁
inst✝ : RingHomInvPair σ σ'
x : R₁
⊢ σ' (σ x) = x

Next tactic:
rw [← RingHom.comp_apply, comp_eq]
theorem comp_apply_eq {x : R₁} : σ' (σ x) = x := by
  rw [← RingHom.comp_apply, comp_eq]
  

Proof state:
R₁ : Type u_1
R₂ : Type u_2
R₃ : Type u_3
inst✝³ : Semiring R₁
inst✝² : Semiring R₂
inst✝¹ : Semiring R₃
σ₁₂ : R₁ →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R₁ →+* R₃
σ : R₁ →+* R₂
σ' : R₂ →+* R₁
inst✝ : RingHomInvPair σ σ'
x : R₁
⊢ (RingHom.id R₁) x = x

Next tactic:
simp
theorem comp_apply_eq₂ {x : R₂} : σ (σ' x) = x := by
  

Proof state:
R₁ : Type u_1
R₂ : Type u_2
R₃ : Type u_3
inst✝³ : Semiring R₁
inst✝² : Semiring R₂
inst✝¹ : Semiring R₃
σ₁₂ : R₁ →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R₁ →+* R₃
σ : R₁ →+* R₂
σ' : R₂ →+* R₁
inst✝ : RingHomInvPair σ σ'
x : R₂
⊢ σ (σ' x) = x

Next tactic:
rw [← RingHom.comp_apply, comp_eq₂]