Lagrange and Legendre characteristic classes