fact
stringlengths
0
6.66k
type
stringclasses
10 values
imports
stringclasses
399 values
filename
stringclasses
465 values
symbolic_name
stringlengths
1
75
index_level
int64
0
7.85k
(P : DProp) : Bool := if dec P then true else false.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import TruncType HProp. Require Import Truncations.Core Modalities.ReflectiveSubuniverse.
Universes\DProp.v
dprop_to_bool
7,200
(b : Bool) : DHProp := if b then True else False.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import TruncType HProp. Require Import Truncations.Core Modalities.ReflectiveSubuniverse.
Universes\DProp.v
bool_to_dhprop
7,201
{ X : Type & { _ : Funext -> IsHProp X & Decidable X } } <~> DProp. Proof. issig. Defined.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import TruncType HProp. Require Import Truncations.Core Modalities.ReflectiveSubuniverse.
Universes\DProp.v
issig_dprop
7,202
`{Funext} (P Q : DProp) : (P = Q :> Type) <~> (P = Q :> DProp). Proof. destruct P as [P hP dP]. destruct Q as [Q hQ dQ]. refine (((equiv_ap' issig_dprop^-1 _ _)^-1) oE _); cbn. refine ((equiv_ap' (equiv_sigma_assoc' _ _)^-1 ((P;hP);dP) ((Q;hQ);dQ)) oE _). refine (equiv_path_sigma_hprop _ _ oE _); cbn. { intros [X hX]; exact _. } refine (equiv_path_sigma_hprop (P;hP) (Q;hQ)). Defined.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import TruncType HProp. Require Import Truncations.Core Modalities.ReflectiveSubuniverse.
Universes\DProp.v
equiv_path_dprop
7,203
`{Funext} {P Q : DProp} : (P = Q :> Type) -> (P = Q :> DProp) := equiv_path_dprop P Q.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import TruncType HProp. Require Import Truncations.Core Modalities.ReflectiveSubuniverse.
Universes\DProp.v
path_dprop
7,204
{ X : HProp & Decidable X } <~> DHProp. Proof. issig. Defined.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import TruncType HProp. Require Import Truncations.Core Modalities.ReflectiveSubuniverse.
Universes\DProp.v
issig_dhprop
7,205
equiv_path_dhprop' `{Funext} (P Q : DHProp) : (P = Q :> HProp) <~> (P = Q :> DHProp). Proof. destruct P as [P dP]. destruct Q as [Q dQ]. refine (((equiv_ap' issig_dhprop^-1 _ _)^-1) oE _); cbn. refine ((equiv_path_sigma_hprop (P; dP) (Q; dQ))). Defined.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import TruncType HProp. Require Import Truncations.Core Modalities.ReflectiveSubuniverse.
Universes\DProp.v
equiv_path_dhprop'
7,206
`{Univalence} (P Q : DHProp) : (P = Q :> Type) <~> (P = Q :> DHProp). Proof. assert (eq_type_hprop : (P = Q :> Type) <~> (P = Q :> HProp)) by apply equiv_path_trunctype'. assert (eq_hprop_dhprop : (P = Q :> HProp) <~> (P = Q :> DHProp)) by apply '. refine (eq_hprop_dhprop oE eq_type_hprop). Defined.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import TruncType HProp. Require Import Truncations.Core Modalities.ReflectiveSubuniverse.
Universes\DProp.v
equiv_path_dhprop
7,207
`{Univalence} {P Q : DHProp} : (P = Q :> Type) -> (P = Q :> DHProp) := equiv_path_dhprop P Q. Global Instance ishset_dprop `{Univalence} : IsHSet DProp. Proof. apply istrunc_S; intros P Q. refine (istrunc_equiv_istrunc _ (n := -1) (equiv_path_dprop P Q)). Defined.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import TruncType HProp. Require Import Truncations.Core Modalities.ReflectiveSubuniverse.
Universes\DProp.v
path_dhprop
7,208
`{Univalence} : DProp <~> Bool := Build_Equiv _ _ dprop_to_bool _.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import TruncType HProp. Require Import Truncations.Core Modalities.ReflectiveSubuniverse.
Universes\DProp.v
equiv_dprop_to_bool
7,209
(b1 b2 : DProp) : DProp := Build_DProp (b1 * b2) _ _.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import TruncType HProp. Require Import Truncations.Core Modalities.ReflectiveSubuniverse.
Universes\DProp.v
dand
7,210
(b1 b2 : DHProp) : DHProp := Build_DHProp (Build_HProp (b1 * b2)) _.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import TruncType HProp. Require Import Truncations.Core Modalities.ReflectiveSubuniverse.
Universes\DProp.v
dhand
7,211
(b1 b2 : DProp) : DProp := Build_DProp (hor b1 b2) _ _.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import TruncType HProp. Require Import Truncations.Core Modalities.ReflectiveSubuniverse.
Universes\DProp.v
dor
7,212
(b1 b2 : DHProp) : DHProp := Build_DHProp (Build_HProp (hor b1 b2)) _.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import TruncType HProp. Require Import Truncations.Core Modalities.ReflectiveSubuniverse.
Universes\DProp.v
dhor
7,213
(b : DProp) : DProp := Build_DProp (~b) _ _.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import TruncType HProp. Require Import Truncations.Core Modalities.ReflectiveSubuniverse.
Universes\DProp.v
dneg
7,214
(b1 b2 : DProp) : DProp := Build_DProp (b1 -> b2) _ _. Declare Scope dprop_scope. Delimit Scope dprop_scope with dprop. Bind Scope dprop_scope with DProp. Declare Scope dhprop_scope. Delimit Scope dhprop_scope with dhprop. Bind Scope dhprop_scope with DHProp. Infix "&&" := dand : dprop_scope. Infix "&&" := dhand : dhprop_scope. Infix "||" := dor : dprop_scope. Infix "||" := dhor : dhprop_scope. Infix "->" := : dprop_scope. Notation "!! P" := (dneg P) : dprop_scope. Local Open Scope dprop_scope. Class IsTrue (P : DProp) := dprop_istrue : P. Class IsFalse (P : DProp) := dprop_isfalse : ~ P. Global Instance true_istrue : IsTrue True := tt. Global Instance false_isfalse : IsFalse False := idmap. Global Instance dand_true_true {P Q} `{IsTrue P} `{IsTrue Q} : IsTrue (P && Q). Proof. exact (dprop_istrue, dprop_istrue). Defined.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import TruncType HProp. Require Import Truncations.Core Modalities.ReflectiveSubuniverse.
Universes\DProp.v
dimpl
7,215
(A :Type) `{IsHProp A} `{Decidable A} `{Univalence} : A = is_inl (dec A). Proof. refine (path_universe_uncurried _). apply equiv_iff_hprop_uncurried. split. - intros b. destruct (dec A); simpl; auto. - destruct (dec A); simpl; auto. intros []. Defined.
Lemma
Require Import HoTT.Basics HoTT.Types. Require Import TruncType HProp. Require Import Truncations.Core Modalities.ReflectiveSubuniverse.
Universes\DProp.v
path_dec
7,216
`{Funext} (A : Type) : IsHProp A <~> (forall (x y : A), x = y). Proof. rapply (equiv_iff_hprop (@path_ishprop A) (@hprop_allpath A)). apply hprop_allpath; intros f g. funext x y. pose (C := Build_Contr A x (f x)). apply path_contr. Defined.
Theorem
Require Import HoTT.Basics HoTT.Types.
Universes\HProp.v
equiv_hprop_allpath
7,217
`{Funext} {A} : IsHProp A <~> (A -> Contr A). Proof. apply (equiv_adjointify (@contr_inhabited_hprop A) (@hprop_inhabited_contr A)). - intro ic. by_extensionality x. apply @path_contr. apply contr_istrunc. exact (ic x). - intro hp. apply path_ishprop. Defined.
Theorem
Require Import HoTT.Basics HoTT.Types.
Universes\HProp.v
equiv_hprop_inhabited_contr
7,218
{A} `{IsEquiv _ _ (fun (a:A) => (a,a))} : IsHProp A. Proof. apply hprop_allpath; intros x y. set (d := fun (a:A) => (a,a)) in *. transitivity (fst (d (d^-1 (x,y)))). - exact (ap fst (eisretr d (x,y))^). - transitivity (snd (d (d^-1 (x,y)))). + unfold d; reflexivity. + exact (ap snd (eisretr d (x,y))). Defined.
Definition
Require Import HoTT.Basics HoTT.Types.
Universes\HProp.v
ishprop_isequiv_diag
7,219
{X Y} (f : X -> Y) (s : forall x1 x2, (f x1 = f x2) -> (x1 = x2)) (H : forall x1 x2, (@ap X Y f x1 x2) o (s x1 x2) == idmap) : IsEmbedding f. Proof. intros y. apply hprop_allpath. intros [x1 p1] [x2 p2]. apply path_sigma with (s x1 x2 (p1 @ p2^)). abstract (rewrite transport_paths_Fl; cbn; rewrite (H x1 x2 (p1 @ p2^)); rewrite inv_pp, inv_V; apply concat_pV_p). Defined.
Definition
Require Import HoTT.Basics HoTT.Types.
Universes\HProp.v
isembedding_sect_ap
7,220
`{Funext} {A} : Contr A <~> A * IsHProp A. Proof. assert (f : Contr A -> A * IsHProp A). - intro P. split. + exact (@center _ P). + apply @istrunc_succ. exact P. - assert (g : A * IsHProp A -> Contr A). + intros [a P]. apply (@contr_inhabited_hprop _ P a). + refine (@equiv_iff_hprop _ _ _ _ f g). apply hprop_inhabited_contr; intro p. apply @contr_prod. * exact (g p). * apply (@contr_inhabited_hprop _ _ (snd p)). Defined.
Theorem
Require Import HoTT.Basics HoTT.Types.
Universes\HProp.v
equiv_contr_inhabited_hprop
7,221
`{Funext} {A} : Contr A <~> A * forall (x y : A), x = y. Proof. transitivity (A * IsHProp A). - apply equiv_contr_inhabited_hprop. - exact (1 *E equiv_hprop_allpath _). Defined.
Theorem
Require Import HoTT.Basics HoTT.Types.
Universes\HProp.v
equiv_contr_inhabited_allpath
7,222
`{Funext} (A B : Type) `{IsHProp A} `{IsHProp B} : (A <-> B) <~> (A <~> B) := Build_Equiv _ _ (@equiv_iff_hprop_uncurried A _ B _) _.
Definition
Require Import HoTT.Basics HoTT.Types.
Universes\HProp.v
equiv_equiv_iff_hprop
7,223
(hprop : Type) `{IsHProp hprop} : hprop -> hprop <~> Unit. Proof. intro p. apply equiv_iff_hprop. - exact (fun _ => tt). - exact (fun _ => p). Defined.
Lemma
Require Import HoTT.Basics HoTT.Types.
Universes\HProp.v
if_hprop_then_equiv_Unit
7,224
(hprop : Type) `{IsHProp hprop} : ~hprop -> hprop <~> Empty. Proof. intro np. exact (Build_Equiv _ _ np _). Defined.
Lemma
Require Import HoTT.Basics HoTT.Types.
Universes\HProp.v
if_not_hprop_then_equiv_Empty
7,225
(hprop : Type) `{IsHProp hprop} `{Decidable hprop} : (hprop <~> Unit) + (hprop <~> Empty). Proof. destruct (dec hprop) as [x|nx]. - exact (inl (if_hprop_then_equiv_Unit hprop x)). - exact (inr (if_not_hprop_then_equiv_Empty hprop nx)). Defined.
Definition
Require Import HoTT.Basics HoTT.Types.
Universes\HProp.v
equiv_decidable_hprop
7,226
A := forall (x : A) (p : x = x), p = idpath x.
Definition
Require Import Basics. Require Import Types.Sigma Types.Paths Types.Unit Types.Arrow.
Universes\HSet.v
axiomK
7,227
{A} : IsHSet A -> axiomK A. Proof. intros H x p. nrapply path_ishprop. exact (H x x). Defined.
Definition
Require Import Basics. Require Import Types.Sigma Types.Paths Types.Unit Types.Arrow.
Universes\HSet.v
axiomK_hset
7,228
{A} `{axiomK A} : IsHSet A. Proof. apply istrunc_S; intros x y. apply @hprop_allpath. intros p q. by induction p. Defined.
Definition
Require Import Basics. Require Import Types.Sigma Types.Paths Types.Unit Types.Arrow.
Universes\HSet.v
hset_axiomK
7,229
{A} : IsHSet A <~> axiomK A. Proof. apply (equiv_adjointify (@axiomK_hset A) (@hset_axiomK A)). - intros K. by_extensionality x. by_extensionality x'. cut (Contr (x=x)). + intro. eapply path_contr. + apply (Build_Contr _ 1). intros. symmetry; apply K. - intro K. eapply path_ishprop. Defined.
Theorem
Require Import Basics. Require Import Types.Sigma Types.Paths Types.Unit Types.Arrow.
Universes\HSet.v
equiv_hset_axiomK
7,230
{A} `{IsHSet A} {x y : A} (p q : x = y): p = q. Proof. induction q. apply axiomK_hset; assumption. Defined.
Theorem
Require Import Basics. Require Import Types.Sigma Types.Paths Types.Unit Types.Arrow.
Universes\HSet.v
hset_path2
7,231
{A} (x : A) (K : axiomK A) : K x (idpath x) = idpath (idpath x). Proof. pose (T1A := @istrunc_succ _ A (@hset_axiomK A K)). exact (@hset_path2 (x=x) (T1A x x) _ _ _ _). Defined.
Lemma
Require Import Basics. Require Import Types.Sigma Types.Paths Types.Unit Types.Arrow.
Universes\HSet.v
axiomK_idpath
7,232
{X R} `{Reflexive X R} `{forall x y, IsHProp (R x y)} (f : forall x y, R x y -> x = y) : IsHSet X. Proof. apply @hset_axiomK. intros x p. refine (_ @ concat_Vp (f x x (transport (R x) p^ (reflexivity _)))). apply moveL_Vp. refine ((transport_paths_r _ _)^ @ _). refine ((transport_arrow _ _ _)^ @ _). refine ((ap10 (apD (f x) p) (@reflexivity X R _ x)) @ _). apply ap. apply path_ishprop. Defined.
Lemma
Require Import Basics. Require Import Types.Sigma Types.Paths Types.Unit Types.Arrow.
Universes\HSet.v
ishset_hrel_subpaths
7,233
{X Y} (f : X -> Y) := forall (Z : HSet), forall g h : Z -> X, f o g = f o h -> g = h. Global Instance isinj_embedding {A B : Type} (m : A -> B) : IsEmbedding m -> IsInjective m. Proof. intros ise x y p. pose (ise (m y)). assert (q : (x;p) = (y;1) :> hfiber m (m y)) by apply path_ishprop. exact (ap pr1 q). Defined.
Definition
Require Import Basics. Require Import Types.Sigma Types.Paths Types.Unit Types.Arrow.
Universes\HSet.v
ismono
7,234
{X Y : Type} (f : X -> Y) {I : IsEmbedding f} {x : X} : (isinj_embedding f I x x idpath) = idpath. Proof. exact (ap (ap pr1) (contr (idpath : (x;idpath) = (x;idpath)))). Defined.
Lemma
Require Import Basics. Require Import Types.Sigma Types.Paths Types.Unit Types.Arrow.
Universes\HSet.v
isinj_embedding_beta
7,235
{A B : Type} {s : A -> B} {r : B -> A} (H : r o s == idmap) : IsInjective s. Proof. intros a a' alpha. exact ((H a)^ @ ap r alpha @ H a'). Defined.
Definition
Require Import Basics. Require Import Types.Sigma Types.Paths Types.Unit Types.Arrow.
Universes\HSet.v
isinj_section
7,236
{A B : Type} `{IsHSet B} (m : A -> B) : IsInjective m -> IsEmbedding m. Proof. intros isi b. apply hprop_allpath; intros [x p] [y q]. apply path_sigma_hprop; simpl. exact (isi x y (p @ q^)). Defined.
Lemma
Require Import Basics. Require Import Types.Sigma Types.Paths Types.Unit Types.Arrow.
Universes\HSet.v
isembedding_isinj_hset
7,237
`{Funext} {X Y} (f : X -> Y) : IsInjective f -> ismono f. Proof. intros ? ? ? ? H'. apply path_forall. apply ap10 in H'. hnf in *. eauto. Qed.
Lemma
Require Import Basics. Require Import Types.Sigma Types.Paths Types.Unit Types.Arrow.
Universes\HSet.v
ismono_isinj
7,238
{X Y} (f : X -> Y) (H : ismono f) : IsInjective f := fun x0 x1 H' => ap10 (H (Build_HSet Unit) (fun _ => x0) (fun _ => x1) (ap (fun x => unit_name x) H')) tt.
Definition
Require Import Basics. Require Import Types.Sigma Types.Paths Types.Unit Types.Arrow.
Universes\HSet.v
isinj_ismono
7,239
`{Funext} X Y (f : X -> Y) `{IsEquiv _ _ f} : ismono f. Proof. intros ? g h H'. apply ap10 in H'. apply path_forall. intro x. transitivity (f^-1 (f (g x))). - by rewrite eissect. - transitivity (f^-1 (f (h x))). * apply ap. apply H'. * by rewrite eissect. Qed.
Lemma
Require Import Basics. Require Import Types.Sigma Types.Paths Types.Unit Types.Arrow.
Universes\HSet.v
ismono_isequiv
7,240
{A B C : Type} `{IsHSet B} {f : A -> B} {g : B -> C} `{IsEmbedding (g o f)} : IsEmbedding f. Proof. rapply isembedding_isinj_hset. rapply (isinj_cancelL _ g). Defined.
Lemma
Require Import Basics. Require Import Types.Sigma Types.Paths Types.Unit Types.Arrow.
Universes\HSet.v
cancelL_isembedding
7,241
(Y : Type@{u}) := { X : Type@{u} & X -> Y }.
Definition
Require Import HoTT.Basics HoTT.Types HFiber Limits.Pullback Pointed Truncations.
Universes\ObjectClassifier.v
Slice
7,242
(Y : pType@{u}) := { X : pType@{u} & X ->* Y }.
Definition
Require Import HoTT.Basics HoTT.Types HFiber Limits.Pullback Pointed Truncations.
Universes\ObjectClassifier.v
pSlice
7,243
sigma_fibration@{u v} {Y : Type@{u}} (P : Y -> Type@{u}) : Slice@{u v} Y := (sig@{u u} P; pr1).
Definition
Require Import HoTT.Basics HoTT.Types HFiber Limits.Pullback Pointed Truncations.
Universes\ObjectClassifier.v
sigma_fibration@
7,244
{Y : Type@{u}} (p : Slice Y) : Y -> Type@{u} := hfiber p.
Definition
Require Import HoTT.Basics HoTT.Types HFiber Limits.Pullback Pointed Truncations.
Universes\ObjectClassifier.v
sigma_fibration_inverse
7,245
`{Univalence} {Y : Type} : IsEquiv (@sigma_fibration Y). Proof. srapply isequiv_adjointify. - exact sigma_fibration_inverse. - intros [X p]. srapply path_sigma; cbn. + exact (path_universe (equiv_fibration_replacement _)^-1%equiv). + apply transport_arrow_toconst_path_universe. - intro P. funext y; cbn. exact ((path_universe (@hfiber_fibration _ y P))^). Defined.
Theorem
Require Import HoTT.Basics HoTT.Types HFiber Limits.Pullback Pointed Truncations.
Universes\ObjectClassifier.v
isequiv_sigma_fibration
7,246
`{Univalence} {Y : Type@{u}} : (Y -> Type@{u}) <~> { X : Type@{u} & X -> Y } := Build_Equiv _ _ _ isequiv_sigma_fibration.
Definition
Require Import HoTT.Basics HoTT.Types HFiber Limits.Pullback Pointed Truncations.
Universes\ObjectClassifier.v
equiv_sigma_fibration
7,247
{A : Type} (P : A -> Type) : P o pr1 == pointed_type o (topmap P) := fun e : sig P => idpath (P e.
Definition
Require Import HoTT.Basics HoTT.Types HFiber Limits.Pullback Pointed Truncations.
Universes\ObjectClassifier.v
objectclassifier_square
7,248
{A : Type} (P : A -> Type) : IsPullback (objectclassifier_square P). Proof. srapply isequiv_adjointify. - intros [a [F p]]. exact (a; transport idmap p^ (point F)). - intros [a [[T t] p]]; cbn in p. refine (path_sigma' _ (idpath a) _). by induction p. - reflexivity. Defined.
Theorem
Require Import HoTT.Basics HoTT.Types HFiber Limits.Pullback Pointed Truncations.
Universes\ObjectClassifier.v
ispullback_objectclassifier_square
7,249
equiv_sigma_fibration_p@{u v +} `{Univalence} {Y : pType@{u}} {F : Type@{u}} : (Y ->* [Type@{u}, F]) <~> { p : Slice@{u v} Y & hfiber p.2 (point Y) <~> F }. Proof. refine (_ oE (issig_pmap _ _)^-1). srapply (equiv_functor_sigma' equiv_sigma_fibration); intro P; cbn. refine (_ oE (equiv_path_universe@{u u v} _ _)^-1%equiv). refine (equiv_functor_equiv _ equiv_idmap). apply hfiber_fibration. Defined.
Proposition
Require Import HoTT.Basics HoTT.Types HFiber Limits.Pullback Pointed Truncations.
Universes\ObjectClassifier.v
equiv_sigma_fibration_p@
7,250
equiv_pfiber_fibration_pfibration@{u v} {Y F : pType@{u}} : { p : Slice@{u v} Y & hfiber p.2 (point Y) <~> F} <~> { p : pSlice@{u v} Y & pfiber p.2 <~>* F }. Proof. equiv_via (sig@{v u} (fun X : Type@{u} => { x : X & { p : X -> Y & { eq : p x = point Y & { e : hfiber p (point Y) <~> F & e^-1 (point F) = (x; eq) } } } })). - refine (_ oE _). + do 5 (rapply equiv_functor_sigma_id; intro). apply equiv_path_sigma. + cbn; make_equiv_contr_basedpaths. - refine (_ oE _). 2: { do 5 (rapply equiv_functor_sigma_id; intro). exact (equiv_path_inverse _ _ oE equiv_moveL_equiv_M _ _). } make_equiv. Defined.
Lemma
Require Import HoTT.Basics HoTT.Types HFiber Limits.Pullback Pointed Truncations.
Universes\ObjectClassifier.v
equiv_pfiber_fibration_pfibration@
7,251
equiv_sigma_pfibration@{u v +} `{Univalence} {Y F : pType@{u}} : (Y ->* [Type@{u}, F]) <~> { p : pSlice@{u v} Y & pfiber p.
Definition
Require Import HoTT.Basics HoTT.Types HFiber Limits.Pullback Pointed Truncations.
Universes\ObjectClassifier.v
equiv_sigma_pfibration@
7,252
equiv_sigma_fibration_O@{u v} `{Univalence} {O : Subuniverse} {Y : Type@{u}} : (Y -> Type_@{u v} O) <~> { p : { X : Type@{u} & X -> Y } & MapIn O p.2 }. Proof. refine (_ oE (equiv_sig_coind@{u v u v v v u} _ _)^-1). apply (equiv_functor_sigma'@{v u v v v v} equiv_sigma_fibration@{u v}); intro P; cbn. rapply equiv_forall_inO_mapinO_pr1. Defined.
Theorem
Require Import HoTT.Basics HoTT.Types HFiber Limits.Pullback Pointed Truncations.
Universes\ObjectClassifier.v
equiv_sigma_fibration_O@
7,253
equiv_sigma_fibration_Op@{u v +} `{Univalence} {O : Subuniverse} {Y : pType@{u}} {F : Type@{u}} `{inO : In O F} : (Y ->* [Type_ O, (F; inO)]) <~> { p : { q : Slice@{u v} Y & MapIn O q.2 } & hfiber p.1.2 (point Y) <~> F }. Proof. refine (_ oE (issig_pmap _ _)^-1); cbn. srapply (equiv_functor_sigma' equiv_sigma_fibration_O); intro P; cbn. refine (_ oE (equiv_path_sigma_hprop _ _)^-1%equiv); cbn. refine (_ oE (equiv_path_universe _ _)^-1%equiv). refine (equiv_functor_equiv _ equiv_idmap). exact (hfiber_fibration (point Y) _). Defined.
Proposition
Require Import HoTT.Basics HoTT.Types HFiber Limits.Pullback Pointed Truncations.
Universes\ObjectClassifier.v
equiv_sigma_fibration_Op@
7,254
equiv_sigma_fibration_Op_connected@{u v +} `{Univalence} {O : Subuniverse} {Y : pType@{u}} `{IsConnected 0 Y} {F : Type@{u}} `{inO : In O F} : (Y ->* [Type_ O, (F; inO)]) <~> { p : Slice@{u v} Y & hfiber p.2 (point Y) <~> F }. Proof. refine (_ oE equiv_sigma_fibration_Op). refine (_ oE (equiv_sigma_assoc' _ (fun p _ => hfiber p.2 (point Y) <~> F))^-1%equiv). srapply equiv_functor_sigma_id; intro; cbn. refine (_ oE equiv_sigma_symm0 _ _). apply equiv_sigma_contr; intro e. rapply contr_inhabited_hprop. rapply conn_point_elim. apply (inO_equiv_inO F e^-1). Defined.
Proposition
Require Import HoTT.Basics HoTT.Types HFiber Limits.Pullback Pointed Truncations.
Universes\ObjectClassifier.v
equiv_sigma_fibration_Op_connected@
7,255
`{Univalence} (O : Subuniverse) {Y F : pType} `{inO : In O F} : (Y ->* [Type_ O, (pointed_type F; inO)]) <~> { p : { q : pSlice Y & MapIn O q.2 } & pfiber p.1.2 <~>* F }. Proof. refine (_ oE equiv_sigma_fibration_Op). refine (_ oE equiv_sigma_symm' _ (fun q => hfiber q.2 (point Y) <~> F)). refine (equiv_sigma_symm' (fun q => pfiber q.2 <~>* F) _ oE _). by rapply (equiv_functor_sigma' equiv_pfiber_fibration_pfibration). Defined.
Proposition
Require Import HoTT.Basics HoTT.Types HFiber Limits.Pullback Pointed Truncations.
Universes\ObjectClassifier.v
equiv_sigma_pfibration_O
7,256
equiv_sigma_pfibration_O_connected@{u v +} `{Univalence} (O : Subuniverse) {Y F : pType@{u}} `{IsConnected 0 Y} `{inO : In O F} : (Y ->* [Type_ O, (pointed_type F; inO)]) <~> { p : pSlice@{u v} Y & pfiber p.
Definition
Require Import HoTT.Basics HoTT.Types HFiber Limits.Pullback Pointed Truncations.
Universes\ObjectClassifier.v
equiv_sigma_pfibration_O_connected@
7,257
`{Univalence} {O : Subuniverse} {Y : pType@{u}} `{IsConnected 0 Y} {F : Type@{u}} `{inO : In O F} : (Y ->* [Type_ O, (F; inO)]) <~> (Y ->* [Type@{u}, F]) := equiv_sigma_fibration_p^-1 oE equiv_sigma_fibration_Op_connected.
Definition
Require Import HoTT.Basics HoTT.Types HFiber Limits.Pullback Pointed Truncations.
Universes\ObjectClassifier.v
equiv_pmap_typeO_type_connected
7,258
`{Univalence} {A : Type} `{Contr (BAut A)} : IsRigid A. Proof. unfold IsRigid. equiv_intro ((path_baut (point (BAut A)) (point (BAut A)))^-1) f. equiv_intro ((path_baut (point (BAut A)) (point (BAut A)))^-1) g. apply ap10, ap, ap, path_contr. Defined.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HFiber. Require Import Truncations. Require Import Universes.BAut.
Universes\Rigid.v
rigid_contr_Baut
7,259
`{Funext} {X Y : Type} (M : (X -> X) -> (Y -> Y)) (Mid : M idmap == idmap) (MC : forall f g, M (g o f) == M g o M f) : (X <~> X) -> (Y <~> Y). Proof. assert (MS : forall f g, g o f == idmap -> (M g) o (M f) == idmap). { intros g f s x. transitivity (M (f o g) x). + symmetry. refine (MC g f x). + transitivity (M idmap x). * apply ap10, ap, path_arrow. intros y; apply s. * apply Mid. } assert (ME : (forall f, IsEquiv f -> IsEquiv (M f))). { intros f ?. refine (isequiv_adjointify (M f) (M f^-1) _ _); apply MS; [ apply eisretr | apply eissect ]. } exact (fun f => (Build_Equiv _ _ (M f) (ME f _))). Defined.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HFiber. Require Import Truncations. Require Import Universes.BAut.
Universes\Rigid.v
aut_homomorphism_end
7,260
`{Univalence} (X A : Type) (n : trunc_index) `{IsTrunc n.+1 X} `{IsRigid A} `{IsConnected n.+1 A} : BAut X <~> BAut (X * A). Proof. refine (Build_Equiv _ _ (baut_prod_r X A) _). apply isequiv_surj_emb. { apply BuildIsSurjection; intros Z. baut_reduce. refine (tr (point _ ; _)). apply path_sigma_hprop; reflexivity. } { apply isembedding_isequiv_ap. intros Z W. pose (L := fun e : Z <~> W => equiv_functor_prod_r (B := A) e). refine (isequiv_commsq L (ap (baut_prod_r X A)) (path_baut Z W) (path_baut (baut_prod_r X A Z) (baut_prod_r X A W)) (fun e => (ap_baut_prod_r X A e)^)). refine ((isconnected_elim (Tr (-1)) (A := A) _ _).1). { apply contr_inhabited_hprop; [ exact _ | refine (merely_isconnected n A) ]. } intros a0. baut_reduce. pose (M := fun f:X*A -> X*A => fun x => fst (f (x,a0))). assert (MH : forall (a:A) (f:X*A -> X*A) (x:X), fst (f (x,a)) = fst (f (x,a0))). { refine (conn_map_elim (Tr n) (unit_name a0) _ _). intros; reflexivity. } assert (MC : forall (f g :X*A -> X*A), M (g o f) == M g o M f). { intros f g x; unfold M. transitivity (fst (g (fst (f (x,a0)), snd (f (x,a0))))). - reflexivity. - apply MH. } pose (M' := aut_homomorphism_end M (fun x => 1) MC). assert (Mker : forall f, M' f == 1%equiv -> f == 1%equiv). { unfold M', M; cbn. intros f p. pose (fh := fun x a => (MH a f x) @ p x). pose (g := fun x a => snd (f (x,a))). assert (ge : forall x, IsEquiv (g x)). { apply isequiv_from_functor_sigma. refine (isequiv_commsq' _ f (equiv_sigma_prod0 X A) (equiv_sigma_prod0 X A) _). intros [x a]; cbn. apply path_prod; [ apply fh | reflexivity ]. } intros [x a]. pose (gisid := path_aut_rigid (Build_Equiv _ _ (g x) (ge x)) 1). apply path_prod. - apply fh. - apply gisid. } assert (Minj : forall f g, M' f == M' g -> f == g). { intros f g p z. apply moveL_equiv_M. revert z. refine (Mker (g^-1 oE f) _). intros x. refine (MC f g^-1 x @ _). change ((M' g)^-1 (M f x) = x). apply moveR_equiv_V, p. } refine (isequiv_adjointify L M' _ _); intros e; apply path_equiv, path_arrow; try apply Minj; intros x; reflexivity. } Defined.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HFiber. Require Import Truncations. Require Import Universes.BAut.
Universes\Rigid.v
baut_prod_rigid_equiv
7,261
issmall_equiv_issmall@{i1 j1 i2 j2 | i1 <= i2} {A : Type@{j1}} {B : Type@{j2}} (e : A <~> B) (sA : IsSmall@{i1 j1} A) : IsSmall@{i2 j2} B. Proof. exists (smalltype A). exact (e oE (equiv_smalltype A)). Defined.
Definition
Require Import Basics.Overture Basics.Equivalences Basics.Trunc Basics.Tactics
Universes\Smallness.v
issmall_equiv_issmall@
7,262
sigma_closed_issmall@{i j | } {A : Type@{j}} (B : A -> Type@{j}) (sA : IsSmall@{i j} A) (sB : forall a, IsSmall@{i j} (B a)) : IsSmall@{i j} { a : A & B a }. Proof. exists { a : (smalltype A) & (smalltype (B (equiv_smalltype A a))) }. snrapply equiv_functor_sigma'; intros; apply equiv_smalltype. Defined.
Definition
Require Import Basics.Overture Basics.Equivalences Basics.Trunc Basics.Tactics
Universes\Smallness.v
sigma_closed_issmall@
7,263
issmall_issmall_codomain_fibers@{i j | } {X Y : Type@{j}} (f : X -> Y) (sY : IsSmall@{i j} Y) (sF : forall y : Y, IsSmall@{i j} (hfiber f y)) : IsSmall@{i j} X. Proof. nrapply issmall_equiv_issmall. - exact (equiv_fibration_replacement f)^-1%equiv. - apply sigma_closed_issmall; assumption. Defined.
Definition
Require Import Basics.Overture Basics.Equivalences Basics.Trunc Basics.Tactics
Universes\Smallness.v
issmall_issmall_codomain_fibers@
7,264
issmall_contr@{i j| } (X : Type@{j}) (T : Contr X) : IsSmall@{i j} X := issmall_equiv_issmall (equiv_contr_unit)^-1 _.
Definition
Require Import Basics.Overture Basics.Equivalences Basics.Trunc Basics.Tactics
Universes\Smallness.v
issmall_contr@
7,265
issmall_inhabited_issmall@{i j k | i < k, j <= k} `{PropResizing} `{Univalence} (X : Type@{j}) (isX : X -> IsSmall@{i j} X) : IsSmall@{i j} X. Proof. rapply (issmall_issmall_codomain_fibers@{i k} isX). intro sX. rapply sigma_closed_issmall. Defined.
Definition
Require Import Basics.Overture Basics.Equivalences Basics.Trunc Basics.Tactics
Universes\Smallness.v
issmall_inhabited_issmall@
7,266
IsLocallySmall@{i j k | i < k, j <= k} (n : nat) (X : Type@{j}) : Type@{k} := match n with | 0%nat => IsSmall@{i j} X | S m => forall x y : X, IsLocallySmall m (x = y) end. Existing Class IsLocallySmall. Hint Unfold IsLocallySmall : typeclass_instances. Global Instance ishprop_islocallysmall@{i j k | i < k, j <= k} `{Univalence} (n : nat) (X : Type@{j}) : IsHProp@{k} (IsLocallySmall@{i j k} n X). Proof. revert X; simple_induction n n IHn; exact _. Defined.
Fixpoint
Require Import Basics.Overture Basics.Equivalences Basics.Trunc Basics.Tactics
Universes\Smallness.v
IsLocallySmall@
7,267
@{i j1 j2 k | i < k, j1 <= k, j2 <= k} (n : nat) {A : Type@{j1}} {B : Type@{j2}} (e : A <~> B) (lsA : IsLocallySmall@{i j1 k} n A) : IsLocallySmall@{i j2 k} n B. Proof. revert A B e lsA. simple_induction n n IHn. - exact @issmall_equiv_issmall. - intros A B e lsA b b'. nrapply IHn. * exact (equiv_ap' (e^-1%equiv) b b')^-1%equiv. * apply lsA. Defined.
Definition
Require Import Basics.Overture Basics.Equivalences Basics.Trunc Basics.Tactics
Universes\Smallness.v
islocallysmall_equiv_islocallysmall
7,268
islocallysmall_islocallysmall_codomain_fibers@{i j k | i < k, j <= k} (n : nat) {X Y : Type@{j}} (f : X -> Y) (sY : IsLocallySmall@{i j k} n Y) (sF : forall y : Y, IsLocallySmall@{i j k} n (hfiber f y)) : IsLocallySmall@{i j k} n X. Proof. nrapply islocallysmall_equiv_islocallysmall. - exact (equiv_fibration_replacement f)^-1%equiv. - apply sigma_closed_islocallysmall; assumption. Defined.
Definition
Require Import Basics.Overture Basics.Equivalences Basics.Trunc Basics.Tactics
Universes\Smallness.v
islocallysmall_islocallysmall_codomain_fibers@
7,269
{n : trunc_index} : { X : Type & IsTrunc n X } <~> TruncType n. Proof. issig. Defined.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
issig_trunctype
7,270
equiv_path_trunctype' {n : trunc_index} (A B : TruncType n) : (A = B :> Type) <~> (A = B :> TruncType n). Proof. refine ((equiv_ap' issig_trunctype^-1 _ _)^-1 oE _). exact (equiv_path_sigma_hprop (_;_) (_;_)). Defined.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
equiv_path_trunctype'
7,271
{n : trunc_index} (A B : TruncType n) : (A <~> B) <~> (A = B :> TruncType n) := ' _ _ oE equiv_path_universe _ _.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
equiv_path_trunctype
7,272
path_trunctype@{a b} {n : trunc_index} {A B : TruncType n} : A <~> B -> (A = B :> TruncType n) := equiv_path_trunctype@{a b} A B.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
path_trunctype@
7,273
{n : trunc_index} {A : TruncType n} : path_trunctype (equiv_idmap A) = idpath. Proof. unfold path_trunctype; simpl. rewrite (eta_path_universe_uncurried 1). rewrite path_sigma_hprop_1. reflexivity. Qed.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
path_trunctype_1
7,274
{n : trunc_index} {A B : TruncType n} (f : A <~> B) : path_trunctype f^-1 = (path_trunctype f)^. Proof. unfold path_trunctype; simpl. rewrite path_universe_V_uncurried. rewrite (path_sigma_hprop_V (path_universe_uncurried f)). refine (concat_p1 _ @ concat_1p _ @ _). refine (_ @ (ap inverse (concat_1p _))^ @ (ap inverse (concat_p1 _))^). refine (ap_V _ _). Qed.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
path_trunctype_V
7,275
{n : trunc_index} {A B C : TruncType n} (f : A <~> B) (g : B <~> C) : path_trunctype (g oE f) = path_trunctype f @ path_trunctype g. Proof. unfold path_trunctype; simpl. rewrite path_universe_compose_uncurried. rewrite (path_sigma_hprop_pp (path_universe_uncurried f) _ _ (trunctype_istrunc B)). refine (concat_p1 _ @ concat_1p _ @ _). refine (_ @ (ap _ (concat_1p _))^ @ (ap _ (concat_p1 _))^). refine (_ @ (ap (fun z => z @ _) (concat_1p _))^ @ (ap (fun z => z @ _) (concat_p1 _))^). refine (ap_pp _ _ _). Qed.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
path_trunctype_pp
7,276
{n : trunc_index} {A B : TruncType n} {f : A <~> B} : ap trunctype_type (path_trunctype f) = path_universe_uncurried f. Proof. destruct A, B. cbn in *. cbn; destruct (path_universe_uncurried f). rewrite concat_1p, concat_p1. rewrite <- 2 ap_compose. apply ap_const. Qed.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
ap_trunctype
7,277
{A B} := @path_trunctype 0 A B.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
path_hset
7,278
{A B} := @path_trunctype (-1) A B. Global Instance istrunc_trunctype {n : trunc_index} : IsTrunc n.+1 (TruncType n) | 0. Proof. apply istrunc_S. intros A B. refine (istrunc_equiv_istrunc _ (equiv_path_trunctype@{i j} A B)). case n as [ | n']. - apply contr_equiv_contr_contr. - apply istrunc_equiv. Defined.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
path_hprop
7,279
HProp := (Build_HProp Unit).
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
Unit_hp
7,280
HProp := (Build_HProp Empty).
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
False_hp
7,281
`{Funext} (hprop : HProp) : HProp := Build_HProp (~hprop).
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
Negation_hp
7,282
(b : Bool) : HProp := if b then Unit_hp else False_hp. Global Instance trunc_path_IsHProp X Y `{IsHProp Y} : IsHProp (X = Y). Proof. apply hprop_allpath. intros pf1 pf2. apply (equiv_inj (equiv_path X Y)). apply path_equiv, path_arrow. intros x; by apply path_ishprop. Qed.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
is_true
7,283
`{IsHProp A, IsHProp B} : (A <-> B) -> A = B :> Type := @path_universe_uncurried _ A B o equiv_iff_hprop_uncurried.
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
path_iff_ishprop_uncurried
7,284
{A B : HProp} : (A <-> B) -> A = B :> HProp := (@path_hprop A B) o (@equiv_iff_hprop_uncurried A _ B _).
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
path_iff_hprop_uncurried
7,285
`{IsHProp A, IsHProp B} : (A -> B) -> (B -> A) -> A = B :> Type := fun f g => path_iff_ishprop_uncurried (f,g).
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
path_iff_ishprop
7,286
{A B : HProp} : (A -> B) -> (B -> A) -> A = B :> HProp := fun f g => path_iff_hprop_uncurried (f,g).
Definition
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
path_iff_hprop
7,287
{A B : Type} `{IsHProp A, IsHProp B} : (A <-> B) <~> (A = B). Proof. exact (Build_Equiv _ _ path_iff_ishprop_uncurried _). Defined.
Lemma
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
equiv_path_iff_ishprop
7,288
{A B : HProp} : (A <-> B) <~> (A = B). Proof. refine (equiv_path_trunctype' _ _ oE equiv_path_iff_ishprop). Defined.
Lemma
Require Import HoTT.Basics HoTT.Types. Require Import HProp.
Universes\TruncType.v
equiv_path_iff_hprop
7,289
Lift@{i j | i < j} (A : Type@{i}) : Type@{j} := A.
Definition
From HoTT Require Import Basics.Overture Basics.PathGroupoids.
Universes\UniverseLevel.v
Lift@
7,290
{A} : A -> Lift A := fun x => x.
Definition
From HoTT Require Import Basics.Overture Basics.PathGroupoids.
Universes\UniverseLevel.v
lift
7,291
{A} : Lift A -> A := fun x => x.
Definition
From HoTT Require Import Basics.Overture Basics.PathGroupoids.
Universes\UniverseLevel.v
lower
7,292
{A B} (f : forall x : A, B x) : forall x : Lift A, Lift (B (lower x)) := f.
Definition
From HoTT Require Import Basics.Overture Basics.PathGroupoids.
Universes\UniverseLevel.v
lift2
7,293
{A B} (f : forall x : Lift A, Lift (B (lower x))) : forall x : A, B x := f.
Definition
From HoTT Require Import Basics.Overture Basics.PathGroupoids.
Universes\UniverseLevel.v
lower2
7,294
{A B} (e : Equiv (Lift A) (Lift B)) : Equiv A B := @Build_Equiv A B (lower2 e) _.
Definition
From HoTT Require Import Basics.Overture Basics.PathGroupoids.
Universes\UniverseLevel.v
lower_equiv
7,295
Lift'@{i j | i <= j} (A : Type@{i}) : Type@{j} := A.
Definition
From HoTT Require Import Basics.Overture Basics.PathGroupoids.
Universes\UniverseLevel.v
Lift'@
7,296
lift'@{i j} {A : Type@{i}} : A -> Lift'@{i j} A := fun x => x.
Definition
From HoTT Require Import Basics.Overture Basics.PathGroupoids.
Universes\UniverseLevel.v
lift'@
7,297
lower'@{i j} {A : Type@{i}} : Lift'@{i j} A -> A := fun x => x.
Definition
From HoTT Require Import Basics.Overture Basics.PathGroupoids.
Universes\UniverseLevel.v
lower'@
7,298
lift'2@{i i' j j'} {A : Type@{i}} {B : A -> Type@{i'}} (f : forall x : A, B x) : forall x : Lift'@{i j} A, Lift'@{i' j'} (B (lower' x)) := f.
Definition
From HoTT Require Import Basics.Overture Basics.PathGroupoids.
Universes\UniverseLevel.v
lift'2@
7,299