DGModuleMap error

6 views
Skip to first unread message

Theo Sandstrom

unread,
Jun 24, 2026, 11:23:40 AM (5 days ago) Jun 24
to Macaulay2
I expect that the following code snippet is not "idiomatic," but I could not find any built-in way to shift the homological degree of a DGModule. Consider the following code snippet:

    needsPackage "DGAlgebras";
    shiftDGModule = (M, k) -> (
      A := M.dgAlgebra;
      shiftedDegs := apply(degrees M, deg -> deg + {-k, 0});
      MShift = freeDGModule(A, shiftedDegs);
      newDiffs = apply(M.diff, d -> (-1)^k * d);
      setDiff(MShift, newDiffs);
      return MShift
    );
   
    p = 3;
    n = 3;
   
    k = GF(p);
    S = k[x_1..x_n];
   
    f = sum(n, j -> S_j^2);
    I = ideal(apply(n, j -> S_j^p));
   
    A = S^1 / I;
    L = ker map(A, A ** S^{-2}, f);
   
    KS = koszulComplexDGA(S);
    KL = koszulComplexDGM(KS, L);
   
    df = sum(n, j -> S_j * (KS.natural)_j);
   
    foo = dgModuleMap(KL, shiftDGModule(KL, -2), df * (id_(KL.natural)));

When I call `isWellDefined foo`, I get:

    error: codim: expected an affine ring (consider Generic=>true to work over QQ)

Can anybody explain (a) is there a way to construct this DGModuleMap without my hacky `shiftDGModule` function, and (b) how is the `isWellDefined` function encountering a non-affine ring?

Any insight is appreciated!

Best,
Theo
Reply all
Reply to author
Forward
0 new messages