There's an interesting statement it seems I can prove, but I can't find any references for it, which makes me suspicious of it. So, could someone verify that the statement is correct/incorrect or direct me to references? I've also included what I believe is a proof of this statement.

$\textbf{Background and Notation}$

Let $U \subset \mathbb{R}^n$ be connected and open. Recall that the Identity Theorem for real-analytic functions says: if $f,g: U \to \mathbb{R}$ are real-analytic functions and $f|_V \equiv g|_V$ for a nonempty open $V \subset U$, then $f\equiv g$ on $U$.

Let $M \subset \mathbb{R}^n$. Then, $M$ is an embedded real-analytic hypersurface without boundary if and only if for each $p \in M$, we may find a nonempty open set $U \subset \mathbb{R}^n$ containing $p$ and a real-analytic function $f: U \to \mathbb{R}$ such that $$\{f=0\} = U \cap M$$ and $\nabla f \neq 0$ on $U$.

The following statement is what I would like verification or references for. It is tantamount to an Identity Theorem for embedded real-analytic hypersurfaces. This statement is motivated by mean curvature flow: for an embedded $C^2$ hypersurface as initial conditions, the solution to mean curvature flow is an embedded real-analytic hypersurface for positive time.

$\textbf{Statement:}$

Let $M$ and $N$ be connected, embedded real-analytic hypersurfaces without boundary (as sets) in $\mathbb{R}^n$.

If for some $p \in M \cap N$, there exists an open $n$-ball $B_r(p)$ around $p$ of radius $r>0$ such that $M \cap B_r(p) = N\cap B_r(p)$, then $M = N$.

$\textbf{Proof of Statement:}$

Define $$A:= \{p \in M \cap N \,|\,M \cap B_r(p) = N \cap B_r(p) \,\text{for some}\,r>0 \} \subset \mathbb{R}^n$$ Note that by assumption, $A \neq \emptyset$. Now, we want to consider the closure $\bar{A}$. Since $M \cap N$ is closed, in particular, $\bar{A} \subseteq M \cap N$. Now, we will show that $\bar{A}$ is an open subset of $M$ in the subspace topology and conclude with a connectedness argument.

Let $p \in \bar{A} \setminus A$. So, there exists $p_n \in A$ such that $p_n \to p$. For each $r>0$, we may find some $p_n$, for $n$ large enough, and $r_n>0$ such that $B_{r_n}(p_n) \subset B_r(p)$ and $M \cap B_{r_n}(p_n) = N \cap B_{r_n}(p_n)$.

Since $M$ and $N$ are embedded real-analytic hypersurfaces, we may pick $r$ small enough so that there exist real-analytic functions $f_1,f_2: B_{r}(p) \to \mathbb{R}$ where $$\{f_1 = 0\}=M \cap B_{r}(p) \,\,\,\,\,\,\,\,\,\,\,\,\{f_2 = 0\}= N \cap B_{r}(p)$$ Since we are considering embedded hypersurfaces, we may pick $r$ small enough such that we may apply the analytic implicit function theorem to $\{f_1 = 0\}$ and $\{f_2 = 0\}$. So, we write $M\cap B_{r}(p)$ and $N \cap B_{r}(p)$ as the graphs of real-analytic functions $\tilde{f_1}, \tilde{f_2}: \mathbb{R}^{n-1} \to \mathbb{R}$. Since $p \in M \cap N$, we may arrange so that $\tilde{f_1}$ and $\tilde{f_2}$ are both defined on the same $(n-1)$-ball around the origin in $\mathbb{R}^{n-1}$, with $\tilde{f_1}(0) = \tilde{f_2}(0)$ and $(0,\tilde{f_1}(0))=(0,\tilde{f_2}(0))$ corresponding to $p$. Now, since $B_{r_n}(p_n) \subset B_r(p)$ and $M \cap B_{r_n}(p_n) = N \cap B_{r_n}(p_n)$, we have that $\tilde{f_1} \equiv \tilde{f_2}$ on a nontrivial open subset of where $\tilde{f_1}$ and $\tilde{f_2}$ are defined in $\mathbb{R}^{n-1}$. By the identity theorem for real-analytic functions, $\tilde{f_1} \equiv \tilde{f_2}$ where defined. So, $\{f_1 = 0\} = \{f_2 = 0\}$ on $B_{r}(p)$. That is, $$M \cap B_{r}(p) = \{f_1 = 0\} = \{f_2 = 0\} = N\cap B_{r}(p)$$ and so $p \in A$. This means that $\bar{A} \setminus A = \emptyset$, so $\bar{A} = A$. Since $A$ is open with respect to the subspace topology, we conclude that $\bar{A}$ is open.

Then, since $\bar{A}$ is nonempty, open, and closed with respect to the subspace topology in connected $M$, we conclude that $\bar{A} = M$. The same argument works to show that $\bar{A} = N$. So, $M = N$.