Compute the ramification divisor corresponding the finite inclusion of normal domains. If you pass it a non-finite map, it will compute the divisorial part of the locus where the map is not smooth. If IsGraded is set to false (the default value), then the coefficient ring of both the source and target of f must be equal. If the IsGraded is set to true, then the function will assume that the source of f is affine, and the target is projective over the source. In this case, the coefficient ring of the target must be equal to the source ring. This can be useful when computing things like relative canonical divisors over regular bases (it may not give the expected answer over non-regular bases).
i1 : R = QQ[x]; |
i2 : S = QQ[y]; |
i3 : f = map(S, R, {y^3}); o3 : RingMap S <--- R |
i4 : ramificationDivisor(f) o4 = 2*Div(y) of S o4 : WDiv |
The next example is a Veronese which is etale in codimension 1.
i5 : R = QQ[x,y]; |
i6 : T = QQ[a,b,c,d]; |
i7 : h = map(R, T, {x^3, x^2*y, x*y^2, y^3}); o7 : RingMap R <--- T |
i8 : S = T/ker h; |
i9 : f = map(R, S, {x^3, x^2*y, x*y^2, y^3}); o9 : RingMap R <--- S |
i10 : ramificationDivisor(f) o10 = 0, the zero divisor of R o10 : WDiv |
Here is an example with wild ramification.
i11 : R = ZZ/2[t]; |
i12 : S = ZZ/2[x]; |
i13 : f = map(S, R, {x^2*(1+x)}); o13 : RingMap S <--- R |
i14 : ramificationDivisor(f) o14 = 2*Div(x) of S o14 : WDiv |
Next we demonstrate how to compute the relative canonical divisor of a blowup over a smooth base.
i15 : R = QQ[x,y]; |
i16 : S = reesAlgebra(ideal(x,y^2)); |
i17 : f = map(S, R); o17 : RingMap S <--- R |
i18 : ramificationDivisor(f,IsGraded=>true) o18 = 2*Div(y, x) of S o18 : WDiv |