aboutsummaryrefslogtreecommitdiff
path: root/doc/sphinx/addendum
diff options
context:
space:
mode:
Diffstat (limited to 'doc/sphinx/addendum')
-rw-r--r--doc/sphinx/addendum/generalized-rewriting.rst2
-rw-r--r--doc/sphinx/addendum/implicit-coercions.rst4
-rw-r--r--doc/sphinx/addendum/micromega.rst2
-rw-r--r--doc/sphinx/addendum/omega.rst35
-rw-r--r--doc/sphinx/addendum/program.rst6
-rw-r--r--doc/sphinx/addendum/sprop.rst52
-rw-r--r--doc/sphinx/addendum/type-classes.rst6
-rw-r--r--doc/sphinx/addendum/universe-polymorphism.rst15
8 files changed, 76 insertions, 46 deletions
diff --git a/doc/sphinx/addendum/generalized-rewriting.rst b/doc/sphinx/addendum/generalized-rewriting.rst
index 315c9d4a80..759f630b85 100644
--- a/doc/sphinx/addendum/generalized-rewriting.rst
+++ b/doc/sphinx/addendum/generalized-rewriting.rst
@@ -529,7 +529,7 @@ pass additional arguments such as ``using relation``.
setoid_symmetry {? in @ident}
setoid_transitivity
setoid_rewrite {? @orientation} @term {? at @occurrences} {? in @ident}
- setoid_replace @term with @term {? using relation @term} {? in @ident} {? by @tactic}
+ setoid_replace @term with @term {? using relation @term} {? in @ident} {? by @ltac_expr3}
:name: setoid_reflexivity; setoid_symmetry; setoid_transitivity; setoid_rewrite; setoid_replace
The ``using relation`` arguments cannot be passed to the unprefixed form.
diff --git a/doc/sphinx/addendum/implicit-coercions.rst b/doc/sphinx/addendum/implicit-coercions.rst
index 1f33775a01..a6dc15da55 100644
--- a/doc/sphinx/addendum/implicit-coercions.rst
+++ b/doc/sphinx/addendum/implicit-coercions.rst
@@ -37,6 +37,8 @@ In addition to these user-defined classes, we have two built-in classes:
* ``Funclass``, the class of functions; its objects are all the terms with a functional
type, i.e. of form :g:`forall x:A,B`.
+Formally, the syntax of classes is defined as:
+
.. insertprodn class class
.. prodn::
@@ -257,7 +259,7 @@ Activating the Printing of Coercions
:name: Printing Coercion
Specifies a set of qualids for which coercions are always displayed. Use the
- :cmd:`Add @table` and :cmd:`Remove @table` commands to update the set of qualids.
+ :cmd:`Add` and :cmd:`Remove` commands to update the set of qualids.
.. _coercions-classes-as-records:
diff --git a/doc/sphinx/addendum/micromega.rst b/doc/sphinx/addendum/micromega.rst
index f706633da9..77bf58aac6 100644
--- a/doc/sphinx/addendum/micromega.rst
+++ b/doc/sphinx/addendum/micromega.rst
@@ -1,4 +1,4 @@
-.. _ micromega:
+.. _micromega:
Micromega: tactics for solving arithmetic goals over ordered rings
==================================================================
diff --git a/doc/sphinx/addendum/omega.rst b/doc/sphinx/addendum/omega.rst
index daca43e65e..e1b1ee8e8d 100644
--- a/doc/sphinx/addendum/omega.rst
+++ b/doc/sphinx/addendum/omega.rst
@@ -1,4 +1,4 @@
-.. _omega:
+.. _omega_chapter:
Omega: a solver for quantifier-free problems in Presburger Arithmetic
=====================================================================
@@ -7,20 +7,18 @@ Omega: a solver for quantifier-free problems in Presburger Arithmetic
.. warning::
- The :tacn:`omega` tactic is about to be deprecated in favor of the
- :tacn:`lia` tactic. The goal is to consolidate the arithmetic
- solving capabilities of Coq into a single engine; moreover,
- :tacn:`lia` is in general more powerful than :tacn:`omega` (it is a
- complete Presburger arithmetic solver while :tacn:`omega` was known
- to be incomplete).
-
- Work is in progress to make sure that there are no regressions
- (including no performance regression) when switching from
- :tacn:`omega` to :tacn:`lia` in existing projects. However, we
- already recommend using :tacn:`lia` in new or refactored proof
- scripts. We also ask that you report (in our `bug tracker
- <https://github.com/coq/coq/issues>`_) any issue you encounter,
- especially if the issue was not present in :tacn:`omega`.
+ The :tacn:`omega` tactic is deprecated in favor of the :tacn:`lia`
+ tactic. The goal is to consolidate the arithmetic solving
+ capabilities of Coq into a single engine; moreover, :tacn:`lia` is
+ in general more powerful than :tacn:`omega` (it is a complete
+ Presburger arithmetic solver while :tacn:`omega` was known to be
+ incomplete).
+
+ It is recommended to switch from :tacn:`omega` to :tacn:`lia` in existing
+ projects. We also ask that you report (in our `bug tracker
+ <https://github.com/coq/coq/issues>`_) any issue you encounter, especially
+ if the issue was not present in :tacn:`omega`. If no new issues are
+ reported, :tacn:`omega` will be removed soon.
Note that replacing :tacn:`omega` with :tacn:`lia` can break
non-robust proof scripts which rely on incompleteness bugs of
@@ -30,6 +28,11 @@ Description of ``omega``
------------------------
.. tacn:: omega
+ :name: omega
+
+ .. deprecated:: 8.12
+
+ Use :tacn:`lia` instead.
:tacn:`omega` is a tactic for solving goals in Presburger arithmetic,
i.e. for proving formulas made of equations and inequalities over the
@@ -118,7 +121,7 @@ loaded by
.. example::
- .. coqtop:: all
+ .. coqtop:: all warn
Require Import Omega.
diff --git a/doc/sphinx/addendum/program.rst b/doc/sphinx/addendum/program.rst
index 5cffe9e435..52862dea47 100644
--- a/doc/sphinx/addendum/program.rst
+++ b/doc/sphinx/addendum/program.rst
@@ -290,7 +290,7 @@ optional identifier is used when multiple functions have unsolved
obligations (e.g. when defining mutually recursive blocks). The
optional tactic is replaced by the default one if not specified.
-.. cmd:: {? {| Local | Global } } Obligation Tactic := @tactic
+.. cmd:: {? {| Local | Global } } Obligation Tactic := @ltac_expr
:name: Obligation Tactic
Sets the default obligation solving tactic applied to all obligations
@@ -314,11 +314,11 @@ optional tactic is replaced by the default one if not specified.
Start the proof of the next unsolved obligation.
-.. cmd:: Solve Obligations {? {? of @ident} with @tactic}
+.. cmd:: Solve Obligations {? {? of @ident} with @ltac_expr}
Tries to solve each obligation of ``ident`` using the given ``tactic`` or the default one.
-.. cmd:: Solve All Obligations {? with @tactic}
+.. cmd:: Solve All Obligations {? with @ltac_expr}
Tries to solve each obligation of every program using the given
tactic or the default one (useful for mutually recursive definitions).
diff --git a/doc/sphinx/addendum/sprop.rst b/doc/sphinx/addendum/sprop.rst
index 9acdd18b89..b19239ed22 100644
--- a/doc/sphinx/addendum/sprop.rst
+++ b/doc/sphinx/addendum/sprop.rst
@@ -7,27 +7,26 @@ SProp (proof irrelevant propositions)
The status of strict propositions is experimental.
+ In particular, conversion checking through bytecode or native code
+ compilation currently does not understand proof irrelevance.
+
This section describes the extension of |Coq| with definitionally
proof irrelevant propositions (types in the sort :math:`\SProp`, also
known as strict propositions) as described in
:cite:`Gilbert:POPL2019`.
-Using :math:`\SProp` may be prevented by passing ``-disallow-sprop``
-to the |Coq| program or using :flag:`Allow StrictProp`.
+Use of |SProp| may be disabled by passing ``-disallow-sprop`` to the
+|Coq| program or by turning the :flag:`Allow StrictProp` flag off.
.. flag:: Allow StrictProp
:name: Allow StrictProp
- Allows using :math:`\SProp` when set and forbids it when unset. The
- initial value depends on whether you used the command line
- ``-disallow-sprop`` and ``-allow-sprop``.
-
-.. exn:: SProp not allowed, you need to Set Allow StrictProp or to use the -allow-sprop command-line-flag.
- :undocumented:
-
-.. coqtop:: none
+ Enables or disables the use of |SProp|. It is enabled by default.
+ The command-line flag ``-disallow-sprop`` disables |SProp| at
+ startup.
- Set Allow StrictProp.
+ .. exn:: SProp is disallowed because the "Allow StrictProp" flag is off.
+ :undocumented:
Some of the definitions described in this document are available
through ``Coq.Logic.StrictProp``, which see.
@@ -38,29 +37,35 @@ Basic constructs
The purpose of :math:`\SProp` is to provide types where all elements
are convertible:
-.. coqdoc::
+.. coqtop:: all
- Definition irrelevance (A:SProp) (P:A -> Prop) (x:A) (v:P x) (y:A) : P y := v.
+ Theorem irrelevance (A : SProp) (P : A -> Prop) : forall x : A, P x -> forall y : A, P y.
+ Proof.
+ intros * Hx *.
+ exact Hx.
+ Qed.
Since we have definitional :ref:`eta-expansion` for
functions, the property of being a type of definitionally irrelevant
values is impredicative, and so is :math:`\SProp`:
-.. coqdoc::
+.. coqtop:: all
Check fun (A:Type) (B:A -> SProp) => (forall x:A, B x) : SProp.
-.. warning::
-
- Conversion checking through bytecode or native code compilation
- currently does not understand proof irrelevance.
-
In order to keep conversion tractable, cumulativity for :math:`\SProp`
-is forbidden:
+is forbidden, unless the :flag:`Cumulative StrictProp` flag is turned
+on:
.. coqtop:: all
Fail Check (fun (A:SProp) => A : Type).
+ Set Cumulative StrictProp.
+ Check (fun (A:SProp) => A : Type).
+
+.. coqtop:: none
+
+ Unset Cumulative StrictProp.
We can explicitly lift strict propositions into the relevant world by
using a wrapping inductive type. The inductive stops definitional
@@ -240,3 +245,10 @@ so correctly converts ``x`` and ``y``.
the kernel when it is passed a term with incorrect relevance marks.
To avoid conversion issues as in ``late_mark`` you may wish to use
it to find when your tactics are producing incorrect marks.
+
+.. flag:: Cumulative StrictProp
+ :name: Cumulative StrictProp
+
+ Set this flag (it is off by default) to make the kernel accept
+ cumulativity between |SProp| and other universes. This makes
+ typechecking incomplete.
diff --git a/doc/sphinx/addendum/type-classes.rst b/doc/sphinx/addendum/type-classes.rst
index bd4c276571..903aa266e2 100644
--- a/doc/sphinx/addendum/type-classes.rst
+++ b/doc/sphinx/addendum/type-classes.rst
@@ -241,7 +241,7 @@ binders. For example:
Definition lt `{eqa : EqDec A, ! Ord eqa} (x y : A) := andb (le x y) (neqb x y).
-The ``!`` modifier switches the way a binder is parsed back to the regular
+The ``!`` modifier switches the way a binder is parsed back to the usual
interpretation of Coq. In particular, it uses the implicit arguments
mechanism if available, as shown in the example.
@@ -323,7 +323,7 @@ Summary of the commands
.. cmdv:: Existing Class @ident
- This variant declares a class a posteriori from a constant or
+ This variant declares a class from a previously declared constant or
inductive definition. No methods or instances are defined.
.. warn:: @ident is already declared as a typeclass
@@ -394,7 +394,7 @@ few other commands related to typeclasses.
:name: typeclasses eauto
This proof search tactic implements the resolution engine that is run
- implicitly during type-checking. This tactic uses a different resolution
+ implicitly during type checking. This tactic uses a different resolution
engine than :tacn:`eauto` and :tacn:`auto`. The main differences are the
following:
diff --git a/doc/sphinx/addendum/universe-polymorphism.rst b/doc/sphinx/addendum/universe-polymorphism.rst
index a08495badd..2958d866ac 100644
--- a/doc/sphinx/addendum/universe-polymorphism.rst
+++ b/doc/sphinx/addendum/universe-polymorphism.rst
@@ -227,7 +227,7 @@ constraints by prefixing the level names with symbols.
Because inductive subtypings are only produced by comparing inductives
to themselves with universes changed, they amount to variance
information: each universe is either invariant, covariant or
-irrelevant (there are no contravariant subtypings in Coq),
+irrelevant (there are no contravariant subtypings in |Coq|),
respectively represented by the symbols `=`, `+` and `*`.
Here we see that :g:`list` binds an irrelevant universe, so any two
@@ -426,6 +426,19 @@ mode, introduced universe names can be referred to in terms. Note that
local universe names shadow global universe names. During a proof, one
can use :cmd:`Show Universes` to display the current context of universes.
+It is possible to provide only some universe levels and let |Coq| infer the others
+by adding a :g:`+` in the list of bound universe levels:
+
+.. coqtop:: all
+
+ Fail Definition foobar@{u} : Type@{u} := Type.
+ Definition foobar@{u +} : Type@{u} := Type.
+ Set Printing Universes.
+ Print foobar.
+
+This can be used to find which universes need to be explicitly bound in a given
+definition.
+
Definitions can also be instantiated explicitly, giving their full
instance: