Calculates the cosets of a subgroup or ideal with respect to a group or ring.