diff options
author | Matthieu Sozeau <mattam@mattam.org> | 2018-07-02 20:12:46 +0200 |
---|---|---|
committer | Matthieu Sozeau <mattam@mattam.org> | 2018-07-02 20:12:46 +0200 |
commit | ce848730137bd1bf1f12f88ec782c935e742d84c (patch) | |
tree | d2a2d90cd2070010fb76e0f549cb23e31501f623 /doc | |
parent | b7d81ff8e1c715a3fe587d6bcaa6d132647ebd30 (diff) | |
parent | ffb3ab4108fa7b6a8f03b865d6287663fc3743e5 (diff) |
Merge PR #7703: Add an option to force parameters to be uniform
Diffstat (limited to 'doc')
-rw-r--r-- | doc/sphinx/language/gallina-specification-language.rst | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/sphinx/language/gallina-specification-language.rst b/doc/sphinx/language/gallina-specification-language.rst index ec99ccbee..e13625286 100644 --- a/doc/sphinx/language/gallina-specification-language.rst +++ b/doc/sphinx/language/gallina-specification-language.rst @@ -906,6 +906,32 @@ Parametrized inductive types sort for the inductive definition and will produce a less convenient rule for case elimination. +.. opt:: Uniform Inductive Parameters + + When this option is set (it is off by default), + inductive definitions are abstracted over their parameters + before typechecking constructors, allowing to write: + + .. coqtop:: all undo + + Set Uniform Inductive Parameters. + Inductive list3 (A:Set) : Set := + | nil3 : list3 + | cons3 : A -> list3 -> list3. + + This behavior is essentially equivalent to starting a new section + and using :cmd:`Context` to give the uniform parameters, like so + (cf. :ref:`section-mechanism`): + + .. coqtop:: all undo + + Section list3. + Context (A:Set). + Inductive list3 : Set := + | nil3 : list3 + | cons3 : A -> list3 -> list3. + End list3. + .. seealso:: Section :ref:`inductive-definitions` and the :tacn:`induction` tactic. |