# Proof that $L=\{a^ncb^n| n \ in \mathbb{N}\}$ is not regular

Proof that $$L=\{a^ncb^n| n \in \mathbb{N}\}$$ is not regular.

Here is my try, I would really appreciate if someone could tell me if this is a correct proof.

Lets assume L is regular. Then we know that L must meet the requirements of the pumping lemma. So let p the pumping number.

Let $$w=a^pcb^p$$. $$w$$ is obviously of the length p and is in L. Therefore it should be possible to split w into three pieces xyz such that $$|y|>0,|xy|<=p,xy^iz$$ is in L $$\forall i \in N$$. Because $$|xy|<=p$$ $$y$$ can only contain the symbol $$a$$(If $$y$$ would contain a symbol different from a it would implicate that $$|xy|>p$$, which is not possible). Therefore $$y$$ must be in the form $$y=a^{p-k},k<=0. So the word w equals $$w=a^ka^{p-k}cb^p$$, if we set i=2 we get $$a^ka^{2p-2k}=a^{2p-k},k and because $$a^{2p-k},k it follows that the pumped $$w$$ is not in $$L$$. Which is a contradiction. Therefore L is not regular.

$$q.e.d$$