Timings for pSect.v
Require Import Basics Types Pointed.Core Pointed.pEquiv.
(** * Pointed sections of pointed maps *)
Local Open Scope pointed_scope.
(* The type of pointed sections of a pointed map. *)
Definition pSect {A B : pType} (f : A ->* B)
:= { s : B ->* A & f o* s ==* pmap_idmap }.
Definition issig_psect { A B : pType } (f : A ->* B)
: { s : B -> A & { p : s pt = pt
& { H : f o s == idmap
& H pt = ap f p @ (point_eq f) } } }
<~> pSect f.
transitivity
{s : B -> A & {p : s pt = pt
& {H : f o s == idmap
& H pt = ap f p @ (point_eq f) @ 1 }}}.
do 3 (napply equiv_functor_sigma_id; intro).
(** Any pointed equivalence over [A] induces an equivalence between pointed sections. *)
Definition equiv_pequiv_pslice_psect `{Funext} {A B C : pType}
(f : B ->* A) (g : C ->* A) (t : B <~>* C) (h : f ==* g o* t)
: pSect f <~> pSect g.
srapply equiv_functor_sigma'.
1: exact (pequiv_pequiv_postcompose t).
apply equiv_phomotopy_concat_l.
refine ((pmap_compose_assoc _ _ _)^* @* _).
(** Pointed sections of [psnd : A * B ->* B] correspond to pointed maps [B ->* A]. *)
Definition equiv_psect_psnd `{Funext} {A B : pType}
: pSect (@psnd A B) <~> (B ->* A).
transitivity {s : (B ->* A) * (B ->* B) & snd s ==* pmap_idmap}.
snrefine (equiv_functor_sigma'
(equiv_pprod_coind (pfam_const A) (pfam_const B))^-1%equiv _).
apply equiv_phomotopy_concat_l.
exact (concat_1p _ @ concat_p1 _).
snrefine (_ oE equiv_functor_sigma_id (fun s => equiv_path_pforall _ _)).
snrefine (_ oE (equiv_functor_sigma_pb (equiv_sigma_prod0 _ _))^-1%equiv); cbn.
refine (_ oE (equiv_sigma_assoc _ _)^-1%equiv).
rapply equiv_sigma_contr.