Skip to content

Commit

Permalink
chore(algebra/group/units): add a lemma about is_unit on a coerced un…
Browse files Browse the repository at this point in the history
…it (#13947)
  • Loading branch information
eric-wieser committed May 5, 2022
1 parent bd944fe commit 6970129
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/algebra/group/units.lean
Expand Up @@ -379,6 +379,10 @@ an additive monoid which is an additive unit."]
noncomputable def is_unit.unit [monoid M] {a : M} (h : is_unit a) : Mˣ :=
(classical.some h).copy a (classical.some_spec h).symm _ rfl

@[simp, to_additive]
lemma is_unit.unit_of_coe_units [monoid M] {a : Mˣ} (h : is_unit (a : M)) : h.unit = a :=
units.ext $ rfl

@[to_additive]
lemma is_unit.unit_spec [monoid M] {a : M} (h : is_unit a) : ↑h.unit = a :=
rfl
Expand Down

0 comments on commit 6970129

Please sign in to comment.