sequences: cleanup shared code between supremum-by and infimum-by.