[back] [prev] [next] [index] [root]

 


IdealIntegrity

Checks the ideals for various inconsistencies

Syntax:

errcount = IdealIntegrity(I);

ideal
  I  
small integer
  errcount  
the number of detected errors

Description:

The most important application of this function is this: Not all matrices (square and with the correct dimension) over the coefficient order of the ideal form an valid ideal. If an ideal is created with a basis matrix it is not checked if this matrix forms a correct ideal basis (because it is much too expensive to check this for every ideal creation by default.) Such an wrong ideal can cause all sorts of follow-up errors which might be difficult to detect. If You are not sure if the ideal is correct apply this function. The ideal invariants which are stored in the ideal data structure are checked for their validity as well, including factorization, norm, minimum, principal generator, prime element, primality. If an inconsistency is detected a warning message is printed to the screen but the break loop is not entered (except if it is not possible to find a 2 element representation where the break loop is entered). If the return value is 0 the ideal is (very likely) correct.


Example:

Correct ideal

kash> O := OrderMaximal(Order(Poly(Zx, [1, 6, 6, 6])));;
kash> I := Ideal(O, Mat(Z, [[2,0,0],[0,1,0],[0,0,1]]),1);
<
[2 0 0]
[0 1 0]
[0 0 1]
>

kash> IdealIntegrity(I);
> 0


<- back[back] [prev] [next] [index] [root]