A Lagrangian dynamical theory for the mass function of cosmic structures -- I. Dynamics | Synapse