-
Notifications
You must be signed in to change notification settings - Fork 130
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
Equational reasoning on higher order expressions #2232
Comments
Hello @josedusol. Thanks for the report. I tried this example but I got different errors. Please, could you share the complete source code of the example, and also the stack/cabal configuration that you are using? |
Hello @facundominguez !. Of course:
Im using ghc-9.0.2, liquidhaskell-0.9.0.2.1 and liquid-base-0.4.15.1. Also, im using Z3 v4.12.2. |
Tested also with ghc-9.2.5 and liquidhaskell-0.9.2.5.0, same result. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Im trying to write some proofs in point free style, but it seems i can't convince LH of my work. I present a simple example next.
Let
f:b->c
,g:a->b
,h:a->c
andf1
be the inverse off
. Let's say we want to prove the following "shunting" rule:f.g = h implies g = f1.h
So we assume
f.g = h
and proveg = f1.h
. The natural thing to do would be to start on the rhsf1.h
to reach lhsg
. If we try to express this idea in code:we get:
I can't understand the error here because clearly the inferred and required type are actually the same... so there may be another thing going on, what?. BTW, i am using
--extensionality
and--higherorder
.Interestingly, we can do the proof in a more verbose fashion working over equality and reducing to
True
as follows:One problem with this approach (besides verbosity) is that working explicitly with
==
forces the inclusion of special type constraints likeEq (a -> b)
. Then, derived proofs inheriting lot of these constraints could get expensive to type check, i.e. not scalable.The text was updated successfully, but these errors were encountered: