I confuse that is it always necessary for the union of two cyclic codes is a cyclic code?
I try to prove that it is not necessarily the union of two cyclic codes is a cyclic code.
This is my counterexample:
Let $C_1$ and $C_2$ be two cyclic codes over $F_2$.
$C_1 = \{000, 101, 011, 110\}$
$C_2 = \{000, 111\}$
Note that $C_1$ and $C_2$ are cylic codes. Hence,
$C_1 \cup C_2=\{000, 101, 011, 110, 111\}$
However $111+011=100\notin C_1\cup C_2$. Hence $C_1 \cup C_2$ is not a linear code. Since it is not a linear code then it is not a cyclic code.
Is the counterexample is correct?
The answer depends on what your definition of cyclic code is.
One definition is that a code is called a cyclic code if the cyclic shifts of every codeword in the code are also codewords in the code. With this definition, $\mathcal C_1 \cup \mathcal C_2$ is a cyclic code.
A more restrictive definition includes the requirement that the code be linear as well as satisfying the cyclic shifts property mentioned above. With this restrictive definition, it is not true that $\mathcal C_1 \cup \mathcal C_2$ is a (linear) cyclic code whenever $\mathcal C_1$ and $\mathcal C_2$ are (linear) cyclic codes. In this case, it can be shown that $\mathcal C_1 + \mathcal C_2$ is a (linear) cyclic code whenever $\mathcal C_1$ and $\mathcal C_2$ are (linear) cyclic codes. Here $\mathcal C_1 + \mathcal C_2$ is defined as $$\mathcal C_1 + \mathcal C_2 = \left\{\mathbf c_1 + \mathbf c_2\colon \mathbf c_1 \in \mathcal C_1, \mathbf c_2 \in \mathcal C_2\right\}$$