# Changes between Initial Version and Version 1 of Ticket #24837

Ignore:
Timestamp:
02/28/18 10:49:45 (4 years ago)
Comment:

Once the tutorial is merged in #22572, we should change the "tips" page accordingly...

New commits:

 ​7cf1a56 first version

### Legend:

Unmodified
• Property Status changed from new to needs_review
• Property Authors changed from to Jean-Philippe Labbé
• Property Dependencies changed from to #22572
• Property Branch changed from to u/jipilab/24837
• Property Commit changed from to 7cf1a562e411bb1307b906c173d04f177d66fc0f
 initial {{{ sage: Cube = polytopes.cube() sage: TCube = Cube.truncation() sage: Nice_repr = TCube.repr_pretty_Hrepresentation(separator='\n') sage: print(Nice_repr) 1 >= x0 1 >= x1 3*x1 + 7 >= 3*x0 + 3*x2 x0 + 1 >= 0 x1 + 1 >= 0 3*x0 + 7 >= 3*x1 + 3*x2 3*x0 + 3*x1 + 7 >= 3*x2 3*x0 + 3*x2 + 7 >= 3*x1 3*x0 + 3*x1 + 3*x2 + 7 >= 0 x2 + 1 >= 0 1 >= x2 3*x1 + 3*x2 + 7 >= 3*x0 3*x2 + 7 >= 3*x0 + 3*x1 7 >= 3*x0 + 3*x1 + 3*x2 sage: print(Nice_repr) 1 >= x0 1 >= x1 3*x1 + 7 >= 3*x0 + 3*x2 x0 + 1 >= 0 x1 + 1 >= 0 3*x0 + 7 >= 3*x1 + 3*x2 3*x0 + 3*x1 + 7 >= 3*x2 3*x0 + 3*x2 + 7 >= 3*x1 3*x0 + 3*x1 + 3*x2 + 7 >= 0 x2 + 1 >= 0 1 >= x2 3*x1 + 3*x2 + 7 >= 3*x0 3*x2 + 7 >= 3*x0 + 3*x1 7 >= 3*x0 + 3*x1 + 3*x2 }}} In the new version it gives: {{{ sage: print(TCube.Hrepresentation_str()) -x0 >= -1 -x1 >= -1 -3*x0 + 3*x1 - 3*x2 >= -7 x0 >= -1 x1 >= -1 3*x0 - 3*x1 - 3*x2 >= -7 3*x0 + 3*x1 - 3*x2 >= -7 3*x0 - 3*x1 + 3*x2 >= -7 3*x0 + 3*x1 + 3*x2 >= -7 x2 >= -1 -x2 >= -1 -3*x0 + 3*x1 + 3*x2 >= -7 -3*x0 - 3*x1 + 3*x2 >= -7 -3*x0 - 3*x1 - 3*x2 >= -7 sage: print(TCube.Hrepresentation_str(latex=True)) \begin{array}{rcl} -x_{0} & \geq & -1 \\ -x_{1} & \geq & -1 \\ -3 \, x_{0} + 3 \, x_{1} - 3 \, x_{2} & \geq & -7 \\ x_{0} & \geq & -1 \\ x_{1} & \geq & -1 \\ 3 \, x_{0} - 3 \, x_{1} - 3 \, x_{2} & \geq & -7 \\ 3 \, x_{0} + 3 \, x_{1} - 3 \, x_{2} & \geq & -7 \\ 3 \, x_{0} - 3 \, x_{1} + 3 \, x_{2} & \geq & -7 \\ 3 \, x_{0} + 3 \, x_{1} + 3 \, x_{2} & \geq & -7 \\ x_{2} & \geq & -1 \\ -x_{2} & \geq & -1 \\ -3 \, x_{0} + 3 \, x_{1} + 3 \, x_{2} & \geq & -7 \\ -3 \, x_{0} - 3 \, x_{1} + 3 \, x_{2} & \geq & -7 \\ -3 \, x_{0} - 3 \, x_{1} - 3 \, x_{2} & \geq & -7 \end{array} }}} The style parameter allows to change the way to print the H-relations: {{{ sage: P = polytopes.permutahedron(3) sage: print(P.Hrepresentation_str(style='<=')) -x0 - x1 - x2 == -6 x1 + x2 <=  5 x2 <=  3 x1 <=  3 -x1 <= -1 -x1 - x2 <= -3 -x2 <= -1 }}} In order to make the function more apparent, deprecation of the current function is perhaps a good idea and change the name to Hrepresentation_str.