| 1 |
(* Revealed a missing re-consideration of postponed problems *) |
| 2 |
|
| 3 |
Module A. |
| 4 |
Inductive flat_type := Unit | Prod (A B : flat_type). |
| 5 |
Inductive exprf (op : flat_type -> flat_type -> Type) {var : Type} : flat_type |
| 6 |
-> Type := |
| 7 |
| Op {t1 tR} (opc : op t1 tR) (args : exprf op t1) : exprf op tR. |
| 8 |
Inductive op : flat_type -> flat_type -> Type := . |
| 9 |
Arguments Op {_ _ _ _} _ _. |
| 10 |
Definition bound_op {var} |
| 11 |
{src2 dst2} |
| 12 |
(opc2 : op src2 dst2) |
| 13 |
: forall (args2 : exprf op (var:=var) src2), Op opc2 args2 = Op opc2 args2 |
| 14 |
:= match opc2 return (forall args2, Op opc2 args2 = Op opc2 args2) with end. |
| 15 |
End A. |
| 16 |
|
| 17 |
(* A shorter variant *) |
| 18 |
Module B. |
| 19 |
Inductive exprf (op : unit -> Type) : Type := |
| 20 |
| A : exprf op |
| 21 |
| Op tR (opc : op tR) (args : exprf op) : exprf op. |
| 22 |
Inductive op : unit -> Type := . |
| 23 |
Definition bound_op (dst2 : unit) (opc2 : op dst2) |
| 24 |
: forall (args2 : exprf op), Op op dst2 opc2 args2 = A op |
| 25 |
:= match opc2 in op h return (forall args2 : exprf ?[U], Op ?[V] ?[I] opc2 args2 = A op) with end. |
| 26 |
End B. |