First-principle validation of Fourier’s law in d=1,2