I want to understand how is this proof working.
What I know:
Pumping lemma for regular language-:
Let $L$ be regular language. Then there exists a constant $n$ which depends on $L$ such that for every string $w \in L$ with $|w|\geq n$ and $w=xyz$ such that-:
$y\neq \epsilon$
$|xy| \leq n$
For all $i \geq 0$, $xy^iz \in L$
The proof that I am trying to understand: prove that $L=\{0^{2^p}, p \geq 0\}$ is not regular.
Solution:
Assume $L$ is regular. (I understand this).
$w=0^{2^n}=xyz$
$|y|$ can be from $1$ to $n$ (let) assuming $x=\epsilon$
Here we want to prove $xy^iz \not\in L$
So what the author has done is that:
|$xy^2z|=|xyz|+|y|$
The length of $xy^2z$ ranges from $2^n$ and $2^{n+1}$ But for $xy^2z$ $\in L$, we need its length in the multiple of $2^n$. This is what I understand. But I want to understand this better so that I can use this same problem solving ability to solve as many problems. Please review me.
What is the pumping length here? $i$ or $n$?