(self, e)
return [-x/e[0] for x in e[1:]]
Expression in terms of generators. See [SCA, 2.8.1].
Expression in terms of generators. See [SCA, 2.8.1].
Expression in terms of generators . See [ SCA 2 . 8 . 1 ] .
def _in_terms_of_generators(self, e):
        """Expression in terms of generators. See [SCA, 2.8.1]."""
        # NOTE: if gens is a standard basis, this can be done more efficiently
        M = self.ring.free_module(self.rank).submodule(*((e,) + self.gens))
        S = M.syzygy_module(
            order="ilex", TOP=False)  # We want decreasing order!
        G = S._groebner_vec()
        # This list cannot not be empty since e is an element
        e = [x for x in G if self.ring.is_unit(x[0])][0]
        return [-x/e[0] for x in e[1:]]
def _in_terms_of_generators ( self , e ) : # NOTE: if gens is a standard basis, this can be done more efficiently M = self . ring . free_module ( self . rank ) . submodule ( * ( ( e , ) + self . gens ) ) S = M . syzygy_module ( order = "ilex" , TOP = False ) # We want decreasing order! G = S . _groebner_vec ( ) # This list cannot not be empty since e is an element e = [ x for x in G if self . ring . is_unit ( x [ 0 ] ) ] [ 0 ] return [ - x / e [ 0 ] for x in e [ 1 : ] ]