Sheaf-theoretically characterize a Riemannian structure? A smooth structure on a topological manifold can be characterized as a sheaf of local rings, see for example the discussion here.
Q: Is there a way to characterize a Riemannian structure on a smooth manifold by a sheaf of functions?
A most likely  horrible guess to clarify the type of answers I'm thinking about: define a Riemannian manifold to be a locally ringed space that locally looks like the sheaf $(\mathbb R^n, \mathcal H_g)$ where $g$ is some non degenerate symmetric positive definite matrix and $\mathcal H_g$ is the sheaf (is it even a sheaf?) that assigns to open subsets harmonic functions solving the Laplace equation given by $g$.
Please forgive my ignorance in the above, this is not my field. Just had to do a little Riemannian geometry today and was thinking whether there's a sheaf-theoretic/functor of points way to think about things.
 A: Suppose that $M$ is a smooth manifold and $g_0, g_1$ are Riemann metrics on $M$. $\newcommand{\eH}{\mathscr{H}}$  Denote by $\eH_{g_i}$, $i=0,1$ and the sheaf of $g_i$-harmonic functions. More precisely for any open set $U\subset M$
$$\eH_{g_i}(U)=\big\{\; f\in C^\infty(U):\;\;\Delta_{g_i} u=0\;\big\}, $$
where $\Delta_{g_i}$ denotes the scalar Laplacian of the metric $g_i$.
Long time ago I proved the following result.

Suppose that $\eH_{g_0}(U)=\eH_{g_1}(U)$, for any open set $U\subset M$.

*

*If $\dim M\geq 3$, then there exists $c\in (0,\infty)$ such that $g_1=c g_0$.


*If $\dim M=2$, then there exists a smooth function $f: M\to (0,\infty)$ such  that $g_1=fg_0$, i.e., the metrics $g_0$ and $g_1$ live in the same conformal class.

The  strong unique continuation property of harmonic functions shows that this statement is  really a statement about the  stalks of the sheaves $\eH_{g_i}$. Note that these are sheaves of vector spaces, not rings.   In dimension $\geq 3$ these sheaves determine the metric up to a multiplicative positive constant.
