Hilbert-Samuel and Hilbert-Kunz functions; Poincaré series Homological methods mathematics