Given that \(\mathcal {O}_x\subset f^{-1}(a,b)\subset M\)  is closed and embedded we get that \(\mathcal {O}_x\)  is also compact. Furthermore, as we previously saw we have that \((s^\ast f)^{-1}[a,b]\)  is also compact and therefore \(G_{\mathcal {O}_x}\)  is the only compact non-degenerate critical submanifold inside \((s^\ast f)^{-1}(a,b)\) .
Consider the mutually complementary projections \(\xi _1:\nu (G_{\mathcal {O}_x})\rightarrow \nu _-(G_{\mathcal {O}_x})\) , \(\eta _1:\nu (G_{\mathcal {O}_x})\rightarrow \nu _+(G_{\mathcal {O}_x})\)  and \(\xi _0:\nu (\mathcal {O}_x)\rightarrow \nu _-(\mathcal {O}_x)\) , \(\eta _0:\nu (\mathcal {O}_x)\rightarrow \nu _+(\mathcal {O}_x)\)  as well as the norms
\(\Vert  \widetilde{v}\Vert _1^2=-Q_F(\xi _1(\widetilde{v}))+Q_F(\eta _1(\widetilde{v}))\qquad \textnormal {and}\qquad \Vert  v\Vert _0^2=-Q_f(\xi _0(v))+Q_f(\eta _0(v)),\) 
for all \(\widetilde{v}\in \nu (G_{\mathcal {O}_x})\)  and \(v\in \nu (\mathcal {O}_x)\) . Because of Theorem REF  there is a Lie groupoid tubular neighborhood \(\phi : (\widetilde{V}\rightrightarrows V)\xrightarrow{} (\widetilde{U}\rightrightarrows U)\)  in the sense of weakly linearization such that
\((\phi _1^\ast F,\phi _0^\ast f)=(c+Q_F,c+Q_f),\) 
where \(c=f(\mathcal {O}_x)=F(G_{\mathcal {O}_x})\)  is the common value of \(f\)  and \(F\)  on \(G_{\mathcal {O}_x}\)  and \(\mathcal {O}_x\) , respectively. By identifying \(\widetilde{V}\cong \widetilde{U}\)  and \(V\cong U\)  we may think of \(F\)  on \(\widetilde{U}\)  and \(f\)  on \(U\)  as respectively given by
\(F(\widetilde{v})=c+Q_F(\widetilde{v})=c-\Vert  \xi _1(\widetilde{v})\Vert _1^2+\Vert  \eta _1(\widetilde{v})\Vert _1^2,\qquad f(v)=c+Q_f(v)=c-\Vert  \xi _0(v)\Vert _0^2+\Vert  \eta _0(v)\Vert _0^2.\) 
Let us now follow some ideas stated in [1]}, [2]}, [3]} about the proof of this result in the classical case. We choose \(\epsilon >0\)  small enough so that the interval \((c-\epsilon ,c+\epsilon )\)  is contained in \([a,b]\)  and all points \(\widetilde{v}\in \nu (G_{\mathcal {O}_x})\)  with \(\Vert  \widetilde{v}\Vert _1^2\le 2\epsilon \)  belong to the neighborhood \(\widetilde{U}\)  and \(v\in \nu (\mathcal {O}_x)\)  with \(\Vert  v\Vert _0^2\le 2\epsilon \)  belong to the neighborhood \(U\) . Similarly to how it was done in [2]} we construct two smooth functions which are a modification of the pair \((F,f)\) . Namely, let \(\mu :\mathbb {R}\rightarrow \mathbb {R}\)  be the smooth function verifying the conditions
\(\mu (0)>\epsilon , & &\\\mu (r)=0 & & \textnormal {for all}\ r\ge 2\epsilon ,\\-1<\mu ^{\prime }(r)\le 0 & & \textnormal {for all}\ r.\) 
Consider the functions \(F_1:G\rightarrow \mathbb {R}\)  and \(f_1:M\rightarrow \mathbb {R}\)  which respectively coincide with \(F\)  and \(f\)  outside of \(\widetilde{U}\)  and \(U\)  but within those neighborhoods they are given as
\(F_1(\widetilde{v})=F(\widetilde{v})-\mu (\Vert  \xi _1(\widetilde{v})\Vert _1^2+2\Vert  \eta _1(\widetilde{v})\Vert ^2_1)=c-\Vert  \xi _1(\widetilde{v})\Vert _1^2+\Vert  \eta _1(\widetilde{v})\Vert _1^2-\mu (\Vert  \xi _1(\widetilde{v})\Vert _1^2+2\Vert  \eta _1(\widetilde{v})\Vert ^2_1),\) 
and
\(f_1(v)=f(v)-\mu (\Vert  \xi _0(v)\Vert _0^2+2\Vert  \eta _0(v)\Vert ^2_1)=c-\Vert  \xi _0(v)\Vert _0^2+\Vert  \eta _0(v)\Vert _0^2-\mu (\Vert  \xi _0(v)\Vert _0^2+2\Vert  \eta _0(v)\Vert ^2_1).\) 
These are well defined smooth functions. Let us prove that \((F_1,f_1):(G\rightrightarrows M)\rightarrow (\mathbb {R}\rightrightarrows \mathbb {R})\)  is also a Lie groupoid morphism. Since \(\phi \)  is a Lie groupoid isomorphism and \((F_1,f_1)\)  agrees with \((F,f)\)  outside \((\widetilde{U},U)\)  we only have to see what happens inside \((\widetilde{U},U)\) . As consequence of the classical Morse–Bott lemma we may identify the norms \(\Vert  \cdot \Vert _1\)  and \(\Vert  \cdot \Vert _0\)  with those norms defined by the restrictions of \(\eta ^{(1)}\)  and \(\eta ^{(0)}\)  on \(\nu (G_{\mathcal {O}_x})\)  and \(\nu (\mathcal {O}_x)\) , respectively. As \(s,t:G\rightarrow M\)  are Riemannian submersions we obtain that \(\Vert  \widetilde{v} \Vert _1=\Vert  ds(\widetilde{v}) \Vert _0\)  and \(\Vert  \widetilde{v} \Vert _1=\Vert  dt(\widetilde{v}) \Vert _0\) . It is worth noticing that if we do not identify the norms as we did above we can also get the previous statement by using the fact that \((Q_F,Q_f)\) , \((\xi _1,\xi _0)\) , and \((\eta _1,\eta _0)\)  are Lie groupoid morphisms. Therefore, by using again the latter fact we obtain that
\((\overline{ds}^\ast f_1)(\widetilde{v}) &=& f_1(\overline{ds}(\widetilde{v}))=c+Q_f(\overline{ds}(\widetilde{v}))-\mu (\Vert  \xi _0(\overline{ds}(\widetilde{v}))\Vert _0^2+2\Vert  \eta _0(\overline{ds}(\widetilde{v})\Vert ^2_0)\\& =& c+(Q_f\circ \overline{ds})(\widetilde{v})-\mu (\Vert  \overline{ds}(\xi _1(\widetilde{v}))\Vert _0^2+2\Vert  \overline{ds}(\xi _1(\widetilde{v})\Vert ^2_0)\\&= & c+Q_F(\widetilde{v})-\mu (\Vert  \xi _1(\widetilde{v})\Vert _1^2+2\Vert  \eta _1(\widetilde{v})\Vert ^2_1)=F_1.\) 
We can analogously prove that \(\overline{dt}^\ast f_1=F_1\)  which implies what we desired.
Just as it was proved in [2]} we have the following assertions.

The regions \(F_1^{-1}(-\infty ,c+\epsilon ]\)  and \(f_1^{-1}(-\infty ,c+\epsilon ]\)  coincide with the regions \(G^{c+\epsilon }\)  and \(M^{c+\epsilon }\) , respectively.

The functions \(F\)  and \(F_1\)  have the same critical arrows. Similarly, the functions \(f\)  and \(f_1\)  have the same critical points.

The sets \(F_1^{-1}[c-\epsilon ,c+\epsilon ]\)  and \(f_1^{-1}[c-\epsilon ,c+\epsilon ]\)  contain no critical points of \(F_1\)  and \(f_1\) , respectively.

Thus, from Proposition REF  we conclude that the Lie subgroupoid level \(F_1^{-1}(-\infty ,c-\epsilon ]\rightrightarrows f_1^{-1}(-\infty ,c-\epsilon ]\)  is a deformation retraction of \(G^{c+\epsilon }\rightrightarrows M^{c+\epsilon }\) .
Let us now consider the negative disk bundle \(D_-(\mathcal {O}_x)=\lbrace v\in U: \Vert  \xi _0(v)\Vert _0^2\le \epsilon ,\ \eta _0(v)=0\rbrace \) . As the value of \(f_1\)  on any point of \(D_-(\mathcal {O}_x)\)  is less than \(c-\epsilon \)  we have that \(M^{c-\epsilon }\cup D_-(\mathcal {O}_x)\subset f_1^{-1}(-\infty ,c-\epsilon ]\) . Moreover, the intersection \(D_-(\mathcal {O}_x)\cap M^{c-\epsilon }\)  coincides with the negative sphere bundle \(\partial D_-(\mathcal {O}_x)=\lbrace v\in U: \Vert  \xi _0(v)\Vert _0^2=\epsilon ,\ \eta _0(v)=0\rbrace \) . Therefore, we can consider the attaching space \(M^{c-\epsilon }\cup _{b} D_-(\mathcal {O}_x)\)  with respect to the bundle projection \(b:\partial D_-(\mathcal {O}_x)\rightarrow M^{c-\epsilon }\)  which actually we may be seen as the union \(M^{c-\epsilon }\cup D_-(\mathcal {O}_x)\)  inside \(f_1^{-1}(-\infty ,c-\epsilon ]\) . As it was argued in [2]}, we have that the union \(M^{c-\epsilon }\cup D_-(\mathcal {O}_x)\)  is a deformation retract of \(f_1^{-1}(-\infty ,c-\epsilon ]\) . The deformation retraction \(r_t:f_1^{-1}(-\infty ,c-\epsilon ]\rightarrow f_1^{-1}(-\infty ,c-\epsilon ]\)  is identical outside \(U\)  but within \(U\)  it acts as follows.

In the domain \(\Vert  \xi _0(v)\Vert ^2_0\le \epsilon \)  (i.e. in \(D_-(\mathcal {O}_x)\) ) the deformation \(r_t\)  is given by the formula
\(r_t(v)=\xi _0(v)+t\eta _0(v).\) 

In the domain \(\epsilon \le \Vert  \xi _0(v)\Vert ^2_0\le \Vert \eta _0(v)\Vert _0^2+\epsilon \)  we define \(r_t\)  by
\(r_t(v)=\xi _0(v)+s_t(v)\eta _0(v),\) 
where the number \(s_t(v)\in [0,1]\)  is defined by \(\displaystyle s_t(v)=t+(1-t)\sqrt{\dfrac{\Vert  \xi _0(v)\Vert ^2_0-\epsilon }{\Vert  \eta _0(v)\Vert ^2_0}}\) . The map \(r_0\)  takes values in \(f^{-1}(c-\epsilon )\) .

Within the domain \(\Vert \eta _0(v)\Vert _0^2+\epsilon \le \Vert \xi _0(v)\Vert _0^2\)  (i.e. in \(M^{c-\epsilon }\) ) we set \(r_t\)  to be the identity map, \(t\in [0,1]\) .

The expressions above agree on the intersection of the three domains and thus they define a continuous map \(r_t\)  so that \(r_1\)  is the identity map and \(r_0\)  is a retraction of \(f_1^{-1}(-\infty ,c-\epsilon ]\)  onto \(M^{c-\epsilon }\cap D_-(\mathcal {O}_x)\) . As expected, we can similarly define the attaching space \(G^{c-\epsilon }\cup _{B} D_-(G_{\mathcal {O}_x})\)  by using the bundle projection \(B:\partial D_-(G_{\mathcal {O}_x})\rightarrow G^{c-\epsilon }\)  as well as construct a deformation retraction \(\widetilde{r_t}:F_1^{-1}(-\infty ,c-\epsilon ]\rightarrow F_1^{-1}(-\infty ,c-\epsilon ]\)  by using the mutually complementary projections \(\xi _1\) , \(\eta _1\)  and the norm \(\Vert  \cdot \Vert _1\)  to produce same formulas as we did above.
The key point now is to prove that \((\widetilde{r_t},r_t)\)  defines a Lie groupoid morphism. As \(\widetilde{r_t}\)  and \(r_t\)  are the identity outside \(\widetilde{U}\)  and \(U\) , respectively, we only have to check this on the three special cases mentioned above. We will use again the fact that \((\xi _1,\xi _0)\)  and \((\eta _1,\eta _0)\)  are Lie groupoid morphisms. In the first domain we have that
\((r_t\circ \overline{ds})(\widetilde{v})=\xi _0(\overline{ds}(\widetilde{v}))+t\eta _0(\overline{ds}(\widetilde{v}))=\overline{ds}(\xi _1(\widetilde{v}))+t\overline{ds}(\eta _1(\widetilde{v}))=(\overline{ds}\circ \widetilde{r_t})(\widetilde{v}).\) 
We can analogously prove that \(r_t\circ \overline{dt}=\overline{dt}\circ \widetilde{r_t}\) . Now, if \(\widetilde{v}\)  and \(\widetilde{u}\)  are such that \(dm(\widetilde{v},\widetilde{u})\)  is defined then
\(\widetilde{r_t}(\overline{dm}(\widetilde{v},\widetilde{u})) &=& \xi _1(\overline{dm}(\widetilde{v},\widetilde{u}))+t\eta _1(\overline{dm}(\widetilde{v},\widetilde{u}))=\overline{dm}(\xi _1(\widetilde{v}),\xi _1(\widetilde{u}))+t\overline{dm}(\eta _1(\widetilde{v}),\eta _1(\widetilde{u}))\\&=& \overline{dm}((\xi _1(\widetilde{v}),\xi _1(\widetilde{u}))+t(\eta _1(\widetilde{v}),\eta _1(\widetilde{u})))= \overline{dm}(\xi _1(\widetilde{v})+t\eta _1(\widetilde{v}),\xi _1(\widetilde{u})+t\eta _1(\widetilde{u}))\\&=& \overline{dm}(\widetilde{r_t}(\widetilde{v}),\widetilde{r_t}(\widetilde{u})),\) 
what means that \(\widetilde{r_t}\circ \overline{dm}=\overline{dm}\circ (\widetilde{r_t}\times \widetilde{r_t})\) . To verify the assertion in the second domain we only have to check that \(s_t(\overline{ds}(\widetilde{v}))=\widetilde{s_t}(\widetilde{v})\) , \(s_t(\overline{dt}(\widetilde{v}))=\widetilde{s_t}(\widetilde{v})\)  and \(\widetilde{s_t}(\widetilde{v})=\widetilde{s_t}(\overline{dm}(\widetilde{v},\widetilde{u}))=\widetilde{s_t}(\widetilde{u})\) . These formulas follows from the fact that \((\xi _1,\xi _0)\)  and \((\eta _1,\eta _0)\)  are Lie groupoid morphisms plus the identities
\(\Vert  \overline{dm}(\widetilde{v},\widetilde{u}) \Vert _1=\Vert  \overline{ds}(\widetilde{u}) \Vert _0=\Vert  \widetilde{u} \Vert _1\qquad \textnormal {and}\qquad \Vert  \overline{dm}(\widetilde{v},\widetilde{u}) \Vert _1=\Vert  \overline{dt}(\widetilde{v}) \Vert _0=\Vert  \widetilde{v} \Vert _1\) 
which can be obtained by either the fact that \(s\) , \(t\) , \(m\) , \(\pi _1\)  and \(\pi _2\)  are Riemannian submersions or \((Q_F,Q_f)\) , \((\xi _1,\xi _0)\) , \((\eta _1,\eta _0)\)  are Lie groupoid morphisms. The remaining computations are similar to those done when looking at the first domain. Finally, in the third domain the assertion directly follows since \(\widetilde{r_t}\)  and \(r_t\)  are the identity maps over there.
In conclusion, the Lie groupoid \(G^{c-\epsilon }\cup _{B} D_-(G_{\mathcal {O}_x})\rightrightarrows M^{c-\epsilon }\cup _{b} D_-(\mathcal {O}_x)\)  is a deformation retraction of the Lie groupoid level \(F_1^{-1}(-\infty ,c-\epsilon ]\rightrightarrows f_1^{-1}(-\infty ,c-\epsilon ]\)  which in turn, as consequence of Proposition REF , is a deformation retraction of the Lie groupoid level \(G^{c+\epsilon }\rightrightarrows M^{c+\epsilon }\) . Hence, \(G^{c-\epsilon }\cup _{B} D_-(G_{\mathcal {O}_x})\rightrightarrows M^{c-\epsilon }\cup _{b} D_-(\mathcal {O}_x)\)  is a deformation retraction of \(G^{c+\epsilon }\rightrightarrows M^{c+\epsilon }\) .
