# Constructing Objects in a Category

Suppose I want to define a Hopf algebra H (or group, ring, etc.) and I want it to be an object of the category HopfAlgebras(QQ). Programming aside, the information need to define a Hopf algebra is the underlying algebra, the comultiplication, antipode, and counit. If H is finitely generated, then I can define the algebra as the quotient of a free algebra, this I know how to do in sage. I can also define the comultiplication, antipode, and counit as ring homorphisms.

How do I use all of this data to make H into an instance of HopfAlgebras(QQ)?