File tree Expand file tree Collapse file tree 1 file changed +34
-2
lines changed
Expand file tree Collapse file tree 1 file changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -217,9 +217,41 @@ def id_hom (M : Type u) [Monoid M] : MonoidHom M M := by
217217 · simp
218218 · simp
219219
220+ def comp_hom {M N P : Type u} [Monoid M][Monoid N][Monoid P]
221+ (f : MonoidHom M N)(g : MonoidHom N P) : MonoidHom M P := by
222+ refine {toFun := ?_, map_one' := ?_, map_mul' := ?_}
223+ · intro m
224+ apply g.toFun
225+ apply f.toFun
226+ exact m
227+ · simp
228+ · simp
229+
220230instance : DeductiveSystem Mon where
221- id := sorry
222- comp := sorry
231+ id M := by
232+ simp [Quiver.Hom]
233+ apply id_hom
234+
235+ comp := comp_hom
236+
237+ instance : Category Mon where
238+ id_comp := by
239+ intro M N f
240+ simp [DeductiveSystem.comp, comp_hom]
241+ apply MonoidHom.ext
242+ intro m
243+ simp [DeductiveSystem.id, id_hom]
244+
245+ comp_id := by
246+ intro M N f
247+ simp [DeductiveSystem.comp, comp_hom]
248+ apply MonoidHom.ext
249+ intro m
250+ simp [DeductiveSystem.id, id_hom]
251+
252+ assoc := by
253+ intro M N P f g h
254+ simp [DeductiveSystem.comp, comp_hom]
223255
224256/--
225257Monoids: Given a monoid M, we have an associated one object category which we denote by
You can’t perform that action at this time.
0 commit comments