aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2021-04-20 10:16:55 +0200
committerPierre-Marie Pédrot2021-04-20 10:16:55 +0200
commitb36fb9f68884090e5b06f9837da084395f519f96 (patch)
treef969092affe593d2220a015b5a712ff934ba72bd /test-suite
parentc3d7754ec2045a964974698821adb73c586b4e41 (diff)
parent1dffce05d5b7b26a890a9d0359e54946e661511b (diff)
Merge PR #14089: unify for Ltac2
Reviewed-by: ppedrot
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/ltac2/std_tactics.v29
1 files changed, 29 insertions, 0 deletions
diff --git a/test-suite/ltac2/std_tactics.v b/test-suite/ltac2/std_tactics.v
new file mode 100644
index 0000000000..39b620a6ac
--- /dev/null
+++ b/test-suite/ltac2/std_tactics.v
@@ -0,0 +1,29 @@
+Require Import Ltac2.Ltac2.
+
+Axiom f: nat -> nat.
+Definition g := f.
+
+Axiom Foo1: nat -> Prop.
+Axiom Foo2: nat -> Prop.
+Axiom Impl: forall n: nat, Foo1 (f n) -> Foo2 (f n).
+
+Create HintDb foo discriminated.
+#[export] Hint Constants Opaque : foo.
+#[export] Hint Resolve Impl : foo.
+
+Goal forall x, Foo1 (f x) -> Foo2 (g x).
+Proof.
+ auto with foo.
+ #[export] Hint Transparent g : foo.
+ auto with foo.
+Qed.
+
+Goal forall (x: nat), exists y, f x = g y.
+Proof.
+ intros.
+ eexists.
+ unify f g.
+ lazy_match! goal with
+ | [ |- ?a ?b = ?rhs ] => unify ($a $b) $rhs
+ end.
+Abort.