@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/mregular_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/mregular_lib.doc INSTEAD
@c library version: (1.6.2.1,2002/02/20)
@c library file: ../Singular/LIB/mregular.lib
@cindex mregular.lib
@cindex mregular_lib
@table @asis
@item @strong{Library:}
mregular.lib
@item @strong{Purpose:}
   Castelnuovo-Mumford Regularity of CM-Schemes and Curves
@item @strong{Authors:}
I.Bermejo, ibermejo@@ull.es
@* Ph.Gimenez, pgimenez@@agt.uva.es
@* G.-M.Greuel, greuel@@mathematik.uni-kl.de

@item @strong{Overview:}
A library for computing the Castelnuovo-Mumford regularity of a subscheme of
the projective n-space that DOES NOT require the computation of a minimal
graded free resolution of the saturated ideal defining the subscheme.
The procedures are based on two papers by Isabel Bermejo and Philippe Gimenez:
'On Castelnuovo-Mumford regularity of projective curves' Proc.Amer.Math.Soc.
128(5) (2000), and 'Computing the Castelnuovo-Mumford regularity of some
subschemes of Pn using quotients of monomial ideals', Proceedings of
MEGA-2000, J. Pure Appl. Algebra (to appear).
@*The algorithm assumes the variables to be in Noether position.

@end table

@strong{Procedures:}
@menu
* reg_CM:: regularity of arith. C-M subscheme V(id_sat) of Pn
* reg_curve:: regularity of projective curve V(id_sat) in Pn
* reg_moncurve:: regularity of projective monomial curve defined by li
@end menu
@c ---end content LibInfo---

@c ------------------- reg_CM -------------
@node reg_CM, reg_curve,, mregular_lib
@subsubsection reg_CM
@cindex reg_CM
@c ---content reg_CM---
Procedure from library @code{mregular.lib} (@pxref{mregular_lib}).

@table @asis
@item @strong{Usage:}
reg_CM (i); i ideal

@item @strong{Return:}
an integer, the Castelnuovo-Mumford regularity of i-sat.

@item @strong{Assume:}
i is a homogeneous ideal of the basering S=K[x(0)..x(n)] where
the field K is infinite, and S/i-sat is Cohen-Macaulay.
Assume that K[x(n-d),...,x(n)] is a Noether normalization of S/i-sat
where d=dim S/i -1. If this is not the case, compute a Noether
normalization e.g. by using the proc noetherNormal from algebra.lib.

@item @strong{Note:}
The output is reg(X)=reg(i-sat) where X is the arithmetically
Cohen-Macaulay subscheme of the projective n-space defined by i.
If printlevel > 0 (default = 0) additional information is displayed.
In particular, the value of the regularity of the Hilbert function of
S/i-sat is given.

@end table
@strong{Example:}
@smallexample
@c computed example reg_CM d2t_singular/mregular_lib.doc:68 
LIB "mregular.lib";
ring s=0,x(0..5),dp;
ideal i=x(2)^2-x(4)*x(5),x(1)*x(2)-x(0)*x(5),x(0)*x(2)-x(1)*x(4),
x(1)^2-x(3)*x(5),x(0)*x(1)-x(2)*x(3),x(0)^2-x(3)*x(4);
reg_CM(i);
@expansion{} 2
// Additional information can be obtained as follows:
printlevel = 1;
reg_CM(i);
@expansion{} // Ideal i of S defining an arithm. Cohen-Macaulay subscheme X of P5:
@expansion{} //   - dimension of X: 2
@expansion{} //   - i is saturated: YES
@expansion{} //   - regularity of the Hilbert function of S/i-sat: -1
@expansion{} //   - time for computing reg(X): 0 sec.
@expansion{} // Castelnuovo-Mumford regularity of X:
@expansion{} 2
@c end example reg_CM d2t_singular/mregular_lib.doc:68
@end smallexample
@c ---end content reg_CM---

@c ------------------- reg_curve -------------
@node reg_curve, reg_moncurve, reg_CM, mregular_lib
@subsubsection reg_curve
@cindex reg_curve
@c ---content reg_curve---
Procedure from library @code{mregular.lib} (@pxref{mregular_lib}).

@table @asis
@item @strong{Usage:}
reg_curve (i[,e]); i ideal, e integer

@item @strong{Return:}
an integer, the Castelnuovo-Mumford regularity of i-sat.

@item @strong{Assume:}
i is a homogeneous ideal of the basering S=K[x(0)..x(n)] where
the field K is infinite, and it defines a projective curve C in
the projective n-space (dim(i)=2). We assume that K[x(n-1),x(n)]
is a Noether normalization of S/i-sat.
@*e=0: (default)
@*Uses a random choice of an element of K when it is necessary.
This is absolutely safe (if the element is bad, another random
choice will be done until a good element is found).
@*e=1: Substitutes the random choice of an element of K by a simple
transcendental field extension of K.

@item @strong{Note:}
The output is the integer reg(C)=reg(i-sat).
@*If printlevel > 0 (default = 0) additional information is displayed.
In particular, says if C is arithmetically Cohen-Macaulay or not,
determines in which step of a minimal graded free resolution of i-sat
the regularity of C is attained, and sometimes gives the value of the
regularity of the Hilbert function of S/i-sat (otherwise, an upper
bound is given).

@end table
@strong{Example:}
@smallexample
@c computed example reg_curve d2t_singular/mregular_lib.doc:119 
LIB "mregular.lib";
ring s = 0,(x,y,z,t),dp;
// 1st example is Ex.2.5 in [Bermejo-Gimenez], Proc.Amer.Math.Soc. 128(5):
ideal i  = x17y14-y31, x20y13, x60-y36z24-x20z20t20;
reg_curve(i);
@expansion{} 72
// 2nd example is Ex.2.9 in [Bermejo-Gimenez], Proc.Amer.Math.Soc. 128(5):
int k=43;
ideal j=x17y14-y31,x20y13,x60-y36z24-x20z20t20,y41*z^k-y40*z^(k+1);
reg_curve(j);
@expansion{} 93
// Additional information can be obtained as follows:
printlevel = 1;
reg_curve(j);
@expansion{} // Ideal i of S defining a projective curve C in P3:
@expansion{} //   - i is saturated: YES
@expansion{} //   - C is arithm. Cohen-Macaulay: NO
@expansion{} //   - reg(C) attained at the last step of a m.g.f.r. of i-sat: YES
@expansion{} //   - regularity of the Hilbert function of S/i-sat: 92
@expansion{} //   - time for computing reg(C): 0 sec.
@expansion{} // Castelnuovo-Mumford regularity of C:
@expansion{} 93
@c end example reg_curve d2t_singular/mregular_lib.doc:119
@end smallexample
@c ---end content reg_curve---

@c ------------------- reg_moncurve -------------
@node reg_moncurve,, reg_curve, mregular_lib
@subsubsection reg_moncurve
@cindex reg_moncurve
@c ---content reg_moncurve---
Procedure from library @code{mregular.lib} (@pxref{mregular_lib}).

@table @asis
@item @strong{Usage:}
reg_moncurve (a0,...,an) ; ai integers with a0=0 < a1 < ... < an=:d

@item @strong{Return:}
an integer, the Castelnuovo-Mumford regularity of the projective
monomial curve C in Pn parametrically defined by:
@*x(0)=t^d , x(1)=s^(a1)t^(d-a1), ... , x(n)=s^d.

@item @strong{Assume:}
a0=0 < a1 < ... < an are integers and the base field is infinite.

@item @strong{Note:}
The defining ideal I(C) in S is determined using elimination.
The procedure reg_curve is improved in this case since one
knows beforehand that the dimension is 2, that the variables are
in Noether position, that I(C) is prime.
@*If printlevel > 0 (default = 0) additional information is displayed.
In particular, says if C is arithmetically Cohen-Macaulay or not,
determines in which step of a minimal graded free resolution of I(C)
the regularity is attained, and sometimes gives the value of the
regularity of the Hilbert function of S/I(C) (otherwise, an upper
bound is given).

@end table
@strong{Example:}
@smallexample
@c computed example reg_moncurve d2t_singular/mregular_lib.doc:170 
LIB "mregular.lib";
// The 1st example is the twisted cubic:
reg_moncurve(0,1,2,3);
@expansion{} 2
// The 2nd. example is the non arithm. Cohen-Macaulay monomial curve in P4
// parametrized by: x(0)-s6,x(1)-s5t,x(2)-s3t3,x(3)-st5,x(4)-t6:
reg_moncurve(0,1,3,5,6);
@expansion{} 3
// Additional information can be obtained as follows:
printlevel = 1;
reg_moncurve(0,1,3,5,6);
@expansion{} // Sequence of integers defining a monomial curve C in P4:
@expansion{} //   - time for computing ideal I(C) of S (elimination): 0 sec.
@expansion{} //   - C is arithm. Cohen-Macaulay: NO
@expansion{} //   - reg(C) attained at the last step of a m.g.f.r. of I(C): YES
@expansion{} //   - reg(C) attained at the second last step of a m.g.f.r. of I(C): YES
@expansion{} //   - regularity of the Hilbert function of S/I(C): 2
@expansion{} //   - time for computing reg(C): 0 sec.
@expansion{} // Castelnuovo-Mumford regularity of C:
@expansion{} 3
@c end example reg_moncurve d2t_singular/mregular_lib.doc:170
@end smallexample
@c ---end content reg_moncurve---
