Skip to content

Commit

Permalink
feat(algebra/group_with_zero): add units.can_lift (#7857)
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-wieser committed Jun 10, 2021
1 parent 0a34878 commit 2fc66c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/algebra/group_with_zero/basic.lean
Expand Up @@ -591,6 +591,11 @@ eq_inv_of_mul_left_eq_one u.inv_mul
@[simp] lemma exists_iff_ne_zero {x : G₀} : (∃ u : units G₀, ↑u = x) ↔ x ≠ 0 :=
⟨λ ⟨u, hu⟩, hu ▸ u.ne_zero, assume hx, ⟨mk0 x hx, rfl⟩⟩

instance : can_lift G₀ (units G₀) :=
{ coe := coe,
cond := (≠ 0),
prf := λ x, exists_iff_ne_zero.mpr }

end units

section group_with_zero
Expand Down

0 comments on commit 2fc66c9

Please sign in to comment.