language changes: {,Total}{Eq,Ord} -> {Partial,}{Eq,Ord}; rand -> std::rand.