TITLE: Version of identity theorem for functions in $\mathbb{R}^n$
QUESTION [5 upvotes]: How to show the following version of the identity theorem for real-analytic function in $\mathbb{R}^n$

Let $g,f: \mathbb{R}^n \to \mathbb{R}$ be two real-analytic functions.
  Suppose, that $g(x)=f(x)$ on a set $E$ of positive Lebesgue measure.
  Then, $f(x)=g(x)$ for all $x \in \mathbb{R}^n$.

Also, providing a reference for this would great. 
The question was first raised here and motivated by identity theorem on open sets. Where the case of $n=1$ was also solved. It was suggested that the case of $n>1$ can be solved by using induction. However, I was not able to follow the proof.
Since one can come up with a number of identity theorems for analytic function in $\mathbb{R}^n$, I was wondering if there is a good source that summarizes these result. I found one for complex analytic functions here, but I don't think it is very complete.

REPLY [10 votes]: We can write this version of the identity principle (IP) as follows: Let $f: \mathbb{R}^n \to \mathbb{R}$ be real-analytic.  If $f=0$ on a set $E$ of positive Lebesgue measure, then $f=0$ everywhere in $\mathbb R^n.$
Proof for $n=1:$ We have $m_1(E\cap [-r,r])>0$ for some $r>0.$ For such an $r$ the set $E\cap [-r,r]$ is infinite, hence has a limit point in $[-r,r].$ We then have $f=0$ on $\mathbb R$ by the standard IP.
For higher dimensions we need a simple fact: Write points in $\mathbb R^{n+1}$ as $(x,t),$ with $x\in \mathbb R^n$ and $t\in \mathbb R.$ If $f$ is real analytic on $\mathbb R^{n+1},$ then for each fixed $t\in \mathbb R,$ the function $x\to f(x,t)$ is real analytic on $\mathbb R^n,$ and for each fixed $x\in \mathbb R^n,$ the function $t\to f(x,t)$ is real analytic on $\mathbb R.$ 
We proceed by induction. First, suppose we have the IP for $n.$ Assume we have a real analytic $f$ on $\mathbb R^{n+1}$ such that $f=0$ on a set $E\subset \mathbb R^{n+1}$ with $m_{n+1}(E)>0.$ By Fubini,
$$m_{n+1}(E)= \int_{\mathbb R} \int_{\mathbb R^n}\chi_E(x,t)\, dm_n(x)\, dm_1(t).$$
Since $m_{n+1}(E) > 0,$ we have the inner integral above positive for $t$ belonging to some set $A\subset \mathbb R$ with $m_1(A)>0.$ By the induction hypothesis, for each $t\in A,$ $x\to f(x, t)$ vanishes identically on $\mathbb R^n.$ Thus we have $f\equiv 0$ on $\mathbb R^n\times A.$ Now fix $x\in \mathbb R^n.$ Then $t\to f(x,t) =0$ for all $t\in A.$ By the IP for $n=1,$ this function vanishes on $\mathbb R.$ It follows that $f=0$ on $\mathbb R^n\times \mathbb R = \mathbb R^{n+1},$ and we're done.