Derivation of Bose–Einstein and Fermi–Dirac statistics from quantum mechanics: gauge-theoretical structure. (27th February 2018)