Created
September 9, 2013 18:47
-
-
Save csgordon/6499819 to your computer and use it in GitHub Desktop.
Definition that isn't strictly positive according to Agda or Coq, but is accepted by Idris (:total ElimT says ElimT is total, which requires not using non-SP types)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data T : Type -> Type where | |
c1 : T Nat | |
c2 : T (T Nat) | |
ElimT : (A : Type) -> T A -> A | |
ElimT _ c1 = 3 | |
ElimT _ c2 = c1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Agda and Coq reject this as non-strictly-positive due to the use of T as an index to itself in the type of c2. Totality checking says ElimT is total, which the manual says requires it not to use non-SP types.