Ask Your Question
0

qepcad fails to find an existing solution

asked 2024-02-15 10:41:33 +0100

I've been trying to use qepcad on the Sagecell and I have the following problem. If I run the following code:

var('a1, a2, a3, a4, d1, d2, d3, d4')

qf = qepcad_formula

F1 = qf.and_( a1 >= 1, a2 >= 1, a3 >= 1, a4 >= 1, d1 >= 0, d2 >= 0, d3 >= 0, d4 >= 0, a1*d1 + a2*d2 + a3*d3 - a4*d4 == 0, d1 + d2 < d3 + d4 )

qepcad(F1, solution = 'any-point')

Then I get a possible solution with {... 'd4' : 1}. However if I perform nearly the same computation, except with the condition d4 >= 0 changed to d4 >= 1, then I get an error:

var('a1, a2, a3, a4, d1, d2, d3, d4')

qf = qepcad_formula

F2 = qf.and_( a1 >= 1, a2 >= 1, a3 >= 1, a4 >= 1, d1 >= 0, d2 >= 0, d3 >= 0, d4 >= 1, a1*d1 + a2*d2 + a3*d3 - a4*d4 == 0, d1 + d2 < d3 + d4 )

qepcad(F2, solution = 'any-point')

which gives ... ValueError: input formula is false everywhere. However the solution to the first example is a valid solution to the second example so I'm not sure what's going on.

Any help would be greatly appreciated!

edit retag flag offensive close merge delete

Comments

Max Alekseyev gravatar imageMax Alekseyev ( 2024-02-20 20:19:02 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2024-03-02 17:57:33 +0100

Max Alekseyev gravatar image

As it was pointed out in the issue 37365, the reason for this behavior is the inability of Sage to recognize QEPCAD's error in the non-interactive mode.

The error can be seen in running QEPCAD in the interactive mode with interact=True, or in verbose mode with verbose=True, although the latter is currently broken. Alternative is to use parameter logfile='myfile.log' and inspect the file myfile.log afterwards. Under Linux it's also possible to specify logfile='/dev/stdout' as an alternative to verbose=True.

The error in this case is "Too few cells reclaimed". The number of cells is controlled by memcells= parameter to qepcad(), although increasing it in this case up to 10^8 does not seem to help.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2024-02-15 10:41:33 +0100

Seen: 184 times

Last updated: Mar 02