Skip to content

Commit

Permalink
feat(Algebra/Associated): add Associated.map (#10895)
Browse files Browse the repository at this point in the history
  • Loading branch information
acmepjz committed Feb 23, 2024
1 parent 64d2ea8 commit 0fb7df8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Mathlib/Algebra/Associated.lean
Expand Up @@ -420,6 +420,11 @@ protected def setoid (α : Type*) [Monoid α] :
iseqv := ⟨Associated.refl, Associated.symm, Associated.trans⟩
#align associated.setoid Associated.setoid

theorem map {M N : Type*} [Monoid M] [Monoid N] {F : Type*} [FunLike F M N] [MonoidHomClass F M N]
(f : F) {x y : M} (ha : Associated x y) : Associated (f x) (f y) := by
obtain ⟨u, ha⟩ := ha
exact ⟨Units.map f u, by rw [← ha, map_mul, Units.coe_map, MonoidHom.coe_coe]⟩

end Associated

attribute [local instance] Associated.setoid
Expand Down

0 comments on commit 0fb7df8

Please sign in to comment.