-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
substitution in equality #114
Comments
I dug a little deeper. Unification seems to behave differently based on the context:
|
Meanwhile
|
When you say The way to do something like this would be to say:
and then define The two queries are different because in the first case you are again asking for a solution to a non-pattern equation (however trivial), which Abella doesn't handle. |
Thanks for the explanation! I understand
etc. I am exploring using Lambda Prolog in specifying math theories as opposed to type (meta-)theories. I would love to hear any insight you may have. |
This is a question for the Lambda Prolog experts, I think. Ping @ThatDaleMiller, @gnadathur97 . |
It seems to me that the response you are getting in the first case is actually incorrect or at least misleading. "No more solutions" should signify that there are no solutions, whereas there clearly are solutions. The response you should get should be more like "Can't solve the unification problem" or something similar. The reason for this is what Kaustuv seems to be saying: the problem lies outside higher-order pattern fragment and the unification procedure used by Abella works only on (a slight extension of) the higher-order pattern class. It might be easy to pull your example back into the category of unification problems that are dealt with, essentially by checking for identity of terms even when they do not belong to the pattern class. In this sense, the example you are presenting here is different from what you had shown in the first example. The explicit quantification over F makes the second query/example significantly different. The unification problem that has to be solved becomes akin to solving (c X) = (c X) for a constant c. This problem is essentially a first-order unification problem, something that is definitely contained within the higher-order pattern fragment. |
If I understand the problem you want to solve, I don't think there is a solution to it that is different from the one you have described. You seem to be wanting to harness the primitive equality to match the common parts of terms in a uniform way before comparing the embedded parts using a defined version of equality (given by the eq predicate). I do not see a way to do this. The solution you have described uses a defined predicate for the entire computation. The other alternative would be to use the primitive equality, but then the terms would have to be equal up to lambda conversion. |
@gnadathur97
then I should be able to apply it to a hypothesis like Is it possible for a user to directly introduce such an axiom into Abella? Or I may not be understanding correctly how Abella works. |
Is there a way to establish an equivalence relation (other than the structural one "=") that respects substitution? If I specify:
eq (F X) (F Y) :- eq X Y.
and then try to prove
Theorem eq_congr: forall F X Y, {eq X Y} -> {eq (F X) (F Y)}.
, afterintros
,search
times out.The text was updated successfully, but these errors were encountered: