aboutsummaryrefslogtreecommitdiff
path: root/doc/sphinx/proof-engine
diff options
context:
space:
mode:
Diffstat (limited to 'doc/sphinx/proof-engine')
-rw-r--r--doc/sphinx/proof-engine/ltac.rst30
-rw-r--r--doc/sphinx/proof-engine/ltac2.rst26
-rw-r--r--doc/sphinx/proof-engine/proof-handling.rst10
-rw-r--r--doc/sphinx/proof-engine/ssreflect-proof-language.rst90
-rw-r--r--doc/sphinx/proof-engine/tactics.rst236
-rw-r--r--doc/sphinx/proof-engine/vernacular-commands.rst29
6 files changed, 232 insertions, 189 deletions
diff --git a/doc/sphinx/proof-engine/ltac.rst b/doc/sphinx/proof-engine/ltac.rst
index fed7111628..c48dd5b99e 100644
--- a/doc/sphinx/proof-engine/ltac.rst
+++ b/doc/sphinx/proof-engine/ltac.rst
@@ -32,22 +32,25 @@ The syntax of the tactic language is given below. See Chapter
:ref:`gallinaspecificationlanguage` for a description of the BNF metasyntax used
in these grammar rules. Various already defined entries will be used in this
chapter: entries :token:`natural`, :token:`integer`, :token:`ident`,
-:token:`qualid`, :token:`term`, :token:`cpattern` and :token:`atomic_tactic`
+:token:`qualid`, :token:`term`, :token:`cpattern` and :token:`tactic`
represent respectively the natural and integer numbers, the authorized
identificators and qualified names, Coq terms and patterns and all the atomic
-tactics described in Chapter :ref:`tactics`. The syntax of :token:`cpattern` is
+tactics described in Chapter :ref:`tactics`.
+
+The syntax of :production:`cpattern` is
the same as that of terms, but it is extended with pattern matching
metavariables. In :token:`cpattern`, a pattern matching metavariable is
-represented with the syntax :g:`?id` where :g:`id` is an :token:`ident`. The
+represented with the syntax :n:`?@ident`. The
notation :g:`_` can also be used to denote metavariable whose instance is
-irrelevant. In the notation :g:`?id`, the identifier allows us to keep
+irrelevant. In the notation :n:`?@ident`, the identifier allows us to keep
instantiations and to make constraints whereas :g:`_` shows that we are not
interested in what will be matched. On the right hand side of pattern matching
clauses, the named metavariables are used without the question mark prefix. There
is also a special notation for second-order pattern matching problems: in an
-applicative pattern of the form :g:`@?id id1 … idn`, the variable id matches any
-complex expression with (possible) dependencies in the variables :g:`id1 … idn`
-and returns a functional term of the form :g:`fun id1 … idn => term`.
+applicative pattern of the form :n:`%@?@ident @ident__1 … @ident__n`,
+the variable :token:`ident` matches any complex expression with (possible)
+dependencies in the variables :n:`@ident__i` and returns a functional term
+of the form :n:`fun @ident__1 … ident__n => @term`.
The main entry of the grammar is :n:`@expr`. This language is used in proof
mode but it can also be used in toplevel definitions as shown below.
@@ -121,6 +124,7 @@ mode but it can also be used in toplevel definitions as shown below.
: solve [ `expr` | ... | `expr` ]
: idtac [ `message_token` ... `message_token`]
: fail [`natural`] [`message_token` ... `message_token`]
+ : gfail [`natural`] [`message_token` ... `message_token`]
: fresh [ `component` … `component` ]
: context `ident` [`term`]
: eval `redexpr` in `term`
@@ -132,7 +136,7 @@ mode but it can also be used in toplevel definitions as shown below.
: guard `test`
: assert_fails `tacexpr3`
: assert_succeeds `tacexpr3`
- : `atomic_tactic`
+ : `tactic`
: `qualid` `tacarg` ... `tacarg`
: `atom`
atom : `qualid`
@@ -582,11 +586,11 @@ Failing
the call to :n:`fail @num` is not enclosed in a :n:`+` command,
respecting the algebraic identity.
- .. tacv:: fail {* message_token}
+ .. tacv:: fail {* @message_token}
The given tokens are used for printing the failure message.
- .. tacv:: fail @num {* message_token}
+ .. tacv:: fail @num {* @message_token}
This is a combination of the previous variants.
@@ -597,8 +601,8 @@ Failing
Similarly, ``gfail`` fails even when used after ``all:`` and there are no
goals left. See the example for clarification.
- .. tacv:: gfail {* message_token}
- gfail @num {* message_token}
+ .. tacv:: gfail {* @message_token}
+ gfail @num {* @message_token}
These variants fail with an error message or an error level even if
there are no goals left. Be careful however if Coq terms have to be
@@ -964,7 +968,7 @@ system decide a name with the intro tactic is not so good since it is
very awkward to retrieve the name the system gave. The following
expression returns an identifier:
-.. tacn:: fresh {* component}
+.. tacn:: fresh {* @component}
It evaluates to an identifier unbound in the goal. This fresh identifier
is obtained by concatenating the value of the :n:`@component`\ s (each of them
diff --git a/doc/sphinx/proof-engine/ltac2.rst b/doc/sphinx/proof-engine/ltac2.rst
index aa603fc966..5f2e911ff9 100644
--- a/doc/sphinx/proof-engine/ltac2.rst
+++ b/doc/sphinx/proof-engine/ltac2.rst
@@ -124,13 +124,13 @@ Type declarations
One can define new types by the following commands.
-.. cmd:: Ltac2 Type @ltac2_typeparams @lident
+.. cmd:: Ltac2 Type {? @ltac2_typeparams } @lident
:name: Ltac2 Type
This command defines an abstract type. It has no use for the end user and
is dedicated to types representing data coming from the OCaml world.
-.. cmdv:: Ltac2 Type {? rec} @ltac2_typeparams @lident := @ltac2_typedef
+.. cmdv:: Ltac2 Type {? rec} {? @ltac2_typeparams } @lident := @ltac2_typedef
This command defines a type with a manifest. There are four possible
kinds of such definitions: alias, variant, record and open variant types.
@@ -154,7 +154,7 @@ One can define new types by the following commands.
Records are product types with named fields and eliminated by projection.
Likewise they can be recursive if the `rec` flag is set.
- .. cmdv:: Ltac2 Type @ltac2_typeparams @ltac2_qualid := [ @ltac2_constructordef ]
+ .. cmdv:: Ltac2 Type {? @ltac2_typeparams } @ltac2_qualid ::= [ @ltac2_constructordef ]
Open variants are a special kind of variant types whose constructors are not
statically defined, but can instead be extended dynamically. A typical example
@@ -179,7 +179,7 @@ constructions from ML.
: let `ltac2_var` := `ltac2_term` in `ltac2_term`
: let rec `ltac2_var` := `ltac2_term` in `ltac2_term`
: match `ltac2_term` with `ltac2_branch` ... `ltac2_branch` end
- : `int`
+ : `integer`
: `string`
: `ltac2_term` ; `ltac2_term`
: [| `ltac2_term` ; ... ; `ltac2_term` |]
@@ -619,7 +619,7 @@ calls to term matching functions from the `Pattern` module. Internally, it is
implemented thanks to a specific scope accepting the :n:`@constrmatching` syntax.
Variables from the :n:`@constrpattern` are statically bound in the body of the branch, to
-values of type `constr` for the variables from the :n:`@constr` pattern and to a
+values of type `constr` for the variables from the :n:`@term` pattern and to a
value of type `Pattern.context` for the variable :n:`@lident`.
Note that unlike Ltac, only lowercase identifiers are valid as Ltac2
@@ -686,20 +686,22 @@ The following scopes are built-in.
- :n:`list0(@ltac2_scope)`:
- + if :n:`@ltac2_scope` parses :production:`entry`, parses :n:`(@entry__0, ..., @entry__n)` and produces
- :n:`[@entry__0; ...; @entry__n]`.
+ + if :n:`@ltac2_scope` parses :n:`@quotentry`,
+ then it parses :n:`(@quotentry__0, ..., @quotentry__n)` and produces
+ :n:`[@quotentry__0; ...; @quotentry__n]`.
- :n:`list0(@ltac2_scope, sep = @string__sep)`:
- + if :n:`@ltac2_scope` parses :n:`@entry`, parses :n:`(@entry__0 @string__sep ... @string__sep @entry__n)`
- and produces :n:`[@entry__0; ...; @entry__n]`.
+ + if :n:`@ltac2_scope` parses :n:`@quotentry`,
+ then it parses :n:`(@quotentry__0 @string__sep ... @string__sep @quotentry__n)`
+ and produce :n:`[@quotentry__0; ...; @quotentry__n]`.
-- :n:`list1`: same as :n:`list0` (with or without separator) but parses :n:`{+ @entry}` instead
- of :n:`{* @entry}`.
+- :n:`list1`: same as :n:`list0` (with or without separator) but parses :n:`{+ @quotentry}` instead
+ of :n:`{* @quotentry}`.
- :n:`opt(@ltac2_scope)`
- + if :n:`@ltac2_scope` parses :n:`@entry`, parses :n:`{? @entry}` and produces either :n:`None` or
+ + if :n:`@ltac2_scope` parses :n:`@quotentry`, parses :n:`{? @quotentry}` and produces either :n:`None` or
:n:`Some x` where :n:`x` is the parsed expression.
- :n:`self`:
diff --git a/doc/sphinx/proof-engine/proof-handling.rst b/doc/sphinx/proof-engine/proof-handling.rst
index 4a2f9c0db3..3f966755ca 100644
--- a/doc/sphinx/proof-engine/proof-handling.rst
+++ b/doc/sphinx/proof-engine/proof-handling.rst
@@ -175,12 +175,12 @@ list of assertion commands is given in :ref:`Assertions`. The command
Use all section variables except the list of :token:`ident`.
- .. cmdv:: Proof using @collection1 + @collection2
+ .. cmdv:: Proof using @collection__1 + @collection__2
Use section variables from the union of both collections.
See :ref:`nameaset` to know how to form a named collection.
- .. cmdv:: Proof using @collection1 - @collection2
+ .. cmdv:: Proof using @collection__1 - @collection__2
Use section variables which are in the first collection but not in the
second one.
@@ -202,10 +202,10 @@ Proof using options
The following options modify the behavior of ``Proof using``.
-.. opt:: Default Proof Using "@expression"
+.. opt:: Default Proof Using "@collection"
:name: Default Proof Using
- Use :n:`@expression` as the default ``Proof using`` value. E.g. ``Set Default
+ Use :n:`@collection` as the default ``Proof using`` value. E.g. ``Set Default
Proof Using "a b"`` will complete all ``Proof`` commands not followed by a
``using`` part with ``using a b``.
@@ -220,7 +220,7 @@ The following options modify the behavior of ``Proof using``.
Name a set of section hypotheses for ``Proof using``
````````````````````````````````````````````````````
-.. cmd:: Collection @ident := @expression
+.. cmd:: Collection @ident := @collection
This can be used to name a set of section
hypotheses, with the purpose of making ``Proof using`` annotations more
diff --git a/doc/sphinx/proof-engine/ssreflect-proof-language.rst b/doc/sphinx/proof-engine/ssreflect-proof-language.rst
index b19b0742c1..cc4976587d 100644
--- a/doc/sphinx/proof-engine/ssreflect-proof-language.rst
+++ b/doc/sphinx/proof-engine/ssreflect-proof-language.rst
@@ -455,7 +455,7 @@ the latter can be replaced by the open syntax ``of term`` or
following extension of the binder syntax:
.. prodn::
- binder += & @term | of @term
+ binder += {| & @term | of @term }
Caveat: ``& T`` and ``of T`` abbreviations have to appear at the end
of a binder list. For instance, the usual two-constructor polymorphic
@@ -1340,7 +1340,7 @@ The general syntax of the discharging tactical ``:`` is:
:undocumented:
.. prodn::
- d_item ::= {? @occ_switch %| @clear_switch } @term
+ d_item ::= {? {| @occ_switch | @clear_switch } } @term
.. prodn::
clear_switch ::= { {+ @ident } }
@@ -1499,7 +1499,7 @@ side of an equation.
The abstract tactic
```````````````````
-.. tacn:: abstract: {+ d_item}
+.. tacn:: abstract: {+ @d_item}
:name: abstract (ssreflect)
This tactic assigns an abstract constant previously introduced with the
@@ -1556,19 +1556,19 @@ whose general syntax is
:undocumented:
.. prodn::
- i_item ::= @i_pattern %| @s_item %| @clear_switch %| @i_view %| @i_block
+ i_item ::= {| @i_pattern | @s_item | @clear_switch | @i_view | @i_block }
.. prodn::
- s_item ::= /= %| // %| //=
+ s_item ::= {| /= | // | //= }
.. prodn::
- i_view ::= {? %{%} } /@term %| /ltac:( @tactic )
+ i_view ::= {? %{%} } {| /@term | /ltac:( @tactic ) }
.. prodn::
- i_pattern ::= @ident %| > %| _ %| ? %| * %| + %| {? @occ_switch } -> %| {? @occ_switch }<- %| [ {?| @i_item } ] %| - %| [: {+ @ident } ]
+ i_pattern ::= {| @ident | > | _ | ? | * | + | {? @occ_switch } {| -> | <- } | [ {?| @i_item } ] | - | [: {+ @ident } ] }
.. prodn::
- i_block ::= [^ @ident ] %| [^~ @ident ] %| [^~ @num ]
+ i_block ::= {| [^ @ident ] | [^~ {| @ident | @num } ] }
The ``=>`` tactical first executes :token:`tactic`, then the :token:`i_item`\s,
left to right. An :token:`s_item` specifies a
@@ -2390,7 +2390,7 @@ of a local definition during the generalization phase, the name of the
local definition must be written between parentheses, like in
``rewrite H in H1 (def_n) H2.``
-.. tacv:: @tactic in {+ @clear_switch | {? @ } @ident | ( @ident ) | ( {? @ } @ident := @c_pattern ) } {? * }
+.. tacv:: @tactic in {+ {| @clear_switch | {? @}@ident | ( @ident ) | ( {? @}@ident := @c_pattern ) } } {? * }
This is the most general form of the ``in`` tactical.
In its simplest form the last option lets one rename hypotheses that
@@ -2492,7 +2492,7 @@ tactic:
The behavior of the defective have tactic makes it possible to
generalize it in the following general construction:
-.. tacn:: have {* @i_item } {? @i_pattern } {? @s_item | {+ @ssr_binder } } {? : @term } {? := @term | by @tactic }
+.. tacn:: have {* @i_item } {? @i_pattern } {? {| @s_item | {+ @ssr_binder } } } {? : @term } {? {| := @term | by @tactic } }
:undocumented:
Open syntax is supported for both :token:`term`. For the description
@@ -2920,7 +2920,7 @@ Advanced generalization
The complete syntax for the items on the left hand side of the ``/``
separator is the following one:
-.. tacv:: wlog … : {? @clear_switch | {? @ } @ident | ( {? @ } @ident := @c_pattern) } / @term
+.. tacv:: wlog … : {? {| @clear_switch | {? @}@ident | ( {? @}@ident := @c_pattern) } } / @term
:undocumented:
Clear operations are intertwined with generalization operations. This
@@ -3020,13 +3020,13 @@ A rewrite step :token:`rstep` has the general form:
rstep ::= {? @r_prefix } @r_item
.. prodn::
- r_prefix ::= {? - } {? @mult } {? @occ_switch %| @clear_switch } {? [ @r_pattern ] }
+ r_prefix ::= {? - } {? @mult } {? {| @occ_switch | @clear_switch } } {? [ @r_pattern ] }
.. prodn::
- r_pattern ::= @term %| in {? @ident in } @term %| %( @term in %| @term as %) @ident in @term
+ r_pattern ::= {| @term | in {? @ident in } @term | {| @term in | @term as } @ident in @term }
.. prodn::
- r_item ::= {? / } @term %| @s_item
+ r_item ::= {| {? / } @term | @s_item }
An :token:`r_prefix` contains annotations to qualify where and how the rewrite
operation should be performed:
@@ -3478,7 +3478,7 @@ efficient ones, e.g. for the purpose of a correctness proof.
Wildcards vs abstractions
`````````````````````````
-The rewrite tactic supports :token:`r_items` containing holes. For example, in
+The rewrite tactic supports :token:`r_item`\s containing holes. For example, in
the tactic ``rewrite (_ : _ * 0 = 0).``
the term ``_ * 0 = 0`` is interpreted as ``forall n : nat, n * 0 = 0.``
Anyway this tactic is *not* equivalent to
@@ -3702,7 +3702,7 @@ The under tactic
The convenience :tacn:`under` tactic supports the following syntax:
-.. tacn:: under {? @r_prefix } @term {? => {+ @i_item}} {? do ( @tactic | [ {*| @tactic } ] ) }
+.. tacn:: under {? @r_prefix } @term {? => {+ @i_item}} {? do {| @tactic | [ {*| @tactic } ] } }
:name: under
Operate under the context proved to be extensional by
@@ -3753,7 +3753,7 @@ involves the following steps:
3. If so :tacn:`under` puts these n goals in head normal form (using
the defective form of the tactic :tacn:`move`), then executes
- the corresponding intro pattern :n:`@ipat__i` in each goal.
+ the corresponding intro pattern :n:`@i_pattern__i` in each goal.
4. Then :tacn:`under` checks that the first n subgoals
are (quantified) equalities or double implications between a
@@ -3802,11 +3802,11 @@ One-liner mode
The Ltac expression:
-:n:`under @term => [ @i_item__1 | … | @i_item__n ] do [ @tac__1 | … | @tac__n ].`
+:n:`under @term => [ @i_item__1 | … | @i_item__n ] do [ @tactic__1 | … | @tactic__n ].`
can be seen as a shorter form for the following expression:
-:n:`(under @term) => [ @i_item__1 | … | @i_item__n | ]; [ @tac__1; over | … | @tac__n; over | cbv beta iota ].`
+:n:`(under @term) => [ @i_item__1 | … | @i_item__n | ]; [ @tactic__1; over | … | @tactic__n; over | cbv beta iota ].`
Notes:
@@ -3819,14 +3819,14 @@ Notes:
involving the `bigop` theory from the Mathematical Components library.
+ If there is only one tactic, the brackets can be omitted, e.g.:
- :n:`under @term => i do @tac.` and that shorter form should be
+ :n:`under @term => i do @tactic.` and that shorter form should be
preferred.
+ If the ``do`` clause is provided and the intro pattern is omitted,
then the default :token:`i_item` ``*`` is applied to each branch.
E.g., the Ltac expression:
- :n:`under @term do [ @tac__1 | … | @tac__n ]` is equivalent to:
- :n:`under @term => [ * | … | * ] do [ @tac__1 | … | @tac__n ]`
+ :n:`under @term do [ @tactic__1 | … | @tactic__n ]` is equivalent to:
+ :n:`under @term => [ * | … | * ] do [ @tactic__1 | … | @tactic__n ]`
(and it can be noted here that the :tacn:`under` tactic performs a
``move.`` before processing the intro patterns ``=> [ * | … | * ]``).
@@ -4237,7 +4237,7 @@ selecting a specific redex and has been described in the previous
sections. We have seen so far that the possibility of selecting a
redex using a term with holes is already a powerful means of redex
selection. Similarly, any terms provided by the user in the more
-complex forms of :token:`c_patterns`
+complex forms of :token:`c_pattern`\s
presented in the tables above can contain
holes.
@@ -5167,7 +5167,7 @@ Interpreting assumptions
The general form of an assumption view tactic is:
-.. tacv:: [move | case] / @term
+.. tacv:: {| move | case } / @term
:undocumented:
The term , called the *view lemma* can be:
@@ -5514,7 +5514,7 @@ Parameters
|SSR| tactics
.. prodn::
- d_tactic ::= elim %| case %| congr %| apply %| exact %| move
+ d_tactic ::= {| elim | case | congr | apply | exact | move }
Notation scope
@@ -5526,7 +5526,7 @@ Module name
Natural number
-.. prodn:: natural ::= @num %| @ident
+.. prodn:: natural ::= {| @num | @ident }
where :token:`ident` is an Ltac variable denoting a standard |Coq| numeral
(should not be the name of a tactic which can be followed by a
@@ -5535,7 +5535,7 @@ bracket ``[``, like ``do``, ``have``,…)
Items and switches
~~~~~~~~~~~~~~~~~~
-.. prodn:: ssr_binder ::= @ident %| ( @ident {? : @term } )
+.. prodn:: ssr_binder ::= {| @ident | ( @ident {? : @term } ) }
binder see :ref:`abbreviations_ssr`.
@@ -5543,33 +5543,33 @@ binder see :ref:`abbreviations_ssr`.
clear switch see :ref:`discharge_ssr`
-.. prodn:: c_pattern ::= {? @term in %| @term as } @ident in @term
+.. prodn:: c_pattern ::= {? {| @term in | @term as } } @ident in @term
context pattern see :ref:`contextual_patterns_ssr`
-.. prodn:: d_item ::= {? @occ_switch %| @clear_switch } {? @term %| ( @c_pattern ) }
+.. prodn:: d_item ::= {? {| @occ_switch | @clear_switch } } {? {| @term | ( @c_pattern ) } }
discharge item see :ref:`discharge_ssr`
-.. prodn:: gen_item ::= {? @ } @ident %| ( @ident ) %| ( {? @ } @ident := @c_pattern )
+.. prodn:: gen_item ::= {| {? @ } @ident | ( @ident ) | ( {? @ } @ident := @c_pattern ) }
generalization item see :ref:`structure_ssr`
-.. prodn:: i_pattern ::= @ident %| > %| _ %| ? %| * %| + %| {? @occ_switch } -> %| {? @occ_switch } <- %| [ {?| @i_item } ] %| - %| [: {+ @ident } ]
+.. prodn:: i_pattern ::= {| @ident | > | _ | ? | * | + | {? @occ_switch } {| -> | <- } | [ {?| @i_item } ] | - | [: {+ @ident } ] }
intro pattern :ref:`introduction_ssr`
-.. prodn:: i_item ::= @clear_switch %| @s_item %| @i_pattern %| @i_view %| @i_block
+.. prodn:: i_item ::= {| @clear_switch | @s_item | @i_pattern | @i_view | @i_block }
view :ref:`introduction_ssr`
.. prodn::
- i_view ::= {? %{%} } /@term %| /ltac:( @tactic )
+ i_view ::= {? %{%} } {| /@term | /ltac:( @tactic ) }
intro block :ref:`introduction_ssr`
.. prodn::
- i_block ::= [^ @ident ] %| [^~ @ident ] %| [^~ @num ]
+ i_block ::= {| [^ @ident ] | [^~ {| @ident | @num } ] }
intro item see :ref:`introduction_ssr`
@@ -5577,7 +5577,7 @@ intro item see :ref:`introduction_ssr`
multiplier see :ref:`iteration_ssr`
-.. prodn:: occ_switch ::= { {? + %| - } {* @num } }
+.. prodn:: occ_switch ::= { {? {| + | - } } {* @num } }
occur. switch see :ref:`occurrence_selection_ssr`
@@ -5585,19 +5585,19 @@ occur. switch see :ref:`occurrence_selection_ssr`
multiplier see :ref:`iteration_ssr`
-.. prodn:: mult_mark ::= ? %| !
+.. prodn:: mult_mark ::= {| ? | ! }
multiplier mark see :ref:`iteration_ssr`
-.. prodn:: r_item ::= {? / } @term %| @s_item
+.. prodn:: r_item ::= {| {? / } @term | @s_item }
rewrite item see :ref:`rewriting_ssr`
-.. prodn:: r_prefix ::= {? - } {? @int_mult } {? @occ_switch %| @clear_switch } {? [ @r_pattern ] }
+.. prodn:: r_prefix ::= {? - } {? @int_mult } {? {| @occ_switch | @clear_switch } } {? [ @r_pattern ] }
rewrite prefix see :ref:`rewriting_ssr`
-.. prodn:: r_pattern ::= @term %| @c_pattern %| in {? @ident in } @term
+.. prodn:: r_pattern ::= {| @term | @c_pattern | in {? @ident in } @term }
rewrite pattern see :ref:`rewriting_ssr`
@@ -5605,7 +5605,7 @@ rewrite pattern see :ref:`rewriting_ssr`
rewrite step see :ref:`rewriting_ssr`
-.. prodn:: s_item ::= /= %| // %| //=
+.. prodn:: s_item ::= {| /= | // | //= }
simplify switch see :ref:`introduction_ssr`
@@ -5640,7 +5640,7 @@ respectively.
rewrite (see :ref:`rewriting_ssr`)
-.. tacn:: under {? @r_prefix } @term {? => {+ @i_item}} {? do ( @tactic | [ {*| @tactic } ] )}
+.. tacn:: under {? @r_prefix } @term {? => {+ @i_item}} {? do {| @tactic | [ {*| @tactic } ] } }
under (see :ref:`under_ssr`)
@@ -5648,8 +5648,8 @@ respectively.
over (see :ref:`over_ssr`)
-.. tacn:: have {* @i_item } {? @i_pattern } {? @s_item %| {+ @ssr_binder } } {? : @term } := @term
- have {* @i_item } {? @i_pattern } {? @s_item %| {+ @ssr_binder } } : @term {? by @tactic }
+.. tacn:: have {* @i_item } {? @i_pattern } {? {| @s_item | {+ @ssr_binder } } } {? : @term } := @term
+ have {* @i_item } {? @i_pattern } {? {| @s_item | {+ @ssr_binder } } } : @term {? by @tactic }
have suff {? @clear_switch } {? @i_pattern } {? : @term } := @term
have suff {? @clear_switch } {? @i_pattern } : @term {? by @tactic }
gen have {? @ident , } {? @i_pattern } : {+ @gen_item } / @term {? by @tactic }
@@ -5658,7 +5658,7 @@ respectively.
forward chaining (see :ref:`structure_ssr`)
-.. tacn:: wlog {? suff } {? @i_item } : {* @gen_item %| @clear_switch } / @term
+.. tacn:: wlog {? suff } {? @i_item } : {* {| @gen_item | @clear_switch } } / @term
specializing (see :ref:`structure_ssr`)
@@ -5710,7 +5710,7 @@ discharge :ref:`discharge_ssr`
introduction see :ref:`introduction_ssr`
-.. prodn:: tactic += @tactic in {+ @gen_item %| @clear_switch } {? * }
+.. prodn:: tactic += @tactic in {+ {| @gen_item | @clear_switch } } {? * }
localization see :ref:`localization_ssr`
diff --git a/doc/sphinx/proof-engine/tactics.rst b/doc/sphinx/proof-engine/tactics.rst
index 2ee23df019..fa6d62ffa2 100644
--- a/doc/sphinx/proof-engine/tactics.rst
+++ b/doc/sphinx/proof-engine/tactics.rst
@@ -131,16 +131,17 @@ include :tacn:`assert`, :tacn:`intros` and :tacn:`destruct`.
simple_intropattern_closed : `naming_intropattern`
: _
: `or_and_intropattern`
- : `equality_intropattern`
+ : `rewriting_intropattern`
+ : `injection_intropattern`
naming_intropattern : `ident`
: ?
: ?`ident`
or_and_intropattern : [ `intropattern_list` | ... | `intropattern_list` ]
: ( `simple_intropattern` , ... , `simple_intropattern` )
: ( `simple_intropattern` & ... & `simple_intropattern` )
- equality_intropattern : ->
+ rewriting_intropattern : ->
: <-
- : [= `intropattern_list` ]
+ injection_intropattern : [= `intropattern_list` ]
or_and_intropattern_loc : `or_and_intropattern`
: `ident`
@@ -462,7 +463,7 @@ Occurrence sets and occurrence clauses
An occurrence clause is a modifier to some tactics that obeys the
following syntax:
- .. productionlist:: sentence
+ .. productionlist:: coq
occurrence_clause : in `goal_occurrences`
goal_occurrences : [`ident` [`at_occurrences`], ... , `ident` [`at_occurrences`] [|- [* [`at_occurrences`]]]]
: * |- [* [`at_occurrences`]]
@@ -2127,7 +2128,7 @@ and an explanation of the underlying technique.
:name: discriminate
This tactic proves any goal from an assumption stating that two
- structurally different :n:`@terms` of an inductive set are equal. For
+ structurally different :n:`@term`\s of an inductive set are equal. For
example, from :g:`(S (S O))=(S O)` we can derive by absurdity any
proposition.
@@ -2285,6 +2286,18 @@ and an explanation of the underlying technique.
to the number of new equalities. The original equality is erased if it
corresponds to a hypothesis.
+ .. tacv:: injection @term {? with @bindings_list} as @injection_intropattern
+ injection @num as @injection_intropattern
+ injection as @injection_intropattern
+ einjection @term {? with @bindings_list} as @injection_intropattern
+ einjection @num as @injection_intropattern
+ einjection as @injection_intropattern
+
+ These are equivalent to the previous variants but using instead the
+ syntax :token:`injection_intropattern` which :tacn:`intros`
+ uses. In particular :n:`as [= {+ @simple_intropattern}]` behaves
+ the same as :n:`as {+ @simple_intropattern}`.
+
.. flag:: Structural Injection
This option ensure that :n:`injection @term` erases the original hypothesis
@@ -2294,7 +2307,7 @@ and an explanation of the underlying technique.
.. flag:: Keep Proof Equalities
- By default, :tacn:`injection` only creates new equalities between :n:`@terms`
+ By default, :tacn:`injection` only creates new equalities between :n:`@term`\s
whose type is in sort :g:`Type` or :g:`Set`, thus implementing a special
behavior for objects that are proofs of a statement in :g:`Prop`. This option
controls this behavior.
@@ -2703,42 +2716,42 @@ simply :g:`t=u` dropping the implicit type of :g:`t` and :g:`u`.
Uses the equality :n:`@term`:sub:`1` :n:`= @term` :sub:`2` from right to left
- .. tacv:: rewrite @term in clause
+ .. tacv:: rewrite @term in @goal_occurrences
- Analogous to :n:`rewrite @term` but rewriting is done following clause
- (similarly to :ref:`performing computations <performingcomputations>`). For instance:
+ Analogous to :n:`rewrite @term` but rewriting is done following
+ the clause :token:`goal_occurrences`. For instance:
- + :n:`rewrite H in H`:sub:`1` will rewrite `H` in the hypothesis
- `H`:sub:`1` instead of the current goal.
- + :n:`rewrite H in H`:sub:`1` :g:`at 1, H`:sub:`2` :g:`at - 2 |- *` means
- :n:`rewrite H; rewrite H in H`:sub:`1` :g:`at 1; rewrite H in H`:sub:`2` :g:`at - 2.`
+ + :n:`rewrite H in H'` will rewrite `H` in the hypothesis
+ ``H'`` instead of the current goal.
+ + :n:`rewrite H in H' at 1, H'' at - 2 |- *` means
+ :n:`rewrite H; rewrite H in H' at 1; rewrite H in H'' at - 2.`
In particular a failure will happen if any of these three simpler tactics
fails.
- + :n:`rewrite H in * |-` will do :n:`rewrite H in H`:sub:`i` for all hypotheses
- :g:`H`:sub:`i` different from :g:`H`.
+ + :n:`rewrite H in * |-` will do :n:`rewrite H in H'` for all hypotheses
+ :g:`H'` different from :g:`H`.
A success will happen as soon as at least one of these simpler tactics succeeds.
+ :n:`rewrite H in *` is a combination of :n:`rewrite H` and :n:`rewrite H in * |-`
that succeeds if at least one of these two tactics succeeds.
Orientation :g:`->` or :g:`<-` can be inserted before the :token:`term` to rewrite.
- .. tacv:: rewrite @term at occurrences
+ .. tacv:: rewrite @term at @occurrences
- Rewrite only the given occurrences of :token:`term`. Occurrences are
+ Rewrite only the given :token:`occurrences` of :token:`term`. Occurrences are
specified from left to right as for pattern (:tacn:`pattern`). The rewrite is
always performed using setoid rewriting, even for Leibniz’s equality, so one
has to ``Import Setoid`` to use this variant.
- .. tacv:: rewrite @term by tactic
+ .. tacv:: rewrite @term by @tactic
Use tactic to completely solve the side-conditions arising from the
:tacn:`rewrite`.
- .. tacv:: rewrite {+, @term}
+ .. tacv:: rewrite {+, @orientation @term} {? in @ident }
Is equivalent to the `n` successive tactics :n:`{+; rewrite @term}`, each one
- working on the first subgoal generated by the previous one. Orientation
- :g:`->` or :g:`<-` can be inserted before each :token:`term` to rewrite. One
+ working on the first subgoal generated by the previous one. An :production:`orientation`
+ ``->`` or ``<-`` can be inserted before each :token:`term` to rewrite. One
unique clause can be added at the end after the keyword in; it will then
affect all rewrite operations.
@@ -2799,13 +2812,14 @@ simply :g:`t=u` dropping the implicit type of :g:`t` and :g:`u`.
Replaces :n:`@term` with :n:`@term’` using the first assumption whose type has
the form :n:`@term’ = @term`
- .. tacv:: replace @term {? with @term} in clause {? by @tactic}
- replace -> @term in clause
- replace <- @term in clause
+ .. tacv:: replace @term {? with @term} in @goal_occurrences {? by @tactic}
+ replace -> @term in @goal_occurrences
+ replace <- @term in @goal_occurrences
- Acts as before but the replacements take place in the specified clause (see
- :ref:`performingcomputations`) and not only in the conclusion of the goal. The
- clause argument must not contain any ``type of`` nor ``value of``.
+ Acts as before but the replacements take place in the specified clauses
+ (:token:`goal_occurrences`) (see :ref:`performingcomputations`) and not
+ only in the conclusion of the goal. The clause argument must not contain
+ any ``type of`` nor ``value of``.
.. tacv:: cutrewrite <- (@term = @term’)
:name: cutrewrite
@@ -2893,7 +2907,7 @@ simply :g:`t=u` dropping the implicit type of :g:`t` and :g:`u`.
This applies :n:`stepl @term` then applies :token:`tactic` to the second goal.
- .. tacv:: stepr @term stepr @term by tactic
+ .. tacv:: stepr @term by @tactic
:name: stepr
This behaves as :tacn:`stepl` but on the right-hand-side of the binary
@@ -3064,7 +3078,7 @@ the conversion in hypotheses :n:`{+ @ident}`.
.. tacv:: native_compute
:name: native_compute
- This tactic evaluates the goal by compilation to Objective Caml as described
+ This tactic evaluates the goal by compilation to OCaml as described
in :cite:`FullReduction`. If Coq is running in native code, it can be
typically two to five times faster than ``vm_compute``. Note however that the
compilation cost is higher, so it is worth using only for intensive
@@ -3159,7 +3173,7 @@ the conversion in hypotheses :n:`{+ @ident}`.
+ A constant can be marked to be unfolded only if applied to enough
arguments. The number of arguments required can be specified using the
- ``/`` symbol in the argument list of the :cmd:`Arguments` vernacular command.
+ ``/`` symbol in the argument list of the :cmd:`Arguments <Arguments (implicits)>` vernacular command.
.. example::
@@ -3230,8 +3244,8 @@ the conversion in hypotheses :n:`{+ @ident}`.
.. tacv:: simpl @pattern
- This applies ``simpl`` only to the subterms matching :n:`@pattern` in the
- current goal.
+ This applies :tacn:`simpl` only to the subterms matching
+ :n:`@pattern` in the current goal.
.. tacv:: simpl @pattern at {+ @num}
@@ -3264,50 +3278,77 @@ the conversion in hypotheses :n:`{+ @ident}`.
This tactic applies to any goal. The argument qualid must denote a
defined transparent constant or local definition (see
- :ref:`gallina-definitions` and :ref:`vernac-controlling-the-reduction-strategies`). The tactic
- ``unfold`` applies the :math:`\delta` rule to each occurrence of the constant to which
- :n:`@qualid` refers in the current goal and then replaces it with its
- :math:`\beta`:math:`\iota`-normal form.
+ :ref:`gallina-definitions` and
+ :ref:`vernac-controlling-the-reduction-strategies`). The tactic
+ :tacn:`unfold` applies the :math:`\delta` rule to each occurrence of
+ the constant to which :n:`@qualid` refers in the current goal and
+ then replaces it with its :math:`\beta`:math:`\iota`-normal form.
-.. exn:: @qualid does not denote an evaluable constant.
- :undocumented:
+ .. exn:: @qualid does not denote an evaluable constant.
-.. tacv:: unfold @qualid in @ident
+ This error is frequent when trying to unfold something that has
+ defined as an inductive type (or constructor) and not as a
+ definition.
- Replaces :n:`@qualid` in hypothesis :n:`@ident` with its definition
- and replaces the hypothesis with its :math:`\beta`:math:`\iota` normal form.
+ .. example::
-.. tacv:: unfold {+, @qualid}
+ .. coqtop:: abort all fail
- Replaces *simultaneously* :n:`{+, @qualid}` with their definitions and
- replaces the current goal with its :math:`\beta`:math:`\iota` normal form.
+ Goal 0 <= 1.
+ unfold le.
-.. tacv:: unfold {+, @qualid at {+, @num }}
+ This error can also be raised if you are trying to unfold
+ something that has been marked as opaque.
- The lists :n:`{+, @num}` specify the occurrences of :n:`@qualid` to be
- unfolded. Occurrences are located from left to right.
+ .. example::
- .. exn:: Bad occurrence number of @qualid.
- :undocumented:
+ .. coqtop:: abort all fail
- .. exn:: @qualid does not occur.
- :undocumented:
+ Opaque Nat.add.
+ Goal 1 + 0 = 1.
+ unfold Nat.add.
+
+ .. tacv:: unfold @qualid in @goal_occurrences
-.. tacv:: unfold @string
+ Replaces :n:`@qualid` in hypothesis (or hypotheses) designated
+ by :token:`goal_occurrences` with its definition and replaces
+ the hypothesis with its :math:`\beta`:math:`\iota` normal form.
- If :n:`@string` denotes the discriminating symbol of a notation (e.g. "+") or
- an expression defining a notation (e.g. `"_ + _"`), and this notation refers to an unfoldable constant, then the
- tactic unfolds it.
+ .. tacv:: unfold {+, @qualid}
-.. tacv:: unfold @string%key
+ Replaces :n:`{+, @qualid}` with their definitions and replaces
+ the current goal with its :math:`\beta`:math:`\iota` normal
+ form.
- This is variant of :n:`unfold @string` where :n:`@string` gets its
- interpretation from the scope bound to the delimiting key :n:`key`
- instead of its default interpretation (see :ref:`Localinterpretationrulesfornotations`).
-.. tacv:: unfold {+, qualid_or_string at {+, @num}}
+ .. tacv:: unfold {+, @qualid at @occurrences }
- This is the most general form, where :n:`qualid_or_string` is either a
- :n:`@qualid` or a :n:`@string` referring to a notation.
+ The list :token:`occurrences` specify the occurrences of
+ :n:`@qualid` to be unfolded. Occurrences are located from left
+ to right.
+
+ .. exn:: Bad occurrence number of @qualid.
+ :undocumented:
+
+ .. exn:: @qualid does not occur.
+ :undocumented:
+
+ .. tacv:: unfold @string
+
+ If :n:`@string` denotes the discriminating symbol of a notation
+ (e.g. "+") or an expression defining a notation (e.g. `"_ +
+ _"`), and this notation denotes an application whose head symbol
+ is an unfoldable constant, then the tactic unfolds it.
+
+ .. tacv:: unfold @string%@ident
+
+ This is variant of :n:`unfold @string` where :n:`@string` gets
+ its interpretation from the scope bound to the delimiting key
+ :token:`ident` instead of its default interpretation (see
+ :ref:`Localinterpretationrulesfornotations`).
+
+ .. tacv:: unfold {+, {| @qualid | @string{? %@ident } } {? at @occurrences } } {? in @goal_occurrences }
+
+ This is the most general form.
.. tacn:: fold @term
:name: fold
@@ -3382,14 +3423,13 @@ the conversion in hypotheses :n:`{+ @ident}`.
Conversion tactics applied to hypotheses
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.. tacn:: conv_tactic in {+, @ident}
+.. tacn:: @tactic in {+, @ident}
- Applies the conversion tactic :n:`conv_tactic` to the hypotheses
- :n:`{+ @ident}`. The tactic :n:`conv_tactic` is any of the conversion tactics
- listed in this section.
+ Applies :token:`tactic` (any of the conversion tactics listed in this
+ section) to the hypotheses :n:`{+ @ident}`.
- If :n:`@ident` is a local definition, then :n:`@ident` can be replaced by
- (type of :n:`@ident`) to address not the body but the type of the local
+ If :token:`ident` is a local definition, then :token:`ident` can be replaced by
+ :n:`type of @ident` to address not the body but the type of the local
definition.
Example: :n:`unfold not in (type of H1) (type of H3)`.
@@ -3447,9 +3487,9 @@ Automation
:ref:`The Hints Databases for auto and eauto <thehintsdatabasesforautoandeauto>` for the list of
pre-defined databases and the way to create or extend a database.
- .. tacv:: auto using {+ @ident__i} {? with {+ @ident } }
+ .. tacv:: auto using {+ @qualid__i} {? with {+ @ident } }
- Uses lemmas :n:`@ident__i` in addition to hints. If :n:`@ident` is an
+ Uses lemmas :n:`@qualid__i` in addition to hints. If :n:`@qualid` is an
inductive type, it is the collection of its constructors which are added
as hints.
@@ -3457,8 +3497,8 @@ Automation
The hints passed through the `using` clause are used in the same
way as if they were passed through a hint database. Consequently,
- they use a weaker version of :tacn:`apply` and :n:`auto using @ident`
- may fail where :n:`apply @ident` succeeds.
+ they use a weaker version of :tacn:`apply` and :n:`auto using @qualid`
+ may fail where :n:`apply @qualid` succeeds.
Given that this can be seen as counter-intuitive, it could be useful
to have an option to use full-blown :tacn:`apply` for lemmas passed
@@ -3476,7 +3516,7 @@ Automation
Behaves like :tacn:`auto` but shows the tactics it tries to solve the goal,
including failing paths.
- .. tacv:: {? info_}auto {? @num} {? using {+ @lemma}} {? with {+ @ident}}
+ .. tacv:: {? info_}auto {? @num} {? using {+ @qualid}} {? with {+ @ident}}
This is the most general form, combining the various options.
@@ -3489,10 +3529,10 @@ Automation
.. tacv:: trivial with {+ @ident}
trivial with *
- trivial using {+ @lemma}
+ trivial using {+ @qualid}
debug trivial
info_trivial
- {? info_}trivial {? using {+ @lemma}} {? with {+ @ident}}
+ {? info_}trivial {? using {+ @qualid}} {? with {+ @ident}}
:name: _; _; _; debug trivial; info_trivial; _
:undocumented:
@@ -3531,7 +3571,7 @@ Automation
Note that ``ex_intro`` should be declared as a hint.
- .. tacv:: {? info_}eauto {? @num} {? using {+ @lemma}} {? with {+ @ident}}
+ .. tacv:: {? info_}eauto {? @num} {? using {+ @qualid}} {? with {+ @ident}}
The various options for :tacn:`eauto` are the same as for :tacn:`auto`.
@@ -3550,9 +3590,9 @@ Automation
This tactic unfolds constants that were declared through a :cmd:`Hint Unfold`
in the given databases.
-.. tacv:: autounfold with {+ @ident} in clause
+.. tacv:: autounfold with {+ @ident} in @goal_occurrences
- Performs the unfolding in the given clause.
+ Performs the unfolding in the given clause (:token:`goal_occurrences`).
.. tacv:: autounfold with *
@@ -3592,10 +3632,9 @@ Automation
Performs all the rewritings in hypothesis :n:`@qualid` applying :n:`@tactic`
to the main subgoal after each rewriting step.
-.. tacv:: autorewrite with {+ @ident} in @clause
+.. tacv:: autorewrite with {+ @ident} in @goal_occurrences
- Performs all the rewriting in the clause :n:`@clause`. The clause argument
- must not contain any ``type of`` nor ``value of``.
+ Performs all the rewriting in the clause :n:`@goal_occurrences`.
.. seealso::
@@ -3666,10 +3705,11 @@ automatically created.
from the order in which they were inserted, making this implementation
observationally different from the legacy one.
-The general command to add a hint to some databases :n:`{+ @ident}` is
-
.. cmd:: Hint @hint_definition : {+ @ident}
+ The general command to add a hint to some databases :n:`{+ @ident}`.
+ The various possible :production:`hint_definition`\s are given below.
+
.. cmdv:: Hint @hint_definition
No database name is given: the hint is registered in the ``core`` database.
@@ -3718,7 +3758,7 @@ The general command to add a hint to some databases :n:`{+ @ident}` is
before, the tactic actually used is a restricted version of
:tacn:`apply`).
- .. cmdv:: Resolve <- @term
+ .. cmdv:: Hint Resolve <- @term
Adds the right-to-left implication of an equivalence as a hint.
@@ -3738,7 +3778,7 @@ The general command to add a hint to some databases :n:`{+ @ident}` is
.. exn:: @term cannot be used as a hint
:undocumented:
- .. cmdv:: Immediate {+ @term} : @ident
+ .. cmdv:: Hint Immediate {+ @term} : @ident
Adds each :n:`Hint Immediate @term`.
@@ -3981,7 +4021,7 @@ use one or several databases specific to your development.
Adds the rewriting rules :n:`{+ @term}` with a right-to-left orientation in
the bases :n:`{+ @ident}`.
-.. cmd:: Hint Rewrite {+ @term} using tactic : {+ @ident}
+.. cmd:: Hint Rewrite {+ @term} using @tactic : {+ @ident}
When the rewriting rules :n:`{+ @term}` in :n:`{+ @ident}` will be used, the
tactic ``tactic`` will be applied to the generated subgoals, the main subgoal
@@ -4202,7 +4242,7 @@ some incompatibilities.
Adds lemmas from :tacn:`auto` hint bases :n:`{+ @ident}` to the proof-search
environment.
-.. tacv:: firstorder tactic using {+ @qualid} with {+ @ident}
+.. tacv:: firstorder @tactic using {+ @qualid} with {+ @ident}
This combines the effects of the different variants of :tacn:`firstorder`.
@@ -4243,10 +4283,10 @@ some incompatibilities.
congruence.
Qed.
-.. tacv:: congruence n
+.. tacv:: congruence @num
- Tries to add at most `n` instances of hypotheses stating quantified equalities
- to the problem in order to solve it. A bigger value of `n` does not make
+ Tries to add at most :token:`num` instances of hypotheses stating quantified equalities
+ to the problem in order to solve it. A bigger value of :token:`num` does not make
success slower, only failure. You might consider adding some lemmas as
hypotheses using assert in order for :tacn:`congruence` to use them.
@@ -4556,14 +4596,14 @@ Automating
.. _btauto_grammar:
.. productionlist:: sentence
- t : `x`
- : true
- : false
- : orb `t` `t`
- : andb `t` `t`
- : xorb `t` `t`
- : negb `t`
- : if `t` then `t` else `t`
+ btauto_term : `ident`
+ : true
+ : false
+ : orb `btauto_term` `btauto_term`
+ : andb `btauto_term` `btauto_term`
+ : xorb `btauto_term` `btauto_term`
+ : negb `btauto_term`
+ : if `btauto_term` then `btauto_term` else `btauto_term`
Whenever the formula supplied is not a tautology, it also provides a
counter-example.
diff --git a/doc/sphinx/proof-engine/vernacular-commands.rst b/doc/sphinx/proof-engine/vernacular-commands.rst
index 26dc4e02cf..5f3e82938d 100644
--- a/doc/sphinx/proof-engine/vernacular-commands.rst
+++ b/doc/sphinx/proof-engine/vernacular-commands.rst
@@ -189,18 +189,13 @@ Requests to the environment
This command displays the type of :n:`@term`. When called in proof mode, the
term is checked in the local context of the current subgoal.
-
- .. TODO : selector is not a syntax entry
-
.. cmdv:: @selector: Check @term
This variant specifies on which subgoal to perform typing
(see Section :ref:`invocation-of-tactics`).
-.. TODO : convtactic is not a syntax entry
-
-.. cmd:: Eval @convtactic in @term
+.. cmd:: Eval @redexpr in @term
This command performs the specified reduction on :n:`@term`, and displays
the resulting term with its type. The term to be reduced may depend on
@@ -264,11 +259,11 @@ Requests to the environment
main symbol as in `"+"` or by its notation’s string as in `"_ + _"` or
`"_ 'U' _"`, see Section :ref:`notations`), the command works like ``Search`` :n:`@qualid`.
- .. cmdv:: Search @string%@key
+ .. cmdv:: Search @string%@ident
The string string must be a notation or the main
symbol of a notation which is then interpreted in the scope bound to
- the delimiting key :n:`@key` (see Section :ref:`LocalInterpretationRulesForNotations`).
+ the delimiting key :token:`ident` (see Section :ref:`LocalInterpretationRulesForNotations`).
.. cmdv:: Search @term_pattern
@@ -1132,6 +1127,8 @@ described first.
with lower level is expanded first. In case of a tie, the second one
(appearing in the cast type) is expanded.
+ .. prodn:: level ::= {| opaque | @num | expand }
+
Levels can be one of the following (higher to lower):
+ ``opaque`` : level of opaque constants. They cannot be expanded by
@@ -1167,19 +1164,19 @@ described first.
Print all the currently non-transparent strategies.
-.. cmd:: Declare Reduction @ident := @convtactic
+.. cmd:: Declare Reduction @ident := @redexpr
This command allows giving a short name to a reduction expression, for
- instance lazy beta delta [foo bar]. This short name can then be used
+ instance ``lazy beta delta [foo bar]``. This short name can then be used
in :n:`Eval @ident in` or ``eval`` directives. This command
accepts the
- Local modifier, for discarding this reduction name at the end of the
- file or module. For the moment the name cannot be qualified. In
+ ``Local`` modifier, for discarding this reduction name at the end of the
+ file or module. For the moment, the name is not qualified. In
particular declaring the same name in several modules or in several
- functor applications will be refused if these declarations are not
+ functor applications will be rejected if these declarations are not
local. The name :n:`@ident` cannot be used directly as an Ltac tactic, but
- nothing prevents the user to also perform a
- :n:`Ltac @ident := @convtactic`.
+ nothing prevents the user from also performing a
+ :n:`Ltac @ident := @redexpr`.
.. seealso:: :ref:`performingcomputations`
@@ -1208,7 +1205,7 @@ Controlling the locality of commands
effect of the command to the current module if the command does not occur in a
section and the Global modifier extends the effect outside the current
sections and current module if the command occurs in a section. As an example,
- the :cmd:`Arguments`, :cmd:`Ltac` or :cmd:`Notation` commands belong
+ the :cmd:`Arguments <Arguments (implicits)>`, :cmd:`Ltac` or :cmd:`Notation` commands belong
to this category. Notice that a subclass of these commands do not support
extension of their scope outside sections at all and the Global modifier is not
applicable to them.