'Expression in terms of generators. See [SCA, 2.8.1].'

def _in_terms_of_generators(self, e):

    M = self.ring.free_module(self.rank).submodule(*((e,) + self.gens))
    S = M.syzygy_module(order='ilex', TOP=False)
    G = S._groebner_vec()
    e = [x for x in G if self.ring.is_unit(x[0])][0]
    return [((- x) / e[0]) for x in e[1:]]
