Computer-aided classification of the Ricci tensor in general relativity