Paths of Minimal Length from Vertex form Tree

Theorem
Let $G = \left({V, E}\right)$ be a simple graph.

Let $r \in V$ be a vertex in $G$.

Let $P$ be the set of finite open paths beginning at $r$ that are of minimal length to reach their endpoints.

That is, an open path $p$ beginning at $r$ and ending at some vertex $s$ is in $P$ there is no path $q$ beginning at $r$ and ending at $s$ such that the length of $q$ is less than the length of $p$.

Let $p, q \in P$.

Let $\left\{{p, q}\right\} \in E'$ either:


 * $q$ is formed by extending $p$ with one edge and one vertex of $G$

or:
 * $p$ is formed by extending $q$ with one edge and one vertex of $G$.

Then $T = \left({P, E'}\right)$ is a tree.

Proof
Let $\left({r}\right)$ be the $0$-length $G$-path whose only vertex is $r$.

Connected
We will show that there is a $T$-path from $\left({r}\right)$ to each element $p$ of $P$.

We proceed by induction on the length of $p$.

If $p$ has length $0$, then $p = \left({r}\right)$.

Thus the $0$-length $T$-path $\left({\left({r}\right)}\right)$ connects $\left({r}\right)$ to $p$.

Suppose that there is a $T$-path from $\left({r}\right)$ to each element of $P$ of length $n$.

Let $p \in P$ have length $n + 1$ and final vertex $z$.

Let $p^*$ be the $G$-path obtained from $p$ by removing the last vertex and the last edge.

Then $p^*$ is a $G$-path of length $n$.

We must show that $p^* \in P$.

Let $w$ be the last vertex of $p^*$.

Suppose for the sake of contradiction that $p^* \notin P$.

Then by the definition of $P$, there is a $G$-path $m$ from $r$ to $w$ which is shorter than $p^*$.

But then appending the last edge and vertex of $p$ to $m$, one obtains a $G$-path from $r$ to $z$ which is shorter than $p$.

This contradicts the supposition that $p \in P$.

Thus we conclude that $p^* \in P$.

By the inductive hypothesis, there is a $T$-path $b$ from $\left({r}\right)$ to $p^*$.

Then by the definition of $E'$, there is an edge from $p^*$ to $p$.

Appending that edge and $p$ to $b$ yields a $T$-path from $\left({r}\right)$ to $p$.

As such a $T$-path exists for each $p \in P$, $T$ is connected.