passagemath-singular 10.6.29__cp313-cp313-musllinux_1_2_aarch64.whl → 10.6.31rc1__cp313-cp313-musllinux_1_2_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of passagemath-singular might be problematic. Click here for more details.
- PySingular.cpython-313-aarch64-linux-musl.so +0 -0
- {passagemath_singular-10.6.29.dist-info → passagemath_singular-10.6.31rc1.dist-info}/METADATA +7 -7
- {passagemath_singular-10.6.29.dist-info → passagemath_singular-10.6.31rc1.dist-info}/RECORD +68 -66
- passagemath_singular.libs/{libSingular-4-d894d219.4.1.so → libSingular-4-faaf7d34.4.1.so} +0 -0
- passagemath_singular.libs/libfactory-4-6907d06f.4.1.so +0 -0
- passagemath_singular.libs/libntl-d58d2536.so.44.0.1 +0 -0
- passagemath_singular.libs/{libomalloc-0-7768d27e.9.6.so → libomalloc-0-c68af0d6.9.6.so} +0 -0
- passagemath_singular.libs/{libpolys-4-2dcf33c7.4.1.so → libpolys-4-f587aa49.4.1.so} +0 -0
- passagemath_singular.libs/libreadline-3f6fb6b3.so.8.2 +0 -0
- passagemath_singular.libs/{libsingular_resources-4-21ad9234.4.1.so → libsingular_resources-4-c24151f0.4.1.so} +0 -0
- sage/algebras/fusion_rings/fast_parallel_fmats_methods.cpython-313-aarch64-linux-musl.so +0 -0
- sage/algebras/fusion_rings/poly_tup_engine.cpython-313-aarch64-linux-musl.so +0 -0
- sage/algebras/fusion_rings/shm_managers.cpython-313-aarch64-linux-musl.so +0 -0
- sage/algebras/letterplace/free_algebra_element_letterplace.cpython-313-aarch64-linux-musl.so +0 -0
- sage/algebras/letterplace/free_algebra_letterplace.cpython-313-aarch64-linux-musl.so +0 -0
- sage/algebras/letterplace/letterplace_ideal.cpython-313-aarch64-linux-musl.so +0 -0
- sage/algebras/quatalg/quaternion_algebra_cython.cpython-313-aarch64-linux-musl.so +0 -0
- sage/algebras/quatalg/quaternion_algebra_element.cpython-313-aarch64-linux-musl.so +0 -0
- sage/libs/singular/decl.pxd +1 -1
- sage/libs/singular/function.cpython-313-aarch64-linux-musl.so +0 -0
- sage/libs/singular/groebner_strategy.cpython-313-aarch64-linux-musl.so +0 -0
- sage/libs/singular/option.cpython-313-aarch64-linux-musl.so +0 -0
- sage/libs/singular/polynomial.cpython-313-aarch64-linux-musl.so +0 -0
- sage/libs/singular/ring.cpython-313-aarch64-linux-musl.so +0 -0
- sage/libs/singular/singular.cpython-313-aarch64-linux-musl.so +0 -0
- sage/matrix/matrix_mpolynomial_dense.cpython-313-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/multi_polynomial_ideal_libsingular.cpython-313-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/multi_polynomial_libsingular.cpython-313-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/plural.cpython-313-aarch64-linux-musl.so +0 -0
- sage/symbolic/expression.cpython-313-aarch64-linux-musl.so +0 -0
- sage/symbolic/expression.pyx +1 -1
- sage_wheels/bin/ESingular +0 -0
- sage_wheels/bin/Singular +0 -0
- sage_wheels/bin/TSingular +0 -0
- sage_wheels/lib/singular/MOD/cohomo.so +0 -0
- sage_wheels/lib/singular/MOD/gfanlib.so +0 -0
- sage_wheels/lib/singular/MOD/gitfan.so +0 -0
- sage_wheels/lib/singular/MOD/interval.so +0 -0
- sage_wheels/lib/singular/MOD/subsets.so +0 -0
- sage_wheels/lib/singular/MOD/systhreads.so +0 -0
- sage_wheels/libexec/singular/MOD/change_cost +0 -0
- sage_wheels/libexec/singular/MOD/solve_IP +0 -0
- sage_wheels/libexec/singular/MOD/toric_ideal +0 -0
- sage_wheels/share/info/singular.info +8119 -3332
- sage_wheels/share/singular/LIB/assprimeszerodim.lib +21 -35
- sage_wheels/share/singular/LIB/gmspoly.lib +2 -2
- sage_wheels/share/singular/LIB/homolog.lib +41 -3
- sage_wheels/share/singular/LIB/modprimdec.lib +22 -2
- sage_wheels/share/singular/LIB/modstd.lib +1 -2
- sage_wheels/share/singular/LIB/modular.lib +124 -17
- sage_wheels/share/singular/LIB/modules.lib +15 -7
- sage_wheels/share/singular/LIB/ncpreim.lib +2 -2
- sage_wheels/share/singular/LIB/normal.lib +6 -6
- sage_wheels/share/singular/LIB/normaliz.lib +101 -15
- sage_wheels/share/singular/LIB/parallel.lib +28 -14
- sage_wheels/share/singular/LIB/primdec.lib +51 -68
- sage_wheels/share/singular/LIB/primdecint.lib +2 -2
- sage_wheels/share/singular/LIB/random.lib +2 -2
- sage_wheels/share/singular/LIB/resources.lib +7 -6
- sage_wheels/share/singular/LIB/sagbiNormaliz.lib +228 -104
- sage_wheels/share/singular/LIB/sagbiNormaliz0.lib +1498 -0
- sage_wheels/share/singular/LIB/sheafcoh.lib +2 -2
- sage_wheels/share/singular/LIB/sresext.lib +757 -0
- sage_wheels/share/singular/LIB/triang.lib +20 -18
- sage_wheels/share/singular/emacs/hlp-cmpl.el +8 -0
- sage_wheels/share/singular/singular.idx +1160 -1144
- passagemath_singular.libs/libfactory-4-e322c0c6.4.1.so +0 -0
- passagemath_singular.libs/libntl-f4409ed7.so.44.0.1 +0 -0
- passagemath_singular.libs/libreadline-78057fb4.so.8.2 +0 -0
- {passagemath_singular-10.6.29.dist-info → passagemath_singular-10.6.31rc1.dist-info}/WHEEL +0 -0
- {passagemath_singular-10.6.29.dist-info → passagemath_singular-10.6.31rc1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,757 @@
|
|
|
1
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
version="version sresext.lib 4.4.1.0 Feb_2025 "; // $Id: e8f0c7051c2bcd098ad8bcf4406d807bb292d9e4 $
|
|
3
|
+
category="Noncommutative";
|
|
4
|
+
info="
|
|
5
|
+
LIBRARY: sresforext.lib Schreyer's algorithm for modules over the exterior algebra
|
|
6
|
+
AUTHORS: Ramesh, L., ramesh@mathematik.uni-kl.de
|
|
7
|
+
|
|
8
|
+
OVERVIEW:
|
|
9
|
+
Procedures for and involving computing Schreyer resolution of modules over the exterior algebra
|
|
10
|
+
|
|
11
|
+
PROCEDURES:
|
|
12
|
+
schreyerSyzExt(m); (refined) Schreyer syzygy of a module over the exterior algebra
|
|
13
|
+
sresExt(m,p); free resolution of module m over the exterior algebra using refined Schreyer alg
|
|
14
|
+
mresExt(m,p); minimal free resolution of module m over the exterior algebra using refined Schreyer alg
|
|
15
|
+
sheafCohBGGsres(M,l,h) cohomology of twists of the coherent sheaf F on P^n
|
|
16
|
+
associated to coker(M). The range of twists is determined by l,h.
|
|
17
|
+
";
|
|
18
|
+
|
|
19
|
+
LIB "nctools.lib"; // for ncalg
|
|
20
|
+
LIB "matrix.lib"; // for submat
|
|
21
|
+
LIB "sheafcoh.lib"; // for displayCohom
|
|
22
|
+
//LIB "tst.lib"; tst_init(); tst_ignore("// ** loaded "); tst_ignore("// ** _ is no standard basis");
|
|
23
|
+
|
|
24
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
25
|
+
|
|
26
|
+
static proc leadmonomial_nc(def s)
|
|
27
|
+
{
|
|
28
|
+
int e;
|
|
29
|
+
poly m;
|
|
30
|
+
|
|
31
|
+
if(typeof(s) == "vector"){
|
|
32
|
+
e=leadexp(s)[nvars(basering)+1];
|
|
33
|
+
m=leadmonom(s)[e,1];
|
|
34
|
+
}
|
|
35
|
+
if(typeof(s) == "poly"){
|
|
36
|
+
m=leadmonom(s);
|
|
37
|
+
}
|
|
38
|
+
return(m);
|
|
39
|
+
}
|
|
40
|
+
example
|
|
41
|
+
{
|
|
42
|
+
"EXAMPLE:";echo=2;
|
|
43
|
+
ring r = 0,(x,y,z),dp;
|
|
44
|
+
vector v = [x2+y,0,z];
|
|
45
|
+
leadmonomial_nc(v);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static proc leadterm(def s)
|
|
49
|
+
{
|
|
50
|
+
int e;
|
|
51
|
+
poly m;
|
|
52
|
+
|
|
53
|
+
if(typeof(s) == "vector"){
|
|
54
|
+
e=leadexp(s)[nvars(basering)+1];
|
|
55
|
+
m=lead(s)[e,1];
|
|
56
|
+
}
|
|
57
|
+
if(typeof(s) == "poly"){
|
|
58
|
+
m=lead(s);
|
|
59
|
+
}
|
|
60
|
+
return(m);
|
|
61
|
+
}
|
|
62
|
+
example
|
|
63
|
+
{
|
|
64
|
+
"EXAMPLE:";echo=2;
|
|
65
|
+
ring r = 0,(x,y,z),dp;
|
|
66
|
+
vector v = [x2+y,0,z];
|
|
67
|
+
leadterm(v);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/*to compute the least common divisor of two monomials that came from the lifting of a module over the exterior algebra.
|
|
71
|
+
That is, each monomial may either be a square of a variable, or a monomial where the power of each variable is 0 or 1.
|
|
72
|
+
This function is used to compute the lead syzygy module of a module over the exterior algebra and may not be appropriate for other purposes. */
|
|
73
|
+
static proc lcm_(poly v, poly w)
|
|
74
|
+
{
|
|
75
|
+
string strv = string(v);
|
|
76
|
+
string strw = string(w);
|
|
77
|
+
int sizev = size(strv);
|
|
78
|
+
int sizew = size(strw);
|
|
79
|
+
int n = nvars(basering);
|
|
80
|
+
int i;
|
|
81
|
+
intvec expv, expw;
|
|
82
|
+
poly ans = 1;
|
|
83
|
+
if (strv[sizev] == "2" && strw[sizew] == "2"){
|
|
84
|
+
ans = 0;
|
|
85
|
+
return(ans); // not sure about type
|
|
86
|
+
}
|
|
87
|
+
else{
|
|
88
|
+
if (strv[sizev] != "2" && strw[sizew] != "2"){
|
|
89
|
+
expv = leadexp(v);
|
|
90
|
+
expw = leadexp(w);
|
|
91
|
+
for (i=1; i<=n; i++){
|
|
92
|
+
if (expv[i]==1 || expw[i]==1){
|
|
93
|
+
ans = ans*var(i);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return(ans);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
if (strv[sizev] == "2"){
|
|
100
|
+
expw = leadexp(w);
|
|
101
|
+
expv = leadexp(v);
|
|
102
|
+
for (i=1; i<=n; i++){
|
|
103
|
+
if (expv[i] == 2){
|
|
104
|
+
ans = ans*(var(i))^2;
|
|
105
|
+
}
|
|
106
|
+
else{
|
|
107
|
+
if (expw[i] == 1){
|
|
108
|
+
ans = ans*var(i);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
else{
|
|
114
|
+
expw = leadexp(w);
|
|
115
|
+
expv = leadexp(v);
|
|
116
|
+
for (i=1; i<=n; i++){
|
|
117
|
+
if (expw[i] == 2){
|
|
118
|
+
ans = ans*(var(i))^2;
|
|
119
|
+
}
|
|
120
|
+
else{
|
|
121
|
+
if (expv[i] == 1){
|
|
122
|
+
ans = ans*var(i);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return(ans);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
static proc schreyers_syz_(module m)
|
|
133
|
+
{
|
|
134
|
+
module lead_mod = lead_syz_(m);
|
|
135
|
+
module ans;
|
|
136
|
+
vector s;
|
|
137
|
+
int i;
|
|
138
|
+
for (i=1;i<=size(lead_mod); i++){
|
|
139
|
+
s = lift_tree_(lead_mod[i], m);
|
|
140
|
+
ans[size(ans)+1] = s;
|
|
141
|
+
}
|
|
142
|
+
return(ans);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
static proc lead_syz_(module m)
|
|
146
|
+
{
|
|
147
|
+
int r = size(m);
|
|
148
|
+
int n = nvars(basering);
|
|
149
|
+
module M = std(freemodule(r));
|
|
150
|
+
vector pi, pj, t, s;
|
|
151
|
+
poly Li, Lj, mji;
|
|
152
|
+
int i, j, k, expi, expj;
|
|
153
|
+
module temp_mod_1, temp_mod_2;
|
|
154
|
+
module lead_mod; //this is what we will return
|
|
155
|
+
|
|
156
|
+
for(i=2; i<=r; i++){
|
|
157
|
+
pi = m[i];
|
|
158
|
+
for(j=1; j<i; j++){
|
|
159
|
+
pj = m[j];
|
|
160
|
+
expi = leadexp(pi)[n+1];
|
|
161
|
+
expj = leadexp(pj)[n+1];
|
|
162
|
+
if(expi == expj){
|
|
163
|
+
Li = leadmonomial_nc(pi);
|
|
164
|
+
Lj = leadmonomial_nc(pj);
|
|
165
|
+
mji = lcm_(Lj,Li)/leadterm(pi);
|
|
166
|
+
t = mji*M[i];
|
|
167
|
+
for (k=1;k<=size(lead_mod);k++){
|
|
168
|
+
temp_mod_1 = lead_mod[k];
|
|
169
|
+
attrib(temp_mod_1, "isSB", 1);
|
|
170
|
+
if (NF(t, temp_mod_1)==0){
|
|
171
|
+
t = 0;
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
else{
|
|
175
|
+
temp_mod_2 = t;
|
|
176
|
+
attrib(temp_mod_2, "isSB", 1);
|
|
177
|
+
if(NF(lead_mod[k], temp_mod_2)==0){
|
|
178
|
+
lead_mod = delete(lead_mod, k);
|
|
179
|
+
k = k-1;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
if(t != 0){
|
|
184
|
+
lead_mod[size(lead_mod)+1] = t;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return(lead_mod);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
static proc lift_tree_(vector s, module M)
|
|
193
|
+
{
|
|
194
|
+
vector g = phi_(s, M);
|
|
195
|
+
vector T = remove_LOT_(g, M);
|
|
196
|
+
vector L;
|
|
197
|
+
vector ans = s;
|
|
198
|
+
int i;
|
|
199
|
+
poly m;
|
|
200
|
+
module temp_I;
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
while (T != 0){
|
|
204
|
+
L = lead(T);
|
|
205
|
+
for(i=1; i<=size(M); i++){
|
|
206
|
+
temp_I = leadmonom(M[i]);
|
|
207
|
+
attrib(temp_I, "isSB", 1);
|
|
208
|
+
if(NF(L, temp_I)==0){
|
|
209
|
+
m = leadmonomial_nc(L)/leadterm(M[i]);
|
|
210
|
+
//check sign:
|
|
211
|
+
if (m*leadterm(M[i]) != leadterm(L)){
|
|
212
|
+
m = -m;
|
|
213
|
+
}
|
|
214
|
+
if (greater_than_(s, m*gen(i), M)){
|
|
215
|
+
ans = ans - lift_subtree_(m*gen(i),M);
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
T = T - L;
|
|
221
|
+
}
|
|
222
|
+
return(ans);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
static proc lift_subtree_(vector s, module M)
|
|
226
|
+
{
|
|
227
|
+
vector g = phi_(s, M);
|
|
228
|
+
g = g - lead(g);
|
|
229
|
+
vector T = remove_LOT_(g, M);
|
|
230
|
+
vector ans = s;
|
|
231
|
+
poly m;
|
|
232
|
+
int i;
|
|
233
|
+
vector L;
|
|
234
|
+
module temp_I;
|
|
235
|
+
|
|
236
|
+
while (T != 0){
|
|
237
|
+
if (leadexp(T)[nvars(basering)+1] > 15){
|
|
238
|
+
}
|
|
239
|
+
L = lead(T);
|
|
240
|
+
for(i=1; i<=size(M); i++){
|
|
241
|
+
temp_I = leadmonom(M[i]);
|
|
242
|
+
attrib(temp_I, "isSB", 1);
|
|
243
|
+
if(NF(L, temp_I)==0){
|
|
244
|
+
m = leadmonomial_nc(L)/leadmonomial_nc(M[i]); //TODO check sign!
|
|
245
|
+
|
|
246
|
+
//check sign:
|
|
247
|
+
if (m*leadterm(M[i]) != leadterm(L)){
|
|
248
|
+
m = -m;
|
|
249
|
+
}
|
|
250
|
+
ans = ans - lift_subtree_(m*gen(i),M);
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
T = T - L;
|
|
255
|
+
}
|
|
256
|
+
return(ans);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
static proc phi_(vector s, module m)
|
|
260
|
+
{
|
|
261
|
+
int n = nvars(basering);
|
|
262
|
+
int i = leadexp(s)[n+1];
|
|
263
|
+
//s is a term
|
|
264
|
+
poly t = leadterm(s);
|
|
265
|
+
return(t*m[i]);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
static proc remove_LOT_(vector g, module m)
|
|
269
|
+
{
|
|
270
|
+
vector L;
|
|
271
|
+
int i;
|
|
272
|
+
vector LOT;
|
|
273
|
+
module temp_I;
|
|
274
|
+
while(g != 0){
|
|
275
|
+
for(i=1; i<=size(m); i++){
|
|
276
|
+
L = lead(g);
|
|
277
|
+
temp_I = leadmonom(m[i]);
|
|
278
|
+
attrib(temp_I, "isSB", 1);
|
|
279
|
+
if(NF(L, temp_I) == 0){
|
|
280
|
+
LOT = LOT+L;
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
g = g - L;
|
|
285
|
+
}
|
|
286
|
+
return(LOT);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
static proc greater_than_(vector s, vector v, module M)
|
|
290
|
+
{
|
|
291
|
+
int n = nvars(basering);
|
|
292
|
+
int i = leadexp(s)[n+1];
|
|
293
|
+
int j = leadexp(v)[n+1];
|
|
294
|
+
poly mi = leadterm(s);
|
|
295
|
+
poly mj = leadterm(v);
|
|
296
|
+
if (lead(mi*M[i]) > lead(mj*M[j])){
|
|
297
|
+
return(1);
|
|
298
|
+
}
|
|
299
|
+
else{
|
|
300
|
+
if(lead(mi*M[i]) == lead(mj*M[j]) && i>j){
|
|
301
|
+
return(1);
|
|
302
|
+
}
|
|
303
|
+
return(0);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
static proc add_ideal_gens_(module m)
|
|
308
|
+
{
|
|
309
|
+
int n = nvars(basering);
|
|
310
|
+
int i,j;
|
|
311
|
+
for (i = 1; i<= n; i++){
|
|
312
|
+
for (j = 1; j<= rank(m); j++){
|
|
313
|
+
m[size(m)+1] = var(i)^2 * gen(j);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
return(m);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
static proc ext_elimination_(module m, module syz_mod)
|
|
320
|
+
{
|
|
321
|
+
//note m is NOT lifted.
|
|
322
|
+
int r = size(m);
|
|
323
|
+
int n = nvars(basering);
|
|
324
|
+
module ans_mod, temp_I;
|
|
325
|
+
|
|
326
|
+
matrix needed_mat = submat(matrix(syz_mod), 1..r, 1..size(syz_mod));
|
|
327
|
+
ans_mod = module(needed_mat);
|
|
328
|
+
int i,j,k;
|
|
329
|
+
|
|
330
|
+
for(i=1;i<=size(ans_mod);i++){
|
|
331
|
+
for(j=1;j<=nrows(matrix(ans_mod[i]));j++){
|
|
332
|
+
for(k=1;k<=n;k++){
|
|
333
|
+
temp_I = var(k)^2;
|
|
334
|
+
attrib(temp_I, "isSB", 1);
|
|
335
|
+
if ((NF(ans_mod[i][j], temp_I) == 0) && ans_mod[i][j] != 0){
|
|
336
|
+
ans_mod[i] = ans_mod[i] - ans_mod[i][j]*gen(j);
|
|
337
|
+
break;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
if(ans_mod[i] == 0){
|
|
342
|
+
ans_mod = delete(ans_mod, i);
|
|
343
|
+
i = i-1;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return(ans_mod);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
351
|
+
|
|
352
|
+
//THIS IS THE MAIN USER CALLABLE PROCEDURE.
|
|
353
|
+
proc schreyerSyzExt(module m)
|
|
354
|
+
"USAGE: schreyerSyzExt(m); m a module over the exterior algebra.
|
|
355
|
+
RETURN: module
|
|
356
|
+
PURPOSE: computes the syzygy module of a m over the exterior algebra.
|
|
357
|
+
THEORY:
|
|
358
|
+
SEE ALSO: sresExt, mresExt
|
|
359
|
+
EXAMPLE: example schreyerSyzExt; shows an example
|
|
360
|
+
"
|
|
361
|
+
{
|
|
362
|
+
int i,j;
|
|
363
|
+
|
|
364
|
+
//create ring
|
|
365
|
+
ring r = basering;
|
|
366
|
+
int N = nvars(r);
|
|
367
|
+
ring R = create_ring(ring_list(basering)[1], ringlist(basering)[2], "("+ordstr(basering)+")", "no_minpoly");
|
|
368
|
+
matrix E = UpOneMatrix(N);
|
|
369
|
+
E = -1*(E);
|
|
370
|
+
def RR = nc_algebra(E,0); setring RR;
|
|
371
|
+
|
|
372
|
+
//imap m to new ring
|
|
373
|
+
module M = imap(r, m);
|
|
374
|
+
|
|
375
|
+
module lift_m = add_ideal_gens_(M);
|
|
376
|
+
module syz_mod = schreyers_syz_(lift_m);
|
|
377
|
+
module ans_mod_ = ext_elimination_(M,syz_mod);
|
|
378
|
+
|
|
379
|
+
//setring original ring
|
|
380
|
+
setring r;
|
|
381
|
+
|
|
382
|
+
//fetch ans_mod
|
|
383
|
+
module ans_mod = imap(RR,ans_mod_);
|
|
384
|
+
|
|
385
|
+
return(ans_mod);
|
|
386
|
+
}
|
|
387
|
+
example
|
|
388
|
+
{
|
|
389
|
+
"EXAMPLE:";echo=2;
|
|
390
|
+
ring r = (0,q),(x,y,z),dp;
|
|
391
|
+
def e = Exterior(); setring e;
|
|
392
|
+
vector f1 = [x,y,0,z,0,0];
|
|
393
|
+
vector f2 = [0,x,y,0,z,0];
|
|
394
|
+
vector f3 = [0,0,0,x,y,z];
|
|
395
|
+
module m = f1,f2,f3;
|
|
396
|
+
m = std(m);
|
|
397
|
+
schreyerSyzExt(m);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
401
|
+
|
|
402
|
+
static proc sres_ext_(module m, int p)
|
|
403
|
+
{
|
|
404
|
+
int i,j;
|
|
405
|
+
list res_list, lead_terms_list;
|
|
406
|
+
lead_terms_list[1] = m;
|
|
407
|
+
|
|
408
|
+
res_list[1] = m;
|
|
409
|
+
for (i = 1; i<p; i++){
|
|
410
|
+
res_list[i+1] = total_syz_alg(res_list[i], lead_terms_list);
|
|
411
|
+
lead_terms_list[i+1] = lead(res_list[i+1]);
|
|
412
|
+
}
|
|
413
|
+
resolution ans_res = res_list;
|
|
414
|
+
//can't return something in a different ring!!!
|
|
415
|
+
return(ans_res);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
419
|
+
|
|
420
|
+
proc sresExt(module m, int p)
|
|
421
|
+
"USAGE: srexExt(m,p); m a module over the polynomial ring.
|
|
422
|
+
RETURN: resolution
|
|
423
|
+
PURPOSE: to compute the minimal free resolution of m, where m represents a module over the exterior algebra, up to pth cohomological degree.
|
|
424
|
+
THEORY:
|
|
425
|
+
SEE ALSO: mresExt, schreyerSyzExt
|
|
426
|
+
EXAMPLE: example sresExt; shows an example
|
|
427
|
+
"
|
|
428
|
+
{
|
|
429
|
+
//assume basering is the exterior algebra
|
|
430
|
+
ring ext_ring = basering;
|
|
431
|
+
int n = nvars(basering);
|
|
432
|
+
intmat E = UpOneMatrix(n);
|
|
433
|
+
E = -1*(E);
|
|
434
|
+
//N is the anti-commutative polynomial ring
|
|
435
|
+
ring R = create_ring(ring_list(basering)[1], ringlist(basering)[2], "("+ordstr(basering)+")", "no_minpoly");
|
|
436
|
+
def N = nc_algebra(E,0); setring N;
|
|
437
|
+
list L; int i;
|
|
438
|
+
|
|
439
|
+
module M = imap(ext_ring, m);
|
|
440
|
+
resolution res1 = sres_ext_(M,p);
|
|
441
|
+
for (i=1; i<=size(res1); i++){
|
|
442
|
+
L[i] = res1[i];
|
|
443
|
+
}
|
|
444
|
+
setring ext_ring;
|
|
445
|
+
list LL = imap(N, L);
|
|
446
|
+
resolution ans_res = LL;
|
|
447
|
+
return(ans_res);
|
|
448
|
+
}
|
|
449
|
+
example
|
|
450
|
+
{"EXAMPLE:";echo=2;
|
|
451
|
+
ring r = 0,(x,y,z),dp;
|
|
452
|
+
def e = Exterior(); setring e;
|
|
453
|
+
vector f1 = [x,y,0,z,0,0];
|
|
454
|
+
vector f2 = [0,x,y,0,z,0];
|
|
455
|
+
vector f3 = [0,0,0,x,y,z];
|
|
456
|
+
module m = f1,f2,f3;
|
|
457
|
+
m = std(m);
|
|
458
|
+
sresExt(m,4);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
462
|
+
|
|
463
|
+
static proc total_syz_alg(module mod_, list L)
|
|
464
|
+
{
|
|
465
|
+
module lift_m = add_ideal_gens_(mod_);
|
|
466
|
+
L[size(L)] = lead(lift_m);
|
|
467
|
+
module syz_mod = schreyers_syz_with_order(lift_m, L);
|
|
468
|
+
|
|
469
|
+
module ans_mod = ext_elimination_(mod_,syz_mod);
|
|
470
|
+
L[size(L)] = lead(mod_);
|
|
471
|
+
//we are not sorting here!
|
|
472
|
+
int i,j;
|
|
473
|
+
for (i = 1; i<size(ans_mod); i++){
|
|
474
|
+
for (j = i+1; j<=size(ans_mod); j++){
|
|
475
|
+
if (ans_mod[i] == ans_mod[j]){
|
|
476
|
+
ans_mod = delete(ans_mod,j);
|
|
477
|
+
j--;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
return(ans_mod);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
485
|
+
|
|
486
|
+
static proc schreyers_syz_with_order(module m, list L)
|
|
487
|
+
{
|
|
488
|
+
module lead_mod = lead_syz_(m);
|
|
489
|
+
module ans;
|
|
490
|
+
vector s;
|
|
491
|
+
int i,j;
|
|
492
|
+
for (i=1;i<=size(lead_mod); i++){
|
|
493
|
+
s = lift_tree_with_order(lead_mod[i], m, L);
|
|
494
|
+
ans[size(ans)+1] = s;
|
|
495
|
+
}
|
|
496
|
+
return(ans);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
500
|
+
|
|
501
|
+
static proc lift_tree_with_order(vector s, module M, list LL)
|
|
502
|
+
{
|
|
503
|
+
vector g = phi_(s, M);
|
|
504
|
+
vector T = remove_LOT_(g, M);
|
|
505
|
+
vector L;
|
|
506
|
+
vector ans = s;
|
|
507
|
+
int i;
|
|
508
|
+
poly m;
|
|
509
|
+
module temp_I;
|
|
510
|
+
|
|
511
|
+
ideal im, iF_, imif, iL;
|
|
512
|
+
while (T != 0){
|
|
513
|
+
L = lead(T);
|
|
514
|
+
for(i=1; i<=size(M); i++){
|
|
515
|
+
temp_I = leadmonom(M[i]);
|
|
516
|
+
attrib(temp_I, "isSB", 1);
|
|
517
|
+
if(NF(L, temp_I)==0){
|
|
518
|
+
m = leadmonomial_nc(L)/leadterm(M[i]);
|
|
519
|
+
|
|
520
|
+
//check sign:
|
|
521
|
+
if (m*leadterm(M[i])!= leadterm(L)){
|
|
522
|
+
m = -m;
|
|
523
|
+
}
|
|
524
|
+
//schreyer order algorithm should be called here
|
|
525
|
+
if (gr_than_for_res(s,m*gen(i),LL)){
|
|
526
|
+
ans = ans - lift_subtree_(m*gen(i),M);
|
|
527
|
+
break;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
T = T - L;
|
|
532
|
+
}
|
|
533
|
+
return(ans);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
537
|
+
|
|
538
|
+
static proc gr_than_for_res(vector s, vector v, list L)
|
|
539
|
+
{
|
|
540
|
+
if (size(L) == 1){
|
|
541
|
+
return(greater_than_(s,v,L[1]));
|
|
542
|
+
}
|
|
543
|
+
int n = nvars(basering);
|
|
544
|
+
poly m1 = leadterm(s); poly m2 = leadterm(v);
|
|
545
|
+
int e1 = leadexp(s)[n+1]; int e2 = leadexp(v)[n+1];
|
|
546
|
+
if(e1 == e2){
|
|
547
|
+
return(m1>m2);
|
|
548
|
+
}
|
|
549
|
+
s = m1*L[size(L)][e1]; v = m2*L[size(L)][e2];
|
|
550
|
+
if (s == v || s == -v){
|
|
551
|
+
if(e1 > e2){
|
|
552
|
+
return(1);
|
|
553
|
+
}
|
|
554
|
+
else{
|
|
555
|
+
return(0);
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
L = delete(L, size(L));
|
|
559
|
+
return(gr_than_for_res(s,v,L));
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
///////////////////////////////////////////////////////////////////////////
|
|
563
|
+
|
|
564
|
+
proc mresExt(module m, int p)
|
|
565
|
+
"USAGE: mresExt(m,p); m a module over the polynomial ring.
|
|
566
|
+
RETURN: resolution
|
|
567
|
+
PURPOSE: to compute the minimal free resolution of m, where m represents a module over the exterior algebra, up to pth cohomological degree.
|
|
568
|
+
THEORY:
|
|
569
|
+
SEE ALSO: sresExt, schreyerSyzExt
|
|
570
|
+
EXAMPLE: example mresExt; shows an example
|
|
571
|
+
"
|
|
572
|
+
{ //first compute groebner basis
|
|
573
|
+
m = std(m);
|
|
574
|
+
//first we build our required non-commutative ring.
|
|
575
|
+
ring r = basering;
|
|
576
|
+
int i;
|
|
577
|
+
int n = nvars(basering);
|
|
578
|
+
intmat E = UpOneMatrix(n);
|
|
579
|
+
E = -1*(E);
|
|
580
|
+
ring R = create_ring(ring_list(basering)[1], ringlist(basering)[2], "("+ordstr(basering)+")", "no_minpoly");
|
|
581
|
+
//N is the anti-commutative polynomial ring
|
|
582
|
+
def N = nc_algebra(E,0); setring N;
|
|
583
|
+
|
|
584
|
+
//now we fetch the given module.
|
|
585
|
+
module M = imap(r, m);
|
|
586
|
+
module temp_mod;
|
|
587
|
+
|
|
588
|
+
//create the non-minimal resolution over the non-commutative ring.
|
|
589
|
+
resolution res_ = sres_ext_(M,p);
|
|
590
|
+
int s = size(res_);
|
|
591
|
+
|
|
592
|
+
//fetch the resolution to the quotient ring over the symmetric algebra.
|
|
593
|
+
list ans_L;
|
|
594
|
+
for (i=1; i<=s; i++){
|
|
595
|
+
setring N;
|
|
596
|
+
temp_mod = res_[i];
|
|
597
|
+
setring r;
|
|
598
|
+
ans_L[i] = fetch(N, temp_mod);
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
//minimise the resolution over the quotient algebra.
|
|
602
|
+
resolution quo_res = ans_L;
|
|
603
|
+
quo_res = minres(quo_res);
|
|
604
|
+
return(quo_res);
|
|
605
|
+
}
|
|
606
|
+
example
|
|
607
|
+
{"EXAMPLE:";echo=2;
|
|
608
|
+
ring r = 0,(x,y,z),dp;
|
|
609
|
+
def E = Exterior();
|
|
610
|
+
vector f1 = [x,y,0,z,0,0];
|
|
611
|
+
vector f2 = [0,x,y,0,z,0];
|
|
612
|
+
vector f3 = [0,0,0,x,y,z];
|
|
613
|
+
module m = f1,f2,f3;
|
|
614
|
+
mresExt(m,4);
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
///////////////////////////////////////////////////////////////////////////
|
|
618
|
+
|
|
619
|
+
proc sheafCohBGGsres(module M,int l,int h)
|
|
620
|
+
"USAGE: sheafCohBGGsres(M,l,h); M module, l,h int
|
|
621
|
+
ASSUME: M is graded, and it comes assigned with an admissible degree
|
|
622
|
+
vector as an attribute, h>=l, and the basering has n+1
|
|
623
|
+
variables.
|
|
624
|
+
RETURN: intmat, cohomology of twists of the coherent sheaf F on P^n
|
|
625
|
+
associated to coker(M). The range of twists is determined by l, h.
|
|
626
|
+
DISPLAY: The intmat is displayed in a diagram of the following form:
|
|
627
|
+
with displayCohom(A,l,h,nvars(r)-1);
|
|
628
|
+
@format
|
|
629
|
+
l l+1 h
|
|
630
|
+
----------------------------------------------------------
|
|
631
|
+
n: h^n(F(l)) h^n(F(l+1)) ...... h^n(F(h))
|
|
632
|
+
...............................................
|
|
633
|
+
1: h^1(F(l)) h^1(F(l+1)) ...... h^1(F(h))
|
|
634
|
+
0: h^0(F(l)) h^0(F(l+1)) ...... h^0(F(h))
|
|
635
|
+
----------------------------------------------------------
|
|
636
|
+
chi: chi(F(l)) chi(F(l+1)) ...... chi(F(h))
|
|
637
|
+
@end format
|
|
638
|
+
A @code{'-'} in the diagram refers to a zero entry; a @code{'*'}
|
|
639
|
+
refers to a negative entry (= dimension not yet determined).
|
|
640
|
+
refers to a not computed dimension.
|
|
641
|
+
NOTE: This procedure is based on the Bernstein-Gel'fand-Gel'fand
|
|
642
|
+
correspondence and on Tate resolution ( see [Eisenbud, Floystad,
|
|
643
|
+
Schreyer: Sheaf cohomology and free resolutions over exterior
|
|
644
|
+
algebras, Trans AMS 355 (2003)] ).
|
|
645
|
+
sheafCohBGG(M,l,h) does not compute all values in the above
|
|
646
|
+
table. To determine all values of h^i(F(d)), d=l..h,
|
|
647
|
+
use sheafCohBGG(M,l-n,h+n).
|
|
648
|
+
SEE ALSO: sheafCoh, dimH, displayCohom
|
|
649
|
+
EXAMPLE: example sheafCohBGG; shows an example
|
|
650
|
+
"
|
|
651
|
+
{
|
|
652
|
+
int i,j,k,row,col,p;
|
|
653
|
+
if( typeof(attrib(M,"isHomog"))!="intvec" )
|
|
654
|
+
{
|
|
655
|
+
if (size(M)==0) { attrib(M,"isHomog",0); }
|
|
656
|
+
else { ERROR("No admissible degree vector assigned"); }
|
|
657
|
+
}
|
|
658
|
+
int n=nvars(basering)-1;
|
|
659
|
+
int ell=l+n;
|
|
660
|
+
def R=basering;
|
|
661
|
+
int reg = CM_regularity(M);
|
|
662
|
+
int bound=max(reg+1,h-1);
|
|
663
|
+
module MT=truncate(M,bound);
|
|
664
|
+
int m=nrows(MT);
|
|
665
|
+
MT=transpose(jacobM(MT));
|
|
666
|
+
MT=syz(MT);
|
|
667
|
+
matrix ML[n+1][1]=maxideal(1);
|
|
668
|
+
matrix S=transpose(outer(ML,unitmat(m)));
|
|
669
|
+
matrix SS=transpose(S*MT);
|
|
670
|
+
//--- to the exterior algebra
|
|
671
|
+
def AR = Exterior();
|
|
672
|
+
setring AR;
|
|
673
|
+
intvec saveopt=option(get);
|
|
674
|
+
option(redSB);
|
|
675
|
+
option(redTail);
|
|
676
|
+
module EM=imap(R,SS);
|
|
677
|
+
intvec w;
|
|
678
|
+
//--- here we are with our matrix
|
|
679
|
+
int bound1=max(1,bound-ell+1);
|
|
680
|
+
for (i=1; i<=nrows(EM); i++)
|
|
681
|
+
{
|
|
682
|
+
w[i]=-bound-1;
|
|
683
|
+
}
|
|
684
|
+
attrib(EM,"isHomog",w);
|
|
685
|
+
resolution temp_res = mresExt(EM,bound1+1);
|
|
686
|
+
list L;
|
|
687
|
+
for (i = 1; i <= bound1; i++){
|
|
688
|
+
L[i] = temp_res[i];
|
|
689
|
+
}
|
|
690
|
+
resolution RE = L;
|
|
691
|
+
intmat Betti = betti(RE);
|
|
692
|
+
k=ncols(Betti);
|
|
693
|
+
row=nrows(Betti);
|
|
694
|
+
int shift = 0;
|
|
695
|
+
intmat newBetti[n+1][h-l+1];
|
|
696
|
+
for (j=1; j<=row; j++)
|
|
697
|
+
{
|
|
698
|
+
for (i=l; i<=h; i++)
|
|
699
|
+
{
|
|
700
|
+
if (((n+2-shift-j)>0)&&((n+2-shift-j)<=(n+1))
|
|
701
|
+
&& ((i-l+1)>0)&&((i-l+1)<=(h-l+1)))
|
|
702
|
+
{
|
|
703
|
+
if ((k+1-j-i+ell-shift>0) and (j+i-ell+shift>=1))
|
|
704
|
+
{
|
|
705
|
+
newBetti[n+2-shift-j,i-l+1]=Betti[j,k+1-j-i+ell-shift];
|
|
706
|
+
}
|
|
707
|
+
else
|
|
708
|
+
{
|
|
709
|
+
newBetti[n+2-shift-j,i-l+1]=-1;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
for (j=2; j<=n+1; j++)
|
|
715
|
+
{
|
|
716
|
+
for (i=1; i<j; i++)
|
|
717
|
+
{
|
|
718
|
+
newBetti[j,i]=-1;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
int d=k-h+ell-1;
|
|
722
|
+
for (j=1; j<=n; j++)
|
|
723
|
+
{
|
|
724
|
+
for (i=h-l+1; i>=k+j; i--)
|
|
725
|
+
{
|
|
726
|
+
newBetti[j,i]=-1;
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
option(set,saveopt);
|
|
730
|
+
setring R;
|
|
731
|
+
return(newBetti);
|
|
732
|
+
}
|
|
733
|
+
example
|
|
734
|
+
{"EXAMPLE:";
|
|
735
|
+
echo = 2;
|
|
736
|
+
// cohomology of structure sheaf on P^4:
|
|
737
|
+
//-------------------------------------------
|
|
738
|
+
ring r=0,x(1..3),dp;
|
|
739
|
+
module M=0;
|
|
740
|
+
intmat A=sheafCohBGGsres(M,-4,1);
|
|
741
|
+
A;
|
|
742
|
+
displayCohom(A,-4,1,nvars(r)-1);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
///////////////////////////////////////////////////////////////////////////
|
|
746
|
+
|
|
747
|
+
static proc jacobM(matrix M) //kopiert aus sheafcoh.lib
|
|
748
|
+
{
|
|
749
|
+
int n=nvars(basering);
|
|
750
|
+
matrix B=transpose(diff(M,var(1)));
|
|
751
|
+
int i;
|
|
752
|
+
for(i=2;i<=n;i++)
|
|
753
|
+
{
|
|
754
|
+
B=concat(B,transpose(diff(M,var(i))));
|
|
755
|
+
}
|
|
756
|
+
return(transpose(B));
|
|
757
|
+
}
|