aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/success
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-30 18:58:25 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2018-03-03 18:08:16 +0100
commitf0bd95e051480e15348e9d30e2df5d3577a9ffb3 (patch)
tree49c4bda580ebbeec1d2f990f969df7b4efca84db /test-suite/success
parente82856f3108a25f7b0cabff4190bc56d3a0cafa1 (diff)
Adding a test file for evar handling in the VM.
Diffstat (limited to 'test-suite/success')
-rw-r--r--test-suite/success/vm_evars.v23
1 files changed, 23 insertions, 0 deletions
diff --git a/test-suite/success/vm_evars.v b/test-suite/success/vm_evars.v
new file mode 100644
index 000000000..2c8b099ef
--- /dev/null
+++ b/test-suite/success/vm_evars.v
@@ -0,0 +1,23 @@
+Fixpoint iter {A} (n : nat) (f : A -> A) (x : A) :=
+match n with
+| 0 => x
+| S n => iter n f (f x)
+end.
+
+Goal nat -> True.
+Proof.
+intros n.
+evar (f : nat -> nat).
+cut (iter 10 f 0 = 0).
+vm_compute.
+intros; constructor.
+instantiate (f := (fun x => x)).
+reflexivity.
+Qed.
+
+Goal exists x, x = 5 + 5.
+Proof.
+ eexists.
+ vm_compute.
+ reflexivity.
+Qed.