  Over a field of characteristic zero, we show that the forgetful functor from
the homotopy category of commutative dg algebras to the homotopy category of dg
associative algebras is faithful. In fact, the induced map of derived mapping
spaces gives an injection on all homotopy groups at any basepoint. We prove
similar results both for unital and non-unital algebras, and also Koszul dually
for the universal enveloping algebra functor from dg Lie algebras to dg
associative algebras. An important ingredient is a natural model for these
derived mapping spaces as Maurer-Cartan spaces of complete filtered dg Lie
algebras (or curved Lie algebras, in the unital case).
