below is my attempt at applying the pumping lemma to a language to prove that it is not context-free. I am new to using the pumping lemma, especially for context-free languages. My question is, is this the right way to apply the pumping lemma to prove a language is not context-free? Can any modifications or corrections be made?
Let L = $ \{ a^m b^n|m,n>0 $ and $m \geq 2n \} $
Assume L is context-free. Therefore, pumping lemma applies. Let P be the Pumping Length.
There exists a string long enough $\geq P$. We'll use $w = a^{2P}b^p = uvxyz$.
$|w| = 3P$
$|vxy| \leq P$
$|vy| \neq 0$
$vxy$ can contain :
- only a's
- only b's
- Some a's and b's
$vxy$ cannot contain:
- more than half of all a's
- more than all b's
$uv^ixy^iz \in L $ because P.L.
Let $i = 2: uv^2xy^2z \in L$
$|uv^2xy^2z| > 3P$
$a^{2P}b^{(P + j)} \notin L $ if j is $ > 0$
The # of b's becomes too great to satisfy the language.
Therefore, $uv^2xy^2z \notin L$, and this is a proof by contradiction.