For a linear code (binary code) $C$ with dual code $C^\perp$, then
$$\sum_{y\in C}(-1)^{x.y}= \begin{cases} 0 & \quad \text{if}\quad x\notin C^\perp\\ |C| & \quad \text{if} \quad x\in C^\perp \end{cases}$$
How would you go about proving this?
If $x\in C^\perp$, then we deduce that $x\cdot y=0$ for $\forall y \in C$. Therefore $\sum_{y\in C}(-1)^{x.y}=\sum_{y\in C}1=|C|$- which proves one part of this identity. How would one prove the $x \notin C^\perp$ part? Thank you
Hint: If $x\notin C^\perp,$ there is some $y_0\in C$ such that $x\cdot y_0=1.$ Then consider the pairs of values $x\cdot y$ and $x\cdot (y+y_0),$ for any $y\in C.$