| 1 |
Local Set Universe Polymorphism. |
| 2 |
Set Printing Universes. |
| 3 |
Cumulative Inductive TM@{t} : Type@{t} -> Type := |
| 4 |
(* Monadic operations *) |
| 5 |
| tmReturn {A:Type@{t}} |
| 6 |
: A -> TM A |
| 7 |
| tmBind {A B : Type@{t}} |
| 8 |
: TM A -> (A -> TM B) -> TM B |
| 9 |
. |
| 10 |
|
| 11 |
Definition lift@{a u1 u2 | a <= u1, u1 <= u2} {A : Type@{a}} : TM@{u1} A -> TM@{u2} _ := fun x => x. |
| 12 |
|
| 13 |
Definition tmFix_body'@{a b f1 f2 fx fr} |
| 14 |
{A : Type@{a}} {B : Type@{b}} (f : (A -> TM@{f1} B) -> (A -> TM@{f2} B)) |
| 15 |
(tmFix : unit -> A -> TM@{fx} B) |
| 16 |
: A -> TM@{fr} B |
| 17 |
:= f (fun a => tmBind@{fr} (tmReturn@{fr} tmFix) (fun tmFix => (tmFix tt a))). |