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

Currying inside systems #480

Open
3abc opened this issue Feb 13, 2019 · 1 comment
Open

Currying inside systems #480

3abc opened this issue Feb 13, 2019 · 1 comment

Comments

@3abc
Copy link

3abc commented Feb 13, 2019

For this definition

def comp3
  (A : type)
  (b : (j0 j1: 𝕀) β†’ A)
  (k0 : [j1 k] A [ k = 0 β†’ b 0 j1])
  (l0 : [j1 k] A [ k = 0 β†’ b 1 j1])
  (k1 : [j0 k] A [ k = 0 β†’ b j0 0
                 | j0 = 0 β†’ k0 0 k
                 | j0 = 1 β†’ l0 0 k])
  (l1 : [j0 k] A [ k = 0 β†’ b j0 1
                 | j0 = 0 β†’ k0 1 k
                 | j0 = 1 β†’ l0 1 k])
  (j0 j1 k : 𝕀) : A =
  comp 0 k (b j0 j1) [
  | j0 = 0 k β†’ k0 j1 k
  | j0 = 1 k β†’ l0 j1 k
  | j1 = 0 k β†’ k1 j0 k
  | j1 = 1 k β†’ l1 j0 k
  ]

If I understand correctly j0 = 0 k β†’ k0 j1 k can be written as j0 = 0 β†’ k0 j1. However if I do so the type won't check.

For the definition below one can just use currying like

def comp2
  (A : type)
  (b : (j0: 𝕀) β†’ A)
  (k0 : [ k] A [ k = 0 β†’ b 0])
  (l0 : [ k] A [ k = 0 β†’ b 1])
  (j0 k : 𝕀) : A =
  comp 0 k (b j0) [
  | j0 = 0 β†’ k0
  | j0 = 1 β†’ l0
  ]
@jonsterling
Copy link
Collaborator

@3abc I believe the issue has to do with the fact that we do not yet fully support partial application of an n-ary extension type. I would have to check the code to see if that is indeed what is happening -- I have been stuck in paper-writing land for some months and haven't been able to work on this.

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

No branches or pull requests

2 participants