I came across the following question:
Given two context-free languages $L_1$ and $L_2$ is it decidable whether $L_1 - L_2 = \emptyset$ ?
The problem $ALL_{\text{CFG}}$ that states:
Given a CFG $G$ then $L(G) = Σ^*$ is known to be undecidable.
So I thought to fix $L_2$ to be $Σ^*$ and allow $L_1$ to be any context-free language to prove that the problem stated is undecidable.
What concerns me the most is that the $ALL_{\text{CFG}}$ refers to a context-free grammar and not a context-free language.
One of the definitions of a context-language is the following:
$L$ is a context-free language $\leftrightarrow$ There exists a context-free grammar $G$ s.t $L(G) = L$ which translates to 2 things:
$L$ is a context-free language $\rightarrow$ There exists a context-free grammar $G$ s.t $L(G) = L$
Given a context-free grammar $G$ s.t $L(G) = L$ $\rightarrow$ $L$ is a context-free language
The only way I see to address my concern regarding $ALL_{\text{CFG}}$ is to add bullet $(1)$ to the proof and state that if the problem in question is decidable then $L(G_1) = Σ^*$ is decidable (which is not) where $G_1$ is the context-free grammar that generates $L_1$. Would this approach work?
I am seeing this kind of question for other kinds of languages as well.
Say that the problem in question was the following:
Given two recursive languages $L_1$ and $L_2$ is the $X$ problem decidable?
Will the same approach work if I manage to take the problem from the domain of recursive languages to the domain of Turing Machines with $M_1$ and $M_2$ where $L(M_1) = L_1$ and $L(M_2) = L_2$?