# expression(ToricDivisor) -- get the expression used to format for printing

## Synopsis

• Function: expression
• Usage:
expression D
• Inputs:
• D,
• Outputs:
• , used to format D for printing

## Description

This method is the primary function called upon by << to format for printing. It assumes that D is well-defined.

When the underlying normal toric variety has not been assigned a global variable, the $i$-th irreducible torus-invariant Weil divisor is displayed as $D_i$. However, if the underlying normal toric variety has been assigned a global variable $X$, the $i$-th irreducible torus-invariant Weil divisor is displayed as $X_i$. In either case, an arbitrary torus-invariant Weil divisor is displayed as an integral linear combination of these expressions.

 i1 : toricDivisor({2,-7,3}, toricProjectiveSpace 2) o1 = 2*D - 7*D + 3*D 0 1 2 o1 : ToricDivisor on normalToricVariety ({{-1, -1}, {1, 0}, {0, 1}}, {{0, 1}, {0, 2}, {1, 2}})
 i2 : toricDivisor convexHull (id_(ZZ^3) | - id_(ZZ^3)) o2 = D + D + D + D + D + D + D + D 0 1 2 3 4 5 6 7 o2 : ToricDivisor on normalToricVariety ({{1, 1, 1}, {-1, 1, 1}, {1, -1, 1}, {-1, -1, 1}, {1, 1, -1}, {-1, 1, -1}, {1, -1, -1}, {-1, -1, -1}}, {{0, 1, 2, 3}, {0, 1, 4, 5}, {0, 2, 4, 6}, {1, 3, 5, 7}, {2, 3, 6, 7}, {4, 5, 6, 7}})
 i3 : PP2 = toricProjectiveSpace 2; i4 : D1 = toricDivisor({2,-7,3}, PP2) o4 = 2*PP2 - 7*PP2 + 3*PP2 0 1 2 o4 : ToricDivisor on PP2 i5 : D2 = 2 * PP2_0 - 7 * PP2_1 + 3 * PP2_2 o5 = 2*PP2 - 7*PP2 + 3*PP2 0 1 2 o5 : ToricDivisor on PP2 i6 : assert(D1 == D1)