The Mayer homology theory