| 1 |
|
| 2 |
(* Inductive t : Type -> Type := *) |
| 3 |
(* | Just : forall (A : Type), t A -> t A. *) |
| 4 |
|
| 5 |
(* Fixpoint test {A : Type} (x : t A) : t (A + unit) := *) |
| 6 |
(* match x in t A return t (A + unit) with *) |
| 7 |
(* | Just T x => @test T x *) |
| 8 |
(* end. *) |
| 9 |
|
| 10 |
|
| 11 |
Definition Type1 := Type. |
| 12 |
Definition Type2 := Type. |
| 13 |
Definition cast (x:Type2) := x:Type1. |
| 14 |
Axiom f: Type2 -> Prop. |
| 15 |
Definition A := |
| 16 |
let T := fun A:Type1 => _ in |
| 17 |
fun A':Type2 => |
| 18 |
eq_refl : T A' = f A' :> Prop. |
| 19 |
(* Type2 <= Type1... f A -> Type1 <= Type2 *) |
| 20 |
|
| 21 |
Inductive t : Type -> Type := |
| 22 |
| Just : forall (A : Type), t A -> t A. |
| 23 |
|
| 24 |
Fixpoint test {A : Type} (x : t A) : t (A + unit) := |
| 25 |
match x in t A with |
| 26 |
| Just B x => @test B x |
| 27 |
end. |