https://123dok.net/document/q7w7740v-the-hamilton-cartan-formalism-in-the-calculus-variations.html