You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contrib/SetoidRewrite.v
+49-59Lines changed: 49 additions & 59 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,8 @@
1
-
(*Typeclass instances to allow rewriting in categories. Examples are given later in the file.*)
1
+
(** * Typeclass instances to allow rewriting in categories *)
2
2
3
-
(* Init.Tactics contains the definition of the Coq stdlib typeclass_inferences database. It must be imported before Basics.Overture. *)
3
+
(** The file using the setoid rewriting machinery from the Coq standard library to allow rewriting in wild-categories. Examples are given later in the file. *)
4
4
5
-
(** Warning: This imports Coq.Setoids.Setoid from the standard library. Currently the setoid rewriting machinery requires this to work, it depends on this file explicitly. This imports the whole standard library into the namespace.
6
-
7
-
All files that import WildCat/SetoidRewrite.v will also recursively import the entire Coq.Init standard library. *)
8
-
9
-
(** Because of this, this file needs to be the *first* file Require'd in any file that uses it. Otherwise, the typeclasses hintdb is cleared, breaking typeclass inference. Moreover, if Foo Requires this file, then Foo must also be the first file Require'd in any file that Requires Foo, and so on. In the long term it would be good if this could be avoided.*)
5
+
(** Init.Tactics contains the definition of the Coq stdlib typeclass_inferences database. It must be imported before Basics.Overture. Otherwise, the typeclasses hintdb is cleared, breaking typeclass inference. Because of this, this file also needs to be the first file Require'd in any file that uses it. Moreover, if Foo Requires this file, then Foo must also be the first file Require'd in any file that Requires Foo, and so on. In the long term it would be good if this could be avoided. *)
(** The first time [rewrite] is used in each direction, it creates transport lemmas called [internal_paths_rew] and [internal_paths_rew_r]. See ../Tactics.v for how these compare to [transport]. We use [rewrite] here to trigger the creation of these lemmas. This ensures that they are defined outside of sections, so they are not unnecessarily polymorphic. The lemmas below are not used in the library. *)
399
-
(** TODO: Since Coq 8.20 has PR#18299, once that is our minimum version we can instead register wrappers for [transport] to be used for rewriting. See the comment by Dan Christensen in that PR for how to do this. Then the tactics [internal_paths_rew_to_transport] and [rewrite_to_transport] can be removed from ../Tactics.v. *)
400
+
(** TODO: Since Coq 8.20 has PR#18299, once that is our minimum version we can instead register wrappers for [transport] to be used for rewriting. See the comment by Dan Christensen in that PR for how to do this. Then the tactics [internal_paths_rew_to_transport] and [rewrite_to_transport] can be removed from ../Tactics.v. Rocq 9.2 will contain PR#21098 which adds further registration options. It should be possible to do things in a way that works across these versions. See #2332 for a discussion of this. *)
400
401
LocalLemma define_internal_paths_rew A x y P (u : P x) (H : x = y :> A) : P y.
0 commit comments