list.argmax₂

Auxiliary definition to define argmax

list.argmax

argmax f l returns some a, where a of l that maximises f a. If there are a b such that f a = f b, it returns whichever of a or b comes first in the list. argmax f [] = none`

list.argmin

argmin f l returns some a, where a of l that minimises f a. If there are a b such that f a = f b, it returns whichever of a or b comes first in the list. argmin f [] = none`

list.maximum

maximum l returns an with_bot α, the largest element of l for nonempty lists, and for []

list.minimum

minimum l returns an with_top α, the smallest element of l for nonempty lists, and for []