In many (most?) languages assert is an optional crash if false. The language can choose to run the check or not. A function to check if a list is sorted and return a boolean is not hard to write - but of course you then need to prove that function is correct.
If you want to assert that a list is sorted, you need some function that checks if it is sorted and returns a boolean.