| 1 |
|
| 2 |
Require Extraction. |
| 3 |
Require Import ListDef. |
| 4 |
|
| 5 |
Section Test. |
| 6 |
Variable A : Type. |
| 7 |
Variable decA : forall (x y:A), {x=y}+{x<>y}. |
| 8 |
|
| 9 |
(** Should fail when no proofs are started *) |
| 10 |
Fail Show Extraction. |
| 11 |
|
| 12 |
Lemma decListA : forall (xs ys : list A), {xs=ys}+{xs<>ys}. |
| 13 |
Proof. |
| 14 |
Show Extraction. |
| 15 |
fix decListA 1. |
| 16 |
destruct xs as [|x xs], ys as [|y ys]. |
| 17 |
Show Extraction. |
| 18 |
- now left. |
| 19 |
- now right. |
| 20 |
- now right. |
| 21 |
- Show Extraction. |
| 22 |
destruct (decA x y). |
| 23 |
+ destruct (decListA xs ys). |
| 24 |
* left; now f_equal. |
| 25 |
* Show Extraction. |
| 26 |
right. congruence. |
| 27 |
+ right. congruence. |
| 28 |
Show Extraction. |
| 29 |
Defined. |
| 30 |
|
| 31 |
End Test. |