# context-free language : if yx belongs to cfl then xy is also cfl [duplicate]

I faced a problem. What is the proof to say that if yx is in a Context-Free Language we can say that xy is also in a context-free language.

C is a Context-Free Language.

I think we can use the PDA defining C and edit final states.

Any ideas? thank you.

• I'm not sure what you're asking. Please define all notation carefully. What's C? What is the precise statement of the fact you want to prove? Figuring out what you're trying to prove is the first step towards proving something.
– D.W.
Jun 5, 2020 at 3:34
• What are the $x$ and the $y$? Is any of them just a character or are they both strings? Jun 5, 2020 at 6:56
• Also, can any of the $x$ or $y$ be the empty string? Jun 5, 2020 at 7:04
• Ik think you mean the operation rotation, conjugation, or cyclic shift. I do not know of a really easy proof. Easy proof for context-free languages being closed under cyclic shift. Accepted answer has a PDA proof, also recalled in another reaction is an answer with CFG by Hopcroft & Ullmann. Jun 5, 2020 at 10:30