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?

  • $\begingroup$ 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. $\endgroup$
    – D.W.
    Apr 25, 2021 at 22:06
  • $\begingroup$ Wasn't aware of that, Edited to ask on a specific issue. Thanks. $\endgroup$
    – SaharCo
    Apr 26, 2021 at 6:27

1 Answer 1


This proof looks correct. You can shorten it a bit (it doesn't need to be so descriptive), and you would get the following proof:

$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!).

  • 1
    $\begingroup$ better safe than sorry :) thanks for the answer! $\endgroup$
    – SaharCo
    Apr 25, 2021 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.