Home Online Manual
Back: locAtZero
Forward: getSmallest
Up: normal_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.4.18.11 norTest

Procedure from library normal.lib (see normal_lib).

nor is the output of normal(i) (any options) or
normalP(i,"withRing") or normalC(i) (any options).
In particular, the ring nor[1][1] contains the ideal norid and the map normap: basering/i --> nor[1][1]/norid.

an intvec v such that:
         v[1] = 1 if the normap is injective and 0 otherwise
         v[2] = 1 if the normap is finite and 0 otherwise
         v[3] = 1 if nor[1][1]/norid is normal and 0 otherwise
If n=1 (resp n=2) only v[1] (resp. v[2]) is computed and returned

The procedure can be used to test whether the computation of the normalization was correct: basering/i --> nor[1][1]/norid is the normalization of basering/i if and only if v=1,1,0.

For big examples it can be hard to fully test correctness; the partial test norTest(i,nor,2) is usually fast

LIB "normal.lib";
int prl = printlevel;
printlevel = -1;
ring r = 0,(x,y),dp;
ideal i = (x-y^2)^2 - y*x^3;
list nor = normal(i);
norTest(i,nor);                //1,1,1 means that normal was correct
==> 1
==> 1
==> 1,1,1
nor = normalC(i);
norTest(i,nor);                //1,1,1 means that normal was correct
==> 1
==> 1
==> 1,1,1
ring s = 2,(x,y),dp;
ideal i = (x-y^2)^2 - y*x^3;
nor = normalP(i,"withRing");
norTest(i,nor);               //1,1,1 means that normalP was correct
==> 1
==> 1
==> 1,1,1
printlevel = prl;