String is Substring of Itself

From ProofWiki
Jump to navigation Jump to search

Theorem

Let $S$ be a string.


Then $S$ is a substring of itself.


Proof

By definition, a string $T$ is a substring of $S$ in $\AA$ if and only if:

$S = S_1 T S_2$

where:

$S_1$ and $S_2$ are strings in $\AA$ (possibly null)
$S_1 T S_2$ is the concatenation of $S_1$, $T$ and $S_2$.


Let $S_1$ and $S_2$ both be the null string.

Then it follows that:

$S = T$

Hence the result.

$\blacksquare$