Proof for showing that $\text{dim}(W)\leq \text{dim}(V)$
You don't need to complicate things so much. Just start with a basis for your subspace $W$. say $\mathcal{B}_{W}$.
Then you proceed by extension theorem to arrive at a basis of $V$. So in this process it is explicitly evident that $\dim(W)\leq\dim(V)$
And $V=W$ implies for any basis $\mathcal{B}$ of $V$. $\text{span}(\mathcal{B})=V=W$ . Thus $\mathcal{B}$ is a basis for $W$ as it becomes a linearly independent spanning set . So $\dim(V)=\dim(W)$.
Conversely as $\dim(W)\leq \dim(V)$ always....$\dim(W)=\dim(V)\implies \, W=V$.
I think one direction is easy , so proceeding by contradiction:
- suppose $\exists v \in V$, such that v $\notin W $.
- choose a basis for $W$, as $\{w_1,w_2,...,w_n\}$, where subscript $n$ is the $\dim W$.
- Now adjoin $v$ to the set $\{w_1,w_2,...,w_n\}$, and consider the sum $\sum a_i w_i +bv=0$. Now , if $b\neq0, v=\sum{a_i\over-b} w_i$, hence is in $W$, which we required not to be, then $b=0$ and $a_i=0$ follows.
- Now we have n+1 linearly independent vectors in V. At this step requiring that this can not happen would solve ,but i think further justification is needed , so continue as follows:
- Choose a basis for V , and form the set {$v_1$,...,$v_n$} from those basis vectors . As vectors inside the set are forming a basis for V , each vector in {$w_1$,$w_2$,...,$w_n$}is in the span of those vectors. Then consider the equations of the form $\sum$$c_i$$v_i$=$w_j$ ,for each j $\in$ {1,2,...,n}. As $w_i$ is a basis vector , $w_i$$\neq$$0$ vector , thus at least one of the $c_i$ in each sum is non-zero .For that $c_i$ there is a vector $v_i$, take the vector $v_i$ and write $v_i$ as $w_j\over c_i$-$\sum$$c_k\over c_i$$v_k$ ,where this time k$\neq$i is omitted.
- What step $5$ achieved is that now applying step 5 , a $v_i$ can be written as in the span of other $v_k$ and a $w_j$ . That is in the set {$v_1$,...,$v_n$} ,replacing a $v_i$ with some $w_j$ is possible. then set {$v_1$,..,$w_j$,..$v_n$} (where it is assumed that replaced vector was not $v_1$ ,but ordering is arbitrary ) is a basis for V.
- Now , take another basis vector $w_m$ from the remaining set (where j$^{th}$ element was taken outside of the set)in the previous step. The key is that now you can also add that $w_m$ to the set {$v_1$,..,$w_j$,..$v_n$} , replacing only one of $v_i$ vectors . This is possible as , consider $\sum$$c_i$$v_i$+b$w_j$=$w_m$ (as $w_m$ can be spanned by those vectors ). Now one of $c_i$ is again not $0$ , as otherwise b$w_j$=$w_m$ , and as they both are linearly independent b=$0$ and $w_m$=$0$ , contradiction. Then $\exists$ $c_i$$\neq$$0$ , and choose the vector $v_i$ corresponding to that and replace it with $w_m$ . Iterating this process each $v_i$ can be replaced with one of $w_j$ and hence {$w_1$,...,$w_n$} is a basis for V .Now as v$\in$V , v is in the span of vectors in the set {$w_1$,...,$w_n$}. But we assumed this is not so , contradiction.
I hope there is no mistake here .