Let $X$ be a set and let $Y$ be an ordered set. For $f, g : X \to Y$, if $f \le g$ pointwise, then for each $y \in Y$, $$\#\{x \in X \mid f(x) \le y\} \ge \#\{x \in X \mid g(x) \le y\}$$ $$\#\{x \in X \mid f(x) \ge y\} \le \#\{x \in X \mid g(x) \ge y\}$$ This also holds if there is a permutation $h : X \to X$ such that $f \le g \circ h$ pointwise.
Does the converse hold? That is, for $f,g : X \to Y$ that satisfy the two displayed conditions, does it follow that there exists a permutation $h : X \to X$ such that $f \le g \circ h$ pointwise? Or are there natural conditions on the order for $Y$ (e.g. completeness) for which this holds?
The conditions are analogous to stochastic dominance for random variables, with cardinality taking the place of a probability measure. (In the probability context the second condition is redundant. For cardinals the second condition is not redundant, because there is no well-defined cardinal subtraction.) The case where $X$ is finite follows from this, using a discrete measure.