Span categories provide a framework for formalizing mathematical models of
open systems in classical mechanics. The categories appearing in classical
mechanics do not have pullbacks, which requires the use of generalized span
categories. We introduce categories \LagSy and \HamSy that respectively
provide a categorical framework for the Lagrangian and Hamiltonian descriptions
of open classical mechanical systems. The morphisms of \LagSy and \HamSy
correspond to such open systems, and composition of morphisms models the
construction of systems from subsystems. The Legendre transformation gives a
functor from \LagSy to \HamSy that translates from the Lagrangian to the
Hamiltonian perspective.Comment: 31 page