Formalizing Categories with Attributes in Coq