  The in-in formalism provides a way to systematically organize the calculation
of primordial correlation functions. Although its theoretical foundations are
now firmly settled, the treatment of total time derivative interactions,
incorrectly trivialized as ``boundary terms'', has been the subject of intense
discussions and conceptual mistakes. In this work, we demystify the use of
total time derivatives -- as well as terms proportional to the linear equations
of motion -- and show that they can lead to artificially large contributions
cancelling at different orders of the in-in operator formalism. We discuss the
treatment of total time derivative interactions in the Lagrangian path integral
formulation of the in-in perturbation theory, and we showcase the importance of
interaction terms proportional to linear equations of motion. We then provide a
new route to the calculation of primordial correlation functions, which avoids
the generation of total time derivatives, by working directly at the level of
the full Hamiltonian in terms of phase-space variables. Instead of integrating
by parts, we perform canonical transformations to simplify interactions. We
explain how to retrieve correlation functions of the initial phase-space
variables from the knowledge of the ones after canonical transformations, and
we provide diagrammatic rules to systematically classify all possible
contributions. As an important first application, we find the explicit sizes of
Hamiltonian cubic interactions in single-field inflation with canonical kinetic
terms and for any background evolution [...]. Our results are important for
performing complete calculations of exchange diagrams in inflation [...]. Being
already written in a form amenable to characterize quantum properties of
primordial fluctuations, they also promise to shed light on the non-linear
dynamics of quantum states during inflation.
