Skip to content
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

Investigate a leftward arrow #8

Open
jeremie-koenig opened this issue Aug 19, 2016 · 0 comments
Open

Investigate a leftward arrow #8

jeremie-koenig opened this issue Aug 19, 2016 · 0 comments

Comments

@jeremie-koenig
Copy link
Member

We could investigate a "leftward" variant of the arrow relator such as:

(R <== S) f g  :=  forall x y, S (f x) (g y) -> R x y

This would be useful to formulate injectivity-like properties. In particular for the relators of inductive types, the injectivity of constructors could be expressed in this way, and declaring the corresponding relational properties could help us mechanize the automatic decomposition of hypotheses such as for example:

 list_rel R (x1 :: x2 :: l) (y1 :: y2 :: l')
---------------------------------------------
    R x1 y1 /\ R x2 y2 /\ list_rel R l l'

Unfortunately, the relator as defined above does not behave in a good way with curried function. So for example:

Proper (R <== list_rel R <== list_rel R) cons

does not encode the property that we want (in fact the corresponding property is false).

It is not immediately obvious how to solve this problem (other than using rel_curry each time we want to state such a property as R * list_rel R <== list_rel R).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant