implemented transformation

given a polynomial p, transform dataset X to Z, each column defined by a
monoid of p