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

Question about the typing of rewrite rules #72

Closed
francoisthire opened this issue Apr 16, 2018 · 2 comments
Closed

Question about the typing of rewrite rules #72

francoisthire opened this issue Apr 16, 2018 · 2 comments

Comments

@francoisthire
Copy link
Collaborator

In the following example, only the first rewrite is well-typed by Dedukti (and lambdapi) but not the second.

A : Type.

a : A.

def T : A -> Type.

[] T a --> A -> A.

True : Type.

def eq : A -> A -> Type.
[x] eq x x --> True.
true : True.
def f : x : A -> y : A -> eq x y -> T x ->  A.

(; OK ;)
[] f a _ true (x => x) --> a.

(; Not OK ;)
[] f _ a true (x => x) --> a.

However, the typing forces that the joker is convertible to a, hence the rewrite rule should be well-typed. In that simple example, writing the first or the second rule does not matter. But is it possible to have an example where it does? Also, is this behavior the one expected?

@fblanqui
Copy link
Member

fblanqui commented Apr 17, 2018 via email

@francoisthire
Copy link
Collaborator Author

@Gaspi should we do something? Or we leave it as it is now since it is fixed in lambdapi?

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

3 participants