Input {48, MemoryConstrained[...]} cannot be evaluated, cause: {HoldForm[MessageName[ForAll, "msgs"]]}
krooken opened this issue · 2 comments
I am getting an error message that I cannot understand. I am trying to prove a seemingly simple formula where I have, among others, yp < 0
and yp >= 0
on the left hand side. When I try to close the branch with QE
, I get an error saying Input {48, MemoryConstrained[...]} cannot be evaluated, cause: {HoldForm[MessageName[ForAll, "msgs"]]}
. What does this error message mean? If I hide some of the sequents, then I can close the branch with QE
, but I am a bit suprised that I have to. I think that I have managed to close similar branched before; what is special about this formula?
KeYmaera X version 5.0.1
Operating System:
Windows 10 10.0
Java JVM:
Oracle Corporation 17.0.1 with 64 bits
Java Home:
C:\Program Files\Java\jdk-17.0.1
Input {48, MemoryConstrained[TimeConstrained[Reduce[ForAll[{kyx
yp, kyx
xp, kyxx, kyx
wl, kyxvpMax, kyx
v, kyxt$u$, kyx
range, kyxptol, kyx
le, kyxaMin, kyx
aMax, kyxa, kyx
T}, Implies[And[Greater[kyxwl, 0], And[Greater[kyx
le, 0], And[Greater[kyxvpMax, 0], And[Greater[kyx
range, 0], And[Greater[kyxptol, 0], And[Less[kyx
aMin, 0], And[Greater[kyxaMax, 0], And[Less[Times[kyx
T, kyxvpMax], kyx
wl], And[Less[Times[kyxT, Minus[0]], kyx
wl], And[Greater[kyxxp, kyx
range], And[Greater[kyxT, 0], And[Less[kyx
yp, 0], And[GreaterEqual[kyxt$u$, 0], And[ForAll[{kyx
s$u$}, Implies[And[LessEqual[0, kyxs$u$], LessEqual[kyx
s$u$, kyxt$u$]], And[LessEqual[Plus[kyx
s$u$, 0], kyxT], GreaterEqual[Plus[Times[kyx
aMax, kyxs$u$], kyx
v], 0]]]], And[LessEqual[Subtract[kyxx, kyx
le], kyxxp], And[GreaterEqual[kyx
yp, 0], And[LessEqual[kyxyp, kyx
wl], And[Greater[kyxyp, kyx
wl], And[Implies[Less[kyxyp, 0], Greater[Plus[Divide[Times[Times[kyx
aMax, Minus[Divide[kyxyp, kyx
vpMax]]], Minus[Divide[kyxyp, kyx
vpMax]]], 2], Times[kyxv, Minus[Divide[kyx
yp, kyxvpMax]]]], Plus[Subtract[kyx
xp, kyxx], kyx
le]]], And[Greater[0, 0], And[Less[0, kyxvpMax], And[LessEqual[kyx
aMin, kyxa], And[LessEqual[kyx
a, kyxaMax], And[Implies[Greater[kyx
yp, kyxwl], Greater[Plus[Divide[Times[Times[kyx
aMax, Divide[Subtract[kyxyp, kyx
wl], Minus[0]]], Divide[Subtract[kyxyp, kyx
wl], Minus[0]]], 2], Times[kyxv, Divide[Subtract[kyx
yp, kyxwl], Minus[0]]]], Plus[Subtract[kyx
xp, kyxx], kyx
le]]], Implies[And[GreaterEqual[kyxyp, 0], LessEqual[kyx
yp, kyxwl]], Greater[Subtract[kyx
x, kyxle], kyx
xp]]]]]]]]]]]]]]]]]]]]]]]]]], Greater[Plus[Divide[Times[Times[kyxaMax, Divide[Subtract[kyx
yp, kyxwl], Minus[0]]], Divide[Subtract[kyx
yp, kyxwl], Minus[0]]], 2], Times[Plus[Times[kyx
aMax, kyxt$u$], kyx
v], Divide[Subtract[kyxyp, kyx
wl], Minus[0]]]], Plus[Subtract[kyxxp, Plus[Plus[Times[kyx
aMax, Divide[Power[kyxt$u$, 2], 2]], Times[kyx
v, kyxt$u$]], kyx
x]], kyxle]]]], {}, Reals], 5], 8000000000]} cannot be evaluated, cause: {HoldForm[MessageName[ForAll, "msgs"]]} in _QE in _QE at edu.cmu.cs.ls.keymaerax.bellerophon.BelleBaseInterpreter.runExpr(SequentialInterpreter.scala:296) at edu.cmu.cs.ls.keymaerax.bellerophon.SequentialInterpreter.runExpr(SequentialInterpreter.scala:773) at edu.cmu.cs.ls.keymaerax.bellerophon.ExhaustiveSequentialInterpreter.runExpr(SequentialInterpreter.scala:813) at edu.cmu.cs.ls.keymaerax.bellerophon.BelleBaseInterpreter.apply(SequentialInterpreter.scala:45) at edu.cmu.cs.ls.keymaerax.bellerophon.BelleBaseInterpreter.runExpr(SequentialInterpreter.scala:291) at edu.cmu.cs.ls.keymaerax.bellerophon.SequentialInterpreter.runExpr(SequentialInterpreter.scala:773) at edu.cmu.cs.ls.keymaerax.bellerophon.ExhaustiveSequentialInterpreter.runExpr(SequentialInterpreter.scala:813) at edu.cmu.cs.ls.keymaerax.bellerophon.BelleBaseInterpreter.apply(SequentialInterpreter.scala:45) at edu.cmu.cs.ls.keymaerax.bellerophon.BelleBaseInterpreter.runExpr(SequentialInterpreter.scala:308) at edu.cmu.cs.ls.keymaerax.bellerophon.SequentialInterpreter.runExpr(SequentialInterpreter.scala:773) at edu.cmu.cs.ls.keymaerax.bellerophon.ExhaustiveSequentialInterpreter.runExpr(SequentialInterpreter.scala:813) at edu.cmu.cs.ls.keymaerax.bellerophon.BelleBaseInterpreter.apply(SequentialInterpreter.scala:45) at edu.cmu.cs.ls.keymaerax.hydra.BellerophonTacticExecutor$$anon$1.call(BellerophonTacticExecutor.scala:128) at edu.cmu.cs.ls.keymaerax.hydra.BellerophonTacticExecutor$$anon$1.call(BellerophonTacticExecutor.scala:125) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: Input {48, MemoryConstrained[TimeConstrained[Reduce[ForAll[{kyx
yp, kyxxp, kyx
x, kyxwl, kyx
vpMax, kyxv, kyx
t$u$, kyxrange, kyx
ptol, kyxle, kyx
aMin, kyxaMax, kyx
a, kyxT}, Implies[And[Greater[kyx
wl, 0], And[Greater[kyxle, 0], And[Greater[kyx
vpMax, 0], And[Greater[kyxrange, 0], And[Greater[kyx
ptol, 0], And[Less[kyxaMin, 0], And[Greater[kyx
aMax, 0], And[Less[Times[kyxT, kyx
vpMax], kyxwl], And[Less[Times[kyx
T, Minus[0]], kyxwl], And[Greater[kyx
xp, kyxrange], And[Greater[kyx
T, 0], And[Less[kyxyp, 0], And[GreaterEqual[kyx
t$u$, 0], And[ForAll[{kyxs$u$}, Implies[And[LessEqual[0, kyx
s$u$], LessEqual[kyxs$u$, kyx
t$u$]], And[LessEqual[Plus[kyxs$u$, 0], kyx
T], GreaterEqual[Plus[Times[kyxaMax, kyx
s$u$], kyxv], 0]]]], And[LessEqual[Subtract[kyx
x, kyxle], kyx
xp], And[GreaterEqual[kyxyp, 0], And[LessEqual[kyx
yp, kyxwl], And[Greater[kyx
yp, kyxwl], And[Implies[Less[kyx
yp, 0], Greater[Plus[Divide[Times[Times[kyxaMax, Minus[Divide[kyx
yp, kyxvpMax]]], Minus[Divide[kyx
yp, kyxvpMax]]], 2], Times[kyx
v, Minus[Divide[kyxyp, kyx
vpMax]]]], Plus[Subtract[kyxxp, kyx
x], kyxle]]], And[Greater[0, 0], And[Less[0, kyx
vpMax], And[LessEqual[kyxaMin, kyx
a], And[LessEqual[kyxa, kyx
aMax], And[Implies[Greater[kyxyp, kyx
wl], Greater[Plus[Divide[Times[Times[kyxaMax, Divide[Subtract[kyx
yp, kyxwl], Minus[0]]], Divide[Subtract[kyx
yp, kyxwl], Minus[0]]], 2], Times[kyx
v, Divide[Subtract[kyxyp, kyx
wl], Minus[0]]]], Plus[Subtract[kyxxp, kyx
x], kyxle]]], Implies[And[GreaterEqual[kyx
yp, 0], LessEqual[kyxyp, kyx
wl]], Greater[Subtract[kyxx, kyx
le], kyxxp]]]]]]]]]]]]]]]]]]]]]]]]]], Greater[Plus[Divide[Times[Times[kyx
aMax, Divide[Subtract[kyxyp, kyx
wl], Minus[0]]], Divide[Subtract[kyxyp, kyx
wl], Minus[0]]], 2], Times[Plus[Times[kyxaMax, kyx
t$u$], kyxv], Divide[Subtract[kyx
yp, kyxwl], Minus[0]]]], Plus[Subtract[kyx
xp, Plus[Plus[Times[kyxaMax, Divide[Power[kyx
t$u$, 2], 2]], Times[kyxv, kyx
t$u$]], kyxx]], kyx
le]]]], {}, Reals], 5], 8000000000]} cannot be evaluated, cause: {HoldForm[MessageName[ForAll, "msgs"]]}
at edu.cmu.cs.ls.keymaerax.tools.qe.JLinkMathematicaCommandRunner.$anonfun$getAnswer$1(MathematicaCommandRunner.scala:150)
at edu.cmu.cs.ls.keymaerax.tools.qe.MathematicaConversion$.importResult(MathematicaConversion.scala:33)
at edu.cmu.cs.ls.keymaerax.tools.qe.JLinkMathematicaCommandRunner.getAnswer(MathematicaCommandRunner.scala:137)
at edu.cmu.cs.ls.keymaerax.tools.qe.JLinkMathematicaCommandRunner.doRun(MathematicaCommandRunner.scala:87)
at edu.cmu.cs.ls.keymaerax.tools.qe.BaseMathematicaCommandRunner.run(MathematicaCommandRunner.scala:51)
at edu.cmu.cs.ls.keymaerax.tools.qe.MathematicaQETool.singleQE(MathematicaQETool.scala:49)
at edu.cmu.cs.ls.keymaerax.tools.qe.MathematicaQETool.quantifierElimination(MathematicaQETool.scala:34)
at edu.cmu.cs.ls.keymaerax.core.Provable$.proveArithmetic(Proof.scala:521)
at edu.cmu.cs.ls.keymaerax.pt.ElidingProvable$.proveArithmetic(TermProvable.scala:439)
at edu.cmu.cs.ls.keymaerax.pt.ElidingProvable$.proveArithmeticLemma(TermProvable.scala:442)
at edu.cmu.cs.ls.keymaerax.pt.ProvableSig$.proveArithmeticLemma(TermProvable.scala:371)
at edu.cmu.cs.ls.keymaerax.tools.ext.Mathematica.$anonfun$qe$1(Mathematica.scala:132)
at edu.cmu.cs.ls.keymaerax.tools.ext.MathematicaQEToolBridge.$anonfun$run$1(MathematicaQEToolBridge.scala:29)
at edu.cmu.cs.ls.keymaerax.tools.ext.JLinkMathematicaLink.$anonfun$run$2(MathematicaLink.scala:316)
at edu.cmu.cs.ls.keymaerax.tools.ext.ToolExecutor.$anonfun$makeFuture$1(ToolExecutor.scala:111)
... 6 more
The error message means that there is a warning generated by Mathematica/Wolfram Engine, but KeYmaera X couldn't retrieve it for display on the UI. Instead, we display the attempted query. When copying that attempted query and evaluating it in Mathematica or Wolfram Engine directly, the message usually appears on their debug output.
There can be several reasons for warnings in Mathematica, but in this particular case there is a division by zero in some of the "irrelevant" other assumptions.
Once the assumptions that use division by zero are hidden, the QE call on this particular proof obligation succeeds. However, unless the assumptions are completely irrelevant for the entire proof, or you are branching on a quantity (0 vs. !=0) where on the 0 branch the affected assumptions are irrelevant, sooner or later there will be a proof obligation that cannot be proved because of the division by zero.
Great, thank you very much! That helps a lot. I apparently tried to simplify a model a bit too much.
Would it be possible to add the suggestion of entering the query directly in Mathematica/Wolfram Engine to the error message when the warning retrieval fails? Now I know what to do, but I imagine it could be helpful to others.