| 1 |
From elpi.apps Require Import tc. |
| 2 |
(* From stdpp/telescopes.v *) |
| 3 |
|
| 4 |
(* A test where polymorphic universes are used *) |
| 5 |
|
| 6 |
Polymorphic Inductive tele : Type := |
| 7 |
| TeleO : tele |
| 8 |
| TeleS {X} (binder : X -> tele) : tele. |
| 9 |
|
| 10 |
Polymorphic Fixpoint tele_fun (TT : tele) (T : Type) : Type := |
| 11 |
match TT with |
| 12 |
| TeleO => T |
| 13 |
| TeleS b => forall x, tele_fun (b x) T |
| 14 |
end. |
| 15 |
|
| 16 |
Class FMap (X : Type -> Type). |
| 17 |
|
| 18 |
(* |
| 19 |
Since the instance is polymorphic, then the proof of the compiled elpi rule |
| 20 |
should be wrapped inside the pglobal constructor |
| 21 |
*) |
| 22 |
Polymorphic Instance tele_fmap {TT : tele} : FMap (tele_fun TT) := {}. |
| 23 |
|
| 24 |
Goal forall x, FMap (tele_fun x). |
| 25 |
intros. |
| 26 |
apply _. |
| 27 |
Show Proof. |
| 28 |
Qed. |