-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Truncatedness of pointed maps and pForall #1819
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ Require Import PathAny. | |
Require Import WildCat. | ||
Require Import Truncations.Core. | ||
Require Import ReflectiveSubuniverse. | ||
Require Import Extensions. | ||
|
||
Local Set Polymorphic Inductive Cumulativity. | ||
|
||
|
@@ -71,6 +72,9 @@ Definition Build_pMap (A B : pType) (f : A -> B) (p : f (point A) = point B) | |
: A ->* B | ||
:= Build_pForall A (pfam_const B) f p. | ||
|
||
(** The [&] tells Coq to use the context to infer the later arguments (in this case, all of them). *) | ||
Arguments Build_pMap & _ _ _ _. | ||
Comment on lines
+75
to
+76
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This lets us write |
||
|
||
(** Pointed maps perserve the base point *) | ||
Definition point_eq {A B : pType} (f : A ->* B) | ||
: f (point A) = point B | ||
|
@@ -235,6 +239,16 @@ Definition issig_pequiv' (A B : pType) | |
: {f : A <~> B & f (point A) = point B} <~> (A <~>* B) | ||
:= ltac:(make_equiv). | ||
|
||
(** pForall can also be described as a type of extensions. *) | ||
Definition equiv_extension_along_pforall `{Funext} {A : pType} (P : pFam A) | ||
: ExtensionAlong (unit_name (point A)) P (unit_name (dpoint P)) <~> pForall A P. | ||
Proof. | ||
unfold ExtensionAlong. | ||
refine (issig_pforall A P oE _). | ||
apply equiv_functor_sigma_id; intro s. | ||
symmetry; apply equiv_unit_rec. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I checked, and it's probably not possible to remove funext from |
||
Defined. | ||
|
||
(** This is [equiv_prod_coind] for pointed families. *) | ||
Definition equiv_pprod_coind {A : pType} (P Q : pFam A) | ||
: (pForall A P * pForall A Q) <~> | ||
|
@@ -429,14 +443,10 @@ Definition pointed_fam {A : pType} (B : A -> pType) : pFam A | |
Definition point_pforall {A : pType} (B : A -> pType) : pForall A (pointed_fam B) | ||
:= Build_pForall A (pointed_fam B) (fun x => point (B x)) 1. | ||
|
||
(** The pointed type of pointed maps. For dependent pointed maps we need a family of pointed types, not just a family of types with a point over the basepoint of [A]. *) | ||
(** The pointed type of dependent pointed maps. Note that we need a family of pointed types, not just a family of types with a point over the basepoint of [A]. *) | ||
Definition ppForall (A : pType) (B : A -> pType) : pType | ||
:= [pForall A (pointed_fam B), point_pforall B]. | ||
|
||
Definition ppMap (A B : pType) : pType | ||
:= ppForall A (fun _ => B). | ||
|
||
Infix "->**" := ppMap : pointed_scope. | ||
Notation "'ppforall' x .. y , P" | ||
:= (ppForall _ (fun x => .. (ppForall _ (fun y => P)) ..)) | ||
: pointed_scope. | ||
|
@@ -445,6 +455,12 @@ Notation "'ppforall' x .. y , P" | |
Definition pconst {A B : pType} : A ->* B | ||
:= point_pforall (fun _ => B). | ||
|
||
(** The pointed type of pointed maps. This is a special case of [ppForall]. *) | ||
Definition ppMap (A B : pType) : pType | ||
:= [A ->* B, pconst]. | ||
jdchristensen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Infix "->**" := ppMap : pointed_scope. | ||
|
||
Lemma pmap_punit_pconst {A : pType} (f : A ->* pUnit) : pconst ==* f. | ||
Proof. | ||
srapply Build_pHomotopy. | ||
|
@@ -459,6 +475,14 @@ Proof. | |
exact (concat_1p _)^. | ||
Defined. | ||
|
||
Global Instance contr_pmap_from_contr `{Funext} {A B : pType} `{C : Contr A} | ||
: Contr (A ->* B). | ||
Proof. | ||
rapply (contr_equiv' { b : B & b = pt }). | ||
refine (issig_pmap A B oE _). | ||
exact (equiv_functor_sigma_pb (equiv_arrow_from_contr A B)^-1%equiv). | ||
Defined. | ||
|
||
(** * pType and pForall as wild categories *) | ||
|
||
(** Note that the definitions for [pForall] are also used for the higher structure in [pType]. *) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
Require Import Basics Types WildCat Truncations.Core Truncations.SeparatedTrunc | ||
Require Import Basics Types WildCat Truncations | ||
Pointed.Core Pointed.pEquiv Pointed.Loops Pointed.pModality. | ||
|
||
Local Open Scope pointed_scope. | ||
|
||
(** * Truncations of pointed types *) | ||
|
||
(** TODO: Many things here can be generalized to any modality or any reflective subuniverse, and could be moved to pModality.v *) | ||
|
||
jdchristensen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Definition pTr (n : trunc_index) (A : pType) : pType | ||
:= [Tr n A, _]. | ||
|
||
|
@@ -42,21 +44,9 @@ Definition pTr_ind n {X : pType} {Y : pFam (pTr n X)} `{forall x, IsTrunc n (Y x | |
: pForall (pTr n X) Y | ||
:= Build_pForall (pTr n X) Y (Trunc_ind Y f) (dpoint_eq f). | ||
|
||
Definition equiv_ptr_rec `{Funext} {n} {X Y : pType} `{IsTrunc n Y} | ||
: (pTr n X ->* Y) <~> (X ->* Y). | ||
Proof. | ||
srapply equiv_adjointify. | ||
{ intro f. | ||
exact (f o* ptr). } | ||
1: srapply pTr_rec. | ||
1: nrapply pTr_rec_beta_path. | ||
intro f. | ||
apply path_pforall. | ||
srapply Build_pHomotopy. | ||
1: by rapply Trunc_ind. | ||
cbn. | ||
symmetry; apply concat_pp_V. | ||
Defined. | ||
Definition pequiv_ptr_rec `{Funext} {n} {X Y : pType} `{IsTrunc n Y} | ||
: (pTr n X ->** Y) <~>* (X ->** Y) | ||
:= pequiv_o_pto_O _ X Y. | ||
|
||
(** ** Functoriality of [pTr] *) | ||
|
||
|
@@ -104,7 +94,7 @@ Proof. | |
reflexivity. | ||
Defined. | ||
|
||
Definition ptr_pequiv {X Y : pType} (n : trunc_index) (f : X <~>* Y) | ||
Definition pequiv_ptr_functor {X Y : pType} (n : trunc_index) (f : X <~>* Y) | ||
: pTr n X <~>* pTr n Y | ||
:= emap (pTr n) f. | ||
|
||
|
@@ -135,21 +125,11 @@ Definition ptr_loops_eq `{Univalence} (n : trunc_index) (A : pType) | |
: pTr n (loops A) = loops (pTr n.+1 A) :> pType | ||
:= path_ptype (ptr_loops n A). | ||
|
||
Definition pequiv_ptr_functor {X Y : pType} n | ||
: X <~>* Y -> pTr n X <~>* pTr n Y. | ||
Proof. | ||
Comment on lines
-138
to
-139
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We had this result twice. |
||
intro e. | ||
srapply Build_pEquiv. | ||
1: rapply (fmap (pTr _) e). | ||
exact _. | ||
Defined. | ||
|
||
(* This lemma generalizes a goal that appears in [ptr_loops_commutes], allowing us to prove it by path induction. *) | ||
Definition path_Tr_commutes (n : trunc_index) (A : Type) (a0 a1 : A) | ||
: (@path_Tr n A a0 a1) o tr == ap tr. | ||
Definition path_Tr_commutes (n : trunc_index) (A : Type) (a0 a1 : A) (p : a0 = a1) | ||
: path_Tr (n:=n) (tr p) = ap tr p. | ||
Proof. | ||
intro p; induction p. | ||
reflexivity. | ||
by destruct p. | ||
Defined. | ||
|
||
(* [ptr_loops] commutes with the two [ptr] maps. *) | ||
|
@@ -168,3 +148,29 @@ Proof. | |
reflexivity. | ||
Defined. | ||
|
||
(** ** Truncatedness of [pForall] and [pMap] *) | ||
|
||
(** Buchholtz-van Doorn-Rijke, Theorem 4.2: Let [j >= -1] and [n >= -2]. When [X] is [j]-connected and [Y] is a pointed family of [j+k+1]-truncated types, the type of pointed sections is [n]-truncated. We formalize it with [j] replaced with a trunc index [m], and so there is a shift compared to the informal statement. This version also allows [n] to be one smaller than BvDR allow. *) | ||
Definition istrunc_pforall `{Univalence} {m n : trunc_index} | ||
(X : pType) {iscX : IsConnected m.+1 X} | ||
jdchristensen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
(Y : pFam X) {istY : forall x, IsTrunc (n +2+ m) (Y x)} | ||
: IsTrunc n (pForall X Y). | ||
Proof. | ||
nrapply (istrunc_equiv_istrunc _ (equiv_extension_along_pforall Y)). | ||
rapply (istrunc_extension_along_conn (n:=m) _ Y (HP:=istY)). | ||
Defined. | ||
|
||
(** From this we deduce the non-dependent version, which is Corollary 4.3 of BvDR. We include [n = -2] here as well, but in this case it is not interesting. Since [X ->* Y] is inhabited, the [n = -1] case also gives contractibility, with weaker hypotheses. *) | ||
Definition istrunc_pmap `{Univalence} {m n : trunc_index} (X Y : pType) | ||
`{!IsConnected m.+1 X} `{!IsTrunc (n +2+ m) Y} | ||
: IsTrunc n (X ->* Y) | ||
:= istrunc_pforall X (pfam_const Y). | ||
|
||
(** We can give a different proof of the [n = -1] case (with the conclusion upgraded to contractibility). This proof works for any reflective subuniverse and avoids univalence. Is it possible to generalize this to dependent functions while still avoiding univalence and/or keeping [O] a general RSU or modality? Can [istrunc_pmap] be proven without univalence? What about [istrunc_pforall]? If the [n = -2] or [n = -1] cases can be provied without univalence, the rest can be done inductively without univalence. *) | ||
Definition contr_pmap_isconnected_inO `{Funext} (O : ReflectiveSubuniverse) | ||
(X : pType) `{IsConnected O X} (Y : pType) `{In O Y} | ||
: Contr (X ->* Y). | ||
Proof. | ||
srapply (contr_equiv' ([O X, _] ->* Y)). | ||
rapply pequiv_o_pto_O. | ||
Defined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was simply moved earlier so that the "this" in the comment made sense.