Suppose $f - g \in V$ where $V$ is a Hilbert space. If $f, g \in V$ and $$ \langle f-g, v\rangle_V = 0, \forall v \in V^*, $$ we say $f$ and $g$ are weakly equal in $V$.
I am wondering if there is a similar notion for the case where $f, g \not\in V$, but $f-g \in V$. For example, let $V = H_0^1(U)$. Consider $f \in H^1(U)$ whose trace is not zero. Suppose there exists $g \in H^1(U)$ such that $T[g] = f|_{\partial U}$. Here $T$ is the trace operator. Then, $f-g$ is clearly in $H^1_0(U)$, however, $f, g \not\in H_0^1(U)$. If $f-g$ is weakly equal to zero in $H_0^1(U)$, it seems that $f$ and $g$ are in some sense equal. However, I am not sure under what sense one can say that they are equal. I am very attempting to claim that $f$ and $g$ are weakly equal in $H^1(U)$. However, since $H_0^1(U) \subset H^1(U)$, it is unclear whether it holds.
Any suggestions/comments/answers will be very appreciated.
First of all, if $f - g \in V$ and $$\langle f-g, v \rangle_V = 0$$ for all $v \in V^*$, then $f - g = 0$. This is a consequence of the Hahn-Banach theorem and holds in arbitrary normed spaces.
Concerning your question: From the above, we see that $f - g = 0$ in $H_0^1(\Omega)$, in particular, $f = g$ a.e. Hence, $f$ and $g$ are the same (equivalence class of) function(s).