# Does every language that fulfills the regular Pumping conditions also fulfill the context-free ones?

Let L be a language that fulfills the properties implies by the Pumping lemma for regular languages. Does L necessarily fulfill the corresponding properties of the Pumping lemma for context-free languages as well?

• Ok, if you didn't manage to contradict it, how about a proof that it is correct? – Shaull Jun 30 '15 at 16:21
• Yes, it is true. Try to provide some details in your question about how you approach the problem, and where you got stuck. This will make an answer much more productive. – Shaull Jun 30 '15 at 16:40
• What do you mean by "a language that fulfils the pumping lemma"? The pumping lemma is a fact about regular languages. It's not something that is fulfilled or not fulfilled by any particular language, just as, for example, Fermat's last theorem is neither fulfilled nor not fulfilled by any particular natural number. – David Richerby Jun 30 '15 at 17:01
• @RickDecker "If $L$ is regular, then the PL applied to $L$ is true." No, the pumping lemma isn't "true for a language $L$": it's just true. It's a universal statement about languages, with no free variables: for all $L$, if $L$ is regular then $L$ has property $X$. For any specific language, one can look at the hypothesis and conclusion of that implication but is that "applying the pumping lemma to $L$"? When we use the pumping lemma to prove non-regularity, we use the contrapositive: for all languages $L$, if not $X$ then $L$ is not regular. What is "applying the PL to a language"? – David Richerby Jun 30 '15 at 20:36
• Hint: look at the respective proofs. – Raphael Jun 30 '15 at 20:56

It is highly unlikely that a proof of this claim would use the containment $REG\subseteq CFL$, since the pumping lemma is not an exact characterization, and if a language satisfies the regular pumping lemma, it doesn't proof that the language is regular.
Consider a language $L$ that satisfies the regular pumping lemma. Thus, there exists some $p>0$ such that for every word $w\in L$, if $|w|>p$, then there exists a partition $w=xyz$ such that $|xy|\le p$, $|y|>0$ and for every $i$ it holds that $xy^iz\in L$.
We want to prove that there exists some $q>0$ such that for every word $w\in L$, if $|w|>q$, then there exists a partition $w=uvstr$ such that $|vst|\le q$, $|vt|>0$ and for every $i$ it holds that $uv^ist^ir\in L$.
Seeing things stated as above, the rest is just "pattern matching": Let $q=p$, and consider a word $w\in L$ such that $|w|>q$, then there exists a partition $w=xyz$ as above. Let $u=x,v=y,s=\epsilon,t=\epsilon$, and $r=z$. Clearly $uvstr=xyz=w$. Also, $|xy|\le p$, so $|vst|=|y|\le p$ and $|y|>0$ so $|vt|=|v|=|y|>0$. Finally, for every $i$ it holds that $$uv^ist^ir=xy^iz\in L$$ and we are done.