aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/success/goal_selector.v
diff options
context:
space:
mode:
authorGravatar Cyprien Mangin <cyprien.mangin@m4x.org>2016-06-03 10:24:36 +0200
committerGravatar Cyprien Mangin <cyprien.mangin@m4x.org>2016-06-14 06:21:31 +0200
commit98ed04803e022e66e17f91526ef708484fd17217 (patch)
treebc123047c60c6a9fee3a90d832824d6df62bffee /test-suite/success/goal_selector.v
parent9356f42d5f84f9b325f71bab041d1b8184384a21 (diff)
Goal selectors are now tacticals and can be used as such.
This allows to write things like this: split; 2: intro _; exact I or like this: eexists ?[x]; ?[x]: exact 0; trivial This has the side-effect on making the '?' before '[x]' mandatory.
Diffstat (limited to 'test-suite/success/goal_selector.v')
-rw-r--r--test-suite/success/goal_selector.v18
1 files changed, 16 insertions, 2 deletions
diff --git a/test-suite/success/goal_selector.v b/test-suite/success/goal_selector.v
index 9ba748e2a..dd7ad1013 100644
--- a/test-suite/success/goal_selector.v
+++ b/test-suite/success/goal_selector.v
@@ -34,8 +34,22 @@ Qed.
Goal True -> True.
Proof.
- intros y.
+ intros y; 1-2 : repeat idtac.
+ 1-1:match goal with y : _ |- _ => let x := y in idtac x end.
Fail 1-1:let x := y in idtac x.
1:let x := y in idtac x.
exact I.
-Qed. \ No newline at end of file
+Qed.
+
+Goal True /\ (True /\ True).
+Proof.
+ dup.
+ - split; 2: (split; exact I).
+ exact I.
+ - split; 2: split; exact I.
+Qed.
+
+Goal True -> exists (x : Prop), x.
+Proof.
+ intro H; eexists ?[x]; ?[x]: exact True; assumption.
+Qed.