Are piecewise polynomials $H^1$ functions? The Sobolev space $H^1(\Omega)$, where $\Omega$ denoted a bounded polygonal domain in $\mathbb{R}^d$, is defined as:
$$
H^1(\Omega) = \{ v \in L^2(\Omega): \nabla v \in (L^2(\Omega)^d \},
$$
where
$$
L^2(\Omega) = \{ v: \int_\Omega v^2 d\Omega < \infty \}.
$$
Let $\Omega$ be subdivided into elements $E \mathcal{E}_h$. We define a space of piecewise polynomials as:
$$
V_h (\Omega) = \{ v \in L^2(\Omega): \forall E \in \mathcal{E}_h, v_{E} \in \mathbb{P}_k (E) \},
$$
where $\mathbb{P}_k(E)$ denotes the space of polynomials of total degree $\leq$ k on each element $E$. Is it true that $V_h \subset H^1(\Omega)$? If so, is there a way to formally/informally prove it? Either through a simple example in 1D or functional analysis with some topology work involve? (I don't have a lot of experience with the latter so something simple to understand would be much appreciated!)
 A: We can show that a piecewise polynomial function $v$ must be globaly continuous such that  $v \in H^1(\Omega)$ where $\Omega$ is a bounded polygonal domain:
Let $(\mathcal{E}_h)_{h > 0}$ be a familie of decomposition of $\Omega$ where for each $E \in \mathcal{E}_h$ we have $d(E) \leq 2 h$. We use piecewise polynomial function $v$ such that $v|_{E} \in \mathcal{P}_k$ for all $E \in \mathcal{E}_h$, where
\begin{equation}
\mathcal{P}_k := \lbrace v(\mathbf{x}) = \sum_{0 \leq |\alpha| \leq k}{\beta_{\alpha}x_1^{\alpha_1}\ldots x_n^{\alpha_n}} \rbrace
\end{equation}
denotes all polynoms with degree $\leq k$. We show the following statement:
Let $\mathcal{E}_h$ be a given decomposition of the bounded polygonal domain $\Omega$ and $m \geq 1$. The function $v: \Omega \rightarrow \mathbb{R}$ satisfies $v|_{E} \in C^{m}(E)$ for each $E \in \mathcal{E}_h$. Than $v \in H^m(\Omega)$ if and only if $v \in C^{m-1}(\Omega)$:
We show the proof for $m = 1$. The case $m > 1$ follows from looking at the Derivates of order $k-1$. Furthemore we assume for simplicity that $d = 2$ since the proof works similar for $d > 2$.
$\Rightarrow$: For $i = 1, 2$ we define
$w_i : \Omega \rightarrow \mathbb{R}$ piecewise $w_i|_{E} := \partial_{x_i} v$ for each $E \in \mathcal{E}_h$. Then for $\phi \in C^{\infty}_{0}(\Omega)$
\begin{equation}
\int_{\Omega}{w_i \phi d \mathbf{x}} = \sum_{E \in \mathcal{E}_h}{\int_{E}{\partial_{x_i}}v \phi d\mathbf{x}} = \sum_{E \in \mathcal{E}_h}\lbrace - \int_{E}{v \partial_{x_i}\phi d \mathbf{x}} + \int_{\partial E}{v \phi n_i d \mathcal{H}^{n-1}} \rbrace.
\end{equation}
Since $v$ is considered continuous the integrals over the inner edges cancel each other out and $\phi$ vanishes on $\Gamma$. Therefore
\begin{equation}
\int_{\Omega}{w_i \phi d \mathbf{x}} = - \int_{E}{v \partial_{x_i}\phi d \mathbf{x}} \mbox{ for all } \phi \in C^{\infty}_{0}(\Omega).
\end{equation}
Therefore $w_i$ is the weak derivative of $v$. 
$\Leftarrow$: Let $v \in H^1(\Omega)$. We look at $v$ in a neighborhood of an edge and rotate the edge such that it lies on the $y$ coordinate. The neighborhood shall contain the interval $[\underline{y} - \delta, \overline{y} + \delta]$ with $\underline{y} < \overline{y}$ and $\delta > 0$. Let $v \in C^{\infty}(\Omega)$ then for the function
\begin{equation}
\psi(x) := \int^{\overline{y}}_{\underline{y}}{v(x, y) dy}
\end{equation}
we get with cauchy-schwarz-inequality
\begin{align}
|\psi(\overline{x}) - \psi(\underline{x})|^2 &= \left| \int^{\overline{x}}_{\underline{x}} \int^{\overline{y}}_{\underline{y}}{\partial_{\mathbf{x}} v(x,y) d y dx  } \right|^2 \\&\leq \left|\int^{\overline{x}}_{\underline{x}}{\int^{\overline{y}}_{\underline{y}}{1 dy dx}} \right||v|^2_{H^1(\Omega)} \\ &\leq |\overline{x} - \underline{x}||\overline{y} - \underline{y}| |v|_{H^1(\Omega)}^2 \\
\end{align}
Since $C^{\infty}(\Omega)$ is dense in $H^1(\Omega)$ the inequlity holds for $v \in H^1(\Omega)$. Therefore $\mathbf{x} \mapsto \psi(\mathbf{x})$ is continuous especially in $\mathbf{x} = 0$. Since $\underline{y}$ and $\overline{y}$ with $\underline{y} < \overline{y}$ were arbitary, it is only possible if the piecewise continuous functions $v$ are continuous on the edge.
