Consider this example (taken from this document: Showing that language is not regular):
$$L = \{1^n \mid n\text{ is even}\} $$
According to the Pumping Lemma, a language $L$ is regular if :
- $y \ne ε$
- $|xy| \lt n$
- $\forall k \in N, xy^kz \in L$
In the above example, $n$ must be even. Suppose we have $n = 4$, we can express: $$xy^kz$$ such that: $x = 1$, $z = 1$, and with $k = 2$, we have $y^k = y^2 = 11$, so we get the string $1111$. However, since all $k$ must be satisfied, if $k = 1$, the string is $111$, it does not belong to $L$. Yet, I was told that the above example is a regular language. How can it be?