1 | //////////////////////////////////////////////////////////////////////////////// |
---|
2 | version="version curveInv.lib 4.1.1.0 Dec_2017 "; // $Id$ |
---|
3 | category="Algebraic geometry"; |
---|
4 | info=" |
---|
5 | LIBRARY: curveInv.lib A library for computing invariants of curves |
---|
6 | AUTHOR: Peter Chini, chini@rhrk.uni-kl.de |
---|
7 | |
---|
8 | OVERVIEW: |
---|
9 | This library provides a collection of procedures for computing invariants |
---|
10 | of curve singularities. Invariants that can be computed are: |
---|
11 | - the delta invariant |
---|
12 | - the multiplicity of the conductor: the length of Normalization(R)/C, |
---|
13 | where C denotes the conductor |
---|
14 | - the Deligne number |
---|
15 | - the colength of derivations along the normalization - the length of |
---|
16 | Der(Normalization(R/I)) / R/I |
---|
17 | |
---|
18 | In addition, it is possible to compute the conductor of a ring S = R/I, |
---|
19 | where R is a (localized) polynomial ring. |
---|
20 | |
---|
21 | THEORY: Computing the Deligne number of curve singularities and an algorithmic framework for |
---|
22 | differential algebras in SINGULAR; |
---|
23 | Chapter 5 - Master's Thesis of Peter Chini - August 2015 |
---|
24 | |
---|
25 | PROCEDURES: |
---|
26 | curveDeltaInv(ideal); computes the delta invariant of R/I for a given ideal I |
---|
27 | curveConductorMult(ideal); returns the multiplicity of the conductor of R/I |
---|
28 | curveDeligneNumber(ideal); computes the Deligne number of R/I |
---|
29 | curveColengthDerivations(ideal); returns the colength of derivations, |
---|
30 | the length of Der(Normalization(R/I))/Der(R/I) |
---|
31 | |
---|
32 | KEYWORDS: curve singularity;invariants;deligne number |
---|
33 | "; |
---|
34 | |
---|
35 | LIB "homolog.lib"; |
---|
36 | LIB "normal.lib"; |
---|
37 | |
---|
38 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
39 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
40 | // Computation of invariants // |
---|
41 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
42 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
43 | |
---|
44 | |
---|
45 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
46 | //-------------------------------------- Delta invariant -------------------------------------// |
---|
47 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
48 | |
---|
49 | |
---|
50 | proc curveDeltaInv(ideal I, list #) |
---|
51 | "USAGE: curveDeltaInv(I); I ideal |
---|
52 | ASSUME: I is a radical ideal, dim(R/I) = 1 |
---|
53 | RETURN: the delta invariant of R/I |
---|
54 | NOTE: - output -1 means: delta invariant is infinite |
---|
55 | - the optional parameter can be used if the normalization has already |
---|
56 | been computed. If a list L contains the output of the procedure |
---|
57 | normal (with options prim, wd and usering if the ring has a mixed ordering), |
---|
58 | apply curveDeltaInv(I,L) |
---|
59 | KEYWORDS: delta invariant; normalization |
---|
60 | SEE ALSO: curveConductorMult; curveDeligneNumber |
---|
61 | EXAMPLE: example curveDeltaInv; shows an example" |
---|
62 | { |
---|
63 | |
---|
64 | if(size(#) > 0){ |
---|
65 | list norma = #; |
---|
66 | }else{ |
---|
67 | // Compute the normalization with delta invariants |
---|
68 | list norma = normal(I,"useRing","prim","wd"); |
---|
69 | } |
---|
70 | |
---|
71 | // Pick the total delta invariant |
---|
72 | int delt = norma[3][2]; |
---|
73 | return(delt); |
---|
74 | |
---|
75 | } |
---|
76 | example |
---|
77 | { |
---|
78 | "EXAMPLE:"; echo = 2; |
---|
79 | ring R = 0,(x,y,z),ds; |
---|
80 | |
---|
81 | //////////////////////////// |
---|
82 | // Finite delta invariant // |
---|
83 | //////////////////////////// |
---|
84 | |
---|
85 | ideal I = x2y-y2z,x2-y2+z2; |
---|
86 | curveDeltaInv(radical(I)); |
---|
87 | |
---|
88 | ////////////////////////////// |
---|
89 | // Infinite delta invariant // |
---|
90 | ////////////////////////////// |
---|
91 | |
---|
92 | ideal J = xyz; |
---|
93 | curveDeltaInv(radical(J)); |
---|
94 | } |
---|
95 | |
---|
96 | |
---|
97 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
98 | //-------------------------------- Conductor and multiplicity --------------------------------// |
---|
99 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
100 | |
---|
101 | |
---|
102 | |
---|
103 | static proc conductorMinPrime(def S) |
---|
104 | "USAGE: conductorMinPrime(S); S ring |
---|
105 | ASSUME: S is a polynomial ring with ideal norid and S/norid is the normalization of R/P, |
---|
106 | where P is a minimal prime of I |
---|
107 | RETURN: the ideal P |
---|
108 | REMARKS: The algorithm computes norid intersect R - it eliminates the new |
---|
109 | variables that were added by the command normal. |
---|
110 | NOTE: the algorithm is for interior use only. We apply it to avoid a second computation |
---|
111 | of the minimal primes |
---|
112 | KEYWORDS: minimal primes; normalization |
---|
113 | " |
---|
114 | { |
---|
115 | //SEE ALSO: conductorIdealIntersect |
---|
116 | |
---|
117 | // Variables of basering as product |
---|
118 | int n = nvars(basering); |
---|
119 | int i; |
---|
120 | poly var_base = 1; |
---|
121 | for(i = 1; i <= n; i++){ |
---|
122 | var_base = var_base*var(i); |
---|
123 | } |
---|
124 | |
---|
125 | // Switch to normalization |
---|
126 | def savering = basering; |
---|
127 | setring S; |
---|
128 | poly var_base = imap(savering,var_base); |
---|
129 | |
---|
130 | // Variables of S as product |
---|
131 | poly var_ext = 1; |
---|
132 | n = nvars(basering); |
---|
133 | for(i = 1; i <= n ; i++){ |
---|
134 | var_ext = var_ext*var(i); |
---|
135 | } |
---|
136 | |
---|
137 | // Variables to eliminate |
---|
138 | poly var_elim = var_ext/var_base; |
---|
139 | |
---|
140 | // Compute norid intersect basering = minimal prime |
---|
141 | ideal min_prime = eliminate(norid,var_elim); |
---|
142 | |
---|
143 | // Switch to R and return |
---|
144 | setring savering; |
---|
145 | ideal min_prime = imap(S,min_prime); |
---|
146 | return(min_prime); |
---|
147 | |
---|
148 | } |
---|
149 | |
---|
150 | |
---|
151 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
152 | |
---|
153 | |
---|
154 | static proc conductorIdealIntersect(list id, int miss) |
---|
155 | "USAGE: conductorIdealIntersect(id,miss); id list, miss int |
---|
156 | ASSUME: id is a list of ideals |
---|
157 | RETURN: the intersection of all ideals in id except the one chosen via miss |
---|
158 | NOTE: - the index can be chosen outside the list |
---|
159 | - the empty intersection is the whole ring |
---|
160 | KEYWORDS: intersection" |
---|
161 | { |
---|
162 | |
---|
163 | int n = size(id); |
---|
164 | ideal in_sect = 1; |
---|
165 | int i; |
---|
166 | |
---|
167 | // Intersect ideals |
---|
168 | for(i = 1; i <= n; i++){ |
---|
169 | if(i != miss){ |
---|
170 | in_sect = intersect(in_sect,id[i]); |
---|
171 | } |
---|
172 | } |
---|
173 | |
---|
174 | return(in_sect); |
---|
175 | |
---|
176 | } |
---|
177 | |
---|
178 | |
---|
179 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
180 | |
---|
181 | |
---|
182 | proc curveConductorMult(ideal I, list #) |
---|
183 | "USAGE: curveConductorMult(I); I ideal |
---|
184 | ASSUME: I is a radical ideal, dim(R/I) = 1 |
---|
185 | RETURN: the multiplicity of the conductor |
---|
186 | NOTE: the optional parameter can be used if the normalization has already |
---|
187 | been computed. If a list L contains the output of the procedure |
---|
188 | normal (with options prim, wd and usering if the ring has a mixed ordering), |
---|
189 | apply curveConductorMult(I,L) |
---|
190 | KEYWORDS: conductor; multiplicity |
---|
191 | SEE ALSO: normalConductor |
---|
192 | EXAMPLE: example curveConductorMult; shows an example" |
---|
193 | { |
---|
194 | |
---|
195 | if(size(#) > 0){ |
---|
196 | list norma = #; |
---|
197 | }else{ |
---|
198 | // Compute the normalization with delta invariants |
---|
199 | list norma = normal(I,"useRing","prim","wd"); |
---|
200 | } |
---|
201 | |
---|
202 | // delta invariant |
---|
203 | int delta = curveDeltaInv(I,norma); |
---|
204 | // If the delta invariant is infinite, the conductor multiplicity is as well |
---|
205 | if(delta == -1){ |
---|
206 | return(-1); |
---|
207 | } |
---|
208 | |
---|
209 | // Conductor |
---|
210 | ideal C = normalConductor(I,norma); |
---|
211 | int c_dim = vdim(std(C)); |
---|
212 | if(c_dim == -1){ |
---|
213 | return(-1); |
---|
214 | } |
---|
215 | |
---|
216 | // Return conductor multiplicity |
---|
217 | return(vdim(std(C)) + delta); |
---|
218 | |
---|
219 | } |
---|
220 | example |
---|
221 | { |
---|
222 | "EXAMPLE:"; echo = 2; |
---|
223 | |
---|
224 | ////////////////////////////////////////////// |
---|
225 | // Mutltiplicity of the conductor of curves // |
---|
226 | ////////////////////////////////////////////// |
---|
227 | |
---|
228 | ring R = 0,(x,y,z),ds; |
---|
229 | |
---|
230 | // Example 1: |
---|
231 | ideal I = x2-y4z,z3y2+xy2; |
---|
232 | I = std(radical(I)); |
---|
233 | curveConductorMult(I); |
---|
234 | |
---|
235 | // Example 2: |
---|
236 | ideal I = x*(y+z)^3 - y3, x2y2 + z5; |
---|
237 | I = std(radical(I)); |
---|
238 | curveConductorMult(I); |
---|
239 | |
---|
240 | kill R; |
---|
241 | |
---|
242 | //////////////////////////////////////////////////////// |
---|
243 | // Mutltiplicity of the conductor of Gorenstein curve // |
---|
244 | //////////////////////////////////////////////////////// |
---|
245 | |
---|
246 | ring R = 0,(x,y),ds; |
---|
247 | ideal I = xy; |
---|
248 | |
---|
249 | // In such a case, the conductor multiplicity c satisfies: c = 2*delta |
---|
250 | // Delta invariant: |
---|
251 | curveDeltaInv(I); |
---|
252 | // Conductor Multiplicity: |
---|
253 | curveConductorMult(I); |
---|
254 | } |
---|
255 | |
---|
256 | |
---|
257 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
258 | //-------------------------------------- Deligne number --------------------------------------// |
---|
259 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
260 | |
---|
261 | |
---|
262 | proc curveDeligneNumber(ideal I, list #) |
---|
263 | "USAGE: curveDeligneNumber(I); I ideal |
---|
264 | ASSUME: I is a radical ideal, dim(R/I) = 1 |
---|
265 | RETURN: the Deligne number of R/I |
---|
266 | REMARKS: The Deligne number e satisfies by definition: e = 3delta - m. |
---|
267 | So the algorithm splits the computation into two parts: one part computes the delta |
---|
268 | invariant, the other part the colength of derivations m. |
---|
269 | NOTE: the optional parameter can be used if the normalization has already |
---|
270 | been computed. If a list L contains the output of the procedure |
---|
271 | normal (with options prim, wd and usering if the ring has a mixed ordering), |
---|
272 | apply curveDeligneNumber(I,L) |
---|
273 | KEYWORDS: deligne number; invariant |
---|
274 | SEE ALSO: curveColengthDerivations, curveDeltaInv |
---|
275 | EXAMPLE: example curveDeligneNumber; shows an example" |
---|
276 | { |
---|
277 | |
---|
278 | if(size(#) > 0){ |
---|
279 | list norma = #; |
---|
280 | }else{ |
---|
281 | // Compute the normalization with delta invariants |
---|
282 | list norma = normal(I,"useRing","prim","wd"); |
---|
283 | } |
---|
284 | |
---|
285 | int delt = curveDeltaInv(I,norma); |
---|
286 | int m = curveColengthDerivations(I,norma); |
---|
287 | return(3*delt - m); |
---|
288 | |
---|
289 | } |
---|
290 | example |
---|
291 | { |
---|
292 | "EXAMPLE:"; echo = 2; |
---|
293 | |
---|
294 | ////////////////////////////// |
---|
295 | // Deligne number of curves // |
---|
296 | ////////////////////////////// |
---|
297 | |
---|
298 | // Example 1: |
---|
299 | ring R = 0,(x,y,z),ds; |
---|
300 | ideal I = x2-y4z,z3y2+xy2; |
---|
301 | I = std(radical(I)); |
---|
302 | curveDeligneNumber(I); |
---|
303 | |
---|
304 | // Example 2: |
---|
305 | ring S = 0,(x,y),ds; |
---|
306 | ideal I = (x+y)*(x2-y3); |
---|
307 | curveDeligneNumber(I); |
---|
308 | |
---|
309 | // Example 3: |
---|
310 | ideal J = (x2-y3)*(x2+y2)*(x-y); |
---|
311 | curveDeligneNumber(J); |
---|
312 | // Let us also compute the milnor number of this complete intersection: |
---|
313 | milnor(J); |
---|
314 | |
---|
315 | // We see that the Milnor number is bigger than the Deligne number. Hence, this |
---|
316 | // curve cannot be quasi homogeneous. This can also be verified by Saitos criterion: |
---|
317 | reduce(J[1],std(jacob(J[1]))); |
---|
318 | } |
---|
319 | |
---|
320 | |
---|
321 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
322 | |
---|
323 | |
---|
324 | proc curveColengthDerivations(ideal I, list #) |
---|
325 | "USAGE: curveColengthDerivations(I); I ideal |
---|
326 | ASSUME: I is a radical ideal |
---|
327 | RETURN: the colength of derivations of R/I |
---|
328 | REMARKS: The procedure goes through all branches and computes the colength of |
---|
329 | derivations there. Then the d-dimension of the minimal primes is computed. |
---|
330 | After that, everything is summed up. |
---|
331 | NOTE: the optional parameter can be used if the normalization has already |
---|
332 | been computed. If a list L contains the output of the procedure |
---|
333 | normal (with options prim, wd and usering if the ring has a mixed ordering), |
---|
334 | apply curveColengthDerivations(I,L) |
---|
335 | KEYWORDS: deligne number; invariants; colength of derivations |
---|
336 | EXAMPLE: example curveColengthDerivations; shows an example" |
---|
337 | { |
---|
338 | //SEE ALSO: curveColengthDerivationsComp |
---|
339 | |
---|
340 | if(size(#) > 0){ |
---|
341 | list norma = #; |
---|
342 | }else{ |
---|
343 | // Compute the normalization with delta invariants |
---|
344 | list norma = normal(I,"useRing","prim","wd"); |
---|
345 | } |
---|
346 | |
---|
347 | int r = size(norma[1]); |
---|
348 | int i,j; |
---|
349 | ideal U,A,B; |
---|
350 | module Der_P; |
---|
351 | def S; |
---|
352 | def savering = basering; |
---|
353 | |
---|
354 | // List of minimal primes and their derivation modules |
---|
355 | list min_prime; |
---|
356 | list der_mod; |
---|
357 | |
---|
358 | // Colength of derivations of any branch, m_delta and total colength of derivations |
---|
359 | int m_i; |
---|
360 | int m_delta; |
---|
361 | int ext_number; |
---|
362 | |
---|
363 | // Go through the irreducible components and compute thecolength of derivations m_i |
---|
364 | for(i = 1; i <= r; i++){ |
---|
365 | // Derivations preserving the minimal primes |
---|
366 | S = norma[1][i]; |
---|
367 | U = norma[2][i]; |
---|
368 | |
---|
369 | min_prime[i] = conductorMinPrime(S); |
---|
370 | der_mod[i] = find_der(min_prime[i]); |
---|
371 | Der_P = der_mod[i]; |
---|
372 | |
---|
373 | // Switch to normalization of R/P and compute colength of derivations |
---|
374 | setring S; |
---|
375 | ideal U = imap(savering,U); |
---|
376 | module Der_P = imap(savering,Der_P); |
---|
377 | |
---|
378 | m_i = curveColengthDerivationsComp(Der_P,U,norid); |
---|
379 | |
---|
380 | // Add colength of derivations of this branch to total colength of derivations |
---|
381 | ext_number = ext_number + m_i; |
---|
382 | setring savering; |
---|
383 | } |
---|
384 | |
---|
385 | // Now compute m_delta via curveDdim |
---|
386 | A = min_prime[1]; |
---|
387 | B = std(1); |
---|
388 | |
---|
389 | for(i = 2; i <= r; i++){ |
---|
390 | A = intersect(A,B); |
---|
391 | B = min_prime[i]; |
---|
392 | m_delta = m_delta + curveDdim(A,find_der(A),B,find_der(B)); |
---|
393 | } |
---|
394 | |
---|
395 | // Add this to the colength of derivations |
---|
396 | ext_number = ext_number + m_delta; |
---|
397 | return(ext_number); |
---|
398 | |
---|
399 | } |
---|
400 | example |
---|
401 | { |
---|
402 | "EXAMPLE:"; echo = 2; |
---|
403 | |
---|
404 | /////////////////////////////////////// |
---|
405 | // colength of derivations of curves // |
---|
406 | /////////////////////////////////////// |
---|
407 | |
---|
408 | // Example 1: |
---|
409 | ring R = 0,(x,y,z),ds; |
---|
410 | ideal I = x2-y4z,z3y2+xy2; |
---|
411 | I = std(radical(I)); |
---|
412 | curveColengthDerivations(I); |
---|
413 | |
---|
414 | // Example 2: |
---|
415 | ring S = 0,(x,y),ds; |
---|
416 | ideal I = (x+y)*(x2-y3); |
---|
417 | curveColengthDerivations(I); |
---|
418 | |
---|
419 | // Example 3: |
---|
420 | ideal J = (x2-y3)*(x2+y2)*(x-y); |
---|
421 | curveColengthDerivations(J); |
---|
422 | } |
---|
423 | |
---|
424 | |
---|
425 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
426 | |
---|
427 | |
---|
428 | static proc curveColengthDerivationsComp(module Der_P, ideal U, ideal relid) |
---|
429 | "USAGE: curveColengthDerivationsComp(Der_P,U,relid); Der_P module, U ideal, relid ideal |
---|
430 | ASSUME: - the basering is the normalization of R/P, where P is a prime |
---|
431 | - Der_P is the module of P-preserving derivations |
---|
432 | - U containts the generators of the normalization of R/P |
---|
433 | - relid is the ideal of relations that hold in the normalization of R/P |
---|
434 | RETURN: the colength of derivations of R/P |
---|
435 | NOTE: the procedure is for interior use only - it is part of the computation of |
---|
436 | the total colength of derivations |
---|
437 | KEYWORDS: colength of derivations |
---|
438 | SEE ALSO: curveAdjustModule, curveExtDerModule" |
---|
439 | { |
---|
440 | |
---|
441 | int k; |
---|
442 | |
---|
443 | // Adjust the generators of Der_P to the new variables T(1),...,T(k),x(1),...,x(n) |
---|
444 | // if there are new variables - check number of blocks |
---|
445 | if(size(ringlist(basering)[3]) >= 3){ |
---|
446 | k = size(ringlist(basering)[3][1][2]); |
---|
447 | Der_P = curveAdjustModule(Der_P,k); |
---|
448 | } |
---|
449 | |
---|
450 | // Extend the derivation module to the normalization |
---|
451 | Der_P = curveExtDerModule(Der_P,U,relid); |
---|
452 | |
---|
453 | // Derivations preserving the relation ideal |
---|
454 | module Der_relid = find_der(relid); |
---|
455 | |
---|
456 | // Quotient module with relations given by relid |
---|
457 | Der_P = Der_P + relid*freemodule(nvars(basering)); |
---|
458 | module quotient_mod = modulo(Der_relid,Der_P); |
---|
459 | k = vdim(std(quotient_mod)); |
---|
460 | |
---|
461 | if(k == -1){ |
---|
462 | ERROR("Colength of derivations not finite !"); |
---|
463 | } |
---|
464 | |
---|
465 | return(k); |
---|
466 | |
---|
467 | } |
---|
468 | |
---|
469 | |
---|
470 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
471 | |
---|
472 | |
---|
473 | static proc curveExtDerModule(module Der_P, ideal U, ideal relid) |
---|
474 | "USAGE: curveExtDerModule(Der_P,U,relid); Der_P module, U ideal, relid ideal |
---|
475 | ASSUME: - the basering is the normalization of R/P, where P is prime |
---|
476 | - Der_P is the module of P-preserving derivations (with adjusted generators) |
---|
477 | - U containts the generators of the normalization of R/P |
---|
478 | - relid is the ideal of relations that hold in the normalization of R/P |
---|
479 | RETURN: The derivation module lifted to the normalization |
---|
480 | REMARKS: the generators of Der_P are extended via the quotient rule |
---|
481 | NOTE: the procedure is for interior use only - it is part of the computation of |
---|
482 | the total colength of derivations |
---|
483 | KEYWORDS: derivations; extend derivations |
---|
484 | " |
---|
485 | { |
---|
486 | //SEE ALSO: curveColengthDerivationsComp |
---|
487 | |
---|
488 | int k = size(Der_P); |
---|
489 | int n = size(U) - 1; |
---|
490 | int i,j; |
---|
491 | |
---|
492 | module M_ext; |
---|
493 | vector delt; |
---|
494 | vector delt_ext; |
---|
495 | |
---|
496 | poly g = (U[n+1])^2; |
---|
497 | poly f; |
---|
498 | poly Un = 1; |
---|
499 | matrix D[k][n]; |
---|
500 | matrix G[k][n]; |
---|
501 | list temp_div; |
---|
502 | |
---|
503 | for(i = 1; i <= k; i++){ |
---|
504 | delt = Der_P[i]; |
---|
505 | |
---|
506 | // Extend to new variables by quotient rule |
---|
507 | for(j = 1; j <= n; j++){ |
---|
508 | f = vecDerivationEval(delt,U[j])*U[n+1] - vecDerivationEval(delt,U[n+1])*U[j]; |
---|
509 | |
---|
510 | // Division |
---|
511 | temp_div = division(f,ideal(g) + relid); |
---|
512 | |
---|
513 | // Units |
---|
514 | D[i,j] = temp_div[3][1,1]; |
---|
515 | // Unit Un is product of all D[i][j] |
---|
516 | Un = Un*D[i,j]; |
---|
517 | |
---|
518 | // Factor of dividing by g |
---|
519 | G[i,j] = temp_div[1][1,1]; |
---|
520 | } |
---|
521 | } |
---|
522 | |
---|
523 | // Extension of the generating derivations |
---|
524 | for(i = 1; i <= k; i++){ |
---|
525 | delt_ext = Un*Der_P[i]; |
---|
526 | |
---|
527 | // Now add the images of the new variables multiplied by the units |
---|
528 | for(j = 1; j <= n; j++){ |
---|
529 | delt_ext = delt_ext + (Un / D[i,j])*G[i,j]*gen(j); |
---|
530 | } |
---|
531 | |
---|
532 | M_ext[i] = delt_ext; |
---|
533 | } |
---|
534 | |
---|
535 | return(M_ext); |
---|
536 | |
---|
537 | } |
---|
538 | |
---|
539 | |
---|
540 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
541 | |
---|
542 | |
---|
543 | static proc curveAdjustModule(module M, int k) |
---|
544 | "USAGE: curveAdjustModule(M,k); M module, k int |
---|
545 | RETURN: the module M with shifted (by k) generators |
---|
546 | NOTE: the procedure is for interior use only - it is part of the computation of |
---|
547 | the total colength of derivations |
---|
548 | KEYWORDS: adjust module |
---|
549 | " |
---|
550 | { |
---|
551 | //SEE ALSO: curveColengthDerivationsComp" |
---|
552 | |
---|
553 | module M_copy = M; |
---|
554 | int n = size(M); |
---|
555 | int vs,i,j; |
---|
556 | vector v,w; |
---|
557 | |
---|
558 | // Adjust dimension of generators |
---|
559 | for(i = 1; i <= n; i++){ |
---|
560 | v = M_copy[i]; |
---|
561 | vs = nrows(v); |
---|
562 | |
---|
563 | for(j = 1; j <= vs; j++){ |
---|
564 | w = w + v[j]*gen(j+k); |
---|
565 | } |
---|
566 | |
---|
567 | M[i] = w; |
---|
568 | w = 0; |
---|
569 | } |
---|
570 | |
---|
571 | return(M); |
---|
572 | |
---|
573 | } |
---|
574 | |
---|
575 | |
---|
576 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
577 | |
---|
578 | |
---|
579 | static proc curveDdim(ideal I, module DI, ideal J, module DJ) |
---|
580 | "USAGE: curveDdim(I,DI,J,DJ); I,J ideal, DI,DJ module |
---|
581 | ASSUME: DI are the I-preserving derivations and DJ are the J-preserving derivations |
---|
582 | RETURN: d(I,J) = dim_k (DI + DJ / (I+J)*Der(R)) |
---|
583 | NOTE: the procedure is part of the computations of the colength of derivations. |
---|
584 | It computes the d-dimension |
---|
585 | KEYWORDS: derivation module; logarithmic derivations |
---|
586 | SEE ALSO: curveColengthDerivations" |
---|
587 | { |
---|
588 | |
---|
589 | module M = DI+DJ; |
---|
590 | module N = (I+J)*freemodule(nvars(basering)); |
---|
591 | module H = modulo(M,N); |
---|
592 | int k = vdim(std(H)); |
---|
593 | |
---|
594 | if(k == -1){ |
---|
595 | ERROR("d-dimension not finite !"); |
---|
596 | } |
---|
597 | |
---|
598 | return(k); |
---|
599 | |
---|
600 | } |
---|
601 | |
---|
602 | |
---|
603 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
604 | |
---|
605 | |
---|
606 | static proc vecDerivationEval(vector delt, poly f) |
---|
607 | "USAGE: vecDerivationEval(delt,f); delt vector, f poly |
---|
608 | ASSUME: delt does not have more rows than the number of variables in the basering |
---|
609 | RETURN: the image of f under delt, if we consider delt as derivation |
---|
610 | REMARKS: We identify derivations as vectors |
---|
611 | NOTE: - the procedure is for interior use only - it is part of the computation of |
---|
612 | the total colength of derivations |
---|
613 | - it is used to apply the quotient rule |
---|
614 | KEYWORDS: derivation |
---|
615 | SEE ALSO: curveExtDerModule" |
---|
616 | { |
---|
617 | |
---|
618 | int n = nrows(delt); |
---|
619 | int i; |
---|
620 | poly eval_; |
---|
621 | |
---|
622 | for(i = 1; i <= n; i++){ |
---|
623 | eval_ = eval_ + delt[i]*diff(f,var(i)); |
---|
624 | } |
---|
625 | |
---|
626 | return(eval_); |
---|
627 | |
---|
628 | } |
---|
629 | |
---|
630 | |
---|
631 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
632 | |
---|
633 | |
---|
634 | static proc find_der(ideal I) |
---|
635 | "USAGE: find_der(I); I ideal |
---|
636 | RETURN: generators of the module of logarithmic derivations |
---|
637 | REMARK: Algorithm by R. Epure - Homogeneity and Derivations on Analytic Algebras" |
---|
638 | { |
---|
639 | // Dummy variables and Initialization: |
---|
640 | int k,i,n,m; |
---|
641 | |
---|
642 | //generating matrix for syzygie computation: |
---|
643 | n = nvars(basering); |
---|
644 | m = size(I); |
---|
645 | ideal j = jacob(I); |
---|
646 | |
---|
647 | matrix M=matrix(j,m,n); |
---|
648 | for (i = 1; i <= m; i++){ |
---|
649 | M = concat(M,diag(I[i],m)); |
---|
650 | } |
---|
651 | module C = syz(M); |
---|
652 | module D; |
---|
653 | |
---|
654 | for(i = 1; i <= size(C); i++){ |
---|
655 | D = D + C[i][1..n]; |
---|
656 | } |
---|
657 | |
---|
658 | //Clearing memory |
---|
659 | kill j; |
---|
660 | kill C; |
---|
661 | kill M; |
---|
662 | return(D); |
---|
663 | } |
---|
664 | |
---|
665 | |
---|
666 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|
667 | //////////////////////////////////////////////////////////////////////////////////////////////// |
---|