aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
authorGravatar Amin Timany <amintimany@gmail.com>2017-07-07 17:57:01 +0200
committerGravatar Amin Timany <amintimany@gmail.com>2017-07-31 18:05:54 +0200
commit28998d55aaaf0ad0e78477db5601a5bc9a6657b1 (patch)
tree0f1dd09378e08cabd371e5b696e33f86a04e8aea /doc
parent77d4c058261e6e843a4a80f7f0290c4798d0f5ec (diff)
Fix typo and Add Jason's example to the doc
Diffstat (limited to 'doc')
-rw-r--r--doc/refman/Universes.tex27
1 files changed, 25 insertions, 2 deletions
diff --git a/doc/refman/Universes.tex b/doc/refman/Universes.tex
index 79b9e4df5..e097de59b 100644
--- a/doc/refman/Universes.tex
+++ b/doc/refman/Universes.tex
@@ -139,7 +139,7 @@ producing global universe constraints, one can use the
Inductive types, coinductive types, variants and records can be
declared cumulative using the \texttt{Cumulative}. Alternatively,
there is an option \texttt{Set Inductive Cumulativity} which when set,
-makes all subsequent inductive definitions cumulative. When set
+makes all subsequent inductive definitions cumulative. When set,
inductive types and the like can be enforced to be
\emph{non-cumulative} using the \texttt{NonCumulative} prefix. Consider the examples below.
\begin{coq_example*}
@@ -180,7 +180,7 @@ Notice that as expected, \texttt{packType@\{i\}} and \texttt{packType@\{j\}} are
Cumulative inductive types, coninductive types, variants and records
only make sense when they are universe polymorphic. Therefore, an
-error is issued whenever the user inputs such monomorphic and
+error is issued whenever the user inputs such a monomorphic and
cumulative type. Notice that this also implies that when the option
\texttt{Set Inductive Cumulativity} is set any subsequent inductive
declaration should be polymorphic, e.g., by setting \texttt{Set
@@ -198,6 +198,29 @@ Fail Inductive Unit := unit.
NonCumulative Inductive Unit := unit.
\end{coq_example}
+\subsection*{An example of a proof using cumulativity}
+
+\begin{coq_example}
+Set Universe Polymorphism.
+Set Inductive Cumulativity.
+
+Inductive eq@{i} {A : Type@{i}} (x : A) : A -> Type@{i} := eq_refl : eq x x.
+
+Definition funext_type@{a b e} (A : Type@{a}) (B : A -> Type@{b})
+ := forall f g : (forall a, B a),
+ (forall x, eq@{e} (f x) (g x))
+ -> eq@{e} f g.
+
+Section down.
+ Universes a b e e'.
+ Constraint e' < e.
+ Lemma funext_down {A B}
+ (H : @funext_type@{a b e} A B) : @funext_type@{a b e'} A B.
+ Proof.
+ exact H.
+ Defined.
+\end{coq_example}
+
\asection{Global and local universes}
Each universe is declared in a global or local environment before it can