TITLE: an example of a Morse-Bott function
QUESTION [8 upvotes]: Hi,
I want to find an example of a Morse-Bott function such that for at least one of the critical submanifolds, the orientation sheaf O is nontrivial.

REPLY [6 votes]: You can get a large class of examples if you look at the real projective space $\mathbb{RP}^n$.  Each point $L\in \mathbb{RP}^n$ is a one dimensional subspace in $\mathbb{R}^{n+1}$ and we denote by $P_L$  the orthogonal projection onto $L$.  Fix a unit vector $v\in \mathbb{R}^{n+1}$ and denote by $U$ the orthogonal complement in $\mathbb{R}^{n+1}$ of  the line $L_v$ spanned by $v$.  Consider  the  function
$$f_v: \mathbb{RP}^n\to\mathbb{R}, \;\; f_v(L)=(P_Lv,v). $$
Note that
$$ 0 \leq f_v(L)\leq 1,\;\;\forall L.$$
This is a Morse-Bott function with precisely two critical submanifolds: the locus of minima  where $f=0$  and  consisting of the real projective space $\mathbb{P}(U)\subset \mathbb{RP}^n $ of lines in $U$,  and a unique  maximum  point, $L_v\in\mathbb{RP}^n$ where $f_v(L_v)=1$.
The normal bundle of $\mathbb{P}(U)\subset \mathbb{RP}^n $ is the tautological real line bundle over $\mathbb{P}(U)$  which is nonorientable.