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

Positivity check is incorrectly implemented #849

Open
ice1000 opened this issue Dec 21, 2022 · 3 comments
Open

Positivity check is incorrectly implemented #849

ice1000 opened this issue Dec 21, 2022 · 3 comments
Assignees

Comments

@ice1000
Copy link
Member

ice1000 commented Dec 21, 2022

data Dead : Set
open data Zaoqi (A : Type)
| essentially (A -> Dead)
open data Cat : Type
  | meow : (Zaoqi Cat) → Cat

def catIsDead : Cat → Dead
  | meow (essentially f) => f (meow (essentially f))

def catIsAlive : Cat
  => meow (essentially catIsDead)
  
def catIsBothDeadAndAlive: Dead
  => catIsDead catIsAlive

/cc @tsao-chi

@HoshinoTented
Copy link
Contributor

😱

@mio-19
Copy link
Contributor

mio-19 commented Dec 26, 2022

A more mature implementation would require explicit polarity annotations

References:
agda/agda#2411
agda/agda#6385

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

Successfully merging a pull request may close this issue.

3 participants