Two Hamel bases of the same vector space have the same cardinality, so we define the dimension of a vector space as the cardinality of one of its Hamel bases. I'm trying to verify that
Let $V$ be a vector space. Let $E,F$ be subspaces of $V$ such that $E \subset F$. Then $\dim(V/F) \le \dim (V/E)$.
Could you check my below attempt?
We consider the map $$ f:V/F \to V/E, x + F \mapsto x + E. $$
Let's prove that $f$ is injective. Let $x,y\in V$ such that $f(x+F)=f(y+F)$. Then $x+E=y+E$. Then $x-y \in E$. Then $x-y \in F$ since $E \subset F$. Hence $x+F=y+F$. It's clear that $f$ is a homomorphism. The claim then follows.
As Arturo and Daniel pointed out in their comment, the correct map should be $$ f:V/E \to V/F, x + E \mapsto x + F. $$
Let's prove that $f$ is well-defined. Let $x,y\in E$ such that $x+E=y+E$. Then $x-y\in E$. Then $x-y\in F$ since $E \subset F$. Then $x+F=y+F$. Then $f(x+E)=f(y+E)$. Clearly, $f$ is linear and surjective. By rank-nullity theorem, we get $\dim (V/E) = \dim (V/F) + \dim (\ker f)$. The claim then follows.