# Proof regular languages are closed under homeomorphism

Let $$\Sigma_1 , \Sigma_2$$ be alphabets. Let $$L\subseteq \Sigma_1^*$$ be a regular language, and let $$h:\Sigma_1^* \rightarrow \Sigma_2^*$$ be a homomorphism.

Proof $$h(L)$$ is regular.

I have written a proof using induction over the number of operands in the regular expression $$r$$ such that $$L = L(r)$$, that there exists a regular expression $$r'$$ such that $$L(r') = h(L)$$.

I divided it to three cases:

1. $$r=r_1 \cup r_2$$

2. $$r= r_1r_2$$

3. $$r =r_1^*$$

Since functions union might not always be a function (i.e $$f(1)=1$$, $$g(1) =2$$ $$\rightarrow f\cup g$$ not a function) I would like to get your opinion for the union case, to verify I didn't do anything wrong there - especially in lines $$5,6,7$$:

1. $$w\in h(L) \Leftrightarrow w = h(\sigma_1 \dots \sigma_n)\in h(L) \wedge \sigma_1 \dots \sigma_n \in L \Leftrightarrow$$
2. $$\sigma_1 \dots \sigma_n \in L(r_1 \cup r_2) \Leftrightarrow$$
3. $$\sigma_1 \dots \sigma_n \in L(r_1) \cup L(r_2) \Leftrightarrow$$
4. $$\sigma_1 \dots \sigma_n \in L(r_1) \vee \sigma_1 \dots \sigma_n\in L(r_2) \Leftrightarrow$$
5. $$h(\sigma_1 \dots \sigma_n) \in h(L(r_1)) \vee h(\sigma_1 \dots \sigma_n) \in h(L(r_2)) \Leftrightarrow$$
6. $$h(\sigma_1 \dots \sigma_n) \in h(L(r_1)) \cup h(L(r_2)) \Leftrightarrow$$

Now, using the induction hypothesis, since $$r_1$$ and $$r_2$$ has less operands,

1. $$h(\sigma_1 \dots \sigma_n) \in L(r_1') \cup L(r_2') \Leftrightarrow$$
2. $$w \in L(r_1' \cup r_2')$$

Is this a valid proof for this case?

• We discourage "please check whether my answer is correct" questions, as only "yes/no" answers are possible, which won't help you or future visitors. See here and here. Can you edit your post to ask about a specific conceptual issue you're uncertain about? As a rule of thumb, a good conceptual question should be useful even to someone who isn't looking at the problem you happen to be working on. If you just need someone to check your work, you might seek out a friend, classmate, or teacher.
– D.W.
Apr 25, 2021 at 22:06
• Wasn't aware of that, Edited to ask on a specific issue. Thanks. Apr 26, 2021 at 6:27

$$h(L)=h(L(r_1\cup r_2))=h(L(r_1)\cup L(r_2)) = h(L(r_1))\cup h(L(r_2)) = L(r'_1)\cup L(r'_2)=L(r'_1\cup r'_2)$$
Where the transition $$h(L(r_1)\cup L(r_2)) = h(L(r_1)) \cup h(L(r_2))$$ can be shown for any function $$h$$ (not necessarily a homeomorphism!).