Does anyone know if this FOL formula correctly describes POSET min and max?
A description:
A maximal element of a subset S of some partially ordered set (poset) is an element of S that is not smaller than any other element in S. A minimal element of a subset S of some partially ordered set is defined dually as an element of S that is not greater than any other element in S.
There is a POSET $R = (S, \subset)$
$maxes = \{x : x \in S \land (\forall y \in S (\lnot((x,y) \in R))\}$
or
There is a POSET $R2 = (S, \subseteq)$
$maxes = \{x : x \in S \land (\forall y \in S (\lnot((x,y) \in R2) \lor x = y)\}$ $maxes = \{x : x \in S \land (\forall y \in S (\lnot( x \subseteq y) \lor x = y)\}$
For the minimum:
$mins = \{y : y \in S \land (\forall x \in S (\lnot((x,y) \in R2) \lor x = y)\}$ $mins = \{y : y \in S \land (\forall x \in S (\lnot(x \subseteq y) \lor x = y\}$