Returns true if and only if the divisor D is the divisor of zeros and poles of some rational function. A rational function which performs that role will also be returned. Recall that any two such functions differ only by a scalar factor.
Returns true if and only if the difference D1 - D2 of the two divisor arguments is a principal divisor. In that case return also the rational function giving this equivalence.
For an effective hypersurface divisor D on an ordinary projective curve C, returns true if and only if D is the scheme theoretic intersection of C with a hypersurface H of the ambient projective space. If so, also returns an equation for H and the degree of H.
> P<x,y,z> := ProjectiveSpace(Rationals(),2); > C := Curve(P,x^3*y+y^3*z+z^3*x); > D0 := CanonicalDivisor(C); > f := Basis(D0)[1]; > D := D0+PrincipalDivisor(f); > IsEffective(D); true > IsHypersurfaceDivisor(D); true -2/9*x 1
The divisor class group, or simply class group of a curve is the group of divisors modulo principal divisors. If C is a curve defined over a finite field, then this function returns an abelian group isomorphic to its divisor class group, a map of representatives from the class group to the divisor group and the homomorphism from the divisor group onto the class group. The second map has an inverse, so translation between the group and the divisors can be achieved using only this map.
The order of the class group of the curve C.
The group of global units of the function field of the curve C, that is the multiplicative group of the field of geometric irreducibility of C as an abelian group together with the map into the function field of C.
> A<x,y> := AffineSpace(GF(2,5),2); > C := Curve(A,x^7 + x^4*y^3 + x*y^2 + y); > Genus(C); 3 > Cl, _, phi := ClassGroup(C); > Cl; Abelian Group isomorphic to Z/26425 + Z Defined on 2 generators Relations: 26425*Cl.1 = 0We can use the map φ to pull elements of the abelian group back to the divisor group. For curves over finite fields, this is one way of constructing interesting divisors.
> Div := DivisorGroup(C); > Div eq Domain(phi); true > D := Cl.1 @@ phi; > D; Divisor of Curve over GF(2^5) defined by x^7 + x^4*y^3 + x*y^2 + yThe unpleasant printing with the dollar signs is happening because no names have yet been assigned to the projective closure of C. Notice that the printing is rather uninformative. This is because a factorization of d is not yet known and could be an extremely expensive computation.
> Decomposition(D); [ <Place at (0 : 0 : 1), -3>, <Place at ($.1 : $.1^10*$.1^2 + $.1^26*$.1 + $.1^22 : 1), 1> ] > Degree(D); 0The degree function simply returns the sum of the integer valuations in the factorization. Those valuations can be seen as the second entry of each tuple in the support.
The abelian invariants of the curve C.
The p-rank of the class group of C.
The Hasse--Witt invariant of the curve C.
If D is a divisor on C then colloquially speaking the Riemann--Roch space L(D) is the finite dimensional vector subspace of the function field of C consisting of functions with poles no worse that D (and at least as many zeros as the negative part of D if D is not effective). To be precise, we say that
L(D) = { f ∈k(C) | (div)(f) + D ≥0 }
where (div)(f) is the principal divisor of zeros and poles of f and the condition ≥0 is simply shorthand to mean that the left-hand side is an effective divisor.
For any divisor on a projective curve defined over a field this vector space is finite dimensional. Its dimension ell(D) appears in the Riemann--Roch formula
ell(D) - ell(KC - D) = deg(D) + 1 - g
where KC is the canonical divisor and g is the genus of C.
The space of effective divisors linearly equivalent to D, the complete linear system of D, is the projectivisation of the Riemann--Roch space L(D). This can be used to create a map from the curve C to a projective space of dimension ell(D) - 1.
Let D be a divisor. Denote the result of both functions by tilde(D), r, A and a (for the second function the input A always equals the output A). The divisor A has (must have) positive degree and the following holds:
- (i)
- D = tilde(D) + rA - (a),
- (ii)
- tilde(D) ≥0 and deg(tilde(D)) < g + deg(A) (over the field of geometric irreducibility),
- (iii)
- tilde(D) has minimal degree among all such divisors satisfying (i), (ii).
A vector space V and an isomorphism from V to the Riemann--Roch space of D in the function field of the curve on which the divisor D lies.
A sequence containing a basis of the Riemann-Roch space L(D) of the divisor D.
A sequence containing a basis of the Riemann-Roch space L(D) of the divisor D in short form.
The dimension ell(d) of the Riemann-Roch space of the divisor D.
Returns a vector space V and a map from V to the space of differentials of the curve C containing the divisor D with image the differentials of ωC(D). Colloquially, this means the differentials whose zeros are at least the positive (or effective) part of D and whose poles are no worse than the negative part of D.
A basis of the space of differentials of the divisor D.
The index of speciality of the divisor D, that is the dimension ell(KC - D) appearing in the Riemann--Roch formula.
Returns true if and only if the divisor D is special.
The gap numbers of the divisor D, at the place p if included.
The gap numbers of the nonsingular point p.
A sequence containing the Weierstrass places (or underlying points) of the divisor D.
The Wronskian orders of the divisor D.
The ramification divisor of the divisor D.
A map from the curve of the divisor D to the projective space P (which will be created in the background if not given as an argument). The dimension of P must be ell(D) - 1.
The canonical map from the curve C to the projective space P (which will be created in the background if not given as an argument). This is the map determined by (a basis of the) Riemann--Roch space of the canonical divisor KC. In particular, the dimension of P must be ell(KC) - 1 = g - 1.
These functions compute the canonical image of a projective curve C of genus at least 2 much more efficiently than the generic image machinery applied to the canonical map. In the first function, the second argument should be the canonical map and in the alternative it should be a sequence of polynomials defining the canonical map.A second return value is a boolean which is true if and only if the image is a rational curve or equivalently if and only if C is a hyperelliptic curve. Note that these functions may also be used for computing the rational normal curve image of a genus 0 curve C under the map given by any (non-trivial) complete linear system.
> P2<X,Y,Z> := ProjectiveSpace(Rationals(),2); > C := Curve(P2,X^7 + X^3*Y^2*Z^2 + Z^7); > Genus(C); 3If C is not hyperelliptic then its canonical map will embed it as a nonsingular quartic curve in the projective plane. We make the canonical map. We even include the plane P2 that we have already created as an argument so that it will be set as the codomain of the map.
> phi := CanonicalMap(C,P2); > phi; Mapping from: Prj: P2 to Prj: P2 with equations : X^2 X*Z Z^2 > phi(C); Curve over Rational Field defined by -X*Z + Y^2That curve is certainly not a plane quartic. Indeed, it is evidently a rational curve, so C must have been hyperelliptic.
> D := phi(C); > Genus(D); 0The bicanonical map will embed C since its genus is strictly bigger than 2.
> D := 2 * CanonicalDivisor(C); > phi2 := DivisorMap(D); > Dimension(Codomain(phi2)); 5 > P5<a,b,c,d,e,f> := Codomain(phi2); > phi2(C); Scheme over Rational Field defined by a^2 + b^2 + e*f -b*d + c^2 -b*e + c*d -b*f + d^2 -b*f + c*e -c*f + d*e -d*f + e^2 > Dimension(phi2(C)); 1 > IsNonsingular(phi2(C)); trueIf you are familiar with the equations of rational normal curves, you will recognise this as a quadric section of a standard scroll---the cone on the rational normal curve of degree 4---which misses the vertex of the cone. This is exactly what gives the curve its hyperelliptic structure. One could go on to make a ruled surface with a map to P5 with this scroll as its image and pull back the curve to the ruled surface on which the ruling cuts out the degree 2 linear system of the hyperelliptic curve. This is carried out for a particular trigonal curve later in Section Trigonal Curves.
Magma contains functionality to compute discrete logarithms in the degree 0 divisor class group of plane curves over finite fields. The algorithm used for this is Diem's version of index calculus [Die06], which looks for relations by considering lines through the points of the factor base. In order to use this algorithm, the group order must be know and given as input.
As is always the case with index calculus, the algorithm consists of two main stages: the sieving stage, during which relations are obtained and stored in a matrix, and the linear algebra stage, during which a non-trivial element of the kernel of this matrix is computed. It is possible to only do the sieving and compute the matrix. For this it is not necessary to know the group order. This can be used to obtain information on how fast sieving can be done. Generally, the linear algebra stage will be the bottle neck for larger examples.
The running time of the algorithm mainly depends on the degree of the curve. In [Die06] it is explained how one can obtain a model of a given curve with relatively low degree. This can greatly speed up the running time of the algorithm.
The algorithm will not work if the field is too small, as there will not be enough lines to produce relations in that case. One requires that at least q≥d! for a degree d curve over GF(q).
Elements in the degree 0 class group can be represented by divisors of degree 0. But we also allow divisors of non-zero degree D as input, together with a fixed divisor D0 of degree 1. This will be interpreted as representing the divisor class D - (deg)(D)D0. Note that once D0 is fixed, and D is effective of minimal degree, then D is uniquely determined by the divisor class. Starting out with an arbitrary divisor E, this unique D can be computed with the Reduction(E,D0) command.
Compute the discrete logarithm of D2 - (deg)(D2)D0 with base D1 - (deg)(D1)D0. The group order np must be given. Optionally, one can also give n as approximate size of the factor base to be used, and rr as the number of required relations.
Find the sparse matrix with relations found in the sieving stage. Input is the same as for IndexCalculus, except that the group order is not given. Outputs M, pos, fb, Da, Db, a, b, where M is the sparse relation matrix. Da and Db are divisors that split over the factor base, and Da - (deg)(Da)D0 and Db - (deg)(Db)D0 are linearly equivalent to a(D1 - (deg)(D1)D0) and b(D2 - (deg)(D2)D0), respectively. fb is a sequence of points that contains the support of Da, Db and D0. pos is a sequence of integers that indicates the position of the points of fb in the factor base. The last two rows of M correspond to the divisors Da - (deg)(Da)D0 and Db - (deg)(Db)D0.
Effective divisor E of minimal degree such that E - (deg)(E)D0 is equivalent to n(D - (deg(D))D0).
In this example we compute a discrete logarithm in the class group of a curve of degree 6. The curve is over GF(213), but it is a base change of a curve over GF(2)
> A2<x,y>:=AffinePlane(GF(2)); > C1:=ProjectiveClosure(Curve(A2,x^5*y + x*y^2 + y^6 + y + 1)); > L:=LPolynomial(C1); > Evaluate(L,1); 752 > K<z>:=CyclotomicField(13); > np:=Numerator(Norm(Evaluate(L,z))); > Factorisation(np); [ <1753104484044610457180695483606558837, 1> ]So the class group of C1 has order 752 over GF(2), and is has order 752np over GF(213), where np is a large prime. Now we create some divisors, and make sure that D2 - (deg)(D2)D0 is in the subgroup generated by D1 - (deg)(D1)D0.
> F13<u>:=GF(2^13); > C13:=ChangeRing(C1,F13); > D1:=Divisor(C13![u^4758,u^3]); > D2:=752*Divisor(C13![u^1325,u^6]); > D0:=Divisor(C13![u^2456,u^11]);In order to get an idea what is going on, we set the verbose flag, and we perform the discrete logarithm computation. In the end, we verify the result.
> SetVerbose("CurveIndexcal",1); > time dl:=IndexCalculus(D1,D2,D0,752*np); Try to find factor base of size 5087 Try to find 5138 relations. First input divisor already splits. Second input divisor already splits. First index calculus input: Divisor 1*Place at (u^4758 : u^3 : 1) Multiple of original input: 1 Second index calculus input: Divisor 752*Place at (u^1325 : u^6 : 1) Multiple of original input: 1 Sieving Number of relations found: 5138 Number of elements in factor base: 5089 Find element of kernel of matrix Found kernel element DLP mod 1753104484044610457180695483606558837: 12522086041061799120645274502697942 Time: 164.900 > MultiplyDivisor(dl,D1,D0) eq Reduction(D2,D0); true