aboutsummaryrefslogtreecommitdiffhomepage
path: root/contrib/subtac/test/ListsTest.v
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/subtac/test/ListsTest.v')
-rw-r--r--contrib/subtac/test/ListsTest.v17
1 files changed, 16 insertions, 1 deletions
diff --git a/contrib/subtac/test/ListsTest.v b/contrib/subtac/test/ListsTest.v
index b8d13fe6b..3ceea173f 100644
--- a/contrib/subtac/test/ListsTest.v
+++ b/contrib/subtac/test/ListsTest.v
@@ -70,7 +70,22 @@ Section Nth.
Next Obligation.
Proof.
- inversion l0.
+ intros.
+ inversion H.
Defined.
+
+ Program Fixpoint nth' (l : list A) (n : nat | n < length l) { struct l } : A :=
+ match l, n with
+ | hd :: _, 0 => hd
+ | _ :: tl, S n' => nth' tl n'
+ | nil, _ => !
+ end.
+
+ Next Obligation.
+ Proof.
+ intros.
+ inversion H.
+ Defined.
+
End Nth.