How to show that the language containing the words whose length is a power of $2$, $L=\{w\mid|w|=2^i\}$, isn't regular using the pumping lemma?The pumping lemma says that Let be M a regular language. Then it exists a number $p>0$ such that for each word $w\in L$, such that $|w|\ge p$, it exists $x,y,z$ such that :$w=xyz$$|y|>0$$|xy|<p$For each $i\ge 0$ we have $xy^iz\in L$.(I don't perfectly understand this lemma...). I have great difficulties to understand the examples which I can provide you in French here.My question is different from How to prove that a language is not regular? as far as all answers are based on $L=\{w\mid|w|=a^pb^q\}$ scheme, mine only have one element and is playing on the size rather than the scheme.My attemptWe take $w=a^{2^n}$. Therefore we have $w\in L$ and $|w|\ge p$. We need a partition $w=xyz$ (to fill in condition 1.) such that $|xy|<p$ (condition 3) and $|y|>0$ (condition 2).Let's assume $L$ is regular.I thought about taking $|w|>n$ $x = aaaa....$ , $y = aaaa...$,$|x|=s$, $|y|=k$. We need to consider ALL the options, that is allthe possible $s,k$ such that $s0$,$k1$ and $s+kn$.Let's take $i=0$, then $xy^iz=xz=a^{n-k}a^n\not\in L$ whatever may $s,k$ be and since $k\ge 1$, $L$ isn't regular at all (but why) and we reach a contradiction.I have some difficulties understanding the conclusion.
Irregularity of language of words whose length is of power of 2
formal languages;regular languages;regular expressions;pumping lemma