For $C$, a $[n,k,d]$ linear code, we'll construct the following new code: $$ \widetilde{C}=\{(c_1,c_2,...,c_{i-1},c_{i+1},..,c_n)|c=(c_1,c_2,...,c_{i-1},0,c_{i+1},..,c_n) \in C\} $$ Now, $\widetilde{C}$ is a $[\widetilde{n},\widetilde{k},\widetilde{d}]$ linear code. How can I show that the new code has either $\widetilde{k}=k$ or $\widetilde{k}=k-1$?
I've tried showing it through $C'=\{(c_1,c_2,...,c_{i-1},0,c_{i+1},..,c_n) \in C\}$ but I'm stuck here.
Surely, the dimension of $C'$ is less or equal than $k$, since $C'\subseteq C$. You have to show that it doesn't get smaller than $k-1$.
Write a basis of $C$, call the basis vector $\{v_1,v_2,\dots,v_k\}$, and suppose that $v_1,\dots,v_r$ have a 0 in the $i$-th position, so $v_1,\dots,v_r\in C'$, and $v_{r+1},\dots,v_k$ have a non-zero number on the $i$-th position.
Since the code is linear, we can scale these vectors into $w_{r+1},\dots,w_k \in C$ so that all them have 1 on the $i$-th position. This means that $w_{r+1}-w_k ,\dots,w_{k-1}-w_k$ are still linearly independent and they have all 0 on the $i$-th position.
From this, $$ v_1,\dots,v_r,w_{r+1}-w_k ,\dots,w_{k-1}-w_k\in C' $$ and they're all lin.ind., so the dimension of $C'$ is $k$ or $k-1$