I am studying CFL at the moment and I found this confusing. What I've just read is that, $L=\{ww\}$ is not a CFL. The proof showed it by using pumping lemma for CFL. ($w=0^n1^n0^n1^n$) and I fully understood the proof.
Here comes the question. I understand that $L1=\{ww^R\}$ can be constructed by NPDA, and thus a CFL. However, if I use pumping lemma for this, i.e., $w=0^n1^n1^n0^n$, I can show that this specific sentence does not satisfy pumping lemma as well.
Pumping lemma
Let $L1$ be a CFL. Then, there exists n such that for any $w ∈ L$ and $|w|\geq n$, $w$ can be decomposed as $w=uvxyz$ such that
1) $|vxy|\leq n$
2) $|vy| \geq 1$
3) $w_i=uv^ixy^iz$ ∈ $L1$, for all $i \geq 0$
By setting $w=0^n1^n1^n0^n$ and if $v,y$ ∈ $0^+$ in the first half, regardless of how many times I pump, $ww^R$ does not belong to $L1$ anymore. Thus, since the pumping lemma should be satisfied for every possible case, I can conclude that it is not CFL.
Note again that I know $L1$ can be designed with NPDA. What is my mistake while proving using pumping lemma?
I am really confused about this. Can anyone answer my question?
My first guess is...
In order to show a language is CFL, I should first try to construct a PDA accepting the language, and if it is not possible, I should show that it is not a CFL by using pumping lemma. However, what if I could not find a PDA although there exists one?
P.S. I actually posted this question yesterday with not much detailed explanation, therefore I posted again.
Thanks in advance