sursumCorda

1174 Reputation

13 Badges

2 years, 76 days

MaplePrimes Activity


These are replies submitted by sursumCorda

@Carl Love Many thanks. I think that it should be 

# resume
MathematicalFunctions:-Assume(V[] ::~ real);
MathematicalFunctions:-Coulditbe(And(d1[]));

This time it becomes rather time-consuming; I have to abort it manually after thousands of seconds.
In this case, solve is useful indeed. But if there are not no solutions (which means ), solve will run for too long, and coulditbe fails again. For instance, considering 

d3:= {p1, p2, S4 <= 1};
_EnvTry := hard: 
(coulditbe(`and`(d2[])) assuming V[] ::~ real); # FAIL

As for MathematicalFunctions:-Coulditbe, it seems that we need to take a longer time—maybe several hours or even more. However, this may not be acceptable for the user.

@Carl Love Sorry for late reply. I am testing it.

@acer Thanks. I would like there to be such new capabilities in a future release (like Maple 2024) if possible.

Ordinarily, SMTLIB[Satisfiable] is inapplicable to general situations (and does not support some elementary functions). The implicit objective of my question is to eliminate quantifiers and then to produce an equivalent quantifier-free formula. (SMTLIB[Satisfiable] thus no longer pertains if the result is not simply true or false.) Insofar as I know it, this functionality has been implemented in Maple as RegularChains[SemiAlgebraicSetTools][QuantifierElimination], but those formulae appearing in statements are all interpreted over  (and do not support something as well). Moreover, the command seems to perform badly as yet on certain slightly complicated statements such as F1R3 (although a trivial counterexample exists). 
Incidentally, doing the same thing (e.g., QE4C and QE4R), by contrast, is much easier in Mathematica. In my opinion, there is still considerable room for improvement in Maple.

@acer I'm not sure. In accordance with MathematicalFunctions/Is, Is(A, B, ...) = not Coulditbe(Not(A), Not(B), Not(...)); accordingly, is( F1 and not F2 )not coulditbe( not F1 or F2 ). In addition, the help page of is explains that the coulditbe routine returns true if there is a set of such parameter values for which the proposition is true. So, not is( F1 and not F2 ) assuming real just suggests  (instead of 's ). For example, considering 

R3 := a*b*c*d >1 and a*b*c + a*b*d + a*c*d + b*c*d > 0:

((not is(F1 and not R3)) assuming real); # ture

However, F1R3, for the point (a, b, c, d) = (1, 1, 1, 1) (which is in F1) doesn't satisfy R3.

BTW, it seems that SMTLIB[Satisfiable] is another extension of coulditbe.

@Carl Love Thanks for your kind explanation.
I find that there exists one function HamiltonianSAT in showstat(GraphTheory:-IsHamiltonian) (or print(GraphTheory:-IsHamiltonian)). Is it possible to call a built-in but undocumented function by the Maple standard interface in general?

@Carl Love Thanks for your comments. The reason why I try different methods is that, recently, I read an old essay on Mathematica which claims that if one large graph is Hamiltonian, then running ChvátalQ may be faster than running native Combinatorica`HamiltonianQ. So I want to test the same thing in Maple.

Besides, the help page also says: By setting infolevel[IsHamiltonian] to an integer greater than 1 a message will be displayed stating how the graph was proven, or disproven, to be Hamiltonian. But this setting doesn't work in some cases. (Although I never need such messages, a bug described below does exist.)
Attachment: infolevel[IsHamiltonian].mws

@acer "Strangely" means: Maple can work out 

minimize(x^3 + y^3 + z^3 - 4*x*y*z, x = 0 .. infinity, y = 0 .. infinity) assuming z>0;

correctly, or work out 

minimize(x^3 + y^3 - 4*x*y, x = 0 .. infinity, y = 0 .. infinity); # Put z = 1 here, and remove the constant.

correctly, but Maple give incorrect result for 

minimize(x^2 + y^2 - 4*x*y, x = 0 .. infinity, y = 0 .. infinity); # cubic → quadratic

How about x^n+y^n-4*x*y
I don't know why Maple cannot deal with x2+y2-4xy (or more clearly, (x-y)2-2xy).

This may be a serious issue; it turns out that certain Maple's symbolic results (without any warnings) are not always reliable indeed. For a simple problem, we can easily discover potential mistakes, but what about large-scale and complex problems…

@mmcdara Some substitutions can be applied, but unfortunately, they are of no effect. For instance, 

minimize(evalindets(x^3 + y^3 + z^3 - 4*x*y*z, 'symbol', x -> 1/x - 1), [x, y, z] =~ 0 .. 1);

still returns 0. Set [x,y,z]=~10^(-12)..1 may avoid incorrect result. However, I hope that Maple can "prove" the minimum (or infimum) by itself (like Mathematica); otherwise Optimization:-Minimize is certainly the better choice. 

@acer Thanks for your examples. Strangely, 

minimize(x^3 + y^3 + z^3 - 4*x*y*z, x = 0 .. infinity, y = 0 .. infinity) assuming z>0;

returns correct results, but the much easier version 

minimize((x - y)^2 - k*x*y, [x = 0 .. infinity, y = 0 .. infinity]) assuming (k > 0);

still returns wrong results. Any reason?

@acer For users, the following one may be better in some sense. 

eval(eval(foldl(uneval(seq), F(i, j, k), i = 1 .. Ri, j = 1 .. Rj, k = 1 .. Rk)));

Or equivalently, 

(eval@@2@foldl)(''seq'',F(i,j,k),i=1..Ri,j=1..Rj,k=1..Rk);

Since it is more direct than using _seq or S (or other dummy names), though I think that there is no essential difference for Maple between them. (But strangely, while eval(subs(...)) works, subs[eval](...) fails.)
John Fredsted's construction is simple as well, but for big (i.e., long) sequence, eval–foldl–seq version is faster in my computer.

First 20 21 22 Page 22 of 22