I was checking the new polytope commands
specifically a polytope in R^2   with points (a,b,c,d,e,f) such that

e+b>= c+d
e+c >= b+d
a+b+c+d+e+f =  31
(this is a polytope I had worked on before so I know it very well)

After several tries (documentation still sparse and incomplete) I
managed to cosntruct it.
Checked vertices:

P.vertices()
[[0, 0, 0, 0, 0, 31], [31, 0, 0, 0, 0, 0], [0, 0, 0, 31/2, 31/2, 0],
[0,
0, 31/2, 0, 31/2, 0], [0, 0, 0, 0, 31, 0], [0, 31/2, 0, 0, 31/2, 0],
[0,
31/2, 31/2, 0, 0, 0]]

That's right, 7 vertices, the right ones (again this is a polytope I
knew before)

P.ambiend_dim()
6

P.dim()
6

!!!!!
======================================
The ambient dimension is indeed 6 (we're after all in R^6) but the
polytope has dimension 5 for it's contained in the a+b+c+d+e+f=31
hyperplane (and thus its dimension is 1 less than ambient) Notice all
vertices have coordinates adding 31, therefore it's indeed contained
in the hyperplane
Polymake verified this as well saying dimension is 5


Now I don't know how or where to submit a bug, but I suppose people
involved with development here know
so the least I can do is  comment there's a bug so it's known and
forwarded (and then stop doing polytope computations in sagemath for a
bit longer)
========================================


By the way, on the "Polyhedron" documentation ?<tab>  ieqs stands for
inequalities or equalities?

For the record, here's how I constructed the polytope

DATA=[[0, 1, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0,
0],
[0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1],
[0,
0, 1, -1, -1, 1, 0], [0, 0, -1, 1, -1, 1, 0], [-31, 1, 1, 1, 1, 1, 1],
[31, 1, 1, 1, 1, 1, 1]]

notice the "double" equation a+b+c+d+e+f >= 31 and a+b+c+d+e+f >=
-31   (equivalent to the equality a+b+c+d+e+f=31 )

P=Polyhedron(ieqs=DATA)

P.ieqs()
[[0, 1, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0], [-31, 1, 1, 1, 1, 1,
1],
[0, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0], [0, 0, 1, -1, -1, 1, 0],
[0, 0, -1, 1, -1, 1, 0], [0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1]]

P.vertices()
[[0, 0, 0, 0, 0, 31], [31, 0, 0, 0, 0, 0], [0, 0, 0, 31/2, 31/2, 0],
[0,
0, 31/2, 0, 31/2, 0], [0, 0, 0, 0, 31, 0], [0, 31/2, 0, 0, 31/2, 0],
[0,
31/2, 31/2, 0, 0, 0]]


Notice that "ieqs" dropped one of the lines with 31 (so I suppose
"ieqs" means equalities  after all but that's incosistent with the
minus sign, isn't it?)
Changing DATA to use only one of those lines has no effect, same
vertices, dimension still is wrongly reported as 6
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to