# Pumping lemma for 0^n and n>0

When applying the pumping lemma to $L = \{ 0^n \mid n>0\}$ I do the following:

$S = 0^p$
$x = \varepsilon$
$y = 0^p$
$z = \varepsilon$

so $S = xyz = (\varepsilon)0^p(\varepsilon)$

For $x y^i z$ if i choose $i = 0$ (pumping down) i get $S = \varepsilon$, which is not an element of $L$.

Therefore according to the pumping lemma this language is not regular. But since I am able to draw a DFA for $L$, I know it is regular.

I would like to know what rules I am violating by trying to apply the pumping lemma to $L$ in this manner.

The pumping lemma says that you can split the word into $xyz$. It doesn't say that every such split works. For instance, if you take $|x|=1$ in your example, the pumping works up and down. This would be a "correct split" that makes the pumping lemma hold.
Let $L$ be a regular language. Then there exists an integer $p\ge 1$ (depending only on $L$) such that every string $w$ in $L$ of length at least $p$ ($p$ is called the "pumping length") can be written as $w = xyz$ (i.e., $w$ can be divided into three substrings), satisfying the following conditions:
1. $|y| \ge 1$
2. $|xy| \le p$ and
3. for all $i \ge 0$, $xy^iz \in L$.
$y$ is the substring that can be pumped (removed or repeated any number of times, and the resulting string is always in $L$).