I'm asked to categorize the language $L=${$a^nb^m : n\neq 7m, \ n,m\in \mathbb{N}$}, therefor I need to distinguish if it's regular, context free, or non context free (in $P$)
We know CFLs are closed under union, and I belive $L_1=${$a^nb^m : n<7m$} can be represented by the CFG $S\rightarrow Ab | aAb | aaAb | ... |aaaaaaAb \\\ A\rightarrow Ab | aAb | aaAb | ... |aaaaaaAb | \epsilon $
(I'm not completely sure in the correctness of this CFG, but I belive it shows the idea of $L_1$)
However I am unsure on how to represent $L_2=${$a^nb^m : n>7m$} in CFG form, it seems like the construction rules of $L_2$ would be 8 appearences of $a$ per $b$, but theres no upper limit on the number of appearences of $a$, which got me in a freeze in progressing with this.
this prevents me from claiming that $L_1\cup L_2=L$ is CFL under closure properties
A little edit:
I've created this PA:
which I believe accepts $L_2$, the basic logic behind it is : read all $a$'s, for each $b$ you see take out 7 appearances of $a$, if you have any $a$'s left in your stack, you can accept the word.
Again, I'm unsure in the correctness of this PA, yet I cant come up with a word in $L_2$ that wont be accepted by this PA.