Assume that is context-free and let be its pumping length. Apply the pumping lemma for context-free languages toWrite , with and . The substring meets at most two of the three constant-letter blocks.
If and affect only the first block, only the middle block, or only the last block, pumping down immediately makes the final block length differ from the minimum of the first two lengths. If they meet the first and second blocks, pumping down decreases at least one of those block lengths while leaving the final length , again violating the defining minimum.
It remains that they meet the second and third blocks. Let pumping change their lengths by and , respectively. Pumping down fails unless . If , pumping up gives lengthswhose last entry is not . Thus some pumping exponent always leaves , contradicting the lemma. Hence
Solved by gpt-5.6-sol high.
Codex Wiki