Library CT.Instance.Algebra.Ring
Program Definition RingCategory (T : Type) : Category :=
{| ob := @Ring T;
mor := RingHomomorphism;
comp := fun _ _ _ ⇒ ring_hom_composition;
id := fun _ ⇒ ring_hom_id;
assoc := fun _ _ _ _ ⇒ ring_hom_composition_assoc
|}.
Next Obligation.
Proof.
symmetry.
apply ring_hom_composition_assoc.
Qed.
Next Obligation.
Proof. apply ring_hom_eq. reflexivity. Qed.
Next Obligation.
Proof. apply ring_hom_eq. reflexivity. Qed.
{| ob := @Ring T;
mor := RingHomomorphism;
comp := fun _ _ _ ⇒ ring_hom_composition;
id := fun _ ⇒ ring_hom_id;
assoc := fun _ _ _ _ ⇒ ring_hom_composition_assoc
|}.
Next Obligation.
Proof.
symmetry.
apply ring_hom_composition_assoc.
Qed.
Next Obligation.
Proof. apply ring_hom_eq. reflexivity. Qed.
Next Obligation.
Proof. apply ring_hom_eq. reflexivity. Qed.