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

Commit 60be8ed

Browse files
committed
feat(data/equiv/*): to_monoid_hom_injective and to_ring_hom_injective (#4525)
1 parent 253f225 commit 60be8ed

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/data/equiv/mul_add.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ begin
222222
{ exact congr_arg equiv.inv_fun h₁ }
223223
end
224224

225+
@[to_additive] lemma to_monoid_hom_injective
226+
{M N} [monoid M] [monoid N] : function.injective (to_monoid_hom : (M ≃* N) → M →* N) :=
227+
λ f g h, mul_equiv.ext (monoid_hom.ext_iff.1 h)
228+
225229
attribute [ext] add_equiv.ext
226230

227231
end mul_equiv

src/data/equiv/ring.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ variables [semiring R] [semiring S] [semiring S']
190190
def to_ring_hom (e : R ≃+* S) : R →+* S :=
191191
{ .. e.to_mul_equiv.to_monoid_hom, .. e.to_add_equiv.to_add_monoid_hom }
192192

193+
lemma to_ring_hom_injective : function.injective (to_ring_hom : (R ≃+* S) → R →+* S) :=
194+
λ f g h, ring_equiv.ext (ring_hom.ext_iff.1 h)
195+
193196
instance has_coe_to_ring_hom : has_coe (R ≃+* S) (R →+* S) := ⟨ring_equiv.to_ring_hom⟩
194197

195198
@[norm_cast] lemma coe_ring_hom (f : R ≃+* S) (a : R) :

0 commit comments

Comments
 (0)