|
D.15.18.2 afaces
Procedure from library gitfan.lib (see gitfan_lib).
- Usage:
- afaces(a [,L]); a: ideal, L: list of intvecs
- Purpose:
- Returns a list of all a-faces (considered as intvecs of 0 and 1, where the i-th entry is 1 if the cone has the i-th unit basis vector as a generator), if L is specified only the faces of the simplex listed in L are considered (e.g. representatives with respect to a group action).
- Return:
- a list of intvecs
Example:
| LIB "gitfan.lib";
ring R = 0,T(1..3),dp;
ideal a = T(1)+T(2)+T(3);
list F = afaces(a);
print(F);
==> [1]:
==> 0
==> [2]:
==> 1,2
==> [3]:
==> 1,3
==> [4]:
==> 2,3
==> [5]:
==> 1,2,3
print(size(F));
==> 5
// 2nd ex //
ring R2 = 0,T(1..3),dp;
ideal a2 = T(2)^2*T(3)^2+T(1)*T(3);
list F2 = afaces(a2);
print(F2);
==> [1]:
==> 0
==> [2]:
==> 1
==> [3]:
==> 2
==> [4]:
==> 1,2
==> [5]:
==> 3
==> [6]:
==> 1,2,3
print(size(F2));
==> 6
// 3rd ex //
ring R3 = 0,T(1..3),dp;
ideal a3 = 0;
list F3 = afaces(a3);
print(F3);
==> [1]:
==> 0
==> [2]:
==> 1
==> [3]:
==> 2
==> [4]:
==> 1,2
==> [5]:
==> 3
==> [6]:
==> 1,3
==> [7]:
==> 2,3
==> [8]:
==> 1,2,3
print(size(F3));
==> 8
// 4th ex //
ring R = 0,T(1..10),wp(1,1,1,1,1,1,1,1,1,1);
==> // ** redefining R (ring R = 0,T(1..10),wp(1,1,1,1,1,1,1,1,1,1);)
ideal J =
T(5)*T(10)-T(6)*T(9)+T(7)*T(8),
T(1)*T(9)-T(2)*T(7)+T(4)*T(5),
T(1)*T(8)-T(2)*T(6)+T(3)*T(5),
T(1)*T(10)-T(3)*T(7)+T(4)*T(6),
T(2)*T(10)-T(3)*T(9)+T(4)*T(8);
list F4 = afaces(J);
print(size(F4));
==> 172
|
|