diff options
Diffstat (limited to 'doc/sphinx/addendum/program.rst')
-rw-r--r-- | doc/sphinx/addendum/program.rst | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/doc/sphinx/addendum/program.rst b/doc/sphinx/addendum/program.rst index eb50e52dc..b685e68e4 100644 --- a/doc/sphinx/addendum/program.rst +++ b/doc/sphinx/addendum/program.rst @@ -135,7 +135,7 @@ support types, avoiding uses of proof-irrelevance that would come up when reasoning with equality on the subset types themselves. The next two commands are similar to their standard counterparts -Definition (see Section `TODO-1.3.2-Definition`_) and Fixpoint (see Section `TODO-1.3.4-Fixpoint`_) +:cmd:`Definition` and :cmd:`Fixpoint` in that they define constants. However, they may require the user to prove some goals to construct the final definitions. @@ -145,13 +145,14 @@ prove some goals to construct the final definitions. Program Definition ~~~~~~~~~~~~~~~~~~ -.. cmd:: Program Definition @ident := @term. +.. cmd:: Program Definition @ident := @term This command types the value term in Russell and generates proof obligations. Once solved using the commands shown below, it binds the final |Coq| term to the name ``ident`` in the environment. - .. exn:: ident already exists + .. exn:: @ident already exists. + :name: @ident already exists. (Program Definition) .. cmdv:: Program Definition @ident : @type := @term @@ -166,7 +167,7 @@ Program Definition .. exn:: In environment … the term: @term does not have type @type. Actually, it has type ... - .. cmdv:: Program Definition @ident @binders : @type := @term. + .. cmdv:: Program Definition @ident @binders : @type := @term This is equivalent to: @@ -174,14 +175,14 @@ Program Definition .. TODO refer to production in alias -See also: Sections `TODO-6.10.1-Opaque`_, `TODO-6.10.2-Transparent`_, `TODO-8.7.5-unfold`_ +See also: Sections :ref:`vernac-controlling-the-reduction-strategies`, :tacn:`unfold` .. _program_fixpoint: Program Fixpoint ~~~~~~~~~~~~~~~~ -.. cmd:: Program Fixpoint @ident @params {? {@order}} : @type := @term. +.. cmd:: Program Fixpoint @ident @params {? {@order}} : @type := @term The optional order annotation follows the grammar: @@ -196,7 +197,7 @@ The optional order annotation follows the grammar: + :g:`wf R x` which is equivalent to :g:`measure x (R)`. The structural fixpoint operator behaves just like the one of |Coq| (see -Section `TODO-1.3.4-Fixpoint`_), except it may also generate obligations. It works +:cmd:`Fixpoint`), except it may also generate obligations. It works with mutually recursive definitions too. .. coqtop:: reset none @@ -254,7 +255,7 @@ using the syntax: Program Lemma ~~~~~~~~~~~~~ -.. cmd:: Program Lemma @ident : @type. +.. cmd:: Program Lemma @ident : @type The Russell language can also be used to type statements of logical properties. It will generate obligations, try to solve them @@ -276,6 +277,7 @@ 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 + :name: Obligation Tactic Sets the default obligation solving tactic applied to all obligations automatically, whether to solve them or when starting to prove one, @@ -348,7 +350,7 @@ Frequently Asked Questions --------------------------- -.. exn:: Ill-formed recursive definition +.. exn:: Ill-formed recursive definition. This error can happen when one tries to define a function by structural recursion on a subset object, which means the |Coq| function looks like: |