# Regular, CFL, non-CFL infinite closures [duplicate]

I was wondering about infinite closure properties.

Are the Regular languages closed under infinite union? Infinite intersection?

Probably not, by taking $$\forall n>0~~L_n=\{a^nb^n\}\in RL$$, then $$\bigcup_{n=1}^{\infty}L_n=\{a^nb^n|n>0\}\notin RL$$

By taking $$L_k=\{a^ib^j~|~i\ne k ~~or~~ j\ne k\}\in RL$$, then $$\bigcap_{k=1}^{\infty}L_k=\{a^ib^j|i \ne j\}\notin RL$$

But what about CFL and non-CFL languages? I couldn't find examples for that.

Thanks!

• Please ask only one question per post. I see about 4 questions here, for regular vs CFL and union vs intersection.
– D.W.
Jun 20, 2022 at 17:36
• @D.W. This is one question with related subs... Jun 20, 2022 at 18:08
• I don't know what "one question with related subs" means, but we don't want one question with related subquestions. Instead, please ask each subquestion separately. The site format doesn't work well when there are multiple questions or subquestions. For instance, if one person answers one of the questions but not the others, the question gets treated as answered. Marking as 'duplicate' doesn't work very well when there are multiple questions or subquestions.
– D.W.
Jun 20, 2022 at 18:24
• Please spend some time searching this site (and other standard resources) before asking a question. Doing a search on "infinite union" and "infinite intersection" on this site immediately turns up many relevant prior posts that answer many of your questions.
– D.W.
Jun 20, 2022 at 18:30