Proving the language $L=\{ a^i b a^j |\ i<j,\text{ or }i>j;\ i,j>0 \} $ is not regular, I am trying to use the pumping lemma for regular languages:
pumping length $:= m$
case 1: $i<j; j=m$
$w_1 = a^i b a^m = xyz$
$|xy| < m$
$|y| > 0$
$\Rightarrow$
$y$ can be:
- $a$s only
- $a$s + $b$
- just $b$
However, this leads to $xy^hz\ \not \in L\ \forall h,\ h>0$.
case 2: $i>j; i=m$
$w_2 = a^m b a^j = xyz$
$|xy| < m$
$|y| > 0$
$\Rightarrow$
$y$ can be:
- $a$s only
Pumping with this $y$:
$xy^hz\ \in L\ \forall h$ holds true.
As this answer does not seem to even consider the second case, is the first case sufficient to proof the language is not regular?
However, taking a look at this answer I think I'd have to considere the second case as well, in order to cover all possible $xyz$ combinations.