Statistical mechanics of polymers subject to a force