Adding a Generator

There are several methods for adding a generator to a GroebnerStrategy. It may not contain two generators with the same leading monomial. In this way generators can be accessed with both their index and their leading term.

In [1]: g=GroebnerStrategy()

In [2]: g.addGenerator(x(1))

In [3]: g[x(1)]
Out[3]: x(1)

In [4]: g.addGenerator(x(1)+1)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)

/Users/michael/sing/PolyBoRi/<ipython console> in <module>()

ValueError: strategy contains already a polynomial with same lead

An alternative is to push the generator to the (generalized) set of critical pairs instead of adding it directly

In [5]: g.addGeneratorDelayed(x(1)+1)
Due to the absence of other pairs, in this example the polynomial is on top of the pair queue
In [6]: g.nextSpoly()
Out[6]: x(1) + 1

A alternative approach is to let PolyBoRi decide, if an generator is added to the system directly or not.

In [1]: g=GroebnerStrategy()

In [2]: g.addAsYouWish(x(1))



2009-10-25