As part of my homework, I’m tasked with showing that an unambiguous CFL cannot be closed under union. Ambiguity is defined as having more than one leftmost (or rightmost) grammar derivation of a word in the language or having more than one unique derivation tree. CFG’s are closed under union, as the new language’s grammar can be expressed as: S0→S1|S2, where S1 and S2 were the original starting variables for languages L1 and L2, and S0 now represents the starting variable for the unionized language.
To prove that no unambiguous CFL can be unioned, should I assume there’s a shared string in each of the original languages? And therefore, there are two possible derivations using either S1 or S2? Or am I approaching this incorrectly? Is there another way to express a union of two CFLs that would make this argument invalid?