aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2020-02-19 15:22:36 -0500
committerEmilio Jesus Gallego Arias2020-02-19 15:22:36 -0500
commit2b72b403d82c15d0420603142e14ab50c7e590c1 (patch)
treea6578e3c7b4166d1cafccc3ea2352fc92a41b7a2 /doc
parent43c3c7d6f62a9bee4772242c27fbafd54770d271 (diff)
parent509d958342764e4a676e735a3896f6ff77c07ff9 (diff)
Merge PR #11600: New syntax [Inductive Acc A R | x : Prop := ...]
Reviewed-by: Zimmi48 Reviewed-by: maximedenes Reviewed-by: ppedrot
Diffstat (limited to 'doc')
-rw-r--r--doc/changelog/02-specification-language/11600-uniform-syntax.rst4
-rw-r--r--doc/sphinx/language/gallina-specification-language.rst13
2 files changed, 15 insertions, 2 deletions
diff --git a/doc/changelog/02-specification-language/11600-uniform-syntax.rst b/doc/changelog/02-specification-language/11600-uniform-syntax.rst
new file mode 100644
index 0000000000..3fa3f80301
--- /dev/null
+++ b/doc/changelog/02-specification-language/11600-uniform-syntax.rst
@@ -0,0 +1,4 @@
+- **Added:**
+ New syntax :g:`Inductive Acc A R | x : Prop := ...` to specify which
+ parameters of an inductive are uniform.
+ (`#11600 <https://github.com/coq/coq/pull/11600>`_, by Gaƫtan Gilbert).
diff --git a/doc/sphinx/language/gallina-specification-language.rst b/doc/sphinx/language/gallina-specification-language.rst
index 721c7a7a51..7ce4538a4d 100644
--- a/doc/sphinx/language/gallina-specification-language.rst
+++ b/doc/sphinx/language/gallina-specification-language.rst
@@ -1063,8 +1063,17 @@ Parameterized inductive types
| cons3 : A -> list3 -> list3.
End list3.
- Attributes ``uniform`` and ``nonuniform`` respectively enable and
- disable uniform parameters for a single inductive declaration block.
+ For finer control, you can use a ``|`` between the uniform and
+ the non-uniform parameters:
+
+ .. coqtop:: in reset
+
+ Inductive Acc {A:Type} (R:A->A->Prop) | (x:A) : Prop
+ := Acc_in : (forall y, R y x -> Acc y) -> Acc x.
+
+ The flag can then be seen as deciding whether the ``|`` is at the
+ beginning (when the flag is unset) or at the end (when it is set)
+ of the parameters when not explicitly given.
.. seealso::
Section :ref:`inductive-definitions` and the :tacn:`induction` tactic.