# Visualizer of monotone, totally monotone, and Monge

## monotone

A $H \times W$ matrix $f$ is monotone iff $\forall y y'.~ y \lt y' \to \forall x \in \mathrm{argmin} _ x f(y, x).~ \exists x' \in \mathrm{argmin} _ {x'} f(y', x').~ x \le x'$ and $\forall y y'.~ y \lt y' \to \forall x' \in \mathrm{argmin} _ {x'} f(y', x').~ \exists x \in \mathrm{argmin} _ x f(y, x).~ x \le x'$ hold. If we assume each row of $f$ is distinct, the definition can be written as $\forall y y'.~ y \lt y' \to \mathrm{argmin} _ x f(y, x) \le \mathrm{argmin} _ {x'} f(y', x')$.

## totally monotone

A $H \times W$ matrix $f$ is totally monotone iff $\forall y y' x x'.~ y \lt y' \land x \lt x' \to (f(y', x) \lt f(y', x') \to f(y, x) \lt f(y, x')) \land (f(y', x) = f(y', x') \to f(y, x) \le f(y, x'))$ holds.

## Monge

A $H \times W$ matrix $f$ is Monge iff $\forall y y' x x'.~ y \lt y' \land x \lt x' \to f(y', x') - f(y', x) \le f(y, x') - f(y, x)$ holds.