Bug #724
RationalSolve: wrongly complains about non zero-dim even in finite char
Description
I ran the example given in issue #723 which tries to compute all rational solutions over a finite field of a homogeneous system which is not 1-dimensional. But RationalSolve
gave an error even though the number of rational solutions is necessarily finite.
Is this a bug?
Related issues
History
#1 Updated by John Abbott almost 9 years ago
Is it just enough to skip the check for zero-dimensionality in this case?
(if so, that's a really simple fix)
#2 Updated by John Abbott almost 9 years ago
I have disabled the zero-dimensionality check if the coeff ring is a finite field.
In one simple test that seems to be enough for the homog case; it was not enough for the inhomog case -- I had to change the result of an elim
because if all values are possible then the result of the elim
is the zero ideal (yet the code expected there to be at least one generator).
#3 Updated by John Abbott almost 9 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
It is not quite as easy as I had hoped. Every so often zero polynomials pop up in awkward places (e.g. to be factorized for their rational roots). The code needs to be reviewed more completely to be sure that it can cope with non zero-dim systems when the coeffs are in a finite field (i.e. when the zero poly has a finite number of rational roots).
Note: maybe I should add a fn which computes the rational roots of a univariate polynomial, and which gives all finite field elems if the polynomial is zero.
#4 Updated by John Abbott over 5 years ago
The example from #723 still fails with the following error:
--> ERROR: Value must be non-zero --> [CoCoALib] factor(x) --> WHERE: at line 102 (column 23) of RationalPoints.cpkg5 --> LinearFacs := [g in factor(f).factors | deg(g) = 1]; --> ^^^^^^^^^
The stack unwinding gave:
CONTEXT: function RationalRoots at line 102 of RationalPoints.cpkg5 CALLED BY: function RationalAffinePointsLoop at line 76 of RationalPoints.cpkg5 CALLED BY: function RationalProjectivePointsLoop at line 136 of RationalPoints.cpkg5 CALLED BY: function RationalProjectivePointsLoop at line 135 of RationalPoints.cpkg5 CALLED BY: function RationalProjectivePointsLoop at line 135 of RationalPoints.cpkg5 CALLED BY: function RationalProjectivePointsLoop at line 135 of RationalPoints.cpkg5 CALLED BY: function RationalProjectivePointsLoop at line 135 of RationalPoints.cpkg5 CALLED BY: function RationalProjectivePointsLoop at line 135 of RationalPoints.cpkg5 CALLED BY: function RationalProjectivePointsLoop at line 135 of RationalPoints.cpkg5 CALLED BY: function RationalProjectivePointsLoop at line 135 of RationalPoints.cpkg5 CALLED BY: function RationalProjectivePointsLoop at line 135 of RationalPoints.cpkg5 ... CALLED BY: function RationalProjectivePointsLoop at line 135 of RationalPoints.cpkg5 CALLED BY: function RationalProjectivePointsLoop at line 135 of RationalPoints.cpkg5 CALLED BY: function RationalProjectivePointsLoop at line 135 of RationalPoints.cpkg5 CALLED BY: function RationalProjectivePointsLoop at line 135 of RationalPoints.cpkg5 CALLED BY: function RationalProjectivePointsLoop at line 135 of RationalPoints.cpkg5 CALLED BY: function RationalProjectivePointsLoop at line 135 of RationalPoints.cpkg5 CALLED BY: function RationalProjectivePointsLoop at line 135 of RationalPoints.cpkg5 CALLED BY: function RationalProjectivePointsLoop at line 135 of RationalPoints.cpkg5 CALLED BY: function RationalProjectivePoints at line 121 of RationalPoints.cpkg5 CALLED BY: function RationalSolve at line 56 of RationalPoints.cpkg5 called at top-level
#5 Updated by John Abbott about 5 years ago
- Related to Bug #1216: RationalSolve: gives wrong answer added
#6 Updated by John Abbott about 5 years ago
- Related to Slug #1270: RationalSolve: use MinPolyQuot instead of elim added
#7 Updated by John Abbott about 3 years ago
- Target version changed from CoCoA-5.?.? to CoCoA-5.4.0
#8 Updated by John Abbott about 3 years ago
- Status changed from In Progress to Resolved
- Assignee set to John Abbott
- % Done changed from 10 to 60
The example from issue #723 is way too slow to act as a test case -- do we have a more sane test case? How about the one below?
I suspect that this is now resolved.
/**/ use ZZ/(3)[x,y,z]; /**/ L := [x, x*y]; /**/ solns := RationalSolveHomog(L); record[ProjectivePts := [[0, 1]], indets := [x, y]]
#9 Updated by John Abbott about 3 years ago
- Status changed from Resolved to Closed
- % Done changed from 60 to 100
- Estimated time set to 1.44 h
Added a test to exbugs.cocoa5
.
Closing.