Let $\Omega $ open and bounded and $g \in W^{1,p}(\Omega)$ given.
$\Phi= \{ u \in W^{1,p}(\Omega) : u-g \in W^{1,p}_0(\Omega) \}$
My notes say this is a closed because the trace operator is continuous. I am trying to prove that and I wonder if it is also Banach.
Attempt:
Closedness: Let $(u_k)_{k\in \mathbb N}$ sequence in $\Phi$ s.t.$u_k \to u$. I need to prove that the limit is in $\Phi$, that is that $u \in W^{1,p}(\Omega)$ and $u-g \in W^{1,p}_0(\Omega)$. I don't know how that can follow from the continuity of the trace operator. How do I continue?
Banach: I know that $W^{1,p}(\Omega)$ is a Banach space, but I am unsure if adding the condition $u-g \in W^{1,p}_0(\Omega)$ keeps $\Phi$ a Banach space.
To start with I have to prove that it is a vector space:
Let $a, b \in \mathbb R$ and $v,w \in \Phi$ and $T$ be the trace operator. $W^{1,p}(\Omega)$ is a vector space so, $av + bw \in W^{1,p}(\Omega)$. For the other condition: From $v,w \in \Phi$ it follows that $T(v)=T(w)=T(g)$. Then $T(av + bw-g)=aT(v)+bT(w)-T(g)= (a+b-1)T(g)$ . This should be $0$ for $av + bw$ to be in $\Phi$ , but it does not seem so. So what am I doing wrong?
$\Phi$ is a linear subspace of $W^{1,p}$ if and only if $g \in W_0^{1,p}$. The if direction is trivial, while the only if direction can be shown for example by observing that when $g \notin W_0^{1,p}$ then $0$ can't belong to $\Phi$. In all cases it is still an affine space though.
From a more abstract viewpoint, $\Phi$ is the equivalence class of $g$ in $W^{1,p}/W_0^{1,p}$ for the equivalence relation $\sim$ defined by $u \sim v \Leftrightarrow u - v \in W_0^{1,p}$. Since equivalence classes are disjoint, it's easy to see that $0$ belongs in one and only one class, and so only the elemnts of that class can hope to make up a linear (sub)space. Not that it matters much since the only kind of equivalence relations you would put on a vector space are relations like $\sim$ so that the quotient is also a vector space and the classes are of the form of $\Phi$, but you never know I guess, someone else one day might use another type of relations and then it'll be (very mildly) useful to know where $0$ is to disqualify everything else from being a linear space. Anyway, I'm rambling... let's go back to the question at hand.
The problem of closedness (and thus completeness in our case since a subset of a complete metric space is complete iff it is closed) here is a quite common situation (both to have happen or to artificially introduce in the proof of some other problem): you have two metric spaces $X,Y$, a subset $B \subset Y$, and a continuous function $f : X \to Y$, and you want to say things about $A := f^{-1}(B) \subset X$.
And well, there are characterisations of continuous functions in terms of open or closed sets: $f$ is continuous iff for all closed $B$, $A$ is closed, and similarly, $f$ is continuous iff for all open $B$, $A$ is open. I won't prove them because you should already have seen it by this point and because they should be in any textbook about topology and/or on Wikipedia (math Wikipedia good Wikipedia 99% of the time :) ).
Applied here for $B = \{0\}$ which is closed and for $f = T$ the trace operator, this means that $T^{-1}(\{0\}) = \ker T = W_0^{1,p}$ is closed when $T$ exists, and therefore $\Phi$ is closed since, for $(u_k)_k \in \Phi^\mathbb{N}$ converging to $u \in W^{1,p}$: $$u_k \to u \quad\Rightarrow\quad u_k - g \to u - g \quad\Rightarrow\quad \underbrace{T(u_k - g)}_{\in\,\{0\}\,\text{closed}} \to T(u - g) \quad\Rightarrow\quad T(u - g) \in \{0\}$$ where I've deliberately written things in terms of $\{0\}$ to emphasize the fact that this reasoning can be generalised to generic closed sets.
Now, a final issue I'm seeing, causing my "when $T$ exists" comment, is that if you only have a bounded open $\Omega$ but no regularity on the boundary (at least Lipschitz boundary) then the trace operator might not be guaranteed to exist, however I'll trust that whatever your source was, they did include a regularity condition on the boundary in their definition of $\Omega$. But even in the event you have a generic open $\Omega$ (not even bounded) (maybe only measurable suffices instead of open? I'm not sure), $\Phi$ is still closed.
See, thus far I used $T$ because your question was based around the issue of "how do I deduce closedness from $T$ being continuous" but really, since $W_0^{1,p}$ is closed, you can directly go like this: $$u_k \to u \quad\Rightarrow\quad \underbrace{u_k - g}_{\in\,W_0^{1,p}\,\text{closed}} \to u - g \quad\Rightarrow\quad u - g \in W_0^{1,p}$$ $W_0^{1,p}$ exists even when $T$ doesn't as the closure in $W^{1,p}$ of the compactly supported test functions, which lets us do away with the trace operator. It just so happens that the two notions coincide for bounded, open $\Omega$ with Lipschitz boundary, but you might have seen that already.