Let $S$ be a symmetric $(0, 2)$ tensor on a Riemannian manifold $M$. Define $E_S : M \to \mathbb{Z}$ by $E_S(x) = \left(\text{the number of distinct eigenvalues of } S_x\right)$. I've seen the following claims in several papers:
- $M_S \doteq \left\{x \in M \ \vert \ E_s \text{ is constant in a neighbourhood of } x \right\}$ is an open dense subset of $M$
- The eigenvalues of $S$ are distinct and smooth in each connected component $U$ of $M_S$.
I'm a having a hard time proving these facts in a rigorous enough manner. It "feels" true since in some sense the eigenvalues should be smooth, but I can't see how to formalize this precisely (smooth from where to where? how to prove smoothness?). I'd appreciate any help.
The function $E_S$ is lower semicontinuous: In a coordinate chart the characteristic polynomial depends continuously on the coefficients of $S$, and hence the eigenvalues (counted with multiplicity) depend continuously on the coefficients of $S$. Thus if we have $k$ distinct roots at some point $p$, then by ensuring the coefficients of $S$ don't change too much, we can ensure we keep at least $k$ distinct roots near $p$ (but possibly we will get more).
Then density of $M_S$ is a consequence of:
Lemma. Let $X$ be a topological space and $f: X \to \mathbb{Z}$ a lower semicontinuous function which is bounded above. Then $U = \lbrace x : f \text{ is constant on a neighborhood of } x \rbrace$ is dense in $X$.
Proof. Pick a neighborhood $V \subseteq X$; it suffices to find a nonempty open subset $W \subseteq V$ on which $f$ is constant. (For then $W \subseteq U$ by definition, so $U$ intersects every open neighborhood, so is dense.)
Consider for $m \in \mathbb{Z}$ the set $$ A_m = f^{-1}\big([m, \infty)\big) \cap V. $$ This is an open subset of $V$ by hypothesis, and when $m$ is large the set $A_m$ is empty (since $f$ is bounded above). Let $N$ be the largest integer such that $A_N$ is nonempty. Then $A_N = f^{-1}(\lbrace N \rbrace) \cap V$, that is, $A_n$ is a nonempty open subset of $V$ on which $f$ is constant.