Closed sliedes closed 2 years ago
I assume this is something that should not happen: The hammer tactic reports that CVC4 found a solution for a goal which is provably false (and where nothing in the context allows deriving False). Then, hammer fails to reconstruct the proof, as it obviously should.
This can sometimes happen because the translation is neither sound nor complete for efficiency/practicability reasons. It is the reconstruction backend which ultimately ensures that nothing false can be proven. However, this should be very rare. I'll look into the example to see where it goes wrong exactly and if it's worth the effort to fix it.
(Furthermore, and I assume this is a different issue, if I execute everything in CoqIde straight to the end, including the "hammer." statement, coqproofworker.opt segfaults (no OOM). So what I do in coqtop to demonstrate this is to execute up to the point just before the "hammer." statement, wait until everything before that has been evaluated, and then proceed to the hammer statement.)
Yes, CoqIDE sometimes has problems executing code with "hammer" in it in one go (seems related to issue #86). However, this is a minor issue, because "hammer" is supposed to be used interactively -- you should never leave it in your scripts in normal usage.
Well, actually, you're wrong - your example is (classically) provable.
(* Now, the goal of S a = 3^S (log3_nat a) is false: For example, with a=0, S 0 = 3^S (log3_nat 0) <-> 1 = 3^1 <-> 1 = 3. *) Compute (S 0 = 3^S (log3_nat 0)).
Wrong counterexample, because with a = 0 your assumption Eq doesn't hold.
(* The only assumption in the context is Eq : log3_nat (S a) = S (log3_nat a), which is not contradictory; eg. log3_nat (S 2) = S (log3_nat 2). *)
But log3_nat (S 0) = 0 <> S (log3_nat 0) = 1
Proof for b = log3_nat a:
Since log3_nat (S a) = S (log3_nat a), we have log3_nat (S a) <> (log3_nat a). In particular, a > 0. Thus, classically, there is p with 3^p = S a, by log3_nat_succ_same_within_pow3. Then p = log3_nat (S a) by log3_nat_pow3. Thus p = S (log3_nat a) by the assumption Eq. Hence, S a = 3 ^ S (log3_nat a).
Please think through your examples more thoroughly before opening an issue.
Oh, indeed. I'm sorry!
Hi,
I assume this is something that should not happen: The hammer tactic reports that CVC4 found a solution for a goal which is provably false (and where nothing in the context allows deriving False). Then, hammer fails to reconstruct the proof, as it obviously should.
I'm sorry that this example is a bit long; I removed the parts of my proof that it didn't need, and this is what is left. I included the proofs of the lemmas to demonstrate that there is nothing inconsistent there. I added comments and Compute statements at the end demonstrating that the goal after the "exists" statement should be unprovable.
(Furthermore, and I assume this is a different issue, if I execute everything in CoqIde straight to the end, including the "hammer." statement, coqproofworker.opt segfaults (no OOM). So what I do in coqtop to demonstrate this is to execute up to the point just before the "hammer." statement, wait until everything before that has been evaluated, and then proceed to the hammer statement.)
I'm using coq 8.13.2 with coq-hammer 1.3.2+8.13 from opam.
Here's what hammer outputs: