The following operation is defined on formal languages. $ operation1(L) = \lbrace w \ | \ wxy \in L, \ \forall x \forall y \ (|x|=|w|) \ \wedge (|y| = |w| ) \rbrace $
Prove that context-free languages are not closed under $ operation1(.)$ operation
I can't find the answer, can you help me?
Let $$L_1=\{a^ib^jc^k(a+b+c)^{2(i+j+k)-1}a|i>0,j>0,k>0\}$$ $$L_2=\{a^nb^n(a+b+c)^m b|n>0,m>0\}$$ $$L_3=\{a^ib^nc^n(a+b+c)^kc|i>0,n>0,k>0\}$$ and $L=L_1\cup L_2 \cup L_3 $. $L$ is context free since its an union of context free languages.
We now show that $operation1(L)=\{a^nb^nc^n|n>0\}$. The inclusion $\{a^nb^nc^n|n>0\}\subseteq operation1(L)$ is direct. Lets focus on the other inclusion.
Let $w\in operation1(L)$ $x\in (a+b+c)^*$ and $y\in(a+b+c)^*a$ with $|x|=|y|=|w|$ by definition of $operation1$ $wxy\in L$ since $y$ ends by a $a$ we know that $wxy\in L_1$ hence $w$ is of the form $a^ib^jc^k$. Consider now $y'\in(a+b+c)^*b$ with $|y'|=|w|$ with the same argument we have $wxy'\in L_2$ thus we know that $i=j$. And again $y''\in(a+b+c)^*c$ with $|y''|=|w|$ with the same argument we have $wxy''\in L_3$ thus we know that $k=j$ hence $w\in\{a^nb^nc^n|n>0\}$.
Since $\{a^nb^nc^n|n>0\}$ is not context free we know that context-free languages are not closed under $operation1$.