Skip to content

Explicit polarity annotation #570

@GoogleCodeExporter

Description

@GoogleCodeExporter

This code does not work since polarity of Nat (monotone in i) is only inferred when the constructors are given. But it is already needed for checking sub.

  data Nat : {i : Size} -> Set

  sub : {i : Size} -> Nat {i}  Nat {↑ i}
  sub x = x

  data Nat where
    zero : {i : Size}            -> Nat {↑ i}
    suc  : {i : Size} -> Nat {i} -> Nat {↑ i}

Original issue reported on code.google.com by andreas....@gmail.com on 19 Feb 2012 at 10:21

Attachments:

Metadata

Metadata

Assignees

Labels

polaritypositivityPositivity checking for data-type definitionssized typesSized types, termination checking with sized types, size inferencetype: enhancementIssues and pull requests about possible improvements

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions