Get an ideal associated to $O(-D)$ of a Weil Divisor $D$. Recall that on an affine scheme, $O(-D)$ is by definition the subset of the fraction field made up of elements such that $Div(f) - D \geq 0$. If $D$ is effective, this will produce the ideal corresponding to $O(-D)$. Otherwise, it will produce some ideal isomorphic to a module corresponding to $O(-D)$.
i1 : R = QQ[x, y, u, v] / ideal(x * y - u * v); |
i2 : D1 = divisor({1, -2, 3, -4}, {ideal(x, u), ideal(x, v), ideal(y, u), ideal(y, v)}) o2 = -4*Div(y, v) + Div(x, u) + -2*Div(x, v) + 3*Div(y, u) o2 : WeilDivisor on R |
i3 : ideal( D1 ) 4 2 3 2 2 2 2 4 2 4 o3 = ideal (u v , y*u v , y u v , x*u v, x u ) o3 : Ideal of R |
i4 : D2 = divisor(ideal(x,u)) o4 = Div(x, u) o4 : WeilDivisor on R |
i5 : ideal(D2) o5 = ideal (u, x) o5 : Ideal of R |
Note, if the divisor has non-integer coefficients, their ceilings will be taken, since $O(-D) = O(floor(-D)) = O(-ceiling(D))$.
i6 : R = QQ[x,y,z]/(ideal(x^3 + y^3 - z^3)); |
i7 : D1 = 1.3*divisor(ideal(x, y-z)) o7 = 1.3*Div(x, y-z) o7 : RWeilDivisor on R |
i8 : ideal D1 2 o8 = ideal (y - z, x ) o8 : Ideal of R |
i9 : I1 = ideal (ceiling(D1)) 2 o9 = ideal (y - z, x ) o9 : Ideal of R |
i10 : I2 = ideal (-ceiling(D1)) 2 2 2 o10 = ideal (y + y*z + z , x ) o10 : Ideal of R |
i11 : reflexify(I1*I2) 2 o11 = ideal x o11 : Ideal of R |
The output value of this function is stored in the divisor's cache.