aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2018-04-11 09:34:12 +0200
committerGravatar Maxime Dénès <mail@maximedenes.fr>2018-04-11 09:34:12 +0200
commitccf5c0879e3341ebfc8d3d00d35cc10b8b32a9e4 (patch)
treee1068186cbd1f81eecf43cd275c0bc6034989f8b
parent7bdca53589a04b293ab591af0be2d899358cb203 (diff)
parent6a6802fd423faf0db91fc21c87d1d153e27cc953 (diff)
Merge PR #6955: Fixed many typos and grammar errors in chapter 11 of the manual.
-rw-r--r--doc/sphinx/proof-engine/ssreflect-proof-language.rst102
1 files changed, 51 insertions, 51 deletions
diff --git a/doc/sphinx/proof-engine/ssreflect-proof-language.rst b/doc/sphinx/proof-engine/ssreflect-proof-language.rst
index 61dffa024..bd71e5ed8 100644
--- a/doc/sphinx/proof-engine/ssreflect-proof-language.rst
+++ b/doc/sphinx/proof-engine/ssreflect-proof-language.rst
@@ -451,7 +451,7 @@ Anonymous arguments
~~~~~~~~~~~~~~~~~~~
When in a definition, the type of a certain argument is mandatory, but
-not its name, one usually use “arrow” abstractions for prenex
+not its name, one usually uses “arrow” abstractions for prenex
arguments, or the ``(_ : term)`` syntax for inner arguments. In |SSR|,
the latter can be replaced by the open syntax ``of term`` or
(equivalently) ``& term``, which are both syntactically equivalent to a
@@ -518,7 +518,7 @@ is a valid tactic expression.
The pose tactic is also improved for the local definition of higher
order terms. Local definitions of functions can use the same syntax as
-global ones. For example the tactic ``pose`` supoprts parameters:
+global ones. For example, the tactic ``pose`` supoprts parameters:
.. example::
@@ -1295,7 +1295,7 @@ is a synonym for:
intro top; first [refine top | refine (top _) | refine (top _ _) | …]; clear top.
-where ``top`` is fresh name, and the sequence of refine tactics tries to
+where ``top`` is a fresh name, and the sequence of refine tactics tries to
catch the appropriate number of wildcards to be inserted. Note that
this use of the refine tactic implies that the tactic tries to match
the goal up to expansion of constants and evaluation of subterms.
@@ -1573,7 +1573,7 @@ The :token:`i_pattern` s can be seen as a variant of *intro patterns*
:ref:`tactics`: each performs an introduction operation, i.e., pops some
variables or assumptions from the goal.
-An :token:`s_item` can simplify the set of subgoals or the subgoal themselves:
+An :token:`s_item` can simplify the set of subgoals or the subgoals themselves:
+ ``//`` removes all the “trivial” subgoals that can be resolved by the
|SSR| tactic ``done`` described in :ref:`terminators_ssr`, i.e.,
@@ -1831,7 +1831,7 @@ compact syntax:
case: {2}_ / eqP.
-were ``_`` is interpreted as ``(_ == _)`` since
+where ``_`` is interpreted as ``(_ == _)`` since
``eqP T a b : reflect (a = b) (a == b)`` and reflect is a type family with
one index.
@@ -2074,7 +2074,7 @@ is equivalent to:
do [done | by move=> top; apply top].
-where top is a fresh name affected to the top assumption of the goal.
+where ``top`` is a fresh name assigned to the top assumption of the goal.
This applied form is supported by the : discharge tactical, and the
tactic:
@@ -2090,7 +2090,7 @@ is equivalent to:
(see section :ref:`discharge_ssr` for the documentation of the apply: combination).
-Warning The list of tactics, possibly chained by semi-columns, that
+Warning The list of tactics, possibly chained by semicolons, that
follows a by keyword is considered as a parenthesized block applied to
the current goal. Hence for example if the tactic:
@@ -2123,7 +2123,7 @@ generated by the previous tactic. This covers the frequent cases where
a tactic generates two subgoals one of which can be easily disposed
of.
-This is an other powerful way of linearization of scripts, since it
+This is another powerful way of linearization of scripts, since it
happens very often that a trivial subgoal can be solved in a less than
one line tactic. For instance, the tactic:
@@ -2131,14 +2131,14 @@ one line tactic. For instance, the tactic:
:name: last
tries to solve the last subgoal generated by the first
-tactic using the given second tactic , and fails if it does not succeeds.
-Its analogous
+tactic using the given second tactic, and fails if it does not succeed.
+Its analogue
.. tacn:: @tactic ; first by @tactic
:name: first
tries to solve the first subgoal generated by the first tactic using the
-second given tactic, and fails if it does not succeeds.
+second given tactic, and fails if it does not succeed.
|SSR| also offers an extension of this facility, by supplying
tactics to *permute* the subgoals generated by a tactic. The tactic:
@@ -2259,14 +2259,14 @@ For instance, the tactic:
tactic; do 1? rewrite mult_comm.
-rewrites at most one time the lemma ``mult_com`` in all the subgoals
+rewrites at most one time the lemma ``mult_comm`` in all the subgoals
generated by tactic , whereas the tactic:
.. coqtop:: in
tactic; do 2! rewrite mult_comm.
-rewrites exactly two times the lemma ``mult_com`` in all the subgoals
+rewrites exactly two times the lemma ``mult_comm`` in all the subgoals
generated by tactic, and fails if this rewrite is not possible in some
subgoal.
@@ -2335,10 +2335,10 @@ to the following one:
.. tacv:: @tactic in {+ @clear_switch | {? @ } @ident | ( @ident ) | ( {? @ } @ident := @c_pattern ) } {? * }
In its simplest form the last option lets one rename hypotheses that
-can’t be cleared (like section variables). For example ``(y := x)``
+can’t be cleared (like section variables). For example, ``(y := x)``
generalizes over ``x`` and reintroduces the generalized variable under the
name ``y`` (and does not clear ``x``).
-For a more precise description this form of localization refer
+For a more precise description of this form of localization refer
to :ref:`advanced_generalization_ssr`.
@@ -2351,7 +2351,7 @@ Forward reasoning structures the script by explicitly specifying some
assumptions to be added to the proof context. It is closely associated
with the declarative style of proof, since an extensive use of these
highlighted statements make the script closer to a (very detailed)
-text book proof.
+textbook proof.
Forward chaining tactics allow to state an intermediate lemma and start a
piece of script dedicated to the proof of this statement. The use of closing
@@ -2492,7 +2492,7 @@ also supported (assuming x occurs in the goal only):
have {x} -> : x = y.
-An other frequent use of the intro patterns combined with ``have`` is the
+Another frequent use of the intro patterns combined with ``have`` is the
destruction of existential assumptions like in the tactic:
.. example::
@@ -2845,8 +2845,8 @@ term -> G.
If the optional list of :token:`itent` is present
on the left side of ``/``, these constants are generalized in the
-premise (term -> G) of the first subgoal. By default the body of local
-definitions is erased. This behavior can be inhibited prefixing the
+premise (term -> G) of the first subgoal. By default bodies of local
+definitions are erased. This behavior can be inhibited by prefixing the
name of the local definition with the ``@`` character.
In the second subgoal, the tactic:
@@ -2936,7 +2936,7 @@ renaming does not require the original variable to be cleared.
The syntax ``(@x := y)`` generates a let-in abstraction but with the
following caveat: ``x`` will not bind ``y``, but its body, whenever ``y`` can be
-unfolded. This cover the case of both local and global definitions, as
+unfolded. This covers the case of both local and global definitions, as
illustrated in the following example.
.. example::
@@ -3035,7 +3035,7 @@ operation should be performed:
specifies if and how the
rewrite operation should be repeated.
+ A rewrite operation matches the occurrences of a *rewrite pattern*,
- and replaces these occurrences by an other term, according to the
+ and replaces these occurrences by another term, according to the
given :token:`r_item`. The optional *redex switch* ``[r_pattern]``,
which should
always be surrounded by brackets, gives explicitly this rewrite
@@ -3329,7 +3329,7 @@ The rewrite tactic can be provided a *tuple* of rewrite rules, or more
generally a tree of such rules, since this tuple can feature arbitrary
inner parentheses. We call *multirule* such a generalized rewrite
rule. This feature is of special interest when it is combined with
-multiplier switches, which makes the rewrite tactic iterates the
+multiplier switches, which makes the rewrite tactic iterate the
rewrite operations prescribed by the rules on the current goal.
@@ -3473,7 +3473,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_items` 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
@@ -3736,8 +3736,8 @@ replaces the occurrence(s) of :token:`ident` coded by the
We found that it was usually preferable to prevent the expansion of
some functions by the partial evaluation switch ``/=``, unless this
-allowed the evaluation of a condition. This is possible thanks to an
-other mechanism of term tagging, resting on the following *Notation*:
+allowed the evaluation of a condition. This is possible thanks to another
+mechanism of term tagging, resting on the following *Notation*:
.. coqtop:: in
@@ -3781,7 +3781,7 @@ arithmetic operations. We define for instance:
The operation ``addn`` behaves exactly like ``plus``, except that
``(addn (S n) m)`` will not simplify spontaneously to
-``(S (addn n m))`` (the two terms, however, are inter-convertible).
+``(S (addn n m))`` (the two terms, however, are convertible).
In addition, the unfolding step: ``rewrite /addn``
will replace ``addn`` directly with ``plus``, so the ``nosimpl`` form is
essentially invisible.
@@ -3792,7 +3792,7 @@ essentially invisible.
Congruence
~~~~~~~~~~
-Because of the way matching interferes with type families parameters,
+Because of the way matching interferes with parameters of type families,
the tactic:
.. coqtop:: in
@@ -3912,8 +3912,8 @@ The simple form of patterns used so far, terms possibly containing
wild cards, often require an additional :token:`occ_switch` to be specified.
While this may work pretty fine for small goals, the use of
polymorphic functions and dependent types may lead to an invisible
-duplication of functions arguments. These copies usually end up in
-types hidden by the implicit arguments machinery or by user defined
+duplication of function arguments. These copies usually end up in
+types hidden by the implicit arguments machinery or by user-defined
notations. In these situations computing the right occurrence numbers
is very tedious because they must be counted on the goal as printed
after setting the Printing All flag. Moreover the resulting script is
@@ -3981,7 +3981,7 @@ pattern for the redex looking at the rule used for rewriting.
The first :token:`c_pattern` is the simplest form matching any context but
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 mean of redex
+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`
presented in the tables above can contain
@@ -4064,7 +4064,7 @@ Contextual pattern in set and the : tactical
As already mentioned in section :ref:`abbreviations_ssr` the ``set``
tactic takes as an
argument a term in open syntax. This term is interpreted as the
-simplest for of :token:`c_pattern`. To void confusion in the grammar, open
+simplest form of :token:`c_pattern`. To avoid confusion in the grammar, open
syntax is supported only for the simplest form of patterns, while
parentheses are required around more complex patterns.
@@ -4086,17 +4086,17 @@ parentheses are required around more complex patterns.
set t := (a + _ in X in _ = X).
-Since the user may define an infix notation for ``in`` the former tactic
-may result ambiguous. The disambiguation rule implemented is to prefer
+Since the user may define an infix notation for ``in`` the result of the former
+tactic may be ambiguous. The disambiguation rule implemented is to prefer
patterns over simple terms, but to interpret a pattern with double
-parentheses as a simple term. For example the following tactic would
+parentheses as a simple term. For example, the following tactic would
capture any occurrence of the term ``a in A``.
.. coqtop:: in
set t := ((a in A)).
-Contextual pattern can also be used as arguments of the ``:`` tactical.
+Contextual patterns can also be used as arguments of the ``:`` tactical.
For example:
.. coqtop:: in
@@ -4139,7 +4139,7 @@ Contextual patterns in rewrite
Note that the right hand side of ``addn0`` is undetermined, but the
rewrite pattern specifies the redex explicitly. The right hand side
- of ``addn0`` is unified with the term identified by ``X``, ``0`` here.
+ of ``addn0`` is unified with the term identified by ``X``, here ``0``.
The following pattern does not specify a redex, since it identifies an
@@ -4269,7 +4269,7 @@ generation (see section :ref:`generation_of_equations_ssr`).
.. example::
- The following script illustrate a toy example of this feature. Let us
+ The following script illustrates a toy example of this feature. Let us
define a function adding an element at the end of a list:
.. coqtop:: reset
@@ -4283,7 +4283,7 @@ generation (see section :ref:`generation_of_equations_ssr`).
.. coqtop:: all
Variable d : Type.
- Fixpoint add_last(s : list d) (z : d) {struct s} : list d :=
+ Fixpoint add_last (s : list d) (z : d) {struct s} : list d :=
if s is cons x s' then cons x (add_last s' z) else z :: nil.
One can define an alternative, reversed, induction principle on
@@ -4296,7 +4296,7 @@ generation (see section :ref:`generation_of_equations_ssr`).
forall s : list d, P s.
Then the combination of elimination views with equation names result
- in a concise syntax for reasoning inductively using the user defined
+ in a concise syntax for reasoning inductively using the user-defined
elimination scheme.
.. coqtop:: all
@@ -4305,8 +4305,8 @@ generation (see section :ref:`generation_of_equations_ssr`).
elim/last_ind_list E : l=> [| u v]; last first.
-User provided eliminators (potentially generated with the ``Function``
-|Coq|’s command) can be combined with the type family switches described
+User-provided eliminators (potentially generated with |Coq|’s ``Function``
+command) can be combined with the type family switches described
in section :ref:`type_families_ssr`.
Consider an eliminator ``foo_ind`` of type:
@@ -4341,7 +4341,7 @@ The ``elim/`` tactic distinguishes two cases:
As explained in section :ref:`type_families_ssr`, the initial prefix of
``ei`` can be omitted.
-Here an example of a regular, but non trivial, eliminator.
+Here is an example of a regular, but nontrivial, eliminator.
.. example::
@@ -4423,7 +4423,7 @@ Here an example of a regular, but non trivial, eliminator.
``P`` should be the same as the second argument of ``plus``, in the
second argument of ``P``, but ``y`` and ``z`` do no unify.
-Here an example of a truncated eliminator:
+Here is an example of a truncated eliminator:
.. example::
@@ -4481,7 +4481,7 @@ Interpreting assumptions
~~~~~~~~~~~~~~~~~~~~~~~~
Interpreting an assumption in the context of a proof consists in
-applying it a lemma before generalizing, and/or decomposing this
+applying to it a lemma before generalizing, and/or decomposing this
assumption. For instance, with the extensive use of boolean reflection
(see section :ref:`views_and_reflection_ssr`.4), it is quite frequent
to need to decompose the logical interpretation of (the boolean
@@ -4689,7 +4689,7 @@ the bookkeeping tactical ``=>`` since this would be redundant with the
Boolean reflection
~~~~~~~~~~~~~~~~~~
-In the Calculus of Inductive Construction, there is an obvious
+In the Calculus of Inductive Constructions, there is an obvious
distinction between logical propositions and boolean values. On the
one hand, logical propositions are objects of *sort* ``Prop`` which is
the carrier of intuitionistic reasoning. Logical connectives in
@@ -5002,7 +5002,7 @@ but they also allow complex transformation, involving negations.
Note that views, being part of :token:`i_pattern`, can be used to interpret
assertions too. For example the following script asserts ``a && b`` but
-actually used its propositional interpretation.
+actually uses its propositional interpretation.
.. example::
@@ -5038,7 +5038,7 @@ applied to a goal ``top`` is interpreted in the following way:
Like assumption interpretation view hints, goal interpretation ones
-are user defined lemmas stored (see section :ref:`views_and_reflection_ssr`) in the ``Hint View``
+are user-defined lemmas stored (see section :ref:`views_and_reflection_ssr`) in the ``Hint View``
database bridging the possible gap between the type of ``term`` and the
type of the goal.
@@ -5132,7 +5132,7 @@ See the files ``ssreflect.v`` and ``ssrbool.v`` for examples.
Multiple views
~~~~~~~~~~~~~~
-The hypotheses and the goal can be interpreted applying multiple views
+The hypotheses and the goal can be interpreted by applying multiple views
in sequence. Both move and apply can be followed by an arbitrary
number of ``/term``. The main difference between the following two
tactics
@@ -5189,7 +5189,7 @@ equivalences are indeed taken into account, otherwise only single
.. cmd:: Search {? @pattern } {* {? - } %( @string %| @pattern %) {? % @ident} } {? in {+ {? - } @qualid } }
-where :token:`qualid` is the name of an open module. This command search returns
+where :token:`qualid` is the name of an open module. This command returns
the list of lemmas:
@@ -5214,7 +5214,7 @@ Note that:
+ As for regular terms, patterns can feature scope indications. For
instance, the command: ``Search _ (_ + _)%N.`` lists all the lemmas whose
- statement (conclusion or hypotheses) involve an application of the
+ statement (conclusion or hypotheses) involves an application of the
binary operation denoted by the infix ``+`` symbol in the ``N`` scope (which is
|SSR| scope for natural numbers).
+ Patterns with holes should be surrounded by parentheses.
@@ -5491,7 +5491,7 @@ prenex implicits declaration see :ref:`parametric_polymorphism_ssr`
used for such generated names.
.. [#7] More precisely, it should have a quantified inductive type with a
assumptions and m − a constructors.
-.. [#8] This is an implementation feature: there is not such obstruction
+.. [#8] This is an implementation feature: there is no such obstruction
in the metatheory
.. [#9] The current state of the proof shall be displayed by the Show
Proof command of |Coq| proof mode.