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