Mathematical structure of loop quantum cosmology