In this work, the authors elaborate on two recently discovered invariance principles, according to which transport coefficients are, to a large extent, independent of the microscopic definition of the densities and currents of the conserved quantities being transported (energy, momentum, mass, charge). The first such principle, gauge invariance, allows one to define a quantum adiabatic energy current from density-functional theory, from which the heat conductivity can be uniquely defined and computed using equilibrium ab initio molecular dynamics.