-
Notifications
You must be signed in to change notification settings - Fork 36
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
Rewriting rules do not compute correctly on term defined by a set
tactic ?
#1178
Comments
A first remark: the rule at line 39 catches everything and will probably be applied all the time. This is not what you expect I guess. It is an example where it might be useful to declare a symbol sequential, but this may break important properties. This kind of reification should be internalized using builtins to avoid adding this kind of rules in the conversion. |
Other remarks:
Following the implementation of reflexive tactics, don't you want instead:
Then, to prove that t:Z = u:Z you can proceed as follows:
|
Proposal:
|
Do we agree on the correctness lemmas?
But I do not see how we can apply
because the evaluation (⇓) will not evaluate to the same terms (x and y are swap because of AC). |
Do you really want/need to prove the correctness and completeness inside Lambdapi? To do that, you need to have a formalization of what Lambdapi is doing. A pen-and-paper proof outside Lambdapi seems more reasonable to start with. |
I am not sure to follow you. Do you mean putting this lemma as an axiom?
This is necessary to prove the reify part? |
Let's try to describe what we are trying to do:
The items 4) and 5) could be formalized in Lambdapi itself easily as it is a property of R', =R and Z. The item 3) is about Lambdapi terms themselves. It is possible to formalize it in Lambdapi itself but it is not very interesting. You can get 6) by proving the correctness of the evaluation process of Lambdapi in this context, that is, using the declared properties and rules of var, opp and add. If we write nf(t) the normal form computed by Lambdapi of the term t, it is enough to prove its correctness wrt =R, that is, nf(r) =R r, for all terms r:R. This should not be too difficult to prove when you know how nf is implemented, and could probably be formalized in Lambdapi itself, though not within a few lines. Note that we do not need nf to be complete although it is a desirable property. Completeness means that any two terms equivalent in the theory =R have the same normal form: r =T s => nf(r) = nf(s). This is more difficult to prove. |
Thanks for this exhaustive description. I think step 2) has a problem because |
Right, but we have ⇓(⇧t) = t, don't we? And it is enough, no? |
If |
And do you agree with 5 and 6? |
Concerning 6, following https://doi.org/10.4230/LIPIcs.FSCD.2022.24, you have that nf(t) is the normal form of the AC-canonical form of t wrt the rewrite relation -->_R^AC which consists in alternating rewriting wrt the set R of rewrite rules given above for var, opp and add using syntactic matching, and AC canonization which consists in normalizing wrt to the following rules:
where > is a total ordering such that (var k x) < (var l y) iff x < y or else x = y and k < l, and similarly for the other function symbols (the arguments of function applications are compared from right to left). |
Hi everyone,
I am facing a strange behavior that I tried to summarize in this gist.
I am using the
set
tactic in my generated proof to make the reconstruction of linear arithmetic proof more readable/easier to debug.A linear inequality is a term of the form:
With ⋈ \in {=, <, >, ≤, ≥}. I am using the tactic
set
to abstract the left and right terms of an inequality.For example
set His := 𝑐𝑖 × 𝑡𝑖 + 𝑑1
andset Hir := 𝑐𝑖 × 𝑡𝑖 + 𝑑2
.It makes the generation of the proof easier and more compact because Alethe requires some normalization before having the sum of the resulting literals, which is trivially contradictory.
My problem is that if I use
set
in a proof then the computation do not work correctly (check line 103).If I try to compute manually with
compute
each part of the final inequality, it produces a term that is not a constant but if I take the output from the terminal and compute again then it reduce to a constant.But if I do not use
set
then we can see that it compute line 117.The text was updated successfully, but these errors were encountered: