abella-prover / abella

An interactive theorem prover based on lambda-tree syntax
https://abella-prover.org/
GNU General Public License v3.0
89 stars 18 forks source link

"search" is inconsistent on list of nominal constants #71

Closed MortenRhiger closed 7 years ago

MortenRhiger commented 7 years ago

In version 2.0.4 of Abella, the search tactic seems inconsistent when working with lists of nominal constants (or my understanding of the underlying logic is terribly wrong). With

Kind t type.
Type f t -> o.

Abella (unexpectedly) proves this theorem with just an application of the search tactic:

Theorem bug : forall A, member A (f n1 :: nil) -> member A (f n2 :: nil).
search.

This results in inconsistencies. Indeed, we can (as expected) prove that no element can be a member of the two singleton lists mentioned above:

Theorem ok : forall A, member A (f n1 :: nil) -> member A (f n2 :: nil) -> false.
intros. case H1. case H2. case H3. case H2. case H3. case H3.

But then

Theorem proof_of_false : false.
assert member (f n1) (f n1 :: nil). apply bug to H1. apply ok to H1 H2.
chaudhuri commented 7 years ago

Thanks. The theorem bug should not be proved by search.

MortenRhiger commented 7 years ago

A similar error can actually be produced without lists and nominal constants: We have

Theorem bug2 : forall A, nabla x y, (A = f x) -> (A = f y).
search.

even though

Theorem nominals_differ : nabla x y, f x = f y -> false.
intros. case H1.

Again it's easy to establish a contradiction:

Theorem ok2 : forall A, nabla x y, (A = f x) -> (A = f y) -> false.
intros. case H1.

The problem seems to be the universally quantified A since neither of the following can be proved by searching:

Theorem not_provable1 : f n1 = f n2.
skip.         % cannot search here

Theorem not_provable2 : nabla x y, f x = f y.
intros. skip. % cannot search here