# isCartier -- whether a Weil divisor is Cartier

## Synopsis

• Usage:
isCartier( D )
• Inputs:
• Optional inputs:
• IsGraded => , default value false, set to true to assume that we are doing this check on a projective variety
• Outputs:

## Description

Check if a Weil divisor is Cartier. For example, the following divisor is not Cartier

 i1 : R = QQ[x, y, u, v] / ideal(x * y - u * v); i2 : D = divisor({2, -3}, {ideal(x, u), ideal(y, v)}) o2 = 2*Div(x, u) + -3*Div(y, v) o2 : WeilDivisor on R i3 : isCartier( D ) o3 = false

Neither is this divisor.

 i4 : R = QQ[x, y, z] / ideal(x * y - z^2 ); i5 : D = divisor({1, 2}, {ideal(x, z), ideal(y, z)}) o5 = 2*Div(y, z) + Div(x, z) o5 : WeilDivisor on R i6 : isCartier( D ) o6 = false

Of course the next divisor is Cartier.

 i7 : R = QQ[x, y, z]; i8 : D = divisor({1, 2}, {ideal(x), ideal(y)}) o8 = Div(x) + 2*Div(y) o8 : WeilDivisor on R i9 : isCartier( D ) o9 = true

If the option IsGraded is set to true (it is false by default), this will check as if D is a divisor on the $Proj$ of the ambient graded ring.

 i10 : R = QQ[x, y, u, v] / ideal(x * y - u * v); i11 : D = divisor({2, -3}, {ideal(x, u), ideal(y, v)}) o11 = 2*Div(x, u) + -3*Div(y, v) o11 : WeilDivisor on R i12 : isCartier(D, IsGraded => true) o12 = true
 i13 : R = QQ[x, y, z] / ideal(x * y - z^2); i14 : D = divisor({1, 2}, {ideal(x, z), ideal(y, z)}) o14 = 2*Div(y, z) + Div(x, z) o14 : WeilDivisor on R i15 : isCartier(D, IsGraded => true) o15 = true

The output value of this function is stored in the divisor's cache with the value of the last IsGraded option. If you change the IsGraded option, the value will be recomputed.