[step:Assemble the candidate basis of $C_1 \mid C_2$]Let $x_1, \dots, x_k \in \mathbb{F}_2^n$ be a basis of $C_1$, so $k = \operatorname{rank}(C_1)$, and let $y_1, \dots, y_\ell \in \mathbb{F}_2^n$ be a basis of $C_2$, so $\ell = \operatorname{rank}(C_2)$. Consider the collection of $k + \ell$ vectors in $\mathbb{F}_2^{2n}$:
\begin{align*}
B := \{\,(x_i \mid x_i) : 1 \leq i \leq k\,\} \cup \{\,(0 \mid y_j) : 1 \leq j \leq \ell\,\}.
\end{align*}
We show $B$ is contained in $C_1 \mid C_2$, spans $C_1 \mid C_2$, and is linearly independent.
**Containment.** For $(x_i \mid x_i)$: take $x = x_i \in C_1$ and $y = 0 \in C_2$; then $(x \mid x + y) = (x_i \mid x_i)$. For $(0 \mid y_j)$: take $x = 0 \in C_1$ and $y = y_j \in C_2$; then $(x \mid x + y) = (0 \mid y_j)$. Both are in $C_1 \mid C_2$.
**Spanning.** Any element of $C_1 \mid C_2$ has the form $(x \mid x + y)$ with $x \in C_1$, $y \in C_2$. Writing $x = \sum_{i=1}^k \alpha_i x_i$ and $y = \sum_{j=1}^\ell \beta_j y_j$ with $\alpha_i, \beta_j \in \mathbb{F}_2$, we obtain
\begin{align*}
(x \mid x + y) = \left(\sum_i \alpha_i x_i \ \Big|\ \sum_i \alpha_i x_i + \sum_j \beta_j y_j \right) = \sum_i \alpha_i (x_i \mid x_i) + \sum_j \beta_j (0 \mid y_j),
\end{align*}
which is an $\mathbb{F}_2$-linear combination of elements of $B$.
**Linear independence.** Suppose $\sum_i \alpha_i (x_i \mid x_i) + \sum_j \beta_j (0 \mid y_j) = 0$. Looking at the first half of $\mathbb{F}_2^{2n}$ (coordinates $1, \dots, n$) gives
\begin{align*}
\sum_{i=1}^k \alpha_i x_i = 0 \in \mathbb{F}_2^n.
\end{align*}
Since $x_1, \dots, x_k$ are linearly independent in $\mathbb{F}_2^n$, every $\alpha_i = 0$. Substituting back, looking at the second half yields $\sum_j \beta_j y_j = 0$, and by linear independence of $y_1, \dots, y_\ell$, every $\beta_j = 0$. Hence $B$ is linearly independent.[/step]