Existence of optimizers in a Sobolev inequality for vector fields