Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 708a28c

Browse files
urkudmergify[bot]
authored andcommitted
chore(algebra/group/units): use def to_units instead of has_lift (#1431)
* chore(algebra/group/units): use `def to_units` instead of `has_lift` * Move, upgrade to `mul_equiv`, add documentation
1 parent bfe9c6c commit 708a28c

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/algebra/group/units.lean

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,3 @@ theorem divp_mul_divp (x y : α) (ux uy : units α) :
149149
by rw [← divp_divp_eq_divp_mul, divp_assoc, mul_comm x, divp_assoc, mul_comm]
150150

151151
end comm_monoid
152-
153-
section group
154-
variables [group α]
155-
156-
instance : has_lift α (units α) :=
157-
⟨λ a, ⟨a, a⁻¹, mul_inv_self _, inv_mul_self _⟩⟩
158-
end group

src/data/equiv/algebra.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,14 @@ instance is_group_hom {α β} [group α] [group β] (h : α ≃* β) :
304304

305305
end mul_equiv
306306

307+
/-- A group is isomorphic to its group of units. -/
308+
def to_units (α) [group α] : α ≃* units α :=
309+
{ to_fun := λ x, ⟨x, x⁻¹, mul_inv_self _, inv_mul_self _⟩,
310+
inv_fun := coe,
311+
left_inv := λ x, rfl,
312+
right_inv := λ u, units.ext rfl,
313+
map_mul' := λ x y, units.ext rfl }
314+
307315
namespace units
308316

309317
variables [monoid α] [monoid β] [monoid γ]

0 commit comments

Comments
 (0)