Pointwise Supremum of Quasi-convex Function In Boyd and Vandenberghe, Convex Optimization, page 102, I read that if function $g(x,y)$ is quasi-convex in $x$ for each $y$, then
$$
f(x)=\sup\limits_{y\in C}(w(y)g(x,y))
$$
is also quasi-convex, where $w(y)\geq0$.
My question: If the set $C$ depends on $x$, for example, $C_x=\{y:y\leq x\}$, then under what conditions can this conclusion still hold?
Thanks!!

Typically you can solve such problems by introducing an indicator function $I_{C_x}(y)$ (for your example it takes the value $0$ if $y\leq x$, $\infty$ otherwise):
$$f(x) = \sup_{y \in C} \left\{ w(y)(g(x,y)-I_{C_x}(y)) \right\}$$
The condition is now that $g(x,y)-I_{C_x}(y)$ is quasiconvex in $x$ for each $y$, which is not true, so we cannot use this trick.
Going back to page 102, it was concluded that $f$ is quasiconvex, because $f(x)\leq \alpha$ iff
$$w(y)g(x,y) \leq \alpha \quad \forall y \in C.$$
In other words, the sublevel set of $f$ is convex, since it is the intersection of convex sets. If you replace $C$ with $C_x$, this argument no longer holds, because $C$ depends on $x$. In other words, the sublevel set of $f$ cannot easily be expressed as the intersection of convex sets.
