aboutsummaryrefslogtreecommitdiff
path: root/doc/plugin_tutorial/tuto3/theories/test.v
diff options
context:
space:
mode:
authorGaëtan Gilbert2019-01-07 13:24:14 +0100
committerGaëtan Gilbert2019-01-08 16:41:01 +0100
commitfde557d9e92d2ddd3c79d8a620f2cb33ce64a49f (patch)
tree1b8a0e216119c908d50277432221ab06805a2ac9 /doc/plugin_tutorial/tuto3/theories/test.v
parent8c040974facb733682d24c488dc89941671f4ab7 (diff)
parent168a13dab1c9987f592994150997e692d4d7e40b (diff)
Add 'doc/plugin_tutorial/' from commit '168a13dab1c9987f592994150997e692d4d7e40b'
git-subtree-dir: doc/plugin_tutorial git-subtree-mainline: 8c040974facb733682d24c488dc89941671f4ab7 git-subtree-split: 168a13dab1c9987f592994150997e692d4d7e40b
Diffstat (limited to 'doc/plugin_tutorial/tuto3/theories/test.v')
-rw-r--r--doc/plugin_tutorial/tuto3/theories/test.v23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/plugin_tutorial/tuto3/theories/test.v b/doc/plugin_tutorial/tuto3/theories/test.v
new file mode 100644
index 0000000000..43204ddf34
--- /dev/null
+++ b/doc/plugin_tutorial/tuto3/theories/test.v
@@ -0,0 +1,23 @@
+(* to be used e.g. in : coqtop -I src -R theories Tuto3 < theories/test.v *)
+
+Require Import Tuto3.Loader.
+
+(* This should print Type. *)
+Tuto3_1.
+
+(* This should print a term that contains an existential variable. *)
+(* And then print the same term, where the variable has been correctly
+ instantiated. *)
+Tuto3_2.
+
+Lemma tutu x y (A : 0 < x) (B : 10 < y) : True.
+Proof.
+pack hypothesis A.
+(* Hypothesis A should have disappeared and a "packed_hyps" hypothesis
+ should have appeared, with unreadable content. *)
+pack hypothesis B.
+(* Hypothesis B should have disappeared *)
+destruct packed_hyps as [unpacked_hyps].
+(* Hypothesis unpacked_hyps should contain the previous contents of A and B. *)
+exact I.
+Qed.