-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathEliminationDemo.m2
More file actions
54 lines (41 loc) · 1.14 KB
/
EliminationDemo.m2
File metadata and controls
54 lines (41 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
-- Example from the documenation of eliminate
restart
R = QQ[x,a,b,c,d]
f = x^2+a*x+b
g = x^2+c*x+d
eliminate(x,ideal(f,g))
-- Regular representation of ZZ/2 with mappings
restart
R = QQ[x_1..x_2, y_1..y_2]
I1 = ideal(y_1 - x_1, y_2 - x_2)
I2 = ideal(y_1 - x_2, y_2 - x_1)
I=intersect(I1,I2)
R = ring I
S = QQ[x_1..x_2]
f= map(S, R, {x_1, x_2, 0 , 0})
L= flatten entries gens I
L / f
-- Regular representation of ZZ/2 with eliminate command
restart
R = QQ[x_1..x_2, y_1..y_2]
I1 = ideal(y_1 - x_1, y_2 - x_2)
I2 = ideal(y_1 - x_2, y_2 - x_1)
I=intersect(I1,I2)+ideal(y_1..y_2)
eliminate({y_1, y_2}, I)
-- Regular representation of ZZ/2 exterior algebra with mappings
R = QQ[x_1..x_2, y_1..y_2, SkewCommutative=>true]
I1 = ideal(y_1 - x_1, y_2 - x_2)
I2 = ideal(y_1 - x_2, y_2 - x_1)
I=intersect(I1,I2)
R = ring I
S = QQ[x_1..x_2, SkewCommutative=>true]
f= map(S, R, {x_1, x_2, 0 , 0})
L= flatten entries gens I
L / f
-- Regular representation of ZZ/2 with eliminate command
restart
R = QQ[x_1..x_2, y_1..y_2, SkewCommutative=>true]
I1 = ideal(y_1 - x_1, y_2 - x_2)
I2 = ideal(y_1 - x_2, y_2 - x_1)
I=intersect(I1,I2)+ideal(y_1..y_2)
eliminate({y_1, y_2}, I)