Definition endomorphism_ring {C : AdditiveCategory} (_ : ob (PreAdditive_categoryWithAbgrops C)) : ring. Proof. pose (end_monoid := @endomorphism_monoid (PreAdditive_categoryWithAbgrops C) X). refine ((pr1 (pr1 end_monoid),, make_dirprod (to_binop X X) (pr2 (pr1 end_monoid))),, _). split; split. - exact (to_isabgrop _ _). - exact (pr2 end_monoid). - intros f g h; apply (to_premor_monoid C _ _ _ h). - intros f g h; apply (to_postmor_monoid C _ _ _ h). Defined.
Require Import UniMath.Foundations.Preamble. Require Import UniMath.MoreFoundations.PartA. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Functors. Require Import UniMath.CategoryTheory.Core.NaturalTransformations. Require Import UniMath.CategoryTheory.catiso. Require Import UniMath.CategoryTheory.Additive. Require Import UniMath.CategoryTheory.CategoriesWithBinOps. Require Import UniMath.CategoryTheory.PreAdditive. Require Import UniMath.CategoryTheory.PrecategoriesWithAbgrops. Require Import UniMath.CategoryTheory.Categories.HSET.Core.