next | previous | forward | backward | up | top | index | toc | Macaulay2 website
SubalgebraBases :: RingElement // Subring

RingElement // Subring -- Write a ring element in terms of the generators.

Synopsis

Description

This function attempts to write f in terms of the generators of subR. Internally, this function calculates a Groebner basis. This function should be considered experimental.

i1 : gndR = QQ[x];
i2 : A = subring sagbi subring {x^4+x^3, x^2+x}

o2 = subring of gndR

o2 : Subring
i3 : gens A

o3 = | x2+x x3-x |

                1          2
o3 : Matrix gndR  <--- gndR
i4 : f = x^3 + x^2

      3    2
o4 = x  + x

o4 : gndR
i5 : g = f//A

o5 = p  + p
      2    1

o5 : QQ[p ..p ]
         0   2
i6 : (A#"presentation"#"fullSubstitution")(g) == f

o6 = true