| 1 |
Succeed Inductive Foo (A:Prop) : Prop := foo : _ tt. |
| 2 |
|
| 3 |
Class ElemOf A B := elem_of: A -> B -> Prop. |
| 4 |
Infix "∈" := elem_of (at level 70) . |
| 5 |
Inductive Types := tnil: Types | tcons: Type -> Types -> Types. |
| 6 |
Implicit Type As: Types. |
| 7 |
Infix "^::" := tcons (at level 60, right associativity). |
| 8 |
Notation "^[ ]" := tnil (at level 5, format "^[ ]"). |
| 9 |
|
| 10 |
Inductive hlist F : Types -> Type := |
| 11 |
| hnil: hlist F ^[] |
| 12 |
| hcons {A As} : F A -> hlist F As -> hlist F (A ^:: As). |
| 13 |
Infix "+::" := (hcons _) (at level 60, right associativity). |
| 14 |
|
| 15 |
Fail Inductive elem_of_hlist {F A As} : ElemOf (F A) (hlist F As) := |
| 16 |
| elem_of_hlist_here F A As (x : F A) (l : hlist F As) : x ∈ (x +:: l) |
| 17 |
| elem_of_list_further F A As (x y : F A) (l : hlist F As) : x ∈ l -> x ∈ (y +:: l). |
| 18 |
|
| 19 |
Fail Inductive elem_of_hlist {F A As} : ElemOf (F A) (hlist F As) := |
| 20 |
| elem_of_hlist_here (x : F A) (l : hlist F As) : x ∈ (x +:: l) |
| 21 |
| elem_of_list_further (x y : F A) (l : hlist F As) : x ∈ l -> x ∈ (y +:: l). |