Stability under operations for semi algebraic functions Let $E$ and $F$ two semialgebraic sets.
Let $\phi(\alpha,\theta): E\times F$ a bounded semi-algebraic function.
How to prove that $\theta\mapsto \sup_\alpha\phi(\alpha,\theta)$ is still semi-algebraic ?
Have you some references where semi-algebraic stability - under sum, product, etc. - for functions is well-written ?
Thank you.
 A: First, let us recall a few facts: semialgebraic functions are exactly those functions with semialgebraic graph, and semialgebraic sets are exactly the definable subsets in the first-order language $(\Bbb R,0,1,+,\cdot,\leq)$.
Let $\Gamma_\phi\subset E\times F\times \Bbb R$ be the graph of $\phi$. Consider the projection $P$ of $\Gamma_\phi$ to $F\times \Bbb R$, which is semialgebraic. By assumption, there exists $c\in \Bbb R$ so that $pr(\Gamma_\phi)\subset F\times [-c,c]$.
We claim the following formula defines the graph of requested function: all the points $(\theta,x)$ in $F\times \Bbb R$ so that for all points $(\theta,m)\in P$, we have the following two conditions:


*

*$x \geq m$ and,

*for all $\epsilon > 0$ there exists some $(\theta,m_0)\in P$ so that $x - \epsilon < m_0$.


This formula defines a semialgebraic set in $F\times \Bbb R$. This formula also computes the desired supremum, and as $P$ is bounded, we know it returns a unique answer for ever $\theta\in F$ and thus defines the graph of a semialgebraic function $F\to \Bbb R$. So this will do it.

As for the followup question about sums and products of semialgebraic functions being semialgebraic, generally these things are skipped over or left as exercises in a first course on semialgebraic sets: they're not too difficult, and they provide a good foundation for getting used to manipulating semialgebraic or definable sets. If you're having trouble proving the general case, the first thing to do is to show the result for the addition and multiplication functions $\Bbb R^2\to\Bbb R$ defined by $(a,b)\mapsto a+b$ and $(a,b)\mapsto ab$, and then try to use what you've learned there in general. If you're having specific difficulties, I recommend posting a different question including your own attempts so more targeted help may be given.
