Added Shannon decomposition and recomposition functions