Mathematical Formalism for Memory Compression in Selective State Space Models