aboutsummaryrefslogtreecommitdiff
path: root/doc/sphinx/addendum
diff options
context:
space:
mode:
authorEnrico Tassi2019-05-13 14:44:27 +0200
committerEnrico Tassi2019-05-13 14:44:27 +0200
commit34fbc9cc6b30fc8e7dc2bd37756d5ede29074de0 (patch)
treec59e91fc8ad41df8e5bd4280c44cc6da3cd20ffa /doc/sphinx/addendum
parentcfecef471c706beb50d70b951b148c9629a4064a (diff)
parent4895bf8bb5d0acfaee499991973fc6537657427d (diff)
Merge PR #10076: [Canonical structures] Annotation to field declarations to prevent them from being “canonical”
Ack-by: SkySkimmer Ack-by: Zimmi48 Reviewed-by: gares Ack-by: maximedenes Ack-by: robbertkrebbers Ack-by: vbgl
Diffstat (limited to 'doc/sphinx/addendum')
-rw-r--r--doc/sphinx/addendum/canonical-structures.rst13
1 files changed, 6 insertions, 7 deletions
diff --git a/doc/sphinx/addendum/canonical-structures.rst b/doc/sphinx/addendum/canonical-structures.rst
index dd21ea09bd..b593b0cef1 100644
--- a/doc/sphinx/addendum/canonical-structures.rst
+++ b/doc/sphinx/addendum/canonical-structures.rst
@@ -209,7 +209,7 @@ We need to define a new class that inherits from both ``EQ`` and ``LE``.
LE_class : LE.class T;
extra : mixin (EQ.Pack T EQ_class) (LE.cmp T LE_class) }.
- Structure type := _Pack { obj : Type; class_of : class obj }.
+ Structure type := _Pack { obj : Type; #[canonical(false)] class_of : class obj }.
Arguments Mixin {e le} _.
@@ -219,6 +219,9 @@ The mixin component of the ``LEQ`` class contains all the extra content we
are adding to ``EQ`` and ``LE``. In particular it contains the requirement
that the two relations we are combining are compatible.
+The `class_of` projection of the `type` structure is annotated as *not canonical*;
+it plays no role in the search for instances.
+
Unfortunately there is still an obstacle to developing the algebraic
theory of this new class.
@@ -313,9 +316,7 @@ constructor ``*``. It also tests that they work as expected.
Unfortunately, these declarations are very verbose. In the following
subsection we show how to make them more compact.
-.. FIXME shouldn't warn
-
-.. coqtop:: all warn
+.. coqtop:: all
Module Add_instance_attempt.
@@ -420,9 +421,7 @@ the reader can refer to :cite:`CSwcu`.
The declaration of canonical instances can now be way more compact:
-.. FIXME should not warn
-
-.. coqtop:: all warn
+.. coqtop:: all
Canonical Structure nat_LEQty := Eval hnf in Pack nat nat_LEQmx.