Let $A\subset[0,1]$ be measurable, and let $g\in L^2(A,dx)$.
Let $C=\{f\in L^2[0,1]:m\{x\in A:f(x) \ne g(x)\}=0 \}$, that is, the set of functions which are equivalent to $g$ on $A$.
Prove that $C$ is closed an convex and find $C^{\perp}$.
Proving convexity is trivial, I've managed to prove closeness, but in quite a tedious way, if anyone sees an elegant way of doing so I'd like to know.
My "real" question, though, is how to calculate $C^{\perp}$.
For closeness, put $T\colon L^2[0,1]\to L^2(A)$, $T(f):=f\mathbf 1_A$. Then $T$ is linear and continuous and since $C=T^{-1}(\{g_0\})$, $C$ is closed.
Let $g\in C^{\perp}$. Then $T(\widetilde g_0)=g_0$, where $\widetilde{g_0}$ is $g_0$ extended by $0$ to $[0,1]$, so $\widetilde g_0\in C$ and $\int_{[0,1]}\widetilde{g_0}g=\int_A gg_0=0$. For $f\in C$, we have $$(f,g)=\int_{[0,1]}fgdm=\int_Afgdm+\int_{A^c}fgdm=\int_{A^c}fg dm,$$ so $g(x)=0$ almost everywhere on $A^c$. Conversely, check that $(g,\widetilde{g_0})=0$ and $g(x)=0$ almost everywhere on $A^c$ then $g\in C^{\perp}$.