reorganize is_monotonic for clarity and succinctness