1 | // $Id: spectrum.lib,v 1.7 2000-12-15 16:20:45 Singular Exp $ |
---|
2 | /////////////////////////////////////////////////////////////////////////////// |
---|
3 | |
---|
4 | version="$Id: spectrum.lib,v 1.7 2000-12-15 16:20:45 Singular Exp $"; |
---|
5 | info=" |
---|
6 | LIBRARY: spectrum.lib PROCEDURES FOR COMPUTING SINGULARITY SPECTRA |
---|
7 | |
---|
8 | PROCEDURES: |
---|
9 | spectrum(poly[,1]); spectrum of a isolated singularity (with/without tests) |
---|
10 | semic(s1,s2[,1]); tests if s2 is semicontinous for s1 using |
---|
11 | half open intervalls |
---|
12 | (and open intervalls for a 3rd paramater 1) |
---|
13 | semicqh(s1,s2[,1]); tests if s2 is semicontinous for s1 using |
---|
14 | open and half open intervalls |
---|
15 | spadd(s1,s2); sum of two spectra s1 and s2 |
---|
16 | spmul(s,k); multiplies the spectrum s with the int k |
---|
17 | (parameters in square brackets [] are optional) |
---|
18 | "; |
---|
19 | |
---|
20 | /////////////////////////////////////////////////////////////////////////////// |
---|
21 | |
---|
22 | proc spectrum (poly f, list #) |
---|
23 | "USAGE: spectrum(f[,1]); f polynomial |
---|
24 | computes the spectrum of f |
---|
25 | if a second argument 1 is given, |
---|
26 | no test for a degenerate principal part will be done |
---|
27 | RETURN: list |
---|
28 | EXAMPLE: example spectrum; shows examples |
---|
29 | " |
---|
30 | { |
---|
31 | if(size(#)==0) |
---|
32 | { return(system("spectrum",f)); } |
---|
33 | return (system("spectrum",f,#[1])); |
---|
34 | } |
---|
35 | example |
---|
36 | { "EXAMPLE:"; echo = 2; |
---|
37 | ring r=0,(x,y),ds; |
---|
38 | poly f=x^31+x^6*y^7+x^2*y^12+x^13*y^2+y^29; |
---|
39 | spectrum(f); |
---|
40 | } |
---|
41 | /////////////////////////////////////////////////////////////////////////////// |
---|
42 | |
---|
43 | proc semic (list s, list ss, list #) |
---|
44 | "USAGE: semic(s,ss[,i]); s, ss spectra, i int |
---|
45 | tests if ss is semicontinous for s using half open intervalls |
---|
46 | (and open intervalls for a 3rd paramater 1) |
---|
47 | RETURN: int |
---|
48 | EXAMPLE: example semic; shows examples |
---|
49 | " |
---|
50 | { |
---|
51 | if(size(#)==0) |
---|
52 | { return(system("semic",s,ss)); } |
---|
53 | return (system("semic",s,ss,#[1])); |
---|
54 | } |
---|
55 | example |
---|
56 | { "EXAMPLE:"; echo = 2; |
---|
57 | } |
---|
58 | /////////////////////////////////////////////////////////////////////////////// |
---|
59 | proc semicsqh (list s, list ss) |
---|
60 | "USAGE: semicsqh(s,ss); s, ss spectra, i int |
---|
61 | tests if ss is semicontinous for s using open and half open intervalls |
---|
62 | RETURN: int |
---|
63 | EXAMPLE: example semicsqh; shows examples |
---|
64 | " |
---|
65 | { |
---|
66 | return (system("semic",s,ss,1)); |
---|
67 | } |
---|
68 | example |
---|
69 | { "EXAMPLE:"; echo = 2; |
---|
70 | } |
---|
71 | /////////////////////////////////////////////////////////////////////////////// |
---|
72 | proc spadd (list s1, list s2) |
---|
73 | "USAGE: spadd(s1,s2); s1, s2 spectra |
---|
74 | sum of two spectra s1 and s2 |
---|
75 | RETURN: list |
---|
76 | EXAMPLE: example spadd; shows examples |
---|
77 | " |
---|
78 | { |
---|
79 | return (system("spadd",s1,s2)); |
---|
80 | } |
---|
81 | example |
---|
82 | { "EXAMPLE:"; echo = 2; |
---|
83 | } |
---|
84 | /////////////////////////////////////////////////////////////////////////////// |
---|
85 | proc spmul (list s, int k) |
---|
86 | "USAGE: spmul(s,k); s spectrum, k int |
---|
87 | multiplies the spectrum s with the int k |
---|
88 | RETURN: list |
---|
89 | EXAMPLE: example spmul; shows examples |
---|
90 | " |
---|
91 | { |
---|
92 | return (system("spmul",s,k)); |
---|
93 | } |
---|
94 | example |
---|
95 | { "EXAMPLE:"; echo = 2; |
---|
96 | } |
---|
97 | /////////////////////////////////////////////////////////////////////////////// |
---|