i1 : G = {{1,2},{2,3},{3,4},{4,1}}; -- a four-cycle
|
i2 : AG = graphic G
o2 = {- x + x , - x + x , - x + x , x - x }
1 2 2 3 3 4 1 4
o2 : Hyperplane Arrangement
|
i3 : describe AG
o3 = {- x + x , - x + x , - x + x , x - x }
1 2 2 3 3 4 1 4
|
i4 : rank AG -- the number of vertices minus number of components o4 = 3 |
i5 : ring AG
o5 = QQ[x ..x ]
1 4
o5 : PolynomialRing
|
i6 : ring graphic(G,ZZ[x,y,z,w]) o6 = ZZ[x..z, w] o6 : PolynomialRing |
The object graphic is a method function.