Macaulay2 » Documentation
Packages » OIGroebnerBases » VectorInWidth + VectorInWidth
next | previous | forward | backward | up | index | toc

# VectorInWidth + VectorInWidth -- add two elements of a free OI-module

- Operator: +
- Usage:
    `f + g`
- Inputs:
  - f, an instance of the type VectorInWidth,
  - g, an instance of the type VectorInWidth,
- Outputs:
  - an instance of the type VectorInWidth,

## Description

Adds f and g.

    i1 : P = makePolynomialOIAlgebra(2, x, QQ);

    i2 : F = makeFreeOIModule(e, {1,1}, P);

    i3 : installGeneratorsInWidth(F, 2);

    i4 : f=x_(1,1)*e_(2,{1},1)+x_(2,1)*e_(2,{1},2)-5*x_(1,2)*e_(2,{2},1)-x_(2,2)*e_(2,{2},2)

    o4 = -5x   e        + x   e        - x   e        + x   e
            1,2 2,{2},1    1,1 2,{1},1    2,2 2,{2},2    2,1 2,{1},2

                                     4
    o4 : (QQ[x   , x   , x   , x   ])  in width 2
              2,2   2,1   1,2   1,1

    i5 : g = 5*x_(1,2)*e_(2,{2},1)

    o5 = 5x   e
           1,2 2,{2},1

                                     4
    o5 : (QQ[x   , x   , x   , x   ])  in width 2
              2,2   2,1   1,2   1,1

    i6 : f + g

    o6 = x   e        - x   e        + x   e
          1,1 2,{1},1    2,2 2,{2},2    2,1 2,{1},2

                                     4
    o6 : (QQ[x   , x   , x   , x   ])  in width 2
              2,2   2,1   1,2   1,1

## Ways to use this method:

- VectorInWidth + VectorInWidth -- add two elements of a free OI-module

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/OIGroebnerBases.m2:2316:0.