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

D.4.25.11 norTest

Procedure from library normal.lib (see normal_lib).

Assume:
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.

Return:
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

Theory:
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.

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

Example:
 
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;