Legendre transformation
Legendre transformation on manifolds.