Trying to disprove that if Prefix(L) is regular then L is regular

12 Views Asked by At

I've thought of using $L=${$a^{2^n}, \forall n \in \mathbb{N}$} and then $prefix(L)=\Sigma ^{*}$.

which we know $\Sigma^{*}$ is regular. however, $L$ is not regular.

is this a correct solution?