It is known that, in general, the sheaf of real analytic functions on a real analytic manifold is not coherent. However, there are some examples, where we have coherence: for example, if $X$ is a complex analytic manifold, then the sheaf of real analytic functions $A^{\omega}\_X$ is the restriction to the diagonal of 
the sheaf $\mathcal O\_{X \times \bar X}$ of complex analytic functions on the product of $X$ and its complex conjugate $\bar X$, so $A^{\omega}\_X$ is coherent.


Are there other examples of real analytic manifolds for which we can prove the coherence of the structure sheaf? 


I am especially interested in the case where $X$ has the metric with special holonomy, for example, when it is a $G\_2$ manifold.



When do real analytic functions form a coherent sheaf?
For real-analytic manifolds, coherence of the structure sheaf always holds. The 1-sentence reason is that one can pass to real and imaginary parts on Oka's coherence theorem in several complex variables. 


Before discussing a proper proof of that 1-sentence executive summary, I should address that in the real-analytic setting however an analogue of one of Oka's "coherence" results over $\mathbf{C}$ can fail (leading one to see phrases in the literature such as "non-coherent real-analytic spaces"): there is *no* real counterpart to the "analytic Nullstellensatz" of Oka. To explain this, recall Oka's result that for a complex-analytic set $X$ in a complex manifold $V$ (i.e., a closed subset that is locally on $V$ given by the vanishing of finitely many holomorphic functions) the ideal sheaf of sections of $O\_V$ vanishing on $X$ is *always locally finitely generated* (or equivalently a coherent $O\_V$-module, since $O\_V$ is coherent by Oka's big theorem). But this fails in the real-analytic case. In contrast, there exist real-analytic sets $Z$ in real-analytic manifolds $U$ (i.e., a closed subset that is locally on $U$ given by the vanishing of finitely many real-analytic functions) such that the ideal sheaf $I\_Z$ of sections of $O\_U$ vanishing on $Z$ is not locally finitely generated; such a $Z$ is called "non-coherent" in $U$ (because in such cases the subsheaf $A = O\_U/I\_Z$ of the sheaf of $\mathbf{R}$-valued continuous functions on $Z$ can fail to be a coherent sheaf of rings, though I have never cared enough to check up on a proof of this consequence in some cases). An explicit example of $Z$ and $U$ with $I\_Z$ not coherent inside $O\_U$ is given near the start of <https://arxiv.org/pdf/math/0612829.pdf>.


To be more detailed about the proof of coherence of the structure sheaf of a real-analytic manifold, the assertion is of local nature and so only depends on the (local) dimension; i.e., for manifolds of (pure) dimension $n$ it is equivalent to showing that the sheaf $O\_U$ of real-analytic functions on every small open ball $U$ around the origin in $\mathbf{R}^n$ is coherent. By definition, this coherence amounts to local finite generation for the kernel of any $O\_U$-linear map $\varphi:O\_U^{\oplus N} \rightarrow O\_U$ for any small $U$. This map locally "extends" over an open in $\mathbf{C}^n$; i.e., by working locally on $U$ we can arrange that that exists an open $V \subset \mathbf{C}^n$ satisfying $V \cap \mathbf{R}^n = U$ and holomorphic $F\_1, \dots, F\_N$ on $V$ whose restriction to $U$ recovers the $N$ components $f\_1, \dots, f\_N$ of $\varphi$. 


By Oka's big coherence theorem (not the analytic Nullstellensatz above), the resulting map $\Phi: O\_V^{\oplus N} \rightarrow O\_V$ extending $\varphi$ has kernel that is locally finitely generated. Working locally on $V$ around points of $U$, we can thereby arrange that there exist $s\_1, \dots, s\_r \in O(V)^{\oplus N}$ generating $\ker \Phi$. We claim that the real and imaginary parts of the restrictions to $U$ of these $N$-tuples belong to $\ker \varphi$ and generate it.


Our problem is local on $V$ near $U$, so for generation we can focus on
$(g\_1,\dots,g\_N) \in (\ker \varphi)(U)$. By working locally on $V$ around a point in $U$ we can arrange that $V$ is connected and that each $g\_j$ extends (necessarily uniquely) to a holomorphic $G\_j$ on $V$. Then the global section $\sum G\_j F\_j \in O(V)$ has restriction to $U$ equal to $\sum g\_j f\_j = \varphi(g\_1,\dots,g\_N)=0$, so $\Phi(G\_1,\dots,G\_N)=\sum G\_j F\_j = 0$ by connectedness of $V$ and analyticity considerations. Thus, working locally on $V$ some more we can arrange that $(G\_1,\dots,G\_N) = \sum\_{k=1}^r a\_k s\_k$ for some $a\_{1}, \dots, a\_{r} \in O(V)$, so restricting to $U$ gives
$$(g\_1,\dots,g\_N) = \sum\_{k=1}^r a\_{k}|\_U \cdot s\_k|\_U.$$


Each function $g\_j$ is $\mathbf{R}$-valued, whereas $a\_{k}|\_U$ and the $N$ components of $s\_k|\_U$ are $\mathbf{C}$-valued, and the real and imaginary parts of these various $\mathbf{C}$-valued functions are real-analytic on $U$. Thus, 
$$(g\_1,\dots,g\_N) = \sum\_{k=1}^r ({\rm{Re}}(a\_{k}|\_U){\rm{Re}}(s\_k|\_U) - 
{\rm{Im}}(a\_{jk}|\_U) {\rm{Im}}(s\_k|\_U)).$$
Finally, the condition $s\_k \in (\ker \Phi)(V) \subset O(V)^{\oplus N}$ says that the $N$ components $s\_{k1},\dots,s\_{kN} \in O(V)$ satisfy $\sum F\_j s\_{kj} = 0$, so $\sum f\_j \cdot s\_{kj}|\_U = 0$ as $\mathbf{C}$-valued functions on $U$. But each $f\_j$ is $\mathbf{R}$-valued, so
$\sum f\_j {\rm{Re}}(s\_{kj}|\_U)$ and $\sum f\_j {\rm{Im}}(s\_{kj}|\_U)$ both vanish on $U$; i.e., ${\rm{Re}}(s\_k|\_U)$ and ${\rm{Im}}(s\_k|\_U)$ belong to $(\ker \varphi)(U)$. Thus, ${\rm{Re}}(s\_1|\_U), \dots, {\rm{Re}}(s\_r|\_U), {\rm{Im}}(s\_1|\_U), \dots, {\rm{Im}}(s\_r|\_U)$ generate $\ker \varphi$ over the (now shrunken) $U$. This shows that in the initial setup (before we began shrinking $U$) the kernel of $\varphi$ is locally finitely generated. 


