| 1 |
|
| 2 |
Module Import Datatypes. |
| 3 |
|
| 4 |
Set Implicit Arguments. |
| 5 |
Set Primitive Projections. |
| 6 |
|
| 7 |
Record prod (A : Type) := pair { fst : A }. |
| 8 |
|
| 9 |
End Datatypes. |
| 10 |
|
| 11 |
Axiom Or : Type -> Type. |
| 12 |
Axiom to : forall T, T -> (Or T). |
| 13 |
|
| 14 |
Section ORecursion. |
| 15 |
Context {P Q : Type} . |
| 16 |
Definition O_rec (f : P -> Q) : (Or P) -> Q. |
| 17 |
Admitted. |
| 18 |
Definition O_rec_beta (f : P -> Q) (x : P) : O_rec f (to P x) = f x. |
| 19 |
Admitted. |
| 20 |
|
| 21 |
End ORecursion. |
| 22 |
|
| 23 |
Parameter (A : Type). |
| 24 |
|
| 25 |
Definition O_prod_unit : prod A -> prod (Or A). |
| 26 |
exact (fun (z : prod A) => pair (to A (fst z))). |
| 27 |
Defined. |
| 28 |
|
| 29 |
Lemma foo (x : A) |
| 30 |
: O_rec O_prod_unit (to (prod A) (pair x)) = pair (to A x). |
| 31 |
Proof. |
| 32 |
apply O_rec_beta. |
| 33 |
Qed. |