# does recursive (decidable) languages closed under division (Quotient) with any language?

I need to prove or disprove that R languages are closed under divison. I have managed to prove thet CFL are't closed under division. I read in wikipedia that RE languages are closed, but I didn't find any proof and also I didn't find anything about R languages. I would really apreciate any help.

The quotient of one language $$L$$ by another $$R$$ is the set of strings $$x$$ such that $$xy\in L$$ for some $$y\in R$$.

If both $$L$$ and $$R$$ are computably enumerable (what you call RE), then the quotient is clearly enumerable, since we can simply search for all strings $$x$$ and $$y$$ such that $$xy\in L$$ and $$y\in R$$, and when found, output $$x$$. This will enumerate the quotient $$L/R$$.

But in the case of decidable sets (what you call R), it is not true that the quotient is necessarily decidable. To see this, let $$L$$ be the sets of strings consisting of strings of the form $$xy$$, where $$x$$ codes a Turing machine program $$p$$ and input $$n$$ (with a suitable end-of-code marker) and $$y$$ codes the halting computation of $$p$$ on $$n$$, provided that it does halt. And let $$R$$ be the string with just the strings $$y$$ coding the halting computations. These are each decidable, since we can look at a string and easily decide if it codes the information or not.

But the quotient $$L/R$$ will consist of strings coding the halting TM program and input pairs that halt. That is, it is the halting problem, and this is not decidable.

The big-picture perspective here is that the quotient construction allows you to perform an existential quantifier, and one does not expect such an operation to preserve decidability, although it will preserve computable enumerability.