This is PlaneCurveLinearSeries.info, produced by Macaulay2, version 1.26.06

PlaneCurveLinearSeries -- Linear series on the normalization of a plane curve
*****************************************************************************

Description
===========

This package implements procedures described in chapters 4, 5, and 14 of the
book "The Practice of Curves", by David Eisenbud and Joe Harris.

If C is a (possibly singular) irreducible plane curve, it is possible to
compute the complete linear series of a given divisor on the normalization C'
of C by computations using data from the plane curve together with the
conductor ideal $ann_C(C/C)$, which can be computed by Macaulay or supplied by
the user.

The main routine of the package is linearSeries. If D0'
and Dinf' are effective divisors on C' whose ideals, as schemes, are pulled
back from ideals D0 and Dinf of C, then

ell = linearSeries(D0,Dinf)

returns a one-row matrix ell whose entries span a linear series with fixed
point locus B on C' (including the conductor scheme) and form a basis of
|D0'-Dinf'|+B.

The routine projectiveImage, provides the image of the
map to projective space given by |D0-Dinf|.  There are special routines for the
most important case, see canonicalSeries, and
canonicalImage.

The functions addition, and negative, implement
the group law in the case of a curve of genus 1.

Author
======

  * David Eisenbud (see https://eisenbud.github.io/ ) <de@berkeley.edu>

Version
=======

This documentation describes version 1.0 of PlaneCurveLinearSeries, released
February 4, 2024.

Citation
========

If you have used this package in your research, please cite it as follows:

+-----------------------------------------------------------------------------+
|@misc{PlaneCurveLinearSeriesSource,                                          |
|  title = {{PlaneCurveLinearSeries: Linear series on the normalization of a  |
|  author = {David Eisenbud},                                                 |
|  howpublished = {A \emph{Macaulay2} package available at                    |
|    \url{https://github.com/Macaulay2/M2/tree/stable/M2/Macaulay2/packages}} |
|}                                                                            |
|-----------------------------------------------------------------------------|
|plane curve. Version~1.0}},                                                  |
+-----------------------------------------------------------------------------+

Exports
=======

  * Functions and commands
      * addition -- addition of smooth points on a curve of
        genus 1
      * canonicalImage -- canonical model of the
        normalization of a plane curve
      * canonicalSeries -- Canonical series of the
        normalization of a plane curve
      * fromCoordinates -- Compute the ideal of a point
        from its coordinates
      * geometricGenus -- Geometric genus of a
        (singular) plane curve
      * linearSeries -- compute a linear series
      * negative -- implements the inverse in the group law of
        a curve of genus 1
      * projectiveImage -- Projective image of the map
        defined by a divisor or matrix
      * toCoordinates -- coordinates of a point from its
        ideal
  * Methods
      * "addition(Ideal,Ideal,Ideal)" -- see addition, --
        addition of smooth points on a curve of genus 1
      * "addition(List,List,List,Ring)" -- see addition, --
        addition of smooth points on a curve of genus 1
      * "canonicalImage(Ideal)" -- see canonicalImage, --
        canonical model of the normalization of a plane curve
      * "canonicalImage(Ring)" -- see canonicalImage, --
        canonical model of the normalization of a plane curve
      * "canonicalSeries(Ideal)" -- see canonicalSeries,
        -- Canonical series of the normalization of a plane curve
      * "canonicalSeries(Ring)" -- see canonicalSeries,
        -- Canonical series of the normalization of a plane curve
      * "fromCoordinates(List,Ring)" -- see fromCoordinates,
        -- Compute the ideal of a point from its coordinates
      * "fromCoordinates(ZZ,ZZ,ZZ,Ring)" -- see fromCoordinates,
        -- Compute the ideal of a point from its coordinates
      * "geometricGenus(Ideal)" -- see geometricGenus, --
        Geometric genus of a (singular) plane curve
      * "geometricGenus(Ring)" -- see geometricGenus, --
        Geometric genus of a (singular) plane curve
      * "linearSeries(Ideal)" -- see linearSeries, --
        compute a linear series
      * "linearSeries(Ideal,Ideal)" -- see linearSeries, --
        compute a linear series
      * "linearSeries(List,List,Ring)" -- see linearSeries,
        -- compute a linear series
      * "linearSeries(List,Ring)" -- see linearSeries, --
        compute a linear series
      * "negative(Ideal,Ideal)" -- see negative, -- implements
        the inverse in the group law of a curve of genus 1
      * "negative(List,List,Ring)" -- see negative, --
        implements the inverse in the group law of a curve of genus 1
      * "projectiveImage(Ideal)" -- see projectiveImage,
        -- Projective image of the map defined by a divisor or matrix
      * "projectiveImage(Ideal,Ideal)" -- see projectiveImage,
        -- Projective image of the map defined by a divisor or
        matrix
      * "projectiveImage(List,List,Ring)" -- see projectiveImage,
        -- Projective image of the map defined by a divisor or
        matrix
      * "projectiveImage(List,Ring)" -- see projectiveImage,
        -- Projective image of the map defined by a divisor or
        matrix
      * "projectiveImage(Matrix)" -- see projectiveImage,
        -- Projective image of the map defined by a divisor or
        matrix
      * "toCoordinates(Ideal)" -- see toCoordinates, --
        coordinates of a point from its ideal
  * Symbols
      * Conductor -- Option to avoid computation
      * ShowBase -- Option for @TO linearSeries@

For the programmer
==================

The object PlaneCurveLinearSeries, is a package (Macaulay2Doc),
defined in PlaneCurveLinearSeries.m2.

-------------------------------------------------------------------------------

The source of this document is in PlaneCurveLinearSeries.m2:331:0.

addition -- addition of smooth points on a curve of genus 1
***********************************************************

  * Usage:
        L =  addition(o,p,q,C)
        I = addition(oC, pC, qC)
  * Inputs:
      * o, a list (Macaulay2Doc),
      * oC, an ideal (Macaulay2Doc),
      * p, a list (Macaulay2Doc),
      * pC, an ideal (Macaulay2Doc),
      * q, a list (Macaulay2Doc),
      * qC, an ideal (Macaulay2Doc),
      * C, a ring (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Conductor => ..., default value null
  * Outputs:
      * L, a list (Macaulay2Doc),
      * I, an ideal (Macaulay2Doc),

Description
===========

If E is an irreducible plane curve of degree 3 then the set of smooth points of
C is a principal homogeneous space under the group Pic_0 E of invertible
sheaves of degree 0. Thus if we choose a smooth point o the map p -> O_E(p-o)
identifies the set of smooth points with such invertible sheaves.

This script computes the sum of smooth points p,q with respect to the group law
in which o is the zero point, where the group operation makes p+q = r if, as
divisors, r is linearly equivalent to p+q-o. The functions addition,
and negative, based on  linearSeries,
allow us to implement the group law.

The points o,p,q may be represented either by their homogeneous coordinates or
by ideal in the ring E. The functions fromCoordinates,
and toCoordinates, pass between these two representations.

Here is an example with a smooth plane cubic:

+----------------------------------------------------------------------------+
|i1 : kk = QQ                                                                |
|                                                                            |
|o1 = QQ                                                                     |
|                                                                            |
|o1 : Ring                                                                   |
+----------------------------------------------------------------------------+
|i2 : S = kk[x,y,z]                                                          |
|                                                                            |
|o2 = S                                                                      |
|                                                                            |
|o2 : PolynomialRing                                                         |
+----------------------------------------------------------------------------+
|i3 : p = {0,1,0}; pS = fromCoordinates(p,S)                                 |
|                                                                            |
|o4 = ideal (x, z)                                                           |
|                                                                            |
|o4 : Ideal of S                                                             |
+----------------------------------------------------------------------------+
|i5 : q = {1,0,0}; qS = fromCoordinates(q,S)                                 |
|                                                                            |
|o6 = ideal (y, z)                                                           |
|                                                                            |
|o6 : Ideal of S                                                             |
+----------------------------------------------------------------------------+
|i7 : o = {1,1,1}; oS = fromCoordinates(o,S)                                 |
|                                                                            |
|o8 = ideal (- x + y, - x + z)                                               |
|                                                                            |
|o8 : Ideal of S                                                             |
+----------------------------------------------------------------------------+
|i9 : I = ideal random(3, intersect(oS, pS, qS))                             |
|                                                                            |
|            7 2    7   2   7 2    221        9 2    25   2   83   2   169 3 |
|o9 = ideal(--x y + -x*y  + -x z + ---x*y*z + -y z - --x*z  - --y*z  - ---z )|
|           10      3       4       18        4       4       18        20   |
|                                                                            |
|o9 : Ideal of S                                                             |
+----------------------------------------------------------------------------+
|i10 : E = S/I                                                               |
|                                                                            |
|o10 = E                                                                     |
|                                                                            |
|o10 : QuotientRing                                                          |
+----------------------------------------------------------------------------+
|i11 : r = addition(o,p,q, E)                                                |
|                                                                            |
|o11 = {191555, 4329, 47535}                                                 |
|                                                                            |
|o11 : List                                                                  |
+----------------------------------------------------------------------------+
|i12 : addition(o, negative(o, p, E), r, E)                                  |
|                                                                            |
|o12 = {1, 0, 0}                                                             |
|                                                                            |
|o12 : List                                                                  |
+----------------------------------------------------------------------------+

It is known that when one takes multiples of a point that is not torsion, the
"height" - roughly the number of digits in the coordinates - is doubled with
each iteration, that is, the number of digits doubles:

+-----------------------------------------------------------------------------+
|i13 : q' := o;                                                               |
+-----------------------------------------------------------------------------+
|i14 : netList ({q}| for i from 0 to 3 list(                                  |
|      q' = addition(o,p,q',E)))                                              |
|                                                                             |
|      +----------------------------------------------------------------------|
|o14 = |1                                                                     |
|      +----------------------------------------------------------------------|
|      |0                                                                     |
|      +----------------------------------------------------------------------|
|      |-244172949014                                                         |
|      +----------------------------------------------------------------------|
|      |743038860238271300560554174480195965                                  |
|      +----------------------------------------------------------------------|
|      |1512566789873890824991732376916576510480728646355562009966439865118340|
|      +----------------------------------------------------------------------|
|-----------------------------------------------------------------------------|
|---+------------------------------------------------------------------------+|
|   |0                                                                       ||
|---+------------------------------------------------------------------------+|
|   |1                                                                       ||
|---+------------------------------------------------------------------------+|
|   |-119281492253                                                           ||
|---+------------------------------------------------------------------------+|
|   |-44359978933187986313751046814340786                                    ||
|---+------------------------------------------------------------------------+|
|127|547650285039319875919824575406875499018143843555769670574753813526475575||
|---+------------------------------------------------------------------------+|
|-----------------------------------------------------------------------------|
|------------------------------------------------------------------------+    |
|0                                                                       |    |
|------------------------------------------------------------------------+    |
|0                                                                       |    |
|------------------------------------------------------------------------+    |
|24260165853                                                             |    |
|------------------------------------------------------------------------+    |
|33809126492894254824110834558213460                                     |    |
|------------------------------------------------------------------------+    |
|878754289542060547624947849749323102108797344640485268511766855091277695|    |
|------------------------------------------------------------------------+    |
+-----------------------------------------------------------------------------+
|i15 : kk = ZZ/7                                                              |
|                                                                             |
|o15 = kk                                                                     |
|                                                                             |
|o15 : QuotientRing                                                           |
+-----------------------------------------------------------------------------+

On the other hand, over a finite field, a curve has only finitely many points,
so any subgroup of the Jacobian is finite:

+-------------------------------------------------------------------+
|i16 : S = kk[x,y,z]                                                |
|                                                                   |
|o16 = S                                                            |
|                                                                   |
|o16 : PolynomialRing                                               |
+-------------------------------------------------------------------+
|i17 : p = {0,1,0}; pS = fromCoordinates(p,S)                       |
|                                                                   |
|o18 = ideal (x, z)                                                 |
|                                                                   |
|o18 : Ideal of S                                                   |
+-------------------------------------------------------------------+
|i19 : o = {1,1,1}; oS = fromCoordinates(o,S)                       |
|                                                                   |
|o20 = ideal (- x + y, - x + z)                                     |
|                                                                   |
|o20 : Ideal of S                                                   |
+-------------------------------------------------------------------+
|i21 : setRandomSeed 0                                              |
| -- setting random seed to 0                                       |
|                                                                   |
|o21 = 0                                                            |
+-------------------------------------------------------------------+
|i22 : I = ideal random(3, intersect(pS,oS))                        |
|                                                                   |
|              3       2     2              2        2      2     3 |
|o22 = ideal(3x  + 3x*y  - 2x z + 3x*y*z + y z - 2x*z  - y*z  + 2z )|
|                                                                   |
|o22 : Ideal of S                                                   |
+-------------------------------------------------------------------+
|i23 : E = S/I                                                      |
|                                                                   |
|o23 = E                                                            |
|                                                                   |
|o23 : QuotientRing                                                 |
+-------------------------------------------------------------------+
|i24 : geometricGenus E                                             |
|                                                                   |
|o24 = 1                                                            |
+-------------------------------------------------------------------+
|i25 : q = o                                                        |
|                                                                   |
|o25 = {1, 1, 1}                                                    |
|                                                                   |
|o25 : List                                                         |
+-------------------------------------------------------------------+
|i26 : netList ({o} | apply(5, i-> q = addition(o,p,q,E)))          |
|                                                                   |
|      +-+--+-+                                                     |
|o26 = |1|1 |1|                                                     |
|      +-+--+-+                                                     |
|      |0|1 |0|                                                     |
|      +-+--+-+                                                     |
|      |2|0 |1|                                                     |
|      +-+--+-+                                                     |
|      |1|2 |1|                                                     |
|      +-+--+-+                                                     |
|      |0|-3|1|                                                     |
|      +-+--+-+                                                     |
|      |1|1 |1|                                                     |
|      +-+--+-+                                                     |
+-------------------------------------------------------------------+
|i27 : setRandomSeed 1                                              |
| -- setting random seed to 1                                       |
|                                                                   |
|o27 = 1                                                            |
+-------------------------------------------------------------------+

A cubic with a node or cusp is also arithmetic genus 1; in the case of a node,
the smooth points are in correspondence with P^1 minus {0, infinity} and the
Jacobian is the multiplicative group of the field. To allow the program to
consider this as a curve of arithmetic genus 1, use the optional argument
Conductor.

+---------------------------------------------------------+
|i28 : kk = ZZ/7                                          |
|                                                         |
|o28 = kk                                                 |
|                                                         |
|o28 : QuotientRing                                       |
+---------------------------------------------------------+
|i29 : S = kk[x,y,z]                                      |
|                                                         |
|o29 = S                                                  |
|                                                         |
|o29 : PolynomialRing                                     |
+---------------------------------------------------------+
|i30 : (o,p,sing) = ({1,1,1}, {-1,1,0},{1,0,-1})          |
|                                                         |
|o30 = ({1, 1, 1}, {-1, 1, 0}, {1, 0, -1})                |
|                                                         |
|o30 : Sequence                                           |
+---------------------------------------------------------+
|i31 : oS = fromCoordinates(o, S)                         |
|                                                         |
|o31 = ideal (- x + y, - x + z)                           |
|                                                         |
|o31 : Ideal of S                                         |
+---------------------------------------------------------+
|i32 : pS = fromCoordinates(p, S)                         |
|                                                         |
|o32 = ideal (x + y, z)                                   |
|                                                         |
|o32 : Ideal of S                                         |
+---------------------------------------------------------+
|i33 : singS = fromCoordinates(sing, S)                   |
|                                                         |
|o33 = ideal (y, x + z)                                   |
|                                                         |
|o33 : Ideal of S                                         |
+---------------------------------------------------------+
|i34 : I = random(3, intersect(oS,pS,singS^2))            |
|                                                         |
|        3     2        2     3    2              2      3|
|o34 = 3x  + 3x y - 3x*y  - 3y  + x z + 3x*y*z + y z + 2z |
|                                                         |
|o34 : S                                                  |
+---------------------------------------------------------+
|i35 : E = S/I                                            |
|                                                         |
|o35 = E                                                  |
|                                                         |
|o35 : QuotientRing                                       |
+---------------------------------------------------------+
|i36 : q' = o                                             |
|                                                         |
|o36 = {1, 1, 1}                                          |
|                                                         |
|o36 : List                                               |
+---------------------------------------------------------+
|i37 : netList ({q'}|apply(6, i->(                        |
|        q' = addition(o,p,q',E, Conductor => 1_E)        |
|        )))                                              |
|                                                         |
|      +--+--+-+                                          |
|o37 = |1 |1 |1|                                          |
|      +--+--+-+                                          |
|      |-1|1 |0|                                          |
|      +--+--+-+                                          |
|      |-1|-1|1|                                          |
|      +--+--+-+                                          |
|      |-3|0 |1|                                          |
|      +--+--+-+                                          |
|      |-3|3 |1|                                          |
|      +--+--+-+                                          |
|      |0 |3 |1|                                          |
|      +--+--+-+                                          |
|      |1 |1 |1|                                          |
|      +--+--+-+                                          |
+---------------------------------------------------------+
|i38 : I = kernel map(kk[s,t], S, {s^3, s^2*t,t^3})       |
|                                                         |
|             3    2                                      |
|o38 = ideal(y  - x z)                                    |
|                                                         |
|o38 : Ideal of S                                         |
+---------------------------------------------------------+

In the case of rational curve with a cusp, the smooth points correspond to the
additive group of the field

+-------------------------------------------------+
|i39 : C = S/I                                    |
|                                                 |
|o39 = C                                          |
|                                                 |
|o39 : QuotientRing                               |
+-------------------------------------------------+
|i40 : genus C                                    |
|                                                 |
|o40 = 1                                          |
+-------------------------------------------------+
|i41 : geometricGenus C                           |
|                                                 |
|o41 = 0                                          |
+-------------------------------------------------+
|i42 : geometricGenus (C, Conductor => ideal(1_C))|
|                                                 |
|o42 = 1                                          |
+-------------------------------------------------+
|i43 : setRandomSeed 0                            |
| -- setting random seed to 0                     |
|                                                 |
|o43 = 0                                          |
+-------------------------------------------------+

the singular point is the image {0,0,1} of the point (0,1) in P^1, so we may
take the origin to be the image {1,1,1} of (1,1) and take another smooth point
p to be the image {1,0,0} of (1,0).

+-----------------------------------------------------------------------------+
|i44 : p = {1,0,0};                                                           |
+-----------------------------------------------------------------------------+
|i45 : o = {1,1,1};                                                           |
+-----------------------------------------------------------------------------+
|i46 : q = o                                                                  |
|                                                                             |
|o46 = {1, 1, 1}                                                              |
|                                                                             |
|o46 : List                                                                   |
+-----------------------------------------------------------------------------+
|i47 : netList ({o}|apply(7, i-> q = addition(o,p,q,C, Conductor => ideal     |
|                                                                             |
|      +--+--+-+                                                              |
|o47 = |1 |1 |1|                                                              |
|      +--+--+-+                                                              |
|      |1 |0 |0|                                                              |
|      +--+--+-+                                                              |
|      |-1|1 |1|                                                              |
|      +--+--+-+                                                              |
|      |-1|2 |1|                                                              |
|      +--+--+-+                                                              |
|      |1 |-3|1|                                                              |
|      +--+--+-+                                                              |
|      |-1|-3|1|                                                              |
|      +--+--+-+                                                              |
|      |1 |2 |1|                                                              |
|      +--+--+-+                                                              |
|      |1 |1 |1|                                                              |
|      +--+--+-+                                                              |
|-----------------------------------------------------------------------------|
|1_C)))                                                                       |
+-----------------------------------------------------------------------------+
|i48 :                                                                        |
+-----------------------------------------------------------------------------+

so 7p ~ o.

References
==========

"The Practice of Algebraic Curves" Ch. 4, by David Eisenbud and Joe Harris,
American Mathematical Society

Caveat
======

Some aspects of the program use random arguments, so one should be wary of
computation over very small fields

See also
========

  * linearSeries -- compute a linear series
  * geometricGenus -- Geometric genus of a (singular)
    plane curve

Ways to use addition:
=====================

  * "addition(Ideal,Ideal,Ideal)"
  * "addition(List,List,List,Ring)"

For the programmer
==================

The object addition, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in PlaneCurveLinearSeries.m2:463:0.

canonicalImage -- canonical model of the normalization of a plane curve
***********************************************************************

  * Usage:
        R' = canonicalImage R
        R' = canonicalImage I
  * Inputs:
      * R, a ring (Macaulay2Doc), the homogeneous coordinate ring
        of a plane curve
      * I, an ideal (Macaulay2Doc), homogeneous ideal of a plane
        curve
  * Optional inputs (Macaulay2Doc),:
      * Conductor => ..., default value null
  * Outputs:
      * R', a ring (Macaulay2Doc), the homogeneous coordinate ring
        of the canonical image of the normalization

Description
===========

The output is the homogeneous coordinate ring of the canonical image of the
normalization the given curve.

For example,  a plane sextic with 4 nodes is a curve of genus 10-4 = 6, so its
canonical image is a curve of degree 10 in P5

+-----------------------------------------------------------------------------+
|i1 : P5 = ZZ/101[x_0..x_5]                                                   |
|                                                                             |
|o1 = P5                                                                      |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : P2 = ZZ/101[a,b,c]                                                      |
|                                                                             |
|o2 = P2                                                                      |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : fourPoints = {{1,0,0},{0,1,0},{0,0,1},{1,1,1}}                          |
|                                                                             |
|o3 = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {1, 1, 1}}                            |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
|i4 : nodes = fromCoordinates(fourPoints, P2)                                 |
|                                                                             |
|               3     2 2     3     2        2 2      3     2 2      2        |
|o4 = ideal (- a b + a b , - a b + a b*c, - a b  + a*b , - a b  + a*b c, -    |
|     ------------------------------------------------------------------------|
|      2         2      2           2       2     3        2     2 2     3    |
|     a b*c + a*b c, - a b*c + a*b*c , - a*b c + b c, - a*b c + b c , - a c + |
|     ------------------------------------------------------------------------|
|      2        3     2 2     2         2      2           2     2 2        2 |
|     a b*c, - a c + a c , - a b*c + a*b c, - a b*c + a*b*c , - a c  + a*b*c ,|
|     ------------------------------------------------------------------------|
|        2 2      3         2    2 2         2      3                         |
|     - a c  + a*c , - a*b*c  + b c , - a*b*c  + b*c )                        |
|                                                                             |
|o4 : Ideal of P2                                                             |
+-----------------------------------------------------------------------------+
|i5 : sings' = intersect apply(fourPoints, p -> (fromCoordinates(p,P2))^2)    |
|                                                                             |
|             2 2         2    2 2   2         2         2    2 2   2 2       |
|o5 = ideal (a c  - 2a*b*c  + b c , a b*c - a*b c - a*b*c  + b c , a b  -     |
|     ------------------------------------------------------------------------|
|         2     2 2                                                           |
|     2a*b c + b c )                                                          |
|                                                                             |
|o5 : Ideal of P2                                                             |
+-----------------------------------------------------------------------------+
|i6 : C0 = P2/(ideal random(6, sings'))                                       |
|                                                                             |
|o6 = C0                                                                      |
|                                                                             |
|o6 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i7 : sings = sub (sings', C0)                                                |
|                                                                             |
|             2 2         2    2 2   2         2         2    2 2   2 2       |
|o7 = ideal (a c  - 2a*b*c  + b c , a b*c - a*b c - a*b*c  + b c , a b  -     |
|     ------------------------------------------------------------------------|
|         2     2 2                                                           |
|     2a*b c + b c )                                                          |
|                                                                             |
|o7 : Ideal of C0                                                             |
+-----------------------------------------------------------------------------+
|i8 : conductor C0 == sub(nodes, C0)                                          |
|                                                                             |
|o8 = false                                                                   |
+-----------------------------------------------------------------------------+
|i9 : C = canonicalImage C0                                                   |
|                                                                             |
|o9 = C                                                                       |
|                                                                             |
|o9 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i10 : betti res ideal C                                                      |
|                                                                             |
|             0 1  2 3 4                                                      |
|o10 = total: 1 6 10 6 1                                                      |
|          0: 1 .  . . .                                                      |
|          1: . 6  5 . .                                                      |
|          2: . .  5 6 .                                                      |
|          3: . .  . . 1                                                      |
|                                                                             |
|o10 : BettiTally                                                             |
+-----------------------------------------------------------------------------+
|i11 : B' = gens image basis (3,intersect nodes)                              |
|                                                                             |
|o11 = 0                                                                      |
|                                                                             |
|               1                                                             |
|o11 : Matrix P2  <-- 0                                                       |
+-----------------------------------------------------------------------------+

The ideal of nodes is the conductor, so the canonical series on C is the
restriction of the set of cubics containing the nodes.

+--------------------------------------------------------------------------+
|i12 : B = sub(B',C);                                                      |
|                                                                          |
|              1                                                           |
|o12 : Matrix C  <-- 0                                                     |
+--------------------------------------------------------------------------+
|i13 : canC = projectiveImage B                                            |
|                                                                          |
|o13 = canC                                                                |
|                                                                          |
|o13 : PolynomialRing                                                      |
+--------------------------------------------------------------------------+
|i14 : delPezzo = P5/ker(map(P2, P5, gens image basis (3,intersect nodes)))|
|                                                                          |
|o14 = delPezzo                                                            |
|                                                                          |
|o14 : QuotientRing                                                        |
+--------------------------------------------------------------------------+
|i15 : betti res ideal canC                                                |
|                                                                          |
|             0                                                            |
|o15 = total: 1                                                            |
|          0: 1                                                            |
|                                                                          |
|o15 : BettiTally                                                          |
+--------------------------------------------------------------------------+
|i16 : betti res ideal delPezzo                                            |
|                                                                          |
|             0 1  2  3  4 5 6                                             |
|o16 = total: 1 6 15 20 15 6 1                                             |
|          0: 1 6 15 20 15 6 1                                             |
|                                                                          |
|o16 : BettiTally                                                          |
+--------------------------------------------------------------------------+

See also
========

  * geometricGenus -- Geometric genus of a (singular)
    plane curve
  * canonicalImage -- canonical model of the
    normalization of a plane curve

Ways to use canonicalImage:
===========================

  * "canonicalImage(Ideal)"
  * "canonicalImage(Ring)"

For the programmer
==================

The object canonicalImage, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in PlaneCurveLinearSeries.m2:896:0.

canonicalSeries -- Canonical series of the normalization of a plane curve
*************************************************************************

  * Usage:
        M = canonicalSeries R
  * Inputs:
      * R, a ring (Macaulay2Doc), ring of a plane curve
  * Optional inputs (Macaulay2Doc),:
      * Conductor => ..., default value null
  * Outputs:
      * M, a matrix (Macaulay2Doc), a 1 x g matrix representing
        the canonical series

Description
===========

Computing the canonical linear series

+-------------------------------------------------------------------------+
|i1 : kk = QQ                                                             |
|                                                                         |
|o1 = QQ                                                                  |
|                                                                         |
|o1 : Ring                                                                |
+-------------------------------------------------------------------------+
|i2 : S = kk[x,y,z]                                                       |
|                                                                         |
|o2 = S                                                                   |
|                                                                         |
|o2 : PolynomialRing                                                      |
+-------------------------------------------------------------------------+
|i3 : C1 = ideal (y^3 - x^2*(x-z)) -- cubic with a node; geometric genus 0|
|                                                                         |
|              3    3    2                                                |
|o3 = ideal(- x  + y  + x z)                                              |
|                                                                         |
|o3 : Ideal of S                                                          |
+-------------------------------------------------------------------------+
|i4 : C2 = ideal(x^2+y^2+z^2) --nonsingular conic                         |
|                                                                         |
|            2    2    2                                                  |
|o4 = ideal(x  + y  + z )                                                 |
|                                                                         |
|o4 : Ideal of S                                                          |
+-------------------------------------------------------------------------+
|i5 : C3 = ideal (x^4+y^4+z^4) -- smooth curve of genus 3                 |
|                                                                         |
|            4    4    4                                                  |
|o5 = ideal(x  + y  + z )                                                 |
|                                                                         |
|o5 : Ideal of S                                                          |
+-------------------------------------------------------------------------+
|i6 : canonicalSeries(S/C1)                                               |
|                                                                         |
|o6 = 0                                                                   |
|                                                                         |
|            /       S       \1                                           |
|o6 : Matrix |---------------|  <-- 0                                     |
|            |   3    3    2 |                                            |
|            \- x  + y  + x z/                                            |
+-------------------------------------------------------------------------+
|i7 : canonicalSeries(S/C2)                                               |
|                                                                         |
|o7 = ideal 0                                                             |
|                                                                         |
|                    S                                                    |
|o7 : Ideal of ------------                                               |
|               2    2    2                                               |
|              x  + y  + z                                                |
+-------------------------------------------------------------------------+
|i8 : canonicalSeries(S/C3)                                               |
|                                                                         |
|o8 = | x y z |                                                           |
|                                                                         |
|            /      S     \1     /      S     \3                          |
|o8 : Matrix |------------|  <-- |------------|                           |
|            | 4    4    4|      | 4    4    4|                           |
|            \x  + y  + z /      \x  + y  + z /                           |
+-------------------------------------------------------------------------+

Ways to use canonicalSeries:
============================

  * "canonicalSeries(Ideal)"
  * "canonicalSeries(Ring)"

For the programmer
==================

The object canonicalSeries, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in PlaneCurveLinearSeries.m2:606:0.

Conductor -- Option to avoid computation
****************************************

  * Usage:
        M = geometricGenus(C,Conductor => cond)
  * Inputs:
      * C, a ring (Macaulay2Doc),
      * cond, an ideal (Macaulay2Doc), the conductor of C

Description
===========

Computing the conductor involves computing the normalization, which is
potentially expensive. If it is known in advance (as in the case of an ordinary
multiple point) the user can insert it to avoid the computation.

See also
========

  * geometricGenus -- Geometric genus of a (singular)
    plane curve

Functions with optional argument named Conductor:
=================================================

  * "addition(...,Conductor=>...)" -- see addition, -- addition
    of smooth points on a curve of genus 1
  * "canonicalImage(...,Conductor=>...)" -- see canonicalImage,
    -- canonical model of the normalization of a plane curve
  * "canonicalSeries(...,Conductor=>...)" -- see canonicalSeries,
    -- Canonical series of the normalization of a plane curve
  * "geometricGenus(...,Conductor=>...)" -- see geometricGenus,
    -- Geometric genus of a (singular) plane curve
  * "linearSeries(...,Conductor=>...)" -- see linearSeries,
    -- compute a linear series
  * "negative(...,Conductor=>...)" -- see negative, --
    implements the inverse in the group law of a curve of genus 1
  * "projectiveImage(...,Conductor=>...)" -- see projectiveImage,
    -- Projective image of the map defined by a divisor or
    matrix

For the programmer
==================

The object Conductor, is a symbol (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in PlaneCurveLinearSeries.m2:920:0.

fromCoordinates -- Compute the ideal of a point from its coordinates
********************************************************************

  * Usage:
        I = fromCoordinates(L,C)
        I = fromCoordinates(x,y,z, C)
  * Inputs:
      * L, a list (Macaulay2Doc), of three integers or field
        elements OR a list of lists of that type
      * x, a ring element (Macaulay2Doc),
      * y, a ring element (Macaulay2Doc),
      * z, a ring element (Macaulay2Doc), integer or field
        coordinates of a point on C (assumed to be a plane curve)
      * C, a ring (Macaulay2Doc), the ring in which the ideal of
        the point will be created
  * Outputs:
      * I, an ideal (Macaulay2Doc), of C, defining the subscheme
        corresponding to the list L of points.

Description
===========

Convenient way to compute the ideal of a point on a plane curve, when the point
is given by a list of its coordinates. If the coordinates are given as
integers, they are interpreted as elements of the coefficient field The script
returns an error if the point is not on the curve.

+---------------------------------------------------------+
|i1 : S = ZZ/101[a,b,c]                                   |
|                                                         |
|o1 = S                                                   |
|                                                         |
|o1 : PolynomialRing                                      |
+---------------------------------------------------------+
|i2 : C = S/ideal"a3+b3-c3"                               |
|                                                         |
|o2 = C                                                   |
|                                                         |
|o2 : QuotientRing                                        |
+---------------------------------------------------------+
|i3 : P = {0,1,1}                                         |
|                                                         |
|o3 = {0, 1, 1}                                           |
|                                                         |
|o3 : List                                                |
+---------------------------------------------------------+
|i4 : Q = {1,1,0}                                         |
|                                                         |
|o4 = {1, 1, 0}                                           |
|                                                         |
|o4 : List                                                |
+---------------------------------------------------------+
|i5 : fromCoordinates(P,C)                                |
|                                                         |
|o5 = ideal (a, - b + c)                                  |
|                                                         |
|o5 : Ideal of C                                          |
+---------------------------------------------------------+
|i6 : fromCoordinates({P,P},C)                            |
|                                                         |
|             2                             2           2 |
|o6 = ideal (a , - a*b + a*c, - a*b + a*c, b  - 2b*c + c )|
|                                                         |
|o6 : Ideal of C                                          |
+---------------------------------------------------------+

See also
========

  * toCoordinates -- coordinates of a point from its
    ideal

Ways to use fromCoordinates:
============================

  * "fromCoordinates(List,Ring)"
  * "fromCoordinates(ZZ,ZZ,ZZ,Ring)"

For the programmer
==================

The object fromCoordinates, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in PlaneCurveLinearSeries.m2:541:0.

geometricGenus -- Geometric genus of a (singular) plane curve
*************************************************************

  * Usage:
        g = geometricGenus R
        g = geometricGenus I
  * Inputs:
      * R, a ring (Macaulay2Doc), homogeneous coordinate ring of a
        plane curve
      * I, an ideal (Macaulay2Doc), defining a plane curve
      * Conductor, an ideal (Macaulay2Doc), the conductor of R (if
        not given, it's computed)
  * Optional inputs (Macaulay2Doc),:
      * Conductor => ..., default value 0
  * Outputs:
      * g, an integer (Macaulay2Doc),

Description
===========

The geometric genus of a plane curve C0 is the genus of the normalization of C0

+-------------------------------------------------------------------------+
|i1 : kk = QQ                                                             |
|                                                                         |
|o1 = QQ                                                                  |
|                                                                         |
|o1 : Ring                                                                |
+-------------------------------------------------------------------------+
|i2 : S = kk[x,y,z]                                                       |
|                                                                         |
|o2 = S                                                                   |
|                                                                         |
|o2 : PolynomialRing                                                      |
+-------------------------------------------------------------------------+
|i3 : C1 = ideal (y^3 - x^2*(x-z)) -- cubic with a node; geometric genus 0|
|                                                                         |
|              3    3    2                                                |
|o3 = ideal(- x  + y  + x z)                                              |
|                                                                         |
|o3 : Ideal of S                                                          |
+-------------------------------------------------------------------------+
|i4 : C2 = ideal(x^2+y^2+z^2)                                             |
|                                                                         |
|            2    2    2                                                  |
|o4 = ideal(x  + y  + z )                                                 |
|                                                                         |
|o4 : Ideal of S                                                          |
+-------------------------------------------------------------------------+
|i5 : C3 = ideal (x^4+y^4+z^4)                                            |
|                                                                         |
|            4    4    4                                                  |
|o5 = ideal(x  + y  + z )                                                 |
|                                                                         |
|o5 : Ideal of S                                                          |
+-------------------------------------------------------------------------+
|i6 : geometricGenus C1                                                   |
|                                                                         |
|o6 = 0                                                                   |
+-------------------------------------------------------------------------+
|i7 : geometricGenus C2                                                   |
|                                                                         |
|o7 = 0                                                                   |
+-------------------------------------------------------------------------+
|i8 : geometricGenus C3                                                   |
|                                                                         |
|o8 = 3                                                                   |
+-------------------------------------------------------------------------+

Every hyperelliptic curve of genus g can be represented as a plane curve of
degree g+2 with a g-fold ordinary singularity, and thus conductor equal to the
(g-1)st power of the maximal ideal. As of 1/20/2024, Macaulay2 crashes on
computing the conductor when g >= 6, but knowing the conductor one can go much
farther:

We make a general hyperelliptic curve of genus g with singularity at q'.

Example g = 20 S = ZZ/101[a,b,c] q' = ideal(a,b); Text Example I = q'^g C =
S/(ideal random(g+2, I)); p = sub(p', C); q = sub(q', C); geometricGenus (C,
Conductor => q'^(g-1))

See also
========

  * canonicalSeries -- Canonical series of the
    normalization of a plane curve

Ways to use geometricGenus:
===========================

  * "geometricGenus(Ideal)"
  * "geometricGenus(Ring)"

For the programmer
==================

The object geometricGenus, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in PlaneCurveLinearSeries.m2:666:0.

linearSeries -- compute a linear series
***************************************

  * Usage:
        D = linearSeries Dplus
        D = linearSeries (Dplus, Dminus)
        D = linearSeries (DplusList, Ring)
        D = linearSeries (DplusList, DminusList, Ring)
  * Inputs:
      * Dplus, an ideal (Macaulay2Doc), in the homogeneous
        coordinate ring A of a plane curve C
      * Dminus, an ideal (Macaulay2Doc), in A
      * DplusList, a list (Macaulay2Doc),
      * DminusList, a list (Macaulay2Doc), lists representing the
        coordinates of points in P^2.
  * Optional inputs (Macaulay2Doc),:
      * Conductor => ..., default value null
      * ShowBase => ..., default value false
  * Outputs:
      * D, a matrix (Macaulay2Doc), of size 1 x dim
        H^0(Dplus-Dminus). Entries are a basis of |Dplus - Dminus|

Description
===========

Given C, a (possibly singular) irreducible plane curve, this routine computes
the complete linear series of a given divisor on the normalization C' of C by
computations using data from the plane curve together with the conductor ideal
$cond =ann_C(C/C)$, which can be computed by Macaulay or supplied by the user
using the optional argument Conductor => cond.

If D0' and Dinf' are effective divisors on C' whose ideals, as schemes, are
pulled back from ideals D0 and Dinf of C, then

ell = linearSeries(D0,Dinf)

returns a one-row matrix ell whose entries span a linear series with fixed
point locus B on C' (including the conductor scheme) and form a basis of
|D0'-Dinf'|+B.

As an example, consider a quintic plane curve with an ordinary triple point and
two more marked points:

+---------------------------------------+
|i1 : S = ZZ/32003[a,b,c]               |
|                                       |
|o1 = S                                 |
|                                       |
|o1 : PolynomialRing                    |
+---------------------------------------+
|i2 : p = ideal(a,b)                    |
|                                       |
|o2 = ideal (a, b)                      |
|                                       |
|o2 : Ideal of S                        |
+---------------------------------------+
|i3 : p1' = ideal(b,c)                  |
|                                       |
|o3 = ideal (b, c)                      |
|                                       |
|o3 : Ideal of S                        |
+---------------------------------------+
|i4 : p2' = ideal(a,c)                  |
|                                       |
|o4 = ideal (a, c)                      |
|                                       |
|o4 : Ideal of S                        |
+---------------------------------------+
|i5 : marked = intersect (p^3, p1', p2')|
|                                       |
|               2   2    3    3         |
|o5 = ideal (a*b , a b, b c, a c)       |
|                                       |
|o5 : Ideal of S                        |
+---------------------------------------+
|i6 : C = S/(random(5, marked))         |
|                                       |
|o6 = C                                 |
|                                       |
|o6 : QuotientRing                      |
+---------------------------------------+
|i7 : red = map(C,S)                    |
|                                       |
|o7 = map (C, S, {a, b, c})             |
|                                       |
|o7 : RingMap C <-- S                   |
+---------------------------------------+
|i8 : p1 = red p1'                      |
|                                       |
|o8 = ideal (b, c)                      |
|                                       |
|o8 : Ideal of C                        |
+---------------------------------------+
|i9 : p2 = red p2'                      |
|                                       |
|o9 = ideal (a, c)                      |
|                                       |
|o9 : Ideal of C                        |
+---------------------------------------+

Since the delta invariant of a triple point is 3, the geometric genus of C is 3
less than the arithmetic genus computed natively, and the conductor is the
square of the maximal ideal:

+--------------------------+
|i10 : genus C             |
|                          |
|o10 = 6                   |
+--------------------------+
|i11 : g = geometricGenus C|
|                          |
|o11 = 3                   |
+--------------------------+
|i12 : conductor C         |
|                          |
|              2        2  |
|o12 = ideal (b , a*b, a ) |
|                          |
|o12 : Ideal of C          |
+--------------------------+

As another example, we compute the complete linear series m*p_2-e*p1 for values
of m from 3 to 12. In the following chart, each column represents one value of
the degree, m-2. The first row gives the degree, the second row gives the value
of the Euler characteristic

$\chi {\mathcal O}_C(m*p2 - 2*p1)$

as computed by the Riemann-Roch Theorem, and the last row gives the dimension
of the complete linear series as computed by this program. Since the linear
series is general The last two rows agree starting in degree since the series
is nonspecial from there on.

+-----------------------------------------------------------------------------+
|i13 : e=2                                                                    |
|                                                                             |
|o13 = 2                                                                      |
+-----------------------------------------------------------------------------+
|i14 : netList{                                                               |
|       {"degree m*p2 - 2*p1: "} | for m from 3 to 12 list m-e,               |
|       {"chi, from Riemann-Roch: "} | for m from 3 to 12 list m-e-g+1,       |
|       {"computed dimension: "} | for m from 3 to 12 list numgens trim ideal |
|       }                                                                     |
|                                                                             |
|      +------------------------+--+-+-+-+-+-+-+-+-+--+                       |
|o14 = |degree m*p2 - 2*p1:     |1 |2|3|4|5|6|7|8|9|10|                       |
|      +------------------------+--+-+-+-+-+-+-+-+-+--+                       |
|      |chi, from Riemann-Roch: |-1|0|1|2|3|4|5|6|7|8 |                       |
|      +------------------------+--+-+-+-+-+-+-+-+-+--+                       |
|      |computed dimension:     |0 |0|1|2|3|4|5|6|7|8 |                       |
|      +------------------------+--+-+-+-+-+-+-+-+-+--+                       |
|-----------------------------------------------------------------------------|
|linearSeries(p2^m, p1^e)                                                     |
+-----------------------------------------------------------------------------+

References
==========

"The Practic of Algebraic Curves" by David Eisenbud and Joe Harris

Caveat
======

A bit slower in characteristic 0

See also
========

  * conductor (IntegralClosure) -- the conductor of a finite
    ring map
  * geometricGenus -- Geometric genus of a (singular)
    plane curve

Ways to use linearSeries:
=========================

  * "linearSeries(Ideal)"
  * "linearSeries(Ideal,Ideal)"
  * "linearSeries(List,List,Ring)"
  * "linearSeries(List,Ring)"

For the programmer
==================

The object linearSeries, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in PlaneCurveLinearSeries.m2:759:0.

negative -- implements the inverse in the group law of a curve of genus 1
*************************************************************************

  * Usage:
        q = negative(o,p,E)
        qE = negative(oE,pE)
  * Inputs:
      * o, a list (Macaulay2Doc),
      * oE, an ideal (Macaulay2Doc),
      * p, a list (Macaulay2Doc),
      * pE, an ideal (Macaulay2Doc),
      * E, a ring (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Conductor => ..., default value null
  * Outputs:
      * q, a list (Macaulay2Doc),
      * qE, an ideal (Macaulay2Doc),

Description
===========

Implements the additive inverse in the group law on the smooth points of a
plane curve E of genus 1, represented by its homogeneous coordinate ring, with
chosen zero point o.

+------------------------------------------+
|i1 : S = QQ[x,y,z]                        |
|                                          |
|o1 = S                                    |
|                                          |
|o1 : PolynomialRing                       |
+------------------------------------------+
|i2 : E = S/ideal"x3+y3+z3"                |
|                                          |
|o2 = E                                    |
|                                          |
|o2 : QuotientRing                         |
+------------------------------------------+
|i3 : o = {1,-1,0}                         |
|                                          |
|o3 = {1, -1, 0}                           |
|                                          |
|o3 : List                                 |
+------------------------------------------+
|i4 : p = {0,1,-1}                         |
|                                          |
|o4 = {0, 1, -1}                           |
|                                          |
|o4 : List                                 |
+------------------------------------------+
|i5 : negative(o,p,E)                      |
|                                          |
|o5 = {-1, 0, 1}                           |
|                                          |
|o5 : List                                 |
+------------------------------------------+
|i6 : q = addition(o,p,p,E)                |
|                                          |
|o6 = {-1, 0, 1}                           |
|                                          |
|o6 : List                                 |
+------------------------------------------+
|i7 : r = addition(o,q, negative(o,p,E), E)|
|                                          |
|o7 = {0, -1, 1}                           |
|                                          |
|o7 : List                                 |
+------------------------------------------+
|i8 : r == p                               |
|                                          |
|o8 = false                                |
+------------------------------------------+

See also
========

  * addition -- addition of smooth points on a curve of genus
    1

Ways to use negative:
=====================

  * "negative(Ideal,Ideal)"
  * "negative(List,List,Ring)"

For the programmer
==================

The object negative, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in PlaneCurveLinearSeries.m2:500:0.

projectiveImage -- Projective image of the map defined by a divisor or matrix
*****************************************************************************

  * Usage:
        I = projectiveImage Dplus
        I = projectiveImage (Dplus, Dminus)
        I = projectiveImage (DplusList, DminusList, C)
        I = projectiveImage (DplusList, C)
  * Inputs:
      * Dplus, an ideal (Macaulay2Doc), in the homogeneous
        coordinate ring A of a plane curve C
      * Dminus, an ideal (Macaulay2Doc), in A
      * DplusList, a list (Macaulay2Doc),
      * DminusList, a list (Macaulay2Doc), lists representing the
        coordinates of points in P^2.
      * C, a ring (Macaulay2Doc), the homogeneous coordinate ring
        of a plane curve
  * Optional inputs (Macaulay2Doc),:
      * Conductor => ..., default value null
  * Outputs:
      * I, an ideal (Macaulay2Doc), the ideal of the image curve

Description
===========

The output ideal is the ideal of polynomial relations among the generators of
the linear series |Dplus-Dminus|.

If C is a general curve of genus 6, then C can be represented as a plane sextic
with 4 nodes. Its canonical embedding is then the projective image of C by the
space of cubic forms vanishing at the 4 nodes. This lies on the surface that is
the image of P2 under the linear series consisting of the cubics vanishing at
the 4 nodes, a del Pezzo surface of degree 5.

+-----------------------------------------------------------------------------+
|i1 : P5 = ZZ/101[x_0..x_5]                                                   |
|                                                                             |
|o1 = P5                                                                      |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : P2 = ZZ/101[a,b,c]                                                      |
|                                                                             |
|o2 = P2                                                                      |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : fourpoints = {                                                          |
|         {0,0,1},                                                            |
|         {1,0,0},                                                            |
|         {0,1,0},                                                            |
|         {1,1,1}}                                                            |
|                                                                             |
|o3 = {{0, 0, 1}, {1, 0, 0}, {0, 1, 0}, {1, 1, 1}}                            |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
|i4 : fourPointsIdeals = apply (fourpoints, L -> fromCoordinates(L,P2))       |
|                                                                             |
|o4 = {ideal (a, b), ideal (b, c), ideal (a, c), ideal (- a + b, - a + c)}    |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+
|i5 : nodes = intersect apply(fourPointsIdeals, p -> p)                       |
|                                                                             |
|o5 = ideal (a*c - b*c, a*b - b*c)                                            |
|                                                                             |
|o5 : Ideal of P2                                                             |
+-----------------------------------------------------------------------------+
|i6 : sings' = intersect apply(fourPointsIdeals, p -> p^2)                    |
|                                                                             |
|             2 2         2    2 2   2         2         2    2 2   2 2       |
|o6 = ideal (a c  - 2a*b*c  + b c , a b*c - a*b c - a*b*c  + b c , a b  -     |
|     ------------------------------------------------------------------------|
|         2     2 2                                                           |
|     2a*b c + b c )                                                          |
|                                                                             |
|o6 : Ideal of P2                                                             |
+-----------------------------------------------------------------------------+
|i7 : C0 = P2/(ideal random(6, sings'))                                       |
|                                                                             |
|o7 = C0                                                                      |
|                                                                             |
|o7 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i8 : sings = sub (sings', C0)                                                |
|                                                                             |
|             2 2         2    2 2   2         2         2    2 2   2 2       |
|o8 = ideal (a c  - 2a*b*c  + b c , a b*c - a*b c - a*b*c  + b c , a b  -     |
|     ------------------------------------------------------------------------|
|         2     2 2                                                           |
|     2a*b c + b c )                                                          |
|                                                                             |
|o8 : Ideal of C0                                                             |
+-----------------------------------------------------------------------------+
|i9 : conductor C0 == sub(nodes, C0)                                          |
|                                                                             |
|o9 = true                                                                    |
+-----------------------------------------------------------------------------+
|i10 : B' = gens image basis (3,nodes)                                        |
|                                                                             |
|o10 = | a2c-abc abc-b2c ac2-bc2 a2b-abc ab2-b2c abc-bc2 |                    |
|                                                                             |
|               1       6                                                     |
|o10 : Matrix P2  <-- P2                                                      |
+-----------------------------------------------------------------------------+
|i11 : B = sub(B',C0);                                                        |
|                                                                             |
|               1       6                                                     |
|o11 : Matrix C0  <-- C0                                                      |
+-----------------------------------------------------------------------------+
|i12 : canonicalSeries(C0) == B                                               |
|                                                                             |
|o12 = true                                                                   |
+-----------------------------------------------------------------------------+

Now the image of C under B lies on the image of P^2 under B'. Since "projective
image defines a ring", we need to make sure the two ideals are in the same ring
to compare them:

+---------------------------------------------------+
|i13 : X = projectiveImage B'                       |
|                                                   |
|o13 = X                                            |
|                                                   |
|o13 : QuotientRing                                 |
+---------------------------------------------------+
|i14 : C = projectiveImage B                        |
|                                                   |
|o14 = C                                            |
|                                                   |
|o14 : QuotientRing                                 |
+---------------------------------------------------+
|i15 : betti res ideal C                            |
|                                                   |
|             0 1  2 3 4                            |
|o15 = total: 1 6 10 6 1                            |
|          0: 1 .  . . .                            |
|          1: . 6  5 . .                            |
|          2: . .  5 6 .                            |
|          3: . .  . . 1                            |
|                                                   |
|o15 : BettiTally                                   |
+---------------------------------------------------+
|i16 : betti res ideal X                            |
|                                                   |
|             0 1 2 3                               |
|o16 = total: 1 5 5 1                               |
|          0: 1 . . .                               |
|          1: . 5 5 .                               |
|          2: . . . 1                               |
|                                                   |
|o16 : BettiTally                                   |
+---------------------------------------------------+
|i17 : isSubset(sub(ideal X, ring ideal C), ideal C)|
|                                                   |
|o17 = true                                         |
+---------------------------------------------------+

See also
========

  * geometricGenus -- Geometric genus of a (singular)
    plane curve
  * canonicalImage -- canonical model of the
    normalization of a plane curve

Ways to use projectiveImage:
============================

  * "projectiveImage(Ideal)"
  * "projectiveImage(Ideal,Ideal)"
  * "projectiveImage(List,List,Ring)"
  * "projectiveImage(List,Ring)"
  * "projectiveImage(Matrix)"

For the programmer
==================

The object projectiveImage, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in PlaneCurveLinearSeries.m2:836:0.

ShowBase -- Option for @TO linearSeries@
****************************************

  * Usage:
        (ls,B) = geometricGenus(C,ShowBase => true)
  * Inputs:
      * C, a ring (Macaulay2Doc),
  * Outputs:
      * ls, a matrix (Macaulay2Doc), 1xn matrix whose entres span
        the linear series plus basepoints
      * B, an ideal (Macaulay2Doc), the base locus

Description
===========

The linear series computed for a plane curve is given as a matrix of forms of a
certain degree in the ideal of the curve; Each form vanishes at a divisor PLUS
a fixed locus, in common to all the forms but not necessarily equal to their
intersection (unless the linear series to be computed is base-point free).

+-------------------------------------------------------+
|i1 : C = ZZ/19[a,b,c]/(ideal"a5+b5-c5")                |
|                                                       |
|o1 = C                                                 |
|                                                       |
|o1 : QuotientRing                                      |
+-------------------------------------------------------+
|i2 : geometricGenus C == 6                             |
|                                                       |
|o2 = true                                              |
+-------------------------------------------------------+
|i3 : p = fromCoordinates({0,1,1}, C)                   |
|                                                       |
|o3 = ideal (a, - b + c)                                |
|                                                       |
|o3 : Ideal of C                                        |
+-------------------------------------------------------+
|i4 : (ls, B) = linearSeries(p^6, p^3, ShowBase => true)|
|                                                       |
|                             2           2   2     2   |
|o4 = (| b2-2bc+c2 |, ideal (b  - 2b*c + c , a b - a c))|
|                                                       |
|o4 : Sequence                                          |
+-------------------------------------------------------+

See also
========

  * linearSeries -- compute a linear series
  * fromCoordinates -- Compute the ideal of a point
    from its coordinates

Functions with optional argument named ShowBase:
================================================

  * "linearSeries(...,ShowBase=>...)" -- see linearSeries,
    -- compute a linear series

For the programmer
==================

The object ShowBase, is a symbol (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in PlaneCurveLinearSeries.m2:951:0.

toCoordinates -- coordinates of a point from its ideal
******************************************************

  * Usage:
        L  = toCoordinates I
  * Inputs:
      * I, an ideal (Macaulay2Doc), defining a point
  * Outputs:
      * L, a list (Macaulay2Doc), of elements of the ground field

Description
===========

This is the inverse of fromCoordinates,

+--------------------------------------------------------+
|i1 : S = ZZ/5[x,y,z]                                    |
|                                                        |
|o1 = S                                                  |
|                                                        |
|o1 : PolynomialRing                                     |
+--------------------------------------------------------+
|i2 : I = ideal(x- y, z)                                 |
|                                                        |
|o2 = ideal (x - y, z)                                   |
|                                                        |
|o2 : Ideal of S                                         |
+--------------------------------------------------------+
|i3 : L = toCoordinates I                                |
|                                                        |
|o3 = {1, 1, 0}                                          |
|                                                        |
|o3 : List                                               |
+--------------------------------------------------------+
|i4 : I == fromCoordinates(L,S)                          |
|                                                        |
|o4 = true                                               |
+--------------------------------------------------------+
|i5 : S = GF(5,2,Variable => a)[x,y,z]/(ideal "x3-y3+z3")|
|                                                        |
|o5 = S                                                  |
|                                                        |
|o5 : QuotientRing                                       |
+--------------------------------------------------------+
|i6 : a^24 == 1                                          |
|                                                        |
|o6 = true                                               |
+--------------------------------------------------------+
|i7 : (a^8)^3                                            |
|                                                        |
|o7 = 1                                                  |
|                                                        |
|o7 : GF 25                                              |
+--------------------------------------------------------+
|i8 : (a^16)^3                                           |
|                                                        |
|o8 = 1                                                  |
|                                                        |
|o8 : GF 25                                              |
+--------------------------------------------------------+
|i9 : p = {a^8, a^16, 0}                                 |
|                                                        |
|o9 = {2a + 1, - 2a - 2, 0}                              |
|                                                        |
|o9 : List                                               |
+--------------------------------------------------------+
|i10 : fromCoordinates (p,S)                             |
|                                                        |
|o10 = ideal ((- 2a - 1)x + y, z)                        |
|                                                        |
|o10 : Ideal of S                                        |
+--------------------------------------------------------+
|i11 : L = toCoordinates fromCoordinates ({a^8,1,0}, S)  |
|                                                        |
|o11 = {2a + 1, 1, 0}                                    |
|                                                        |
|o11 : List                                              |
+--------------------------------------------------------+

See also
========

  * fromCoordinates -- Compute the ideal of a point
    from its coordinates

Ways to use toCoordinates:
==========================

  * "toCoordinates(Ideal)"

For the programmer
==================

The object toCoordinates, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in PlaneCurveLinearSeries.m2:576:0.