Tensor products and the cotangent complex