-- -*- M2-comint -*- hash: 1827402070270389622

i1 : C = coneFromVData matrix {{1,0,0},{1,1,0},{1,0,1},{1,1,1}}

o1 = C

o1 : Cone

i2 : rays C

o2 = | 0 0 1 |
     | 1 0 1 |
     | 0 1 1 |
     | 1 1 1 |

              4       3
o2 : Matrix ZZ  <-- ZZ

i3 : facets C

o3 = | 0 -1 0  1  |
     | 0 0  -1 1  |
     | 0 1  1  -1 |

              3       4
o3 : Matrix ZZ  <-- ZZ

i4 : (facets C) * (rays C)

o4 = | 0 1 0 |
     | 1 0 0 |
     | 0 0 1 |

              3       3
o4 : Matrix ZZ  <-- ZZ

i5 : (hyperplanes C) * (rays C)

o5 = 0

              1       3
o5 : Matrix ZZ  <-- ZZ

i6 : (facets C) * (linealitySpace C)

o6 = 0

              3
o6 : Matrix ZZ  <-- 0

i7 : P = hypercube(2,0,1)

o7 = P

o7 : Polyhedron

i8 : V = vertices P

o8 = | 0 1 0 1 |
     | 0 0 1 1 |

              2       4
o8 : Matrix QQ  <-- QQ

i9 : (A, b) = facets P

o9 = (| -1 0  |, | 0 |)
      | 1  0  |  | 1 |
      | 0  -1 |  | 0 |
      | 0  1  |  | 1 |

o9 : Sequence

i10 : A * V

o10 = | 0 -1 0  -1 |
      | 0 1  0  1  |
      | 0 0  -1 -1 |
      | 0 0  1  1  |

               4       4
o10 : Matrix QQ  <-- QQ

i11 : for i from 0 to numColumns V - 1 do (
            test := b - A*V_{i};
            << "Vertex " << i << " " << (flatten entries V_{i}) << ": " << all(flatten entries test, e -> e>= 0) << endl;
         )
Vertex 0 {0, 0}: true
Vertex 1 {1, 0}: true
Vertex 2 {0, 1}: true
Vertex 3 {1, 1}: true

i12 : P = convexHull(matrix{{1,0},{0,1},{2,2}}, matrix {{1},{1},{2}})

o12 = P

o12 : Polyhedron

i13 : vertices P

o13 = | 1 0 |
      | 0 1 |
      | 2 2 |

               3       2
o13 : Matrix QQ  <-- QQ

i14 : rays P

o14 = | 1 |
      | 1 |
      | 2 |

               3       1
o14 : Matrix QQ  <-- QQ

i15 : (A, b) = facets P

o15 = (| 2  0  -1 |, 0)
       | 0  2  -1 |
       | -2 -2 1  |

o15 : Sequence

i16 : A * (vertices P)

o16 = | 0  -2 |
      | -2 0  |
      | 0  0  |

               3       2
o16 : Matrix QQ  <-- QQ

i17 : A * (rays P)

o17 = | 0  |
      | 0  |
      | -2 |

               3       1
o17 : Matrix QQ  <-- QQ

i18 : (E, v) = hyperplanes P

o18 = (| 1 1 -1 |, | -1 |)

o18 : Sequence

i19 : E * (rays P)

o19 = 0

               1       1
o19 : Matrix QQ  <-- QQ

i20 : E * (vertices P)

o20 = | -1 -1 |

               1       2
o20 : Matrix QQ  <-- QQ

i21 : C == coneFromVData(rays C, linealitySpace C)

o21 = true

i22 : C == coneFromRays(rays C, linealitySpace C)

o22 = true

i23 : C == coneFromHData(facets C, hyperplanes C)

o23 = true

i24 : C == coneFromInequalities(facets C, hyperplanes C)

o24 = true

i25 : P == convexHull (vertices P, rays P, linealitySpace P)

o25 = true

i26 : F = facets P

o26 = (| 2  0  -1 |, 0)
       | 0  2  -1 |
       | -2 -2 1  |

o26 : Sequence

i27 : H = hyperplanes P

o27 = (| 1 1 -1 |, | -1 |)

o27 : Sequence

i28 : P == polyhedronFromHData(F#0, F#1, H#0, H#1)

o28 = true

i29 : P == polyhedronFromInequalities(F#0, F#1, H#0, H#1)

o29 = true

i30 : 
