Extrema Predicates in Deductive Databases