Home Online Manual
Top
Back: multiDegResolution
Forward: multiDegTor
FastBack:
FastForward:
Up: multigrading_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.15.25.43 multiDegTensor

Procedure from library multigrading.lib (see multigrading_lib).

Usage:
multiDegTensor(m, n), m,n modules or matrices.

Purpose:
Computes the multigraded tensor product of to multigraded modules.

Return:
A module.

Example:
 
LIB "multigrading.lib";
ring r = 0,(x),dp;
intmat g[2][1]=1,1;
setBaseMultigrading(g);
matrix m[5][3]=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15;
matrix n[3][2]=x,x2,x3,x4,x5,x6;
module mm = m;
module nn = n;
intmat gm[2][5]=1,2,3,4,5,0,0,0,0,0;
intmat gn[2][3]=0,0,0,1,2,3;
mm = setModuleGrading(mm, gm);
nn = setModuleGrading(nn, gn);
module mmtnn = multiDegTensor(mm, nn);
print(mmtnn);
==> x, x2,0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 
==> x3,x4,0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 
==> x5,x6,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 
==> 0, 0, x, x2,0, 0, 0, 0, 0, 0, 4, 0, 0, 5, 0, 0, 6, 0, 0, 
==> 0, 0, x3,x4,0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 5, 0, 0, 6, 0, 
==> 0, 0, x5,x6,0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 5, 0, 0, 6, 
==> 0, 0, 0, 0, x, x2,0, 0, 0, 0, 7, 0, 0, 8, 0, 0, 9, 0, 0, 
==> 0, 0, 0, 0, x3,x4,0, 0, 0, 0, 0, 7, 0, 0, 8, 0, 0, 9, 0, 
==> 0, 0, 0, 0, x5,x6,0, 0, 0, 0, 0, 0, 7, 0, 0, 8, 0, 0, 9, 
==> 0, 0, 0, 0, 0, 0, x, x2,0,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==> 0, 0, 0, 0, 0, 0, x3,x4,0, 0, 0, 10,0, 0, 11,0, 0, 12,0, 
==> 0, 0, 0, 0, 0, 0, x5,x6,0, 0, 0, 0, 10,0, 0, 11,0, 0, 12,
==> 0, 0, 0, 0, 0, 0, 0, 0, x, x2,13,0, 0, 14,0, 0, 15,0, 0, 
==> 0, 0, 0, 0, 0, 0, 0, 0, x3,x4,0, 13,0, 0, 14,0, 0, 15,0, 
==> 0, 0, 0, 0, 0, 0, 0, 0, x5,x6,0, 0, 13,0, 0, 14,0, 0, 15 
kill m, mm, n, nn, gm, gn;
matrix m[7][3] = x, x-1,x+2, 3x, 4x, x5, x6, x-7, x-8, 9, 10, 11x, 12 -x, 13x, 14x, x15, (x-4)^2, x17, 18x, 19x, 20x, 21x;
matrix n[2][4] = 1, 2, 3, 4, x, x2, x3, x4;
module mm = m;
module nn = n;
print(mm);
==> x,    x-1,     x+2,
==> 3x,   4x,      x5, 
==> x6,   x-7,     x-8,
==> 9,    10,      11x,
==> -x+12,13x,     14x,
==> x15,  x2-8x+16,x17,
==> 18x,  19x,     20x 
print(nn);
==> 1,2, 3, 4,
==> x,x2,x3,x4
intmat gm[2][7] = 1, 2, 3, 4, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0;
intmat gn[2][2] = 0, 0, 1, 2;
mm = setModuleGrading(mm, gm);
nn = setModuleGrading(nn, gn);
module mmtnn = multiDegTensor(mm, nn);
==> // ** redefining mmtnn (module mmtnn = multiDegTensor(mm, nn);) ./example\
   s/multiDegTensor.sing:30
print(mmtnn);
==> 1,2, 3, 4, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0,\
    0, 
==>   x,    0,    x-1,     0,       x+2,0,  
==> x,x2,x3,x4,0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0,\
    0, 
==>   0,    x,    0,       x-1,     0,  x+2,
==> 0,0, 0, 0, 1,2, 3, 4, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0,\
    0, 
==>   3x,   0,    4x,      0,       x5, 0,  
==> 0,0, 0, 0, x,x2,x3,x4,0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0,\
    0, 
==>   0,    3x,   0,       4x,      0,  x5, 
==> 0,0, 0, 0, 0,0, 0, 0, 1,2, 3, 4, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0,\
    0, 
==>   x6,   0,    x-7,     0,       x-8,0,  
==> 0,0, 0, 0, 0,0, 0, 0, x,x2,x3,x4,0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0,\
    0, 
==>   0,    x6,   0,       x-7,     0,  x-8,
==> 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 1,2, 3, 4, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0,\
    0, 
==>   9,    0,    10,      0,       11x,0,  
==> 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, x,x2,x3,x4,0,0, 0, 0, 0,0, 0, 0, 0,0, 0,\
    0, 
==>   0,    9,    0,       10,      0,  11x,
==> 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 1,2, 3, 4, 0,0, 0, 0, 0,0, 0,\
    0, 
==>   -x+12,0,    13x,     0,       14x,0,  
==> 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, x,x2,x3,x4,0,0, 0, 0, 0,0, 0,\
    0, 
==>   0,    -x+12,0,       13x,     0,  14x,
==> 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 1,2, 3, 4, 0,0, 0,\
    0, 
==>   x15,  0,    x2-8x+16,0,       x17,0,  
==> 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, x,x2,x3,x4,0,0, 0,\
    0, 
==>   0,    x15,  0,       x2-8x+16,0,  x17,
==> 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 1,2, 3,\
    4, 
==>   18x,  0,    19x,     0,       20x,0,  
==> 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, x,x2,x3\
   ,x4,
==>   0,    18x,  0,       19x,     0,  20x 
getModuleGrading(mmtnn);
==> 1,1,2,2,3,3,4,4,5,5,6,6,7,7,
==> 1,2,1,2,1,2,1,2,1,2,1,2,1,2 
matrix a = mmtnn;
matrix b = tensorMod(mm, nn);
print(a-b);
==> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
==> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
==> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
==> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
==> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
==> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
==> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
==> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
==> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
==> 0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