# Complexity classes closed under finite union and intersection, why not infinite union and intersection?

All "nice" Complexity classes are closed under finite union and intersection. (By "nice" I mean ones with complete problems or leaf languages, e.g. P, NP, PSPACE, etc.)

But such classes are not closed under infinite union and intersection. Why?

• I edited the question to improve it.
– 6005
Apr 29 '20 at 4:32

Consider the "singleton" languages: $$L=\{w\}$$ for some fixed word $$w$$. (e.g., the language $$L=\{00010100\}$$ would be a singleton language) Most "nice" complexity classes include the singleton languages.

Every language can be written as an infinite union of singleton languages. So, if all singleton languages are in the class, and if the class is closed under infinite union, then all languages are in the class.

Thus, if there is any language at all that isn't in such a complexity class yet it does contain all the singleton languages, then the class cannot be closed under infinite union.

• Thanks! nice. What about inf intersection? that seems more difficult... Apr 28 '20 at 21:26
• @RingRing, if it's closed under complement, then that follows by a similar argument...
– D.W.
Apr 28 '20 at 22:59
• For intersection, even if it's not closed under complement like NP, it should contain all cofinite languages and thus closure under intersection means it contains all languages.
– 6005
Apr 29 '20 at 4:33