next | previous | forward | backward | up | top | index | toc | Macaulay2 web site

quotientRemainder' -- matrix quotient and remainder (opposite)

Synopsis

Description

The equation q*g+r == f will hold. The sources and targets of the maps should be free modules. This function is obtained from quotientRemainder by transposing the inputs and outputs.
i1 : R = ZZ[x,y]

o1 = R

o1 : PolynomialRing
i2 : f = random(R^{2:1},R^2)

o2 = {-1} | 3x+9y 2x+y |
     {-1} | 7x+8y 5x+y |

             2       2
o2 : Matrix R  <--- R
i3 : g = transpose (vars R ++ vars R)

o3 = {-1} | x 0 |
     {-1} | y 0 |
     {-1} | 0 x |
     {-1} | 0 y |

             4       2
o3 : Matrix R  <--- R
i4 : (q,r) = quotientRemainder'(f,g)

o4 = ({-1} | 3 9 2 1 |, 0)
      {-1} | 7 8 5 1 |

o4 : Sequence
i5 : q*g+r == f

o5 = true
i6 : f = f + map(target f, source f, id_(R^2))

o6 = {-1} | 3x+9y+1 2x+y   |
     {-1} | 7x+8y   5x+y+1 |

             2       2
o6 : Matrix R  <--- R
i7 : (q,r) = quotientRemainder'(f,g)

o7 = ({-1} | 3 9 2 1 |, {-1} | 1 0 |)
      {-1} | 7 8 5 1 |  {-1} | 0 1 |

o7 : Sequence
i8 : q*g+r == f

o8 = true

See also

Ways to use quotientRemainder' :

Code

function 'quotientRemainder'': source code not available