[Math] $L_1$ is a regular language, $L_2$ is a non-regular language, the intersection $L_1 \cap L_2$ is finite language

discrete mathematicsformal-languagesregular-language

1) Given $L_1$ is a regular language and $L_2$ is a non-regular language, the intersection of $L_1$ and $L_2$ is a finite language, how to prove that the union of $L_1$ and $L_2$ is a non-regular language?

2) Given $L_1$ is a regular language and $L_2$ is a non-regular language, the intersection of $L_1$ and $L_2$ is an infinite language, how to prove that the union of $L_1$ and $L_2$ is a regular language.

I have tried my best to prove this, I tried pumping lemma and Demorgan's law and haven't worked it out. Asking for help with sincerity.

Best Answer

1) is equivalent to the following claim

Let $L_1$ be a regular language, $L_2$ any language. Assume that $L_1 \cup L_2$ is regular and that $L_1 \cap L_2$ is finite. Then $L_2$ is regular.

This is easy to prove.

2) is false.

Take $L_1$ an infinite regular language, $L_2$ the union of $L_1$ and a non-regular language over a totally different alphabet. Then $L_1 \cap L_2 = L_1$ is infinite and $L_1 \cup L_2 = L_2$ is non-regular.