Hamiltonian of non-regular Lagrangian is well-defined on phase space

Consider a Lagrangian system with $n$ DOF. In the case where the Hessian matrix $\frac{\partial^2 L}{\partial v^i \partial v^j}$ has constant rank $r$, it is possible to replace $r$ velocities with $r$ momenta in the definition of the Hamiltonian. It is proven in theorem 2 of my Phys.SE answer here, that this Hamiltonian will not depend on the remaining $n-r$ velocities, cf. OP's question.