  An inclusive framework for joined Hamiltonian and dissipative dynamical
systems, which preserve energy and produce entropy, is given. The dissipative
dynamics of the framework is based on the metriplectic 4-bracket, a quantity
like the Poisson bracket defined on phase space functions, but unlike the
Poisson bracket has four slots with symmetries and properties motivated by
Riemannian curvature. Metriplectic 4-bracket dynamics is generated using two
generators, the Hamiltonian and the entropy, with the entropy being a Casimir
of the Hamiltonian part of the system. The formalism includes all known
previous binary bracket theories for dissipation or relaxation as special
cases. Rich geometrical significance of the formalism and methods for
constructing metriplectic 4-brackets are explored. Many examples of both finite
and infinite dimensions are given.
