We have a finite poset and its subset $S$.
We can enumerate elements of $S$ using an iterator.
I need to check if there are more than one minimal elements of $S$ (regarding the above poset).
The best thing I came up with is to construct the graph of all elements of $S$ and then check it for minimal elements. But this:
requires to enumerate all elements of $S$ (while I would prefer to interrupt the calculating in the middle as soon as we get $2$ minimal elements);
may use much memory.
Is there a better way (without enumerating all $S$)?