  We develop computational tools for calculating supersymmetric higher-order
derivative corrections to eleven-dimensional supergravity using the action
principle approach. We show that, provided the superspace Bianchi identities
admit a perturbative solution in the derivative expansion, there are at least
two independent superinvariants at the eight-derivative order of
eleven-dimensional supergravity. Assuming the twelve-superforms associated to
certain anomalous Chern-Simons terms are Weil-trivial, there will be a third
independent superinvariant at this order. Under certain conditions, at least
two superinvariants will survive to all orders in the derivative expansion.
However only one of them will be present in the quantum theory: the
supersymmetrization of the Chern-Simons terms of eleven dimensional
supergravity required for the cancellation of the M5-brane gravitational
anomaly by inflow. This superinvariant can be shown to be unique at the
eight-derivative order, assuming it is quartic in the fields. On the other
hand, a necessary condition for the superinvariant to be quartic is the
exactness, in tau-cohomology, of X0,8 -the purely spinorial component of the
eight-superform related by descent to the M5-brane anomaly polynomial. In that
case it can also be shown that the solution of the Weil-triviality condition of
the corresponding twelve-form, which is a prerequisite for the explicit
construction of the superinvariant, is guaranteed to exist. We prove that
certain highly non-trivial necessary conditions for the tau-exactness of X0,8
are satisfied. Moreover any potential superinvariant associated to anomalous
Chern-Simons terms at the eight-derivative order must necessarily contain terms
cubic or lower in the fields.
