Add the is_upper_triangular() function and its tests.