  The long standing problem of the relations among the scalar invariants of the
Riemann tensor is computationally solved for all 6x10^23 objects with up to 12
derivatives of the metric. This covers cases ranging from products of up to 6
undifferentiated Riemann tensors to cases with up to 10 covariant derivatives
of a single Riemann. We extend our computer algebra system Invar to produce
within seconds a canonical form for any of those objects in terms of a basis.
The process is as follows: (1) an invariant is converted in real time into a
canonical form with respect to the permutation symmetries of the Riemann
tensor; (2) Invar reads a database of more than 6x10^5 relations and applies
those coming from the cyclic symmetry of the Riemann tensor; (3) then applies
the relations coming from the Bianchi identity, (4) the relations coming from
commutations of covariant derivatives, (5) the dimensionally-dependent
identities for dimension 4, and finally (6) simplifies invariants that can be
expressed as product of dual invariants. Invar runs on top of the tensor
computer algebra systems xTensor (for Mathematica) and Canon (for Maple).
