aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorVincent Laporte2019-02-11 09:53:25 +0000
committerVincent Laporte2019-02-14 07:04:42 +0000
commit398452805f1e3d0b2f4fac0d3a1b00ce9789e427 (patch)
tree94d63d6711e863673d12ecbaa5ead51e978d5b07 /doc
parent940a7ef064de410bba89b8f36b00bd762da874d0 (diff)
[Manual] Clean examples for `apply`
Diffstat (limited to 'doc')
-rw-r--r--doc/sphinx/proof-engine/tactics.rst30
1 files changed, 25 insertions, 5 deletions
diff --git a/doc/sphinx/proof-engine/tactics.rst b/doc/sphinx/proof-engine/tactics.rst
index e5f56407c8..d58cbdec07 100644
--- a/doc/sphinx/proof-engine/tactics.rst
+++ b/doc/sphinx/proof-engine/tactics.rst
@@ -755,33 +755,49 @@ Applying theorems
A solution is to ``apply (Rtrans n m p)`` or ``(Rtrans n m)``.
- .. coqtop:: all undo
+ .. coqtop:: all
apply (Rtrans n m p).
Note that ``n`` can be inferred from the goal, so the following would work
too.
- .. coqtop:: in undo
+ .. coqtop:: none
+
+ Abort. Goal R n p.
+
+ .. coqtop:: in
apply (Rtrans _ m).
More elegantly, ``apply Rtrans with (y:=m)`` allows only mentioning the
unknown m:
- .. coqtop:: in undo
+ .. coqtop:: none
+
+ Abort. Goal R n p.
+
+ .. coqtop:: in
apply Rtrans with (y := m).
Another solution is to mention the proof of ``(R x y)`` in ``Rtrans``
- .. coqtop:: all undo
+ .. coqtop:: none
+
+ Abort. Goal R n p.
+
+ .. coqtop:: all
apply Rtrans with (1 := Rnm).
... or the proof of ``(R y z)``.
- .. coqtop:: all undo
+ .. coqtop:: none
+
+ Abort. Goal R n p.
+
+ .. coqtop:: all
apply Rtrans with (2 := Rmp).
@@ -789,6 +805,10 @@ Applying theorems
finding ``m``. Then one can apply the hypotheses ``Rnm`` and ``Rmp``. This
instantiates the existential variable and completes the proof.
+ .. coqtop:: none
+
+ Abort. Goal R n p.
+
.. coqtop:: all
eapply Rtrans.