@@ -185,6 +185,40 @@ lemma _root_.isStarNormal_of_mem_unitary {u : R} (hu : u ∈ unitary R) : IsStar
185185
186186end Monoid
187187
188+ end unitary
189+
190+ section Group
191+
192+ variable {G : Type *} [Group G] [StarMul G]
193+
194+ theorem unitary.inv_mem {g : G} (hg : g ∈ unitary G) : g⁻¹ ∈ unitary G := by
195+ simp_rw [unitary.mem_iff, star_inv, ← mul_inv_rev, inv_eq_one] at *
196+ exact hg.symm
197+
198+ variable (G) in
199+ /-- `unitary` as a `Subgroup` of a group.
200+
201+ Note the group structure on this type is not defeq to the one on `unitary`.
202+ This situation naturally arises when considering the unitary elements as a
203+ subgroup of the group of units of a star monoid. -/
204+ def unitarySubgroup : Subgroup G where
205+ toSubmonoid := unitary G
206+ inv_mem' := unitary.inv_mem
207+
208+ @[simp]
209+ theorem unitarySubgroup_toSubmonoid : (unitarySubgroup G).toSubmonoid = unitary G := rfl
210+
211+ @[simp]
212+ theorem mem_unitarySubgroup_iff {g : G} : g ∈ unitarySubgroup G ↔ g ∈ unitary G :=
213+ Iff.rfl
214+
215+ nonrec theorem unitary.inv_mem_iff {g : G} : g⁻¹ ∈ unitary G ↔ g ∈ unitary G :=
216+ inv_mem_iff (H := unitarySubgroup G)
217+
218+ end Group
219+
220+ namespace unitary
221+
188222section SMul
189223
190224section
@@ -300,6 +334,16 @@ lemma toMonoidHom_mapEquiv (f : R ≃⋆* S) :
300334 (mapEquiv f).toStarMonoidHom = map f.toStarMonoidHom :=
301335 rfl
302336
337+ /-- The unitary subgroup of the units is equivalent to the unitary elements of the monoid. -/
338+ @[simps!]
339+ def _root_.unitarySubgroupUnitsEquiv {M : Type *} [Monoid M] [StarMul M] :
340+ unitarySubgroup Mˣ ≃* unitary M where
341+ toFun x := ⟨x.val, congr_arg Units.val x.prop.1 , congr_arg Units.val x.prop.2 ⟩
342+ invFun x := ⟨⟨x, star x, x.prop.2 , x.prop.1 ⟩, Units.ext x.prop.1 , Units.ext x.prop.2 ⟩
343+ map_mul' _ _ := rfl
344+ left_inv _ := Subtype.ext <| Units.ext rfl
345+ right_inv _ := rfl
346+
303347end Map
304348
305349section CommMonoid
0 commit comments