# If $f$ and $g$ are cts and $g$ is monotonically decreasing , prove that $\text{argmax}_{x \in X} f(x) = \text{argmin}_{x \in X} g \circ f(x)$

I'm having trouble with this real analysis/optimization problem. The result seems intuitively obvious, but I don't know how I could possibly formalize it. Any advice is appreciated:

Let $X \subset \mathbb{R}^n$, $Y \subset \mathbb{R}$, $f:x \rightarrow Y$ and $g:: Y \rightarrow \mathbb{R}$.

Suppose $X$ is a compact set, $f$ and $g$ are continuous functions on their domains, and $g$ is a strictly monotonically decreasing function on its domain.

Argue that the sets referred to exist and are equivalent:

$\text{argmax}_{\textbf{x} \in X} f(\textbf{x}) = \text{argmin}_{\textbf{x} \in X} g \circ f(\textbf{x})$

-

Suppose $x \in \mathrm{argmax} f$. Equivalently, for all $y \in X$, $f(x) \geq f(y)$. This is equivalent to $g(f(x)) \leq g(f(y))$. Which is the same as $x \in \mathrm{argmin} g \circ f$.