User:Anghel/Sandbox

Theorem
Let $P$ be a polygon embedded in $\R^2$.

Denote the boundary of $P$ as $\partial P$.

Then, $\R^2 \setminus \partial P$ is a union of two components.

Both components are open in $\R^2$.

One component is bounded, and is called the interior of $P$.

The other component is unbounded, and is called the exterior of $P$.

Lemma 1
$\R^2 \setminus \partial P$ is a union of at most two disjoint path-connected sets.

Proof
The polygon $P$ has $n$ sides, where $n \in \N$.

Denote the vertices of $P$ as $A_1, \ldots, A_n$ and its sides as $S_1, \ldots, S_n$, such that each vertex $A_i$ has adjacent sides $S_{i-1}$ and $S_i$.

We use the conventions that $S_0 = S_n$, and $A_{n+1} = A_1$.

Let $\displaystyle \delta_i = d \left({S_i, \bigcup_{ j = 1, \ldots, n: \ \left\vert{i-j}\right\vert > 1 } S_j }\right)$ be the Euclidean distance between a side $S_i$ and all sides not adjacent to $S_i$.

From Distance between Closed Sets in Euclidean Space, it follows that $\delta_i > 0$

Put $\displaystyle \delta = \min_{i=1, \ldots, n} \delta_i$.

From Boundary of Polygon is Jordan Curve, it follows that $\partial P$ is equal to the image of a Jordan curve $\gamma: \left[{0\,.\,.\,1}\right] \to \R^2$ that is a concatenation of $n$ paths $\gamma_1, \ldots, \gamma_n$.

Each $\gamma_i$ is a line segment that joins its initial point $A_i$ and its final point $A_{i+1}$, so the image of $\gamma_i$ is equal to the side $S_i$.

Let $\mathbf v_i = \dfrac{A_{i+1} - A_i}{d \left({A_{i+1}, A_i}\right) }$ be the direction vector of $\gamma_i$ with norm $\left\Vert{\mathbf v_i}\right\Vert = 1$.

Let $\mathbf w_i$ be the vector $v_i$ rotated $\dfrac \pi 2$ radians counterclockwise, so $\left\Vert{\mathbf w_i}\right\Vert = 1$.

For any $\epsilon \in \left({0\,.\,.\,\dfrac \delta 2}\right)$, we intend to construct two Jordan curves $\sigma, \overline \sigma$ such that $\operatorname{Im} \left({\sigma}\right) \cup \operatorname{Im} \left({\overline \sigma}\right) = \left\{ {q \in \R^2: d \left({q, \partial P}\right) = \epsilon }\right\}$.

For $i \in \left\{ {1, \ldots, n}\right\}$, initially define the $\sigma_i$ as the line segment that joins its initial point $A_i + \epsilon \mathbf w_i$ with its final point $A_{i+1} + \epsilon \mathbf w_i$.

If $\sigma_i$ and $\sigma_{i+1}$ intersect at some point $p_{i+1} \in R^2$, re-define the two line segments so the final point of $\sigma_i$ becomes $p_{i+1}$, and the initial point of $\sigma_{i+1}$ becomes $p_{i+1}$.

Then define a path $\rho_i$ as the constant function $\rho_i \left({t}\right) = p_{i+1}$.

Otherwise, define a path $\rho_i$ with initial point $A_{i+1} + \epsilon \mathbf w_i$ and final point $A_{i+1} + \epsilon \mathbf w_{i+1}$, such that the image of $\rho_i$ is part of the circumference of the circle with center $A_{i+1}$ and radius $\epsilon$.

Define the path $\sigma: \left[{0\,.\,.\,1}\right] \to \R^2$ as the concatenation:


 * $\sigma = \sigma_1 * \rho_1 * \sigma_2 * \rho_2 * \ldots \sigma_n * \rho_n$

Then, $\sigma$ is a closed path, as $\sigma_1$ has initial point $A_1$ equal to the final point of $\rho_n$.

Each of the paths $\sigma_i$ and $\rho_i$ are injective.

For all $i, j \in \left\{ {1, \ldots, n}\right\}$, $\sigma_i$ only intersects $\rho_{i-1}$ and $\rho_i$ in their endpoints.

Also, $\sigma_i$ can only possibly intersect $\sigma_{i-1}$ in their endpoints, in which case the path $\rho_{i-1}$ is constant.

Similarly, $\sigma_i$ can only possibly intersect $\sigma_{i+1}$ in their endpoints, in which case the path $\rho_{i+1}$ is constant.

For $\left\vert{i - j}\right\vert > 1$, let $x_i \in \operatorname{Im} \left({\sigma_i}\right) \cup \operatorname{Im} \left({\rho_i}\right)$ and $x_j \in \operatorname{Im} \left({\sigma_j}\right) \cup \operatorname{Im} \left({\rho_j}\right)$.

Let $p_i, p_j \in \partial P$ be two points such that $d \left({x_i, p_i}\right) = d \left({x_j, p_j}\right) = \epsilon$.

If $x_i \in \operatorname{Im} \left({\sigma_i}\right)$, we can put $p_i = x_i - \epsilon \mathbf w_i$, and if $x_i \in \operatorname{Im} \left({\rho_i}\right)$, we can put $p_i = A_{i+1}$.

Then $x_i \ne x_j$, as:

It follows that $\sigma_i$ and $\rho_i$ do not intersect $\sigma_j$ and $\rho_j$.

It follows that $\sigma$ is a Jordan curve.

Now for $i \in \left\{ {1, \ldots, n}\right\}$, initially define the $\overline \sigma_i$ as the line segment that joins its initial point $A_i - \epsilon \mathbf w_i$ with its final point $A_{i+1} - \epsilon \mathbf w_i$.

Proceed to define $\overline \rho_i$ and re-define $\overline \sigma_i$ similarly to what we did with $\sigma_i$ and $\rho_i$.

Finally, define $\overline \sigma$ as the concatenation:


 * $\overline \sigma = \overline \sigma_1 * \overline \rho_1 * \overline \sigma_2 * \overline \rho_2 * \ldots \overline \sigma_n * \overline \rho_n$

It follows that $\overline \sigma$ is a Jordan curve as above.

We now show that $\sigma$ and $\overline \sigma$ do not intersect.

First, $\sigma_i$ and $\overline \sigma_i$ do not intersect, as they are both line segments parallel to $S_i$ with a distance of $2 \epsilon$.

Second, $\rho_i$ and $\overline \rho_i$ do not intersect, as one path, say $\rho_i$ is constant with image equal to the crossing point of $\sigma_{i-1}$ and $\sigma_i$.

The other path, say $\overline \rho_i$, is part of a circle circumference that joins the final point of $\overline \sigma_{i-1}$ with the initial point of $\overline \sigma_i$.

Third, $\sigma_i$ and $\overline \sigma_{i+1}$ do not intersect, since neither line segment crosses $\partial P$, which would be necessary if the two line sigments should intersect.

Similarly, $\sigma_i$ and $\overline \sigma_{i-1}$ do not intersect.

For all other combinations of $i, j \in \left\{ {1, \ldots, n}\right\}$, $\sigma_i$ and $\rho_i$ do not intersect with $\overline \sigma_j$ and $\overline \rho_j$.

This follows as $d \left({ \sigma_i, S_i}\right) = d \left({ \rho_i, S_i}\right) = d \left({ \rho_i, S_{i-1} }\right) = \epsilon$, and as $S_i$, or $S_{i-1}$, are not adjacent sides to $S_j$, we have $d \left({S_i, S_j}\right) > 2 \epsilon$.

Now we can use the Triangle Inequality as above, to prove that the paths do not intersect.

Finally, let $q_1, q_2, q_3 \in R^2 \setminus \partial P$.

Put $\displaystyle \epsilon = \min \left({ d \left({q_1, \partial P}\right) / 2, d \left({q_2, \partial P}\right) / 2, d \left({q_3, \partial P}\right) / 2, \delta }\right)$.

For all $i \in \left\{ {1, 2, 3}\right\}$, draw a line segment $\mathcal L_i$ joining $q_i$ with any point on the boundary $\partial P$.

As $d \left({q_i, \partial P}\right) > \epsilon$, it follows from the Intermediate Value Theorem that there is a point $x_i$ on $\mathcal L_i$ such that $d \left({x_i, \partial P}\right) = \epsilon$.

Then we have either $x_i \in \operatorname{Im} \left({\sigma}\right)$, or $x_i \in \operatorname{Im} \left({\overline \sigma}\right)$, when the Jordan curves $\sigma$ and $\overline \sigma$ gets defined from the new value of $\epsilon$.

It follows that at least two out of three of the points $q_1, q_2, q_3$ is path-connected to the same Jordan curve.

As a Jordan curve is a path, it follows that at least two of the points can be connected by a path.

Hence, $R^2 \setminus \partial P$ is a union of at most two disjoint path-connected sets.

Lemma 2
All points in a path-connected subset of $R^2 \setminus \partial P$ have the same parity.

Proof
Let $q \in \R^2 \setminus \partial P$.

Define $g: \R \to \R^2$ by $g \left({\theta}\right) = \left({\cos \theta, \sin \theta}\right)$.

Define $\mathcal L_\theta = \left\{ {q + s g \left({\theta}\right): s \in \R_{\ge 0} }\right\}$ as a ray with start point $q$.

Then $\mathcal L_\theta \cap \partial P$ consists of a finite number of line segments.

As two adjacent sides in $P$ do not form a straight angle by the definition of polygon, it follows that each of the line segments is either a single point or an entire side of $P$.

Each of these line segments is called a crossing iff:


 * the line sigment is a single point which is not a vertex of $P$.


 * the line segment is a single vertex, and the adjacent sides lie on opposite sides of $\mathcal L_\theta \cap \partial P$.


 * the line segment is a side $S$ of $P$, and the two sides adjacent to $S$ lie on opposite sides of $\mathcal L_\theta \cap \partial P$.

Let $N_\theta \left({q}\right) \in \N$ be the number of crossings of $\mathcal L_\theta$.

As the value of $\theta$ increases, the value of $N_\theta \left({q}\right) \in \N$ only changes when $\mathcal L_\theta$ crosses a vertex of $P$.

If $\theta_0 \in \R$ is a value for which $\mathcal L_{\theta_0}$ crosses exactly one vertex $A$ or side $S$, there are three possibilities:


 * $\displaystyle N_{\theta_0} \left({q}\right) = \lim_{\theta \to \theta_0} N_\theta \left({q}\right)$, if $A$ or $S$ is not part of a crossing.


 * $\displaystyle N_{\theta_0} \left({q}\right) = \lim_{\theta \to \theta_0^-} N_\theta \left({q}\right) = \lim_{\theta \to \theta_0^+} N_\theta \left({q}\right) - 2$, if $A$ or $S$ is part of a crossing, and $\mathcal L_{\theta_0}$ intersects both lines adjacent to $A$ or $S$ for some $\theta > \theta_0$.


 * $\displaystyle N_{\theta_0} \left({q}\right) = \lim_{\theta \to \theta_0^-} N_\theta \left({q}\right) - 2 = \lim_{\theta \to \theta_0^+} N_\theta \left({q}\right)$, if $A$ or $S$ is part of a crossing, and $\mathcal L_{\theta_0}$ intersects both lines adjacent to $A$ or $S$ for some $\theta < \theta_0$.

Here, $\displaystyle \lim_{\theta \to \theta_0^-} $ denotes a limit from the left, and $\displaystyle \lim_{\theta \to \theta_0^+} $ denotes a limit from the right.

If $\mathcal L_{\theta_0}$ crosses more than one vertex, $\displaystyle N_{\theta_0} \left({q}\right)$ may change be a larger number, but always by a multiple of $2$.

Hence, $N_\theta \left({q}\right) \bmod 2$ is independent of $\theta$, so we define the parity of $q$ as $\operatorname{par} \left({q}\right) := N_\theta \left({q}\right) \bmod 2$.

Let $\sigma: \left[{0\,.\,.\,1}\right] \to \R^2 \setminus \partial P$ be any path with initial point $q$.

For fixed $\theta \in \R$ and $t \in \left[{0\,.\,.\,1}\right]$, define $\mathcal L_{\theta, t} = \left\{ {\sigma \left({t}\right) + s g \left({\theta}\right): s \in \R_{\ge 0} }\right\}$ as a ray with start point $\sigma \left({t}\right)$.

A similar argument to the one above shows that:


 * $\displaystyle \lim_{\theta \to \theta_0} N_\theta \left({\sigma \left({t}\right) + s g \left({\theta}\right) }\right) \equiv N_{\theta_0} \left({\sigma \left({t}\right) + s g \left({\theta}\right) }\right) \pmod 2$

So all point in $\operatorname{Im} \left({\gamma}\right)$ have the same parity, which shows that all points in a path-connected subset of $R^2 \setminus \partial P$ have the same parity.

We show that $\R^2 \setminus \partial P$ is not path-connected.

Find any $q_1 \in R^2 \setminus \partial P$ and $\theta \in \R$ such that the ray $\mathcal L_\theta = \left\{ {q_1 + s g \left({\theta}\right): s \in \R_{\ge 0} }\right\}$ has exactly one crossing of $\partial P$.

Find any $q_2 \in \mathcal L_\theta$ that lies on the ray after the crossing, so the ray $\left\{ {q_2 + s g \left({\theta}\right): s \in \R_{\ge 0} }\right\}$ does not intersect $\partial P$.

Then $\operatorname{par} \left({q_1}\right) = 1 \ne 0 = \operatorname{par} \left({q_2}\right)$.

From Jordan Polygon Parity Lemma, it follows that $q_1$ and $q_2$ cannot be connected by a path.

Rest
As $R^2 \setminus \partial P$ is not path-connected, it follows from the Lemma that $R^2 \setminus \partial P$ is a union of exactly two disjoint path-connected sets, which we denote as $U_1$ and $U_2$.

Let $q \in \R^2 \setminus \partial P$, and let $d \left({q, \partial P}\right)$ be the Euclidean distance between $q$ and $\partial P$.

From Distance between Closed Sets in Euclidean Space, it follows that $d \left({q, \partial P}\right) > 0$.

When we put $\epsilon = d \left({q, \partial P}\right) / 2$, we have $B_\epsilon \left({q}\right) \subseteq \R^2 \setminus \partial P$.

As Open Ball is Convex Set, it follows that $B_\epsilon \left({q}\right)$ is path-connected, so $B_\epsilon \left({q}\right)$ is a subset of either $U_1$ or $U_2$.

Then, both $U_1$ and $U_2$ are open.

From Path-Connected Space is Connected, it follows that $U_1$ and $U_2$ are connected.

Then, $\R^2 \setminus \partial P$ is a union of two components.

From Boundary of Polygon is Jordan Curve, it follows that $\partial P$ is equal to the image of a Jordan curve $\gamma: \left[{0\,.\,.\,1}\right] \to \R^2$.

From Continuous Image of Compact Space is Compact/Corollary 2, it follows that $\partial P$ is bounded.

That is, there exist $a \in \R^2$ and $R \in \R_{>0}$ such that $\partial P \subseteq B_R \left({a}\right)$.

If $x_1, x_2 \in \R^2 \setminus B_R \left({a}\right)$, $x_1$ to $x_2$ can be joined by a path in $\R^2 \setminus B_R \left({a}\right)$ following:


 * the circumference of the two circles with center $a$ and radii $d \left({a, x_1}\right)$ and $d \left({a, x_2}\right)$.


 * a line segment joining the two circumferences

Then $\R^2 \setminus B_R \left({a}\right)$ is path-connected, so $\R^2 \setminus B_R \left({a}\right)$ is a subset of one of the components of $\R^2 \setminus \partial P$, say $U_1$.

As $\R^2 \setminus B_R \left({a}\right) \subseteq U_1$, it follows that $U_1$ is unbounded, so $U_1$ is the exterior of $\gamma$.

Then $U_2 \subseteq B_R \left({a}\right)$, so $U_2$ is bounded, which implies that $U_2$ is the interior of $\gamma$.