I don't think that I fully understand how to use the pumping lemma to prove that a given language is not regular. I'm reading Sipser and according to him the definition of the pumping lemma is:
"If A is a regular language, then there is a number p ( the pumping length) where, if s is any string of A of length at least p, then s may be divided into three pieces, s = xyz, satisfying the following conditions: 1. for each $i \ge 0, xy^iz\in A$ 2. $\left| y \right| \gt 0$ 3. $\left|xy\right| \le p$
Now given the exercise:
Show that $A_1 = \{0^n1^n2^n | n\ge 0\}$ is not regular.
I assume that $A_1$ is regular and therefore can be divided into a form $s=xyz$ for $s\in A_1$. But now I could simply say that $s=0^p1^p2^p$ where p is the pumping length and divide s such that $x=\epsilon, y= 0^p1^p, z = 2^p$ and claim that because $\left|xy\right| \gt p$ it follows that $A_3$ is not regular. Similarly for the language $L=\{a^nb^la^k | k \neq n+l\}$ I could use the same logic. But all the solutions to those exercises come up with fairly complicated solutions compared to this logic, so I assume something is wrong here.
I think I misunderstand something about the theorem and how to use it to prove some language is not regular, what am I getting wrong?