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
(** 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. *)
400
409
(** 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. *)
410
+
(** TODO DONE*)
401
411
LocalLemma define_internal_paths_rew A x y P (u : P x) (H : x = y :> A) : P y.
402
412
Proof. rewrite <- H. exact u. Defined.
403
413
404
414
LocalLemma define_internal_paths_rew_r A x y P (u : P y) (H : x = y :> A) : P x.
405
415
Proof. rewrite -> H. exact u. Defined.
406
416
407
-
(* TODO: ": rename" is needed because the default names changed in Rocq 9.2.0. When the minimum supported version is >= 9.2.0, the ": rename" can be removed. *)
408
-
Arguments internal_paths_rew {A%_type_scope} {a} P%_function_scope f {a0} p : rename.
409
-
Arguments internal_paths_rew_r {A%_type_scope} {a y} P%_function_scope HC X.
410
-
411
417
(** Having defined transport, we can use it to talk about what a homotopy theorist might see as "paths in a fibration over paths in the base"; and what a type theorist might see as "heterogeneous equality in a dependent type". We will first see this appearing in the type of [apD]. *)
412
418
413
419
(** Functions act on paths: if [f : A -> B] and [p : x = y] is a path in [A], then [ap f p : f x = f y]. We typically pronounce [ap] as a single syllable, short for "application"; but it may also be considered as an acronym, "action on paths". *)
Copy file name to clipboardExpand all lines: theories/Tactics.v
-17Lines changed: 0 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -405,20 +405,3 @@ Ltac context_to_lambda G :=
405
405
let ret := context G[k] in
406
406
exact ret)) in
407
407
(eval cbv zeta in ret).
408
-
409
-
(** The [rewrite <-] tactic uses [internal_paths_rew], which is definitionally equal to [transport], except for the order of the arguments. The following replaces the former with the latter. *)
410
-
Ltac internal_paths_rew_to_transport :=
411
-
repeat match goal with |- context [ internal_paths_rew ?P ?u ?p ] =>
412
-
change (internal_paths_rew P u p) with (transport P p u) end.
413
-
414
-
(** Unfortunately, the more common [rewrite ->] uses [internal_paths_rew_r], which is not definitionally equal to something involving [transport]. However, we do have a propositional equality. The arguments here match the arguments that [internal_paths_rew_r] takes. *)
415
-
Definition internal_paths_rew_r_to_transport {A : Type} {x y : A} (P : A -> Type) (u : P y) (p : x = y)
416
-
: internal_paths_rew_r P u p = transport P p^ u.
417
-
Proof.
418
-
destruct p; reflexivity.
419
-
Defined.
420
-
421
-
(** This tactic replaces both [internal_paths_rew] and [internal_paths_rew_r] with [transport], using [rewrite] for the latter. *)
0 commit comments