Skip to content

Instantly share code, notes, and snippets.

@ichistmeinname
Created January 12, 2017 15:11
Show Gist options
  • Save ichistmeinname/744c87bf55629063602fa7c551171081 to your computer and use it in GitHub Desktop.
Save ichistmeinname/744c87bf55629063602fa7c551171081 to your computer and use it in GitHub Desktop.
Set Implicit Arguments.
Inductive Simple (A: Type) := simple : Simple A.
Inductive Wrap (A: Type) :=
| wrap : A -> Wrap A
| funWrap : forall X, Simple X -> (X -> Wrap A) -> Wrap A.
Definition anotherWrap A : Wrap A :=
funWrap (simple A) (fun x => wrap x).
Fail Definition specialWrap1 A : Wrap (Wrap A) :=
funWrap (simple (Wrap A)) (fun x => wrap x).
Fail Definition specialWrap A : Wrap A :=
funWrap (simple (Wrap A)) (fun x => x).
(* Because of strict positivity, the `X` in `funWrap` cannot be instantiated
with `Wrap A`? *)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment