Bases for a subspace versus basis for the ambient vector space I am trying to solve the following problem.

Let $U \subset V$ be a subspace of a vector space $V$. Prove or disprove each of the following assertions.
(a) Any basis of $U$ is contained in a basis of $V$.
(b) Any basis of $V$ contains a basis of $U$.

Here is my attempt.
Part (a) is true: any basis of $U$ can be extended, by induction, to a basis for $V$. (If the vector spaces are infinite-dimensional, I can't use induction, but I believe the result is still true.)
Part (b) is not true. Let $V = \mathbb{R}^2$. Then $\left\{(1,0), (0,1) \right\}$ is a basis for $\mathbb{R}^2$. If $U = \mathrm{span}(1,1)$, then this basis for $V$ fails to contain a basis for $U$.
How does this look? I'm concerned about the case where $U$ and $V$ may be infinite-dimensional. Can I extend $U$ to a basis for $V$ by using the Axiom of Choice? I'm not exactly sure how that works since there's no guarantee that the algorithm for finding the basis terminates, unlike in the finite-dimensional case by induction.
 A: Part (b) is perfect. The way you phrase Part (a) only works for finite dimensional spaces, as you note.
That every vector space has a basis is equivalent to the Axiom of Choice; in fact it is easier to prove the equivalence of "Every spanning set of a vector space contains a basis" (which is a stronger statement) to the Axiom of Choice. That means that in general there is no "algorithm" to produce a basis for an infinite dimensional vector space (though one may be able to do so for specific vector spaces).
What you want is the following theorem:

Theorem. Let $V$ be a vector space. Then every linearly independent subset of $V$ can be extended to a basis.

This is in turn a consequence of the following more general result:
Theorem. Let $V$ be a vector space. If $A$ is a linearly independent subset of $V$, $S$ is a spanning set of $V$, and $A\subseteq S$, then there exists a $\beta$, $A\subseteq \beta\subseteq S$ such that $\beta$ is a basis for $V$.
The result you want follows by taking $S=V$.
The proof uses Zorn's Lemma. Consider the set
$$\mathscr{S}=\{X\subseteq V\mid A\subseteq X\subseteq S\text{ and }X\text{ is linearly independent}\}$$
partially ordered by set inclusion. It is straighforward to prove that any $\mathcal{C}$ in $\mathscr{S}$ is bounded above, either by $X$ itself if $\mathcal{C}$ is empty, and by $\cup\mathcal{C}$ if $\mathcal{C}$ is nonempty. By Zorn's Lemma, $\mathscr{S}$ has maximal elements. Let $\beta$ be such an element, and prove that $\beta$ must span $V$ (otherwise, there is some $x\in S$ that is not in $\mathrm{span}(\beta)$, and then $\beta\cup\{x\}$ would contradict maximality). Thus, $\beta$ is a basis for $V$ with the desired properties.
You can now invoke the theorem to show that any basis for a subspace $U$ can be extended to a basis for $V$ (assuming the Axiom of Choice, whch you need anyway to ensure that both $U$ and $V$ have bases in the first place in the arbitrary setting).
