next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Macaulay2Doc :: quotientRemainder'

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} | 8x+y  8x+3y |
     {-1} | 3x+7y 3x+7y |

             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)
-- ker (91) called with OptionTable: OptionTable{SubringLimit => infinity}
-- ker (91) returned CacheFunction: -*a cache function*-
-- ker (91) called with Matrix: 0
--                            2
-- ker (91) returned Module: R
assert( ker(map(R^0,R^2,0)) === (R^2))
-- ker (92) called with OptionTable: OptionTable{SubringLimit => infinity}
-- ker (92) returned CacheFunction: -*a cache function*-
-- ker (92) called with Matrix: 0
--                            2
-- ker (92) returned Module: R
assert( ker(map(R^0,R^{{-1}, {-1}},0)) === (R^{{-1}, {-1}}))
-- ker (93) called with OptionTable: OptionTable{SubringLimit => infinity}
-- ker (93) returned CacheFunction: -*a cache function*-
-- ker (93) called with Matrix: 0
--                            2
-- ker (93) returned Module: R
assert( ker(map(R^0,R^2,0)) === (R^2))
-- ker (94) called with OptionTable: OptionTable{SubringLimit => infinity}
-- ker (94) returned CacheFunction: -*a cache function*-
-- ker (94) called with Matrix: 0
--                            4
-- ker (94) returned Module: R
assert( ker(map(R^0,R^{{-1}, {-1}, {-1}, {-1}},0)) === (R^{{-1}, {-1}, {-1}, {-1}}))
-- ker (95) called with OptionTable: OptionTable{SubringLimit => infinity}
-- ker (95) returned CacheFunction: -*a cache function*-
-- ker (95) called with Matrix: 0
--                            2
-- ker (95) returned Module: R
assert( ker(map(R^0,R^{{1}, {1}},0)) === (R^{{1}, {1}}))
-- ker (96) called with OptionTable: OptionTable{SubringLimit => infinity}
-- ker (96) returned CacheFunction: -*a cache function*-
-- ker (96) called with Matrix: 0
--                            4
-- ker (96) returned Module: R
assert( ker(map(R^0,R^{{1}, {1}, {1}, {1}},0)) === (R^{{1}, {1}, {1}, {1}}))
-- ker (97) called with OptionTable: OptionTable{SubringLimit => infinity}
-- ker (97) returned CacheFunction: -*a cache function*-
-- ker (97) called with Matrix: 0
--                            2
-- ker (97) returned Module: R
assert( ker(map(R^0,R^{{1}, {1}},0)) === (R^{{1}, {1}}))
-- ker (98) called with OptionTable: OptionTable{SubringLimit => infinity}
-- ker (98) returned CacheFunction: -*a cache function*-
-- ker (98) called with Matrix: 0
--                            2
-- ker (98) returned Module: R
assert( ker(map(R^0,R^2,0)) === (R^2))

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

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

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

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

             2       2
o6 : Matrix R  <--- R
i7 : (q,r) = quotientRemainder'(f,g)
-- ker (99) called with OptionTable: OptionTable{SubringLimit => infinity}
-- ker (99) returned CacheFunction: -*a cache function*-
-- ker (99) called with Matrix: 0
--                            2
-- ker (99) returned Module: R
assert( ker(map(R^0,R^2,0)) === (R^2))
-- ker (100) called with OptionTable: OptionTable{SubringLimit => infinity}
-- ker (100) returned CacheFunction: -*a cache function*-
-- ker (100) called with Matrix: 0
--                             2
-- ker (100) returned Module: R
assert( ker(map(R^0,R^{{-1}, {-1}},0)) === (R^{{-1}, {-1}}))
-- ker (101) called with OptionTable: OptionTable{SubringLimit => infinity}
-- ker (101) returned CacheFunction: -*a cache function*-
-- ker (101) called with Matrix: 0
--                             2
-- ker (101) returned Module: R
assert( ker(map(R^0,R^2,0)) === (R^2))
-- ker (102) called with OptionTable: OptionTable{SubringLimit => infinity}
-- ker (102) returned CacheFunction: -*a cache function*-
-- ker (102) called with Matrix: 0
--                             4
-- ker (102) returned Module: R
assert( ker(map(R^0,R^{{-1}, {-1}, {-1}, {-1}},0)) === (R^{{-1}, {-1}, {-1}, {-1}}))
-- ker (103) called with OptionTable: OptionTable{SubringLimit => infinity}
-- ker (103) returned CacheFunction: -*a cache function*-
-- ker (103) called with Matrix: 0
--                             2
-- ker (103) returned Module: R
assert( ker(map(R^0,R^{{1}, {1}},0)) === (R^{{1}, {1}}))
-- ker (104) called with OptionTable: OptionTable{SubringLimit => infinity}
-- ker (104) returned CacheFunction: -*a cache function*-
-- ker (104) called with Matrix: 0
--                             4
-- ker (104) returned Module: R
assert( ker(map(R^0,R^{{1}, {1}, {1}, {1}},0)) === (R^{{1}, {1}, {1}, {1}}))
-- ker (105) called with OptionTable: OptionTable{SubringLimit => infinity}
-- ker (105) returned CacheFunction: -*a cache function*-
-- ker (105) called with Matrix: 0
--                             2
-- ker (105) returned Module: R
assert( ker(map(R^0,R^{{1}, {1}},0)) === (R^{{1}, {1}}))
-- ker (106) called with OptionTable: OptionTable{SubringLimit => infinity}
-- ker (106) returned CacheFunction: -*a cache function*-
-- ker (106) called with Matrix: 0
--                             2
-- ker (106) returned Module: R
assert( ker(map(R^0,R^2,0)) === (R^2))

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

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

o8 = true

Code

function quotientRemainder': source code not available

See also

Ways to use quotientRemainder' :

For the programmer

The object quotientRemainder' is a method function.