Reading out of this lecture series we define a phase space Lagrangian $\mathcal L$ to be a function of $4n+1$ variables namely $q,\dot q,p,\dot p,t$. My question is, what space is this function defined on? (I know that the $\dot p$ is there for names sake only).
My stab at an answer is it is a product space between $\mathcal L:TQ\times T^*Q\times \mathbb R\to \mathbb R$ since we are dealing with both velocity and momentum (where $Q$ is a configuration manifold). However this makes zero intuitive sense to me. If indeed it is phase space, my understanding was that taking the fibre derivative with respect to a function on the tangent bundle changed the velocity coordinates to momentum coordinates - the Legendre transform?