  | #### D.4.11.2 cup Procedure from library `homolog.lib` (see homolog_lib). Usage: cup(M,[,any,any]); M=module Compute: cup-product Ext^1(M',M') x Ext^1(M',M') ---> Ext^2(M',M'), where M':=R^m/M, if M in R^m, R basering (i.e. M':=coker(matrix(M))). If called with >= 2 arguments: compute symmetrized cup-product Assume: all Ext's are finite dimensional Return: - if called with 1 argument: matrix, the columns of the output present the coordinates of b_i&b_j with respect to a kbase of Ext^2, where b_1,b_2,... is a kbase of Ext^1 and & denotes cup product; - if called with 2 arguments: matrix, the columns of the output present the coordinates of (1/2)(b_i&b_j + b_j&b_i) with respect to a kbase of Ext^2; - if called with 3 arguments: list,
            L[1] = matrix see above (symmetric case, for >=2 arguments)
            L[2] = matrix of kbase of Ext^1
            L[3] = matrix of kbase of Ext^2
Note: printlevel >=1; shows what is going on. printlevel >=2; shows result in another representation. For computing cupproduct of M itself, apply proc to syz(M)! Example:
    LIB "homolog.lib";
    int p      = printlevel;
    ring  rr   = 32003,(x,y,z),(dp,C);
    ideal  I   = x4+y3+z2;
    qring  o   = std(I);
    module M   = [x,y,0,z],[y2,-x3,z,0],[z,0,-y,-x3],[0,z,x,-y2];
    print(cup(M));
    ==> 1,0, 0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,
    ==> 0,-1,0, 0,1,0,0,0,0,0, 0,0,0,0,0,0,
    ==> 0,0, -1,0,0,0,0,0,1,0, 0,0,0,0,0,0,
    ==> 0,0, 0, 1,0,0,1,0,0,-1,0,0,1,0,0,0
    print(cup(M,1));
    ==> 1,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0
    // 2nd EXAMPLE  (shows what is going on)
    printlevel = 3;
    ring   r   = 0,(x,y),(dp,C);
    ideal  i   = x2-y3;
    qring  q   = std(i);
    module M   = [-x,y],[-y2,x];
    print(cup(M));
    ==> // vdim (Ext^1) = 2
    ==> // kbase of Ext^1(M,M)
    ==> //  - the columns present the kbase elements in Hom(F(1),F(0))
    ==> //  - F(*) a free resolution of M
    ==> -1,0,
    ==> 0, y,
    ==> 0, 1,
    ==> -1,0
    ==> // lift kbase of Ext^1:
    ==> //  - the columns present liftings of kbase elements into Hom(F(2),F(1))
    ==> //  - F(*) a free resolution of M
    ==> 1,0,
    ==> 0,y,
    ==> 0,1,
    ==> 1,0
    ==> // vdim (Ext^2) = 2
    ==> // kbase of Ext^2(M,M)
    ==> //  - the columns present the kbase elements in Hom(F(2),F(0))
    ==> //  - F(*) is a free resolution of M
    ==> -1,0,
    ==> 0, y,
    ==> 0, 1,
    ==> -1,0
    ==> // matrix of cup-products (in Ext^2)
    ==> -1,0, 0,y,
    ==> 0, -y,y,0,
    ==> 0, -1,1,0,
    ==> -1,0, 0,y
    ==> ////// end level 2 //////
    ==> // the associated matrices of the bilinear mapping 'cup'
    ==> // corresponding to the kbase elements of Ext^2(M,M) are shown,
    ==> //  i.e. the rows of the final matrix are written as matrix of
    ==> //  a bilinear form on Ext^1 x Ext^1
    ==> //-----component 1:
    ==> 1,0,
    ==> 0,0
    ==> //-----component 2:
    ==> 0,-1,
    ==> 1,0
    ==> ////// end level 3 //////
    ==> 1,0, 0,0,
    ==> 0,-1,1,0
    printlevel = p;

User manual for Singular version 4.4.1, 2025, generated by texi2html.