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

tensorComplex1 -- computes the first map of the tensor complex

Synopsis

Description

Let X := Proj(Spec S ×ℙb1-1×…×ℙbn-1), and let

K := …∧21a OX(-1,…, -1) →OX →0

be the Koszul complex of the multilinear forms corresponding to f, on X. The output of tensorComplex1(f,w) is the first map of the complex obtained by pushing K ⊗OX(w1,…,wn) down to Spec S.

This script implements the construction of tensor complexes from the paper “Tensor Complexes: Multilinear free resolutions constructed from higher tensors” of Berkesch, Erman, Kummini and Sam (BEKS).

The program requires that f is a flattened tensor, that is, a map A →B1⊗…⊗Bn. Returns the first map in the tensor complex F(f,w) of BEKS, requiring that w satisfies:

w0 = 0, w1 ≥0, w2 ≥w1+b1,  and  wi>wi-1  for  i≥2.

When rank A=∑rank Bi, that is, L0 = ∑i=1n Li then we are in the “balanced case” discussed in Section 3 of BEKS. In this case giving a weight vector is unnecessary, and one can use the format tensorComplex1 f.

The example from section 12 of BEKS appears below.

i1 : f = flattenedGenericTensor({4,2,2},ZZ/32003)

o1 = | x_(0,0,0) x_(1,0,0) x_(2,0,0) x_(3,0,0) |
     | x_(0,0,1) x_(1,0,1) x_(2,0,1) x_(3,0,1) |
     | x_(0,1,0) x_(1,1,0) x_(2,1,0) x_(3,1,0) |
     | x_(0,1,1) x_(1,1,1) x_(2,1,1) x_(3,1,1) |

               ZZ                                                                                                                                  4         ZZ                                                                                                                                  4
o1 : Matrix (-----[x     , x     , x     , x     , x     , x     , x     , x     , x     , x     , x     , x     , x     , x     , x     , x     ])  <--- (-----[x     , x     , x     , x     , x     , x     , x     , x     , x     , x     , x     , x     , x     , x     , x     , x     ])
             32003  0,0,0   0,0,1   0,1,0   0,1,1   1,0,0   1,0,1   1,1,0   1,1,1   2,0,0   2,0,1   2,1,0   2,1,1   3,0,0   3,0,1   3,1,0   3,1,1          32003  0,0,0   0,0,1   0,1,0   0,1,1   1,0,0   1,0,1   1,1,0   1,1,1   2,0,0   2,0,1   2,1,0   2,1,1   3,0,0   3,0,1   3,1,0   3,1,1
i2 : S = ring f;
i3 : g = tensorComplex1(f,{0,0,2})

o3 = | -x_(0,1,0)x_(1,0,0)+x_(0,0,0)x_(1,1,0)                                       -x_(0,1,0)x_(2,0,0)+x_(0,0,0)x_(2,1,0)                                       -x_(1,1,0)x_(2,0,0)+x_(1,0,0)x_(2,1,0)                                       -x_(0,1,0)x_(3,0,0)+x_(0,0,0)x_(3,1,0)                                       -x_(1,1,0)x_(3,0,0)+x_(1,0,0)x_(3,1,0)                                       -x_(2,1,0)x_(3,0,0)+x_(2,0,0)x_(3,1,0)                                       |
     | -x_(0,1,1)x_(1,0,0)-x_(0,1,0)x_(1,0,1)+x_(0,0,1)x_(1,1,0)+x_(0,0,0)x_(1,1,1) -x_(0,1,1)x_(2,0,0)-x_(0,1,0)x_(2,0,1)+x_(0,0,1)x_(2,1,0)+x_(0,0,0)x_(2,1,1) -x_(1,1,1)x_(2,0,0)-x_(1,1,0)x_(2,0,1)+x_(1,0,1)x_(2,1,0)+x_(1,0,0)x_(2,1,1) -x_(0,1,1)x_(3,0,0)-x_(0,1,0)x_(3,0,1)+x_(0,0,1)x_(3,1,0)+x_(0,0,0)x_(3,1,1) -x_(1,1,1)x_(3,0,0)-x_(1,1,0)x_(3,0,1)+x_(1,0,1)x_(3,1,0)+x_(1,0,0)x_(3,1,1) -x_(2,1,1)x_(3,0,0)-x_(2,1,0)x_(3,0,1)+x_(2,0,1)x_(3,1,0)+x_(2,0,0)x_(3,1,1) |
     | -x_(0,1,1)x_(1,0,1)+x_(0,0,1)x_(1,1,1)                                       -x_(0,1,1)x_(2,0,1)+x_(0,0,1)x_(2,1,1)                                       -x_(1,1,1)x_(2,0,1)+x_(1,0,1)x_(2,1,1)                                       -x_(0,1,1)x_(3,0,1)+x_(0,0,1)x_(3,1,1)                                       -x_(1,1,1)x_(3,0,1)+x_(1,0,1)x_(3,1,1)                                       -x_(2,1,1)x_(3,0,1)+x_(2,0,1)x_(3,1,1)                                       |

             3       6
o3 : Matrix S  <--- S
i4 : g1 = tensorComplex1 f

o4 = | -x_(0,1,0)x_(1,0,0)+x_(0,0,0)x_(1,1,0)                                       -x_(0,1,0)x_(2,0,0)+x_(0,0,0)x_(2,1,0)                                       -x_(1,1,0)x_(2,0,0)+x_(1,0,0)x_(2,1,0)                                       -x_(0,1,0)x_(3,0,0)+x_(0,0,0)x_(3,1,0)                                       -x_(1,1,0)x_(3,0,0)+x_(1,0,0)x_(3,1,0)                                       -x_(2,1,0)x_(3,0,0)+x_(2,0,0)x_(3,1,0)                                       |
     | -x_(0,1,1)x_(1,0,0)-x_(0,1,0)x_(1,0,1)+x_(0,0,1)x_(1,1,0)+x_(0,0,0)x_(1,1,1) -x_(0,1,1)x_(2,0,0)-x_(0,1,0)x_(2,0,1)+x_(0,0,1)x_(2,1,0)+x_(0,0,0)x_(2,1,1) -x_(1,1,1)x_(2,0,0)-x_(1,1,0)x_(2,0,1)+x_(1,0,1)x_(2,1,0)+x_(1,0,0)x_(2,1,1) -x_(0,1,1)x_(3,0,0)-x_(0,1,0)x_(3,0,1)+x_(0,0,1)x_(3,1,0)+x_(0,0,0)x_(3,1,1) -x_(1,1,1)x_(3,0,0)-x_(1,1,0)x_(3,0,1)+x_(1,0,1)x_(3,1,0)+x_(1,0,0)x_(3,1,1) -x_(2,1,1)x_(3,0,0)-x_(2,1,0)x_(3,0,1)+x_(2,0,1)x_(3,1,0)+x_(2,0,0)x_(3,1,1) |
     | -x_(0,1,1)x_(1,0,1)+x_(0,0,1)x_(1,1,1)                                       -x_(0,1,1)x_(2,0,1)+x_(0,0,1)x_(2,1,1)                                       -x_(1,1,1)x_(2,0,1)+x_(1,0,1)x_(2,1,1)                                       -x_(0,1,1)x_(3,0,1)+x_(0,0,1)x_(3,1,1)                                       -x_(1,1,1)x_(3,0,1)+x_(1,0,1)x_(3,1,1)                                       -x_(2,1,1)x_(3,0,1)+x_(2,0,1)x_(3,1,1)                                       |

             3       6
o4 : Matrix S  <--- S
i5 : betti matrix g

            0 1
o5 = total: 3 6
        -1: . 6
         0: 3 .

o5 : BettiTally
i6 : betti matrix g1

            0 1
o6 = total: 3 6
        -1: . 6
         0: 3 .

o6 : BettiTally
i7 : betti res coker g

            0 1 2
o7 = total: 3 6 3
         0: 3 . .
         1: . 6 .
         2: . . 3

o7 : BettiTally

We can recover the Eagon-Northcott complex as follows.

i8 : f = flattenedGenericTensor({6,2}, ZZ/32003)

o8 = | x_(0,0) x_(1,0) x_(2,0) x_(3,0) x_(4,0) x_(5,0) |
     | x_(0,1) x_(1,1) x_(2,1) x_(3,1) x_(4,1) x_(5,1) |

               ZZ                                                                          2         ZZ                                                                          6
o8 : Matrix (-----[x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   ])  <--- (-----[x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   ])
             32003  0,0   0,1   1,0   1,1   2,0   2,1   3,0   3,1   4,0   4,1   5,0   5,1          32003  0,0   0,1   1,0   1,1   2,0   2,1   3,0   3,1   4,0   4,1   5,0   5,1
i9 : S = ring f;
i10 : g = tensorComplex1(f,{0,0});

              1       15
o10 : Matrix S  <--- S
i11 : transpose g

o11 = | -x_(0,1)x_(1,0)+x_(0,0)x_(1,1) |
      | -x_(0,1)x_(2,0)+x_(0,0)x_(2,1) |
      | -x_(1,1)x_(2,0)+x_(1,0)x_(2,1) |
      | -x_(0,1)x_(3,0)+x_(0,0)x_(3,1) |
      | -x_(1,1)x_(3,0)+x_(1,0)x_(3,1) |
      | -x_(2,1)x_(3,0)+x_(2,0)x_(3,1) |
      | -x_(0,1)x_(4,0)+x_(0,0)x_(4,1) |
      | -x_(1,1)x_(4,0)+x_(1,0)x_(4,1) |
      | -x_(2,1)x_(4,0)+x_(2,0)x_(4,1) |
      | -x_(3,1)x_(4,0)+x_(3,0)x_(4,1) |
      | -x_(0,1)x_(5,0)+x_(0,0)x_(5,1) |
      | -x_(1,1)x_(5,0)+x_(1,0)x_(5,1) |
      | -x_(2,1)x_(5,0)+x_(2,0)x_(5,1) |
      | -x_(3,1)x_(5,0)+x_(3,0)x_(5,1) |
      | -x_(4,1)x_(5,0)+x_(4,0)x_(5,1) |

              15       1
o11 : Matrix S   <--- S
i12 : betti res coker g

             0  1  2  3  4 5
o12 = total: 1 15 40 45 24 5
          0: 1  .  .  .  . .
          1: . 15 40 45 24 5

o12 : BettiTally
i13 : betti eagonNorthcott matrix f

             0  1  2  3  4 5
o13 = total: 1 15 40 45 24 5
          0: 1  .  .  .  . .
          1: . 15 40 45 24 5

o13 : BettiTally

The following example is taken from the introduction to BEKS.

i14 : f = flattenedGenericTensor({7,1,2,1,2,1},ZZ/32003);

                ZZ                                                                                                                                                                                                                                                                                                                                                                                                          4         ZZ                                                                                                                                                                                                                                                                                                                                                                                                          7
o14 : Matrix (-----[x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           ])  <--- (-----[x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           , x           ])
              32003  0,0,0,0,0,0   0,0,0,0,1,0   0,0,1,0,0,0   0,0,1,0,1,0   1,0,0,0,0,0   1,0,0,0,1,0   1,0,1,0,0,0   1,0,1,0,1,0   2,0,0,0,0,0   2,0,0,0,1,0   2,0,1,0,0,0   2,0,1,0,1,0   3,0,0,0,0,0   3,0,0,0,1,0   3,0,1,0,0,0   3,0,1,0,1,0   4,0,0,0,0,0   4,0,0,0,1,0   4,0,1,0,0,0   4,0,1,0,1,0   5,0,0,0,0,0   5,0,0,0,1,0   5,0,1,0,0,0   5,0,1,0,1,0   6,0,0,0,0,0   6,0,0,0,1,0   6,0,1,0,0,0   6,0,1,0,1,0          32003  0,0,0,0,0,0   0,0,0,0,1,0   0,0,1,0,0,0   0,0,1,0,1,0   1,0,0,0,0,0   1,0,0,0,1,0   1,0,1,0,0,0   1,0,1,0,1,0   2,0,0,0,0,0   2,0,0,0,1,0   2,0,1,0,0,0   2,0,1,0,1,0   3,0,0,0,0,0   3,0,0,0,1,0   3,0,1,0,0,0   3,0,1,0,1,0   4,0,0,0,0,0   4,0,0,0,1,0   4,0,1,0,0,0   4,0,1,0,1,0   5,0,0,0,0,0   5,0,0,0,1,0   5,0,1,0,0,0   5,0,1,0,1,0   6,0,0,0,0,0   6,0,0,0,1,0   6,0,1,0,0,0   6,0,1,0,1,0
i15 : S = ring f;
i16 : g = tensorComplex1 f;

              10       28
o16 : Matrix S   <--- S
i17 : betti res coker g

              0  1  2  3  4  5
o17 = total: 10 28 70 70 28 10
          0: 10 28  .  .  .  .
          1:  .  . 70 70  .  .
          2:  .  .  .  . 28 10

o17 : BettiTally

The input map need not be generic.

i18 : S = QQ[x,y,z];
i19 : F = labeledModule S^5

       5
o19 = S

o19 : free S-module with labeled basis
i20 : G = tensorProduct(labeledModule S^2, labeledModule S^2)

       4
o20 = S

o20 : free S-module with labeled basis
i21 : f = map(G,F, (i,j) -> random(1,S))

o21 = | 8/7x+1/2y+1/2z 7x+1/2y+7/2z    1/3x+1/10y+2z 5/9x+9/8y+3/10z 3x+2y+3/8z     |
      | 4/5x+y+1/3z    4/5x+7/9y+6z    5x+2/3y+3/2z  8/3x+5/3y+1/2z  5/4x+y+z       |
      | 7/4x+y+1/3z    2/9x+10/3y+7/3z x+2/3y+z      3/2x+y+7/9z     4/5x+3/5y+3/5z |
      | 10x+1/4y+1/2z  3/4x+2/5y+1/2z  4x+3/10y+z    1/2x+3y+3/5z    4x+1/4y+9/4z   |

              4       5
o21 : Matrix S  <--- S
i22 : g = tensorComplex1(f, {0,0,2});

              3       10
o22 : Matrix S  <--- S
i23 : betti res coker g

             0  1  2 3
o23 = total: 3 10 15 8
          0: 3  .  . .
          1: . 10  . .
          2: .  . 15 8

o23 : BettiTally

Caveat

Unlike BEKS, this method does not work with arbitrary weight vectors w.

See also

Ways to use tensorComplex1 :

  • tensorComplex1(LabeledModuleMap)
  • tensorComplex1(LabeledModuleMap,List)