fieker-DuValspielwiese
Last change
on this file since e1552a was
37cd955,
checked in by Hans Schoenemann <hannes@…>, 14 years ago
|
pagelength removed
git-svn-id: file:///usr/local/Singular/svn/trunk@13172 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | ring r= 32003,(x,y,z),lp; |
---|
2 | |
---|
3 | proc printid |
---|
4 | { |
---|
5 | int @usage = size(#) != 2; |
---|
6 | if (@usage == 0) |
---|
7 | { |
---|
8 | @usage = typeof(#[1]) != "ideal"; |
---|
9 | if (@usage) |
---|
10 | { |
---|
11 | typeof(#[1]), " not allowed for printid"; |
---|
12 | } |
---|
13 | } |
---|
14 | if (@usage) { |
---|
15 | "usage : printid(ideal,prefix)",newline, |
---|
16 | " prints nonzero elements, w/ or w/o pref"; |
---|
17 | return(); |
---|
18 | } |
---|
19 | |
---|
20 | #[2], size(#[1]); |
---|
21 | int @i; |
---|
22 | for (@i=1; @i<=size(#[1]); @i=@i+1) |
---|
23 | { |
---|
24 | if (#[2] != "") |
---|
25 | { |
---|
26 | #[2] , "(", @i, ") ", #[1][@i]; |
---|
27 | } |
---|
28 | if (#[2] == "") |
---|
29 | { |
---|
30 | #[1][@i]; |
---|
31 | } |
---|
32 | } |
---|
33 | } |
---|
34 | |
---|
35 | poly px = x; |
---|
36 | px; |
---|
37 | poly p1 = 1x2; |
---|
38 | p1; |
---|
39 | |
---|
40 | poly p2 = 3x2yz5; |
---|
41 | p2; |
---|
42 | |
---|
43 | poly p3 = 3 * 1x2yz5; |
---|
44 | p3; |
---|
45 | |
---|
46 | poly p4 = (2x2yz5)^2; |
---|
47 | p4; |
---|
48 | |
---|
49 | poly p5 = (2x2yz5)^2 - 1x; |
---|
50 | p5; |
---|
51 | |
---|
52 | poly p6 = (2x2yz5)^2 - p3; |
---|
53 | p6; |
---|
54 | |
---|
55 | poly p6 = x; |
---|
56 | p6; |
---|
57 | kill p6; |
---|
58 | poly p6 = x; |
---|
59 | p6; |
---|
60 | |
---|
61 | 1a 2x; |
---|
62 | 1y 2x; |
---|
63 | y 2x; |
---|
64 | 1y2x; |
---|
65 | |
---|
66 | "p1", p1; |
---|
67 | "p2", p2; |
---|
68 | "p3", p3; |
---|
69 | "p4", p4; |
---|
70 | matrix m[2][2] = p1,p2,p3,p4; |
---|
71 | m; |
---|
72 | kill m; |
---|
73 | matrix m[2][2] = p1,p2,p3,p4; |
---|
74 | m; |
---|
75 | m[1,2]; |
---|
76 | "-------------------------------------"; |
---|
77 | ideal id = m, xy3; |
---|
78 | id; |
---|
79 | |
---|
80 | ideal sid = std(id); |
---|
81 | sid; |
---|
82 | |
---|
83 | sid[3]+0 == 0; |
---|
84 | sid; |
---|
85 | "....................."; |
---|
86 | sid[2] == 1x4y2z10; |
---|
87 | sid[2] == x2; |
---|
88 | sid; |
---|
89 | sid[2] = x2z; |
---|
90 | sid; |
---|
91 | "-------------------"; |
---|
92 | printid("?"); |
---|
93 | printid(sid,"; "); |
---|
94 | sid; |
---|
95 | printid(sid,""); |
---|
96 | sid; |
---|
97 | printid(m,""); |
---|
98 | listvar(all); |
---|
99 | // lamm@mathematik.uni-kl.de (0.9.2e): |
---|
100 | poly null; |
---|
101 | ord(null); |
---|
102 | "-------------------"; |
---|
103 | ring R = 0,x,dp; |
---|
104 | poly f = (x+3)*(x+2); |
---|
105 | poly q = (x+2)^2; |
---|
106 | poly h = 20x + 40; |
---|
107 | (f*q)/h; |
---|
108 | LIB "tst.lib";tst_status(1);$; |
---|
Note: See
TracBrowser
for help on using the repository browser.