Why is universality of CFG undecidable? Let $\text{ALL-CFG} = \{\left&lt;G\right&gt; \mid G\text{ is a CFG and } L(G) = \Sigma^*\}$.
I have understood the proof of ALL-CFG is undecidable, but I wonder why the following proof is not appropriate.
Let $C$ be a CFG. Then $\bar{C}$ is a CFG by closure under complement. Since the emptiness of CFG is decidable, we can use it to decide whether $\bar{C}$ is empty and therefore whether $C$ is universal.
This problem has confused me a lot. Really appreciate your help. Thanks!!!
The context-free languages are not closed under complement. For example, $\overline{\{a^nb^nc^n : n \geq 0\}}$ is context-free, but its complement isn't.