Monotone functions taking prescribed values on finitely many sets #
[UPSTREAM] A function on a preorder can be required to take the value k i throughout the set
s i, for each i in a finset. A monotone such function exists exactly when the prescriptions
agree with the order, k i ≤ k j whenever some point of s i lies below some point of s j. The
condition is necessary since a monotone function preserves the order of the two points, and
sufficient into a join-semilattice with a bottom, the value at x being the join of the k i
whose set reaches below x.
Upstream home: beside MonotoneOn.exists_monotone_extension in
Mathlib/Order/Monotone/Extension.lean, which extends a single function from a bounded set into a
conditionally complete linear order.
A monotone function takes the value k i on each s i exactly when k i ≤ k j whenever a
point of s i lies below a point of s j.
An antitone function takes the value k i on each s i exactly when k i ≤ k j whenever a
point of s j lies below a point of s i.