On Wednesday, February 27, 2019 at 2:52:36 PM UTC+1, Daniel Krenn wrote:

> > I suppose in non-full-dimensional case you still can use 
> > P.inequalities() as above, 
> > projecting them on the affine hull of P. 
>
> Yes, this is the interesting case. The problem then is going back from 
> the projection. I guess that orthogonality is ususally destroyed here... 
>

You should use Gram-Smidth on the normal vectors of the equations in the 
linearity space and the inequality defining the facet right?

sage: P = Polyhedron([[4,1,5,6],[2,3,1,4],[3,3,3,3]])
sage: P.equations()
(An equation (0, 4, 1, 2) x - 21 == 0, An equation (2, 0, -1, 0) x - 3 == 0)
sage: f = P.faces(1)[0]
sage: f
<0,1>
sage: f.ambient_Hrepresentation()
(An equation (0, 4, 1, 2) x - 21 == 0,
 An equation (2, 0, -1, 0) x - 3 == 0,
 An inequality (0, 0, 1, 2) x - 9 >= 0)
sage: # Not sure if the Hrepresentation of f is always the linearity space 
+ inequality, check the code, the following is just to be on the safe side
sage: M = matrix([ec.vector()[1:] for ec in P.equations() ] + [inec[1:] for 
inec in f.ambient_Hrepresen
....: tation() if inec.is_inequality()])
sage: M
[ 0  4  1  2]
[ 2  0 -1  0]
[ 0  0  1  2]
sage: v = M.gram_schmidt()[0].row(-1); v
(4/13, -12/13, 8/13, 20/13)
sage: #This should be the inner normal vector of the facet in the linearity 
space
sage: f.vertices()
(A vertex at (2, 3, 1, 4), A vertex at (3, 3, 3, 3)
sage: a = vector([2,3,1,4])
sage: b = vector([3,3,3,3])
sage: c = (a+b)/2
sage: c in P
True
sage: c + 1/100*v in P
True
sage: P.relative_interior_contains(c)
False
sage: P.relative_interior_contains(c+1/100*v)
True

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to