Project

General

Profile

Bug #1604

SqFreeFactor crashes over non-perfect field

Added by Florian Walsh almost 3 years ago. Updated over 1 year ago.

Status:
In Progress
Priority:
Normal
Assignee:
-
Category:
bug
Target version:
Start date:
27 Jul 2021
Due date:
% Done:

10%

Estimated time:
Spent time:

Description

It seems like SqFreeFactor only works over perfect fields, but CoCoA does not check whether the ring is defined over a perfect field.
The following code leads to a segmentation fault.

R ::= ZZ/(2)[a];
K := NewFractionField(R);
Use K[x,y];   
SqFreeFactor(x^2+a);       

Radical also crashes, probably because it uses SqFreeFactor.

R ::= ZZ/(2)[a];
K := NewFractionField(R);
Use K[x,y];              
I := Ideal(x^2+a, y^2+a);

History

#1 Updated by John Abbott over 2 years ago

  • Category set to bug
  • Target version set to CoCoA-5.4.0

The problem appears to be an infinite loop inside PthRoot (in ring.C:1220--1250).
For some reason the iterator seems never to end. It's too late to investigate further now.

The problem is almost certainly in CoCoALib.

#2 Updated by John Abbott over 2 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

Correction: the problem seems to be that SqfreeFactorCharP goes into an infinite loop.

The call to IteratedPthRoot returns the original poly, but this is not tested for.
Is there an input violation? Or a mathematical bug?

I'll investigate later.

#3 Updated by John Abbott over 2 years ago

The following test case still fails

R ::= ZZ/(2)[a];
K := NewFractionField(R);
Use K[x,y];   
SqFreeFactor((x^2+a)*(x^2+a^3)^2); -- gives just 1 factor of deg 6

#4 Updated by John Abbott over 2 years ago

  • Target version changed from CoCoA-5.4.0 to CoCoA-5.4.2

No real chance of finding time to resolve this in the foreseeable future :-(
Probably not that hard, but it will surely require time.
Any volunteers?

#5 Updated by John Abbott over 1 year ago

STATUS 2022-09-28:
The original failing cases are now apparently OK.
The example in comment 3 still incorrectly returns the whole deg 6 poly (instead of 2 factors).

Also available in: Atom PDF