\documentclass{article}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{url}
\urlstyle{same}
\def\ul{\underline}
\def\ov{\overline}
\begin{document}

\begin{center}{\Large Annotated Examples 2}\end{center}
\begin{center}{\large Slight variation on example 3.7.3\\ of the SINGULAR book}\end{center}

This is a slightly more interesting version of example 3.7.3 
from the SINGULAR book, wh
ich they insist on writing as \begin{verbatim}zy2-zx3-x6\end{verbatim},
which I would write as $x^6+x^3z-y^2z$ 
so as to view it as an integral extension problem, 
extending $\mathbf{F}[y,z]$ to 
$\mathbf{F}[x:y,z]/\langle x^6+x^3z-y^2z\rangle$. 

Let's try instead:
\[\mathbf{F}[x,y,z]/\langle x^6+x^3z-y^3z^2\rangle,\]
which has the same flavor but a slightly more interesting integral closure.


In SINGULAR,
\begin{verbatim}
                     SINGULAR                             /
 A Computer Algebra System for Polynomial Computations   /   version 3-1-0
                                                       0<
     by: G.-M. Greuel, G. Pfister, H. Schoenemann        \   Mar 2009
FB Mathematik der Universitaet, D-67653 Kaiserslautern    \
> LIB "normal.lib";
> intmat A[3][3]=1,0,0,5,6,6,3,6,0;
> ring r=0,(x,y,z),M(A);
> ideal i=x6+x3z-y3z2;
> list nor=normal(i);
> nor;
[1]:
   [1]:
//   characteristic : 0
//   number of vars : 6
//        block   1 : ordering dp
//                  : names    T(1) T(2) T(3) 
//        block   2 : ordering M
//                  : names    x y z 
//                  : weights  1 0 0 
//                  : weights  5 6 6 
//                  : weights  3 6 0 
//        block   3 : ordering C
[2]:
   [1]:
      _[1]=y3z
      _[2]=xy2z
      _[3]=x2yz
      _[4]=x3
> def R=nor[1][1];
> setring R;
> normap;
normap[1]=x
normap[2]=y
normap[3]=z
> norid;
norid[1]=T(1)*x-T(2)*y
norid[2]=T(2)*x-T(3)*y
norid[3]=-T(3)*x+y*z
norid[4]=-T(1)*z+x^3+z
norid[5]=-T(1)*y*z^2+T(3)*x^4+T(3)*x*z
norid[6]=T(1)^2-T(1)-y^3
norid[7]=T(1)*T(2)-T(2)-x*y^2
norid[8]=T(2)^2-T(3)-x^2*y
norid[9]=T(1)*T(3)-T(3)-x^2*y
norid[10]=T(2)*T(3)-T(1)*z
norid[11]=T(3)^2-T(2)*z
norid[12]=x^6+x^3*z-y^3*z^2
> option(redSB);
> ideal j=std(norid);j;
j[1]=T(3)*y^2*z-x^5-x^2*z
j[2]=T(3)*x-y*z
j[3]=T(2)*y*z-x^4-x*z
j[4]=T(2)*x-T(3)*y
j[5]=T(1)*z-x^3-z
j[6]=T(1)*x-T(2)*y
j[7]=T(3)^2-T(2)*z
j[8]=T(2)*T(3)-x^3-z
j[9]=T(1)*T(3)-T(3)-x^2*y
j[10]=T(2)^2-T(3)-x^2*y
j[11]=T(1)*T(2)-T(2)-x*y^2
j[12]=T(1)^2-T(1)-y^3
j[13]=x^6+x^3*z-y^3*z^2
\end{verbatim}
is one generator short of a $\mathbf{Q}[y,z]$-module basis
for an algebra presentation. This can be salvaged by
\begin{verbatim}
> intmat B[7][7]=
 1,1,1,1,1,0,0,
 1,1,1,1,0,0,0,
 1,1,1,0,0,0,0,
 1,1,0,0,0,0,0,
 1,0,0,0,0,0,0,
10,9,8,7,5,6,6,
 6,9,6,3,3,6,0;
> ring r=0,(x2,T(1),T(2),T(3),x,y,z),M(B);
> ideal i=imap(R,j);
> option(redSB);
> ideal j=i,x^2-x2;
> ideal k=std(j);k;
k[1]=x^2-x2
k[2]=T(3)*x-y*z
k[3]=T(2)*x-T(3)*y
k[4]=T(1)*x-T(2)*y
k[5]=x2*x-T(1)*z+z
k[6]=T(3)^2-T(2)*z
k[7]=T(2)*T(3)-T(1)*z
k[8]=T(1)*T(3)-x2*y-T(3)
k[9]=x2*T(3)-x*y*z
k[10]=T(2)^2-x2*y-T(3)
k[11]=T(1)*T(2)-T(2)-x*y^2
k[12]=x2*T(2)-y^2*z
k[13]=T(1)^2-T(1)-y^3
k[14]=x2*T(1)-T(3)*y^2
k[15]=x2^2-T(2)*y*z+x*z
\end{verbatim}

The computation of the genus and delta invariant seems strange as well.
In the first example above, 
there would seem to be $5\cdot 10/2=25$ missing weights in the original ring, 
$g=9$ missing in the integral closure, 
with the delta-invariant being $25-9=16$.
It looks like the delta invariant is computed easily, 
but that the genus may not be, depending on what ring and ideal is used.
So why, in the case of several free variables, 
can't the delta-invariant be generalized to the number ($9$ here)
of monomials that are leading monomials relative to the original ring,
but not relative to the integral closure; those (canonical) monomials here being
$x^3,x^4,x^4/y,x^4/z,x^5,x^5/y,x^5/z,x^5/y^2,x^5/(yz)$,
given that $x^3/z$, $x^4/(yz)$, and $x^5/(y^2z)$ are leading monomials of the ideal of the integral closure?

\newpage

The newer normalP with ``withRing'' and ``noRed'' options gives:

\begin{verbatim}
                     SINGULAR                             /
 A Computer Algebra System for Polynomial Computations   /   version 3-1-0
                                                       0<
     by: G.-M. Greuel, G. Pfister, H. Schoenemann        \   Mar 2009
FB Mathematik der Universitaet, D-67653 Kaiserslautern    \
> LIB "/home/leonada/presolve.lib";
> LIB "/home/leonada/normal.lib";
> intmat A[3][3]=1,0,0,5,6,6,3,6,0;
> ring r=23,(x,y,z),M(A);
> ideal i=x6+x3z-y3z2;
> list norp=normalP(i,"withRing","noRed");
> norp;
[1]:
   [1]:
//   characteristic : 23
//   number of vars : 6
//        block   1 : ordering dp
//                  : names    T(1) T(2) T(3) 
//        block   2 : ordering M
//                  : names    x y z 
//                  : weights  1 0 0 
//                  : weights  5 6 6 
//                  : weights  3 6 0 
//        block   3 : ordering C
[2]:
   [1]:
      _[1]=x3y2
      _[2]=x4y+xyz
      _[3]=x5+x2z
      _[4]=y2z
[3]:
   [1]:
      -1
   [2]:
      -1
> def R=norp[1][1];
> setring R;
> normap;
normap[1]=x
normap[2]=y
normap[3]=z
> norid;
norid[1]=T(1)*x-T(2)*y+x
norid[2]=T(2)*x-T(3)*y
norid[3]=T(3)*x-y*z
norid[4]=-T(1)*z+x^3
norid[5]=T(1)^2+T(1)-y^3
norid[6]=T(1)*T(2)-x*y^2
norid[7]=T(2)^2-T(3)-x^2*y
norid[8]=T(1)*T(3)-x^2*y
norid[9]=T(2)*T(3)-x^3-z
norid[10]=T(3)^2-T(2)*z
norid[11]=x^6+x^3*z-y^3*z^2
> option(redSB);
> ideal j=std(norid);j;
j[1]=T(3)*y^2*z-x^5-x^2*z
j[2]=T(3)*x-y*z
j[3]=T(2)*y*z-x^4-x*z
j[4]=T(2)*x-T(3)*y
j[5]=T(1)*z-x^3
j[6]=T(1)*x-T(2)*y+x
j[7]=T(3)^2-T(2)*z
j[8]=T(2)*T(3)-x^3-z
j[9]=T(1)*T(3)-x^2*y
j[10]=T(2)^2-T(3)-x^2*y
j[11]=T(1)*T(2)-x*y^2
j[12]=T(1)^2+T(1)-y^3
j[13]=x^6+x^3*z-y^3*z^2
\end{verbatim}

with grevlex order on new variables T(1), T(2), T(3) of implicit weights
(9,9), (8,6), and (7,3) respectively, over the original ring, 
hence the correct fractions, but an expectedly uninspired presentation. 
(Curiously the denominator here is what I would have produced, 
as opposed to the one produced in normal above.)


\newpage
\begin{verbatim}
Macaulay 2, version 1.2
with packages: Elimination, IntegralClosure, LLLBases, PrimaryDecomposition,
               ReesAlgebra, SchurRings, TangentCone
i1 : load "IntegralClosure.m2";
i2 : R=QQ[x,y,z,MonomialOrder=>{Weights=>{1,0,0},Weights=>{5,6,6},Weights=>{3,6,0}}];
i3 : I=ideal(x^6+x^3*z-y^3*z^2);
i4 : S=R/I;
i5 : time P=presentation(integralClosure(S))
     -- used 0.21 seconds

o5 = | w_(2,0)x-w_(1,1)y 
       
       w_(2,0)w_(1,1)-w_(1,1)-xy2 

       w_(2,0)^2-w_(2,0)-y3 |

i7 : time G=gens gb P
     -- used 0. seconds

o7 = | w_(1,1)^2y-w_(1,1)x-x2y2 

       w_(2,0)x-w_(1,1)y 

       w_(2,0)w_(1,1)-w_(1,1)-xy2

       w_(2,0)^2-w_(2,0)-y3 |
\end{verbatim}


Macaulay2 version 1.2 gets this example ``wrong'' from my point of view
(see the discussion following the MAGMA normalisation section):


In char 23,

\begin{verbatim}
i13 : R=ZZ/23[x,y,z];
i14 : I=ideal(x^6+x^3*z-y^3*z^2);
i15 : S=R/I;
i16 : time P=presentation(integralClosure(S))
     -- used 0.19 seconds

o16 = | w_(2,0)x-w_(1,1)y 
  
        w_(2,0)w_(1,1)-w_(1,1)-xy2 

        w_(2,0)^2-w_(2,0)-y3 |

i17 : time G=gens gb P
     -- used 0. seconds

o17 = | w_(1,1)^2y-w_(1,1)x-x2y2 

        w_(2,0)x-w_(1,1)y 

        w_(2,0)w_(1,1)-w_(1,1)-xy2
      
        w_(2,0)^2-w_(2,0)-y3 |


i18 : time F=icFracP(S)
     -- used 11.33 seconds

              3         2
             x  - 11z  y z  y*z
o18 = {x, 1, --------, ---, ---}
                 z       2   x
                        x
\end{verbatim}
the {\em integralClosure} output is consistent with the char 0 output,
but {\em icFracP} is slow, unreduced modulo the original ring, and
still provides no presentation that I can see. 

The option {\em conductorElement} doesn't help speed this up,
and M2 still micromanages some of the fractions, 
probably in part because there is no attempt to view this conductor element 
as the common denominator:

\begin{verbatim}
i20 : time F=icFracP(S, conductorElement=> y^2*z)
     -- used 10.9 seconds

           3   4
          x   x  + x*z  y*z
o20 = {1, --, --------, ---}
           z     y*z     x
\end{verbatim}


\newpage

The author's qth power algorithm sees $q=3$ as a bad prime,
but then reconstructs the char 0 answer from those over $q=5,7,11$,
giving a presentation in terms of a $\mathbf{Q}[f_{6,6},f_{6,0}]$-module basis
$(f_{0,0}:=1,f_{5,3},f_{7,3},f_{8,6},f_{9,9},f_{10,6})$.

\begin{verbatim}
Loading file "qchar051109.mag"
Loading "closure_func040909.mag"
1111111111111111111111111111111111111111111111111111111111
q= 3
Delta= S.2^6*S.3^2+S.2^3*S.3^2
WT_MATRIX_T= [
    [ 7, 5, 4, 3, 2, 6, 6 ],
    [ 3, 3, 0, 3, 0, 6, 0 ]
]
time for q= 3 is 0.060 seconds
modulus= 3
1111111111111111111111111111111111111111111111111111111111
q= 5
Delta= S.2^2*S.3^2
WT_MATRIX_T= [
    [ 10, 9, 8, 7, 5, 6, 6 ],
    [  6, 9, 6, 3, 3, 6, 0 ]
]
time for q= 5 is 0.010 seconds
1111111111111111111111111111111111111111111111111111111111
q= 7
Delta= S.2^2*S.3^2
WT_MATRIX_T= [
    [ 10, 9, 8, 7, 5, 6, 6 ],
    [  6, 9, 6, 3, 3, 6, 0 ]
]
time for q= 7 is 0.010 seconds
modulus= 35
[
    f_9_9^5*f_6_6 + f_9_9^5 + f_9_9^2*f_6_6*f_6_0 + f_9_9^2*f_6_0,
    f_9_9*f_6_6^3*f_6_0 + f_9_9*f_6_6^2*f_6_0,
    f_9_9^5 + f_9_9^2*f_6_6^2*f_6_0 + f_9_9^2*f_6_0,
    f_9_9^3*f_6_6^2 - f_6_6^2*f_6_0,
    f_9_9^4*f_6_6 - f_9_9*f_6_6^2*f_6_0 + f_9_9*f_6_6*f_6_0,
    f_6_6^4*f_6_0 + f_6_6^3*f_6_0,
    f_6_6^3*f_6_0^2 + f_6_6^2*f_6_0^2,
    f_6_6^3*f_6_0 + f_6_6^2*f_6_0
]
1111111111111111111111111111111111111111111111111111111111
q= 11
Delta= S.2^2*S.3^2
WT_MATRIX_T= [
    [ 10, 9, 8, 7, 5, 6, 6 ],
    [  6, 9, 6, 3, 3, 6, 0 ]
]
time for q= 11 is 0.020 seconds
modulus= 385
[
    f_5_3^2*f_6_6^2*f_6_0,
    f_5_3^3*f_6_6^2,
    f_5_3^4*f_6_6 + f_5_3*f_6_6*f_6_0,
    f_5_3^5 + f_5_3^2*f_6_0,
    f_5_3*f_6_6^2*f_6_0,
    f_6_6^3*f_6_0,
    f_6_6^2*f_6_0^2,
    f_6_6^2*f_6_0
]
1 f_5_3^2*f_6_6^2*f_6_0
2 f_5_3^3*f_6_6^2
3 f_5_3^4*f_6_6 + f_5_3*f_6_6*f_6_0
4 f_5_3^5 + f_5_3^2*f_6_0
5 f_5_3*f_6_6^2*f_6_0
6 f_6_6^3*f_6_0
7 f_6_6^2*f_6_0^2
8 f_6_6^2*f_6_0
newrelations= [
    f_5_3^2 - f_10_6,
    f_7_3^2 - f_8_6*f_6_0,
    f_7_3*f_5_3 - f_6_6*f_6_0,
    f_8_6^2 - f_10_6*f_6_6 - f_7_3,
    f_8_6*f_7_3 - f_9_9*f_6_0 - f_6_0,
    f_8_6*f_5_3 - f_7_3*f_6_6,
    f_9_9^2 - f_6_6^3 + f_9_9,
    f_9_9*f_8_6 - f_5_3*f_6_6^2,
    f_9_9*f_7_3 - f_10_6*f_6_6,
    f_9_9*f_5_3 - f_8_6*f_6_6 + f_5_3,
    f_10_6^2 - f_8_6*f_6_6*f_6_0 + f_5_3*f_6_0,
    f_10_6*f_9_9 - f_7_3*f_6_6^2 + f_10_6,
    f_10_6*f_8_6 - f_6_6^2*f_6_0,
    f_10_6*f_7_3 - f_5_3*f_6_6*f_6_0,
    f_10_6*f_5_3 - f_9_9*f_6_0
]
totaltime= 0.110 seconds

\end{verbatim}


Since there are two independent variables, this is beyond the scope of MAGMA's 
{\em IntegralClosure} function, 
but can be done using the {\em Normalisation} function,
which seems to have appeared in version 11.


\begin{verbatim}
t:=Cputime();
Q:=Rationals();
P<x,y,z>:=PolynomialRing(Q,3,"weight",[1,0,0,5,6,6,3,6,0]);
f:=x^6+x^3*z-y^3*z^2;
I:=ideal<P|f>;
J:=Normalisation(I:FFMin:=true);
"J=",J;
Cputime(t);
G:=GroebnerBasis(J[1][1]);G;#G;
Cputime(t);
\end{verbatim}

The laughable output (taking around 300 seconds to produce) 
from describing J takes over 14,000 lines, so is
omitted here. The GroebnerBasis output , taking another 300 seconds)
is
\begin{verbatim}

    J.1+30*J.3-108*J.4*J.8-2/81*J.8^4-1/162*J.8,
    J.2-48*J.3*J.8+432*J.4*J.8^2+8/81*J.8^5-1/81*J.8^2,
    J.3^2+11/972*J.3*J.8-4/27*J.4*J.8^5-5/27*J.4*J.8^2-1/59049*J.8^11
      -1/78732*J.8^8-11/944784*J.8^5,
    J.3*J.4+1/2187*J.3-7/486*J.4*J.8^4-5/486*J.4*J.8-1/531441*J.8^10 
      -1/2125764*J.8^7-1/2125764*J.8^4,
    J.3*$.5-5/1944*J.5*J.8-5/34992*J.6*J.8^3-1/39366*J.7*J.8^8,
    J.3*J.6-4/27*J.5*J.8^2-1/81*J.6*J.8^4-5/972*J.6*J.8-4/2187*J.7*J.8^9
      -1/729*J.7*J.8^6+5/8748*J.7*J.8^3,
    J.3*J.7-2/3*J.5-1/108*J.6*J.8^2-1/243*J.7*J.8^4,
    J.3*J.8^3+J.3-9*J.4*J.8^4-45/4*J.4*J.8-1/486*J.8^7-1/972*J.8^4,
    J.3*J.9-1/243*J.7^3*J.8^4-5/972*J.7^3*J.8-5/486*J.8^4*J.9-5/972*J.8*J.9,
    J.4^2-1/729*J.4*J.8^3-1/2187*J.4-1/4782969*J.8^9,
    J.4*J.5-1/4374*J.5-1/78732*J.6*J.8^2-1/354294*J.7*J.8^7,
    J.4*J.6-1/81*J.5*J.8-5/4374*J.6*J.8^3-1/2187*J.6-4/19683*J.7*J.8^8 
      -2/19683*J.7*J.8^5+1/19683*J.7*J.8^2,
    J.4*J.7+2/9*J.5*J.8^2-1/243*J.6*J.8+1/2187*J.7*J.8^3,
    J.4*J.9-1/2187*J.7^3*J.8^3-1/2187*J.7^3-2/2187*J.8^3*J.9-1/2187*J.9,
    J.5^2-1/162*J.5*J.7*J.8-1/26244*J.7^2*J.8^5,
    J.5*J.6-2/9*J.5*J.7*J.8^2-1/162*J.6*J.7*J.8-2/729*J.7^2*J.8^6
      +1/1458*J.7^2*J.8^3,
    J.5*J.7^2-1/162*J.8^4*J.9,
    J.5*J.8^3+1/4*J.5-1/72*J.6*J.8^2+1/324*J.7*J.8^4,
    J.5*J.9-1/162*J.7^4*J.8-1/162*J.7*J.8*J.9,
    J.6^3-160/729*J.7^3*J.8^9-104/729*J.7^3*J.8^6-2/81*J.7^3*J.8^3 
      -1/729*J.7^3-64/729*J.8^12*J.9-256/729*J.8^9*J.9-40/243*J.8^6*J.9 
      -19/729*J.8^3*J.9-1/729*J.9,
    J.6^2*J.7-16/81*J.7^3*J.8^7-4/27*J.7^3*J.8^4-1/81*J.7^3*J.8 
      -32/81*J.8^7*J.9-4/27*J.8^4*J.9-1/81*J.8*J.9,
    J.6^2*J.8-8/9*J.6*J.7*J.8^3-1/9*J.6*J.7-16/81*J.7^2*J.8^8 
      +4/81*J.7^2*J.8^5+1/81*J.7^2*J.8^2,
    J.6*J.7^2-2/9*J.7^3*J.8^2-4/9*J.8^5*J.9-1/9*J.8^2*J.9,
    J.6*J.8*J.9-4/9*J.7^4*J.8^3-1/9*J.7^4-2/3*J.7*J.8^3*J.9-1/9*J.7*J.9,
    J.7^6+J.7^3*J.9-J.8^3*J.9^2
\end{verbatim}

From this, it is possible to see (using S as the name of the ring
and $S.7=x$, $S.8=y$, $S.9=z$) that:
\[S.6*y*z - 4/9*x^4*y^3 - 1/9*x^4 - 2/3*x*y^3*z - 1/9*x*z=0,\]
\[S.5*z - 1/162*x^4*y - 1/162*x*y*z=0,\]
\[S.4*z - 1/2187*x^3*y^3 - 1/2187*x^3 - 2/2187*y^3*z - 1/2187*z=0,\] 
\[S.3*z - 1/243*x^3*y^4 - 5/972*x^3*y - 5/486*y^4*z - 5/972*y*z=0,\]
\[S.2 - 48*S.3*y + 432*S.4*y^2 + 8/81*y^5 - 1/81*y^2=0,\]
\[S.1 + 30*S.3 - 108*S.4*y - 2/81*y^4 - 1/162*y=0.\]
This suggests that
\[f6:=9S.6-6xy^2=\frac{4x^4y^3+x^4+xz}{yz}\]
\[f5:=162S.5-xy=\frac{x^4y}{z}\]
\[f4:=2187S.4+2y^3+1=\frac{x^3y^3+x^3}{z}\]
\[f3:=972S.3-10y^4-5y=\frac{4x^3y^4+5x^3y}{z}\]
would be better fractions to use, with $S.2$ and $S.1$ probably unnecessary.
But then one could use
\[g3:=f3-4yf4=\frac{x^3y}{z}\]
probably throw away $f5=g3x$, use
\[g6:=f6-4g3y=\frac{x^4+xz}{yz}\]
\[g4:=f4-g3*y^2=\frac{x^3}{z}\], and then throw away $g3$.
So $g4$ corresponds to $f_{9,9}$ from above, and $g6$ corresponds to $f_{8,6}$.
Since both MAGMA and Macaulay2 seem to think that $f_{7,3}$ is {\em not} missing,
let us consider why they might think that.

Indeed it is true that $f_{8,6}^2-f_{5,3}^2f_{6,6}=f_{7,3}$, 
so that $f_{7,3}$ does in fact live in this integral closure.
However, as with most ``wrong'' answers, this is analogous to the difference
between describing an ideal by a generating set 
and by describing it by a Gr\"obner basis.
To my way of thinking, 
it is important to be able to give a normal form of each element
of the integral closure. 
That means that either $f_{8,6}^2$ or $f_{5,3}^2f_{6,6}$
must be reduced to normal form. And what would that be? Hmm....
My answer is first that the normal form of $f_{5,3}^2$ is $f_{10,6}$;
and then that the normal form of $f_{8,6}^2$ is $f_{10,6}f_{6,6}+f_{7,3}$.
But this requires having both $f_{7,3}$ and $f_{10,6}$ as generators.

\end{document}


normalP computes the fractions I expected, as opposed to those above,
but, again, the ``withring'' option spews garbage, clearly totally unrelated
to the fractions produced.

\begin{verbatim}
 ring r=23,(x,y,z),M(A);
> ideal i=x6+x3z-y3z2;
> list nor=normalP(i,"withring");
   ? wrong range[7] in ideal/module(6)
   ? error occurred in normal.lib::substpartSpecial line 3683: `            kk=kk+1;`
   ? leaving normal.lib::substpartSpecial
   ? wrong range[8] in ideal/module(6)
   ? error occurred in normal.lib::substpartSpecial line 3683: `            kk=kk+1;`
   ? leaving normal.lib::substpartSpecial
   ? wrong range[9] in ideal/module(6)
   ? error occurred in normal.lib::substpartSpecial line 3683: `            kk=kk+1;`
   ? leaving normal.lib::substpartSpecial
   ? wrong range[10] in ideal/module(6)
   ? error occurred in normal.lib::substpartSpecial line 3683: `            kk=kk+1;`
   ? leaving normal.lib::substpartSpecial
   ? wrong range[11] in ideal/module(6)
   ? error occurred in normal.lib::substpartSpecial line 3683: `            kk=kk+1;`
   ? leaving normal.lib::substpartSpecial
   ? wrong range[12] in ideal/module(6)
   ? error occurred in normal.lib::substpartSpecial line 3683: `            kk=kk+1;`
   ? leaving normal.lib::substpartSpecial

> nor;
[1]:
   [1]:
      //   characteristic : 23
//   number of vars : 2
//        block   1 : ordering dp
//                  : names    T(1) 
//        block   2 : ordering M
//                  : names    x 
//                  : weights  1 
//        block   3 : ordering C
[2]:
   [1]:
      _[1]=x3y2
      _[2]=x4y+xyz
      _[3]=x5+x2z
      _[4]=y2z
[3]:
   [1]:
      -1
   [2]:
      -1
> def R=nor[1][1];
> setring R;
> normap;
normap[1]=x
normap[2]=0
normap[3]=-x^3
> norid;
norid[1]=T(1)*x+x
norid[2]=T(1)^2+T(1)
norid[3]=T(1)*x^3+x^3
> option(redSB);
> ideal j=std(norid);j;
j[1]=T(1)*x+x
j[2]=T(1)^2+T(1)
\end{verbatim} 



\begin{verbatim}
R=QQ[x,y,z,MonomialOrder=>{Weights=>{1,0,0},Weights=>{5,6,6},Weights=>{3,6,0}}]
I=ideal(x^6+x^3*z-y^3*z^2)
S=R/I
timing P=presentation(integralClosure(S))
\end{verbatim}
produces
\begin{verbatim}
| w_3x+2w_2y-x 
  w_3w_2+w_2+2xy2 
  w_3^2-4y3-1 |
      -- .18 seconds
\end{verbatim}
finding only the functions of weights (9,9) and (8,6), 
but missing the one of weight (7,3) in addition to suppressing $x^2$.

Without the MonomialOrder specified, it is still ``wrong'':
\begin{verbatim}
Macaulay 2, version 1.2
i1 : R=QQ[x,y,z]
i2 : I=ideal(x^6+x^3*z-y^3*z^2)
i3 : S=R/I
i4 : P=presentation(integralClosure(S))

o4 = | w_3x+w_1y 
       4w_3w_1-2w_1+xy2 
       4w_3^2-2w_3-y3 |
\end{verbatim}  

And in characteristic 23,
\begin{verbatim}
i5 : R=ZZ/23[x,y,z]
i6 : I=ideal(x^6+x^3*z-y^3*z^2)
i7 : S=R/I
i8 : P=presentation(integralClosure(S))

o8 = | w_3x+5w_1y-4x 
       w_3w_1+4w_1-xy2 
       w_3^2+5y3+7 |

i9 : F=icFracP(S)

             3         2
            x  - 11z  y z  y*z
o9 = {x, 1, --------, ---, ---}
                z       2   x
                       x
\end{verbatim}
it is ``wrong'' again, despite icFracP giving a technically correct
but poorly edited set of fractions (given that the element $x$ and the term $-11z$ are unnecessary and that the denominators are not from $\mathbf{Q}[y,z]$ as I claim they should be).
