  A strict 2-group is a 2-category with one object in which all morphisms and
all 2-morphisms have inverses. 2-Groups have been studied in the context of
homotopy theory, higher gauge theory and Topological Quantum Field Theory
(TQFT). In the present article, we develop the notions of trialgebra and
cotrialgebra, generalizations of Hopf algebras with two multiplications and one
comultiplication or vice versa, and the notion of Hopf categories,
generalizations of monoidal categories with an additional functorial
comultiplication. We show that each strict 2-group has a `group algebra' which
is a cocommutative trialgebra, and that each strict finite 2-group has a
`function algebra' which is a commutative cotrialgebra. Each such commutative
cotrialgebra gives rise to a symmetric Hopf category of corepresentations. In
the semisimple case, this Hopf category is a 2-vector space according to
Kapranov and Voevodsky. We also show that strict compact topological 2-groups
are characterized by their C^*-cotrialgebras of `complex-valued functions',
generalizing the Gel'fand representation, and that commutative cotrialgebras
are characterized by their symmetric Hopf categories of corepresentations,
generalizing Tannaka--Krein reconstruction. Technically, all these results are
obtained using ideas from functorial semantics, by studying models of the
essentially algebraic theory of categories in various base categories of
familiar algebraic structures and the functors that describe the relationships
between them.
