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
|
---|---|---|---|---|---|
{A : Type} {P : A -> Type} `{forall x, IsHProp (P x)} (u v : sig P) : u. | Definition | Require Import HoTT.Basics. Require Import Types.Arrow Types.Paths. | Types\Sigma.v | path_sigma_hprop | 7,000 |
{A : Type} {P : A -> Type} {HP : forall a, IsHProp (P a)} (u v : sig P) : (u. | Definition | Require Import HoTT.Basics. Require Import Types.Arrow Types.Paths. | Types\Sigma.v | equiv_path_sigma_hprop | 7,001 |
{A} {P : A -> Type} `{forall a, IsHProp (P a)} (x y : sig P) : IsEquiv (@pr1_path A P x y) := _ : IsEquiv (path_sigma_hprop x y)^-1. | Definition | Require Import HoTT.Basics. Require Import Types.Arrow Types.Paths. | Types\Sigma.v | isequiv_pr1_path_hprop | 7,002 |
{A} {P : A -> Type} `{forall a, IsHProp (P a)} (x y : sig P) : IsEquiv (@ap _ _ (@pr1 A P) x y) := _. | Definition | Require Import HoTT.Basics. Require Import Types.Arrow Types.Paths. | Types\Sigma.v | isequiv_ap_pr1_hprop | 7,003 |
{A : Type} {P : A -> Type} `{forall x, IsHProp (P x)} (u : sig P) : path_sigma_hprop u u 1 = 1. Proof. unfold path_sigma_hprop. unfold isequiv_pr1_contr; simpl. refine (ap (fun p => match p in (_ = v2) return (u = (u.1; v2)) with 1 => 1 end) (contr (idpath u.2))). Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Arrow Types.Paths. | Types\Sigma.v | path_sigma_hprop_1 | 7,004 |
{A : Type} {P : A -> Type} `{forall x, IsHProp (P x)} {a b : A} (p : a = b) (x : P a) (y : P b) : path_sigma_hprop (b;y) (a;x) p^ = (path_sigma_hprop (a;x) (b;y) p)^. Proof. destruct p; simpl. rewrite (path_ishprop x y). refine (path_sigma_hprop_1 _ @ (ap inverse (path_sigma_hprop_1 _))^). Qed. | Definition | Require Import HoTT.Basics. Require Import Types.Arrow Types.Paths. | Types\Sigma.v | path_sigma_hprop_V | 7,005 |
{A : Type} {P : A -> Type} `{forall x, IsHProp (P x)} {a b c : A} (p : a = b) (q : b = c) (x : P a) (y : P b) (z : P c) : path_sigma_hprop (a;x) (c;z) (p @ q) = path_sigma_hprop (a;x) (b;y) p @ path_sigma_hprop (b;y) (c;z) q. Proof. destruct p, q. rewrite (path_ishprop y x). rewrite (path_ishprop z x). refine (_ @ (ap (fun z => z @ _) (path_sigma_hprop_1 _))^). apply (concat_1p _)^. Qed. | Definition | Require Import HoTT.Basics. Require Import Types.Arrow Types.Paths. | Types\Sigma.v | path_sigma_hprop_pp | 7,006 |
{A : Type} {P : A -> Type} `{forall x, IsHProp (P x)} (u v : sig P) (p : u = v) : path_sigma_hprop u v (ap pr1 p) = p := eisretr (path_sigma_hprop u v) p. | Definition | Require Import HoTT.Basics. Require Import Types.Arrow Types.Paths. | Types\Sigma.v | path_sigma_hprop_ap_pr1 | 7,007 |
{A : Type} {P : A -> Type} `{forall x, IsHProp (P x)} (u v : sig P) (p : u = v) : path_sigma_hprop u v p. | Definition | Require Import HoTT.Basics. Require Import Types.Arrow Types.Paths. | Types\Sigma.v | path_sigma_hprop_pr1_path | 7,008 |
{A : Type} {P : A -> Type} `{forall x, IsHProp (P x)} (u v : sig P) (p : u. | Definition | Require Import HoTT.Basics. Require Import Types.Arrow Types.Paths. | Types\Sigma.v | ap_pr1_path_sigma_hprop | 7,009 |
{A : Type} {P : A -> Type} `{forall x, IsHProp (P x)} (u v : sig P) (p : u. | Definition | Require Import HoTT.Basics. Require Import Types.Arrow Types.Paths. | Types\Sigma.v | pr1_path_path_sigma_hprop | 7,010 |
{A B} (P : A -> Type) (Q : B -> Type) (f : A -> B) (g : forall a, P a -> Q (f a)) (b : B) (v : Q b) : (hfiber (functor_sigma f g) (b; v)) <~> {w : hfiber f b & hfiber (g w.1) ((w.2)^ # v)}. Proof. unfold hfiber, functor_sigma. refine (_ oE equiv_functor_sigma_id _). 2:intros; symmetry; apply equiv_path_sigma. transitivity {w : {x : A & f x = b} & {x : P w.1 & (w.2) # (g w.1 x) = v}}. 1:make_equiv. apply equiv_functor_sigma_id; intros [a p]; simpl. apply equiv_functor_sigma_id; intros u; simpl. apply equiv_moveL_transport_V. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Arrow Types.Paths. | Types\Sigma.v | hfiber_functor_sigma | 7,011 |
{A} (P Q : A -> Type) (g : forall a, P a -> Q a) (b : A) (v : Q b) : (hfiber (functor_sigma idmap g) (b; v)) <~> hfiber (g b) v. Proof. refine (_ oE hfiber_functor_sigma P Q idmap g b v). exact (equiv_contr_sigma (fun (w:hfiber idmap b) => hfiber (g w.1) (transport Q (w.2)^ v))). Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Arrow Types.Paths. | Types\Sigma.v | hfiber_functor_sigma_idmap | 7,012 |
n {A P Q} (g : forall a : A, P a -> Q a) `{!IsTruncMap n (functor_sigma idmap g)} : forall a, IsTruncMap n (g a). Proof. intros a v. exact (istrunc_equiv_istrunc _ (hfiber_functor_sigma_idmap _ _ _ _ _)). Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Arrow Types.Paths. | Types\Sigma.v | istruncmap_from_functor_sigma | 7,013 |
`(z : A + B) : match z with | inl z' => inl z' | inr z' => inr z' end = z := match z with inl _ => 1 | inr _ => 1 end. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | eta_sum | 7,014 |
{A B} (z z' : A + B) : Type := match z, z' with | inl a, inl a' => a = a' | inr b, inr b' => b = b' | _, _ => Empty end. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | code_sum | 7,015 |
{A B : Type} {z z' : A + B} (c : code_sum z z') : z = z'. Proof. destruct z, z'. - apply ap, c. - elim c. - elim c. - apply ap, c. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | path_sum | 7,016 |
{A B : Type} {z z' : A + B} (pq : z = z') : match z, z' with | inl z0, inl z'0 => z0 = z'0 | inr z0, inr z'0 => z0 = z'0 | _, _ => Empty end := match pq with | 1 => match z with | inl _ => 1 | inr _ => 1 end end. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | path_sum_inv | 7,017 |
{A B : Type} (a : A) (b : B) : inl a <> inr b := path_sum_inv. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | inl_ne_inr | 7,018 |
{A B : Type} (b : B) (a : A) : inr b <> inl a := path_sum_inv. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | inr_ne_inl | 7,019 |
{A : Type} (B : Type) {x x' : A} : inl x = inl x' -> x = x' := fun p => @path_sum_inv A B _ _ p. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | path_sum_inl | 7,020 |
(A : Type) {B : Type} {x x' : B} : inr x = inr x' -> x = x' := fun p => @path_sum_inv A B _ _ p. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | path_sum_inr | 7,021 |
{A B} {z z' : A + B} : path_sum o (@path_sum_inv _ _ z z') == idmap := fun p => match p as p in (_ = z') return path_sum (path_sum_inv p) = p with | 1 => match z as z return (@path_sum _ _ z z) (path_sum_inv 1) = 1 with | inl _ => 1 | inr _ => 1 end end. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | eisretr_path_sum | 7,022 |
{A B} {z z' : A + B} : path_sum_inv o (@path_sum _ _ z z') == idmap. Proof. intro p. destruct z, z', p; exact idpath. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | eissect_path_sum | 7,023 |
{A B : Type} (z z' : A + B) := Build_Equiv _ _ _ (@isequiv_path_sum A B z z'). Global Instance ishprop_hfiber_inl {A B : Type} (z : A + B) : IsHProp (hfiber inl z). Proof. destruct z as [a|b]; unfold hfiber. - refine (istrunc_equiv_istrunc _ (equiv_functor_sigma_id (fun x => (inl x) (inl a)))). - refine (istrunc_isequiv_istrunc _ (fun xp => inl_ne_inr (xp.1) b xp.2)^-1). Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_path_sum | 7,024 |
A <~> {x:A & P x} + {x:A & ~(P x)}. Proof. transparent assert (f : (A -> {x:A & P x} + {x:A & ~(P x)})). { intros x. destruct (dec (P x)) as [p|np]. - exact (inl (x;p)). - exact (inr (x;np)). } refine (Build_Equiv _ _ f _). refine (isequiv_adjointify _ (fun z => match z with | inl (x;p) => x | inr (x;np) => x end) _ _). - intros [[x p]|[x np]]; unfold f; destruct (dec (P x)) as [p'|np']. + apply ap, ap, path_ishprop. + elim (np' p). + elim (np p'). + apply ap, ap, path_ishprop. - intros x; unfold f. destruct (dec (P x)); cbn; reflexivity. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_decidable_sum | 7,025 |
(a : A) (p : P a) : equiv_decidable_sum a = inl (a;p). Proof. unfold equiv_decidable_sum; cbn. destruct (dec (P a)) as [p'|np']. - apply ap, path_sigma_hprop; reflexivity. - elim (np' p). Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_decidable_sum_l | 7,026 |
(a : A) (np : ~ (P a)) : equiv_decidable_sum a = inr (a;np). Proof. unfold equiv_decidable_sum; cbn. destruct (dec (P a)) as [p'|np']. - elim (np p'). - apply ap, path_sigma_hprop; reflexivity. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_decidable_sum_r | 7,027 |
{A : Type} {P Q : A -> Type} {a a' : A} (p : a = a') (z : P a + Q a) : transport (fun a => P a + Q a) p z = match z with | inl z' => inl (p # z') | inr z' => inr (p # z') end := match p with idpath => match z with inl _ => 1 | inr _ => 1 end end. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | transport_sum | 7,028 |
{A B} (P : A -> Type@{p}) : A + B -> Type@{p} := fun x => match x with inl a => P a | inr _ => Empty end. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | is_inl_and | 7,029 |
{A B} (P : B -> Type@{p}) : A + B -> Type@{p} := fun x => match x with inl _ => Empty | inr b => P b end. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | is_inr_and | 7,030 |
{A B} : A + B -> Type0 := is_inl_and (fun _ => Unit). | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | is_inl | 7,031 |
{A B} : A + B -> Type0 := is_inr_and (fun _ => Unit). Global Instance ishprop_is_inl {A B} (x : A + B) : IsHProp (is_inl x). Proof. destruct x; exact _. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | is_inr | 7,032 |
{A B} (z : A + B) : is_inl z -> A. Proof. destruct z as [a|b]. - intros; exact a. - intros e; elim e. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | un_inl | 7,033 |
{A B} (z : A + B) : is_inr z -> B. Proof. destruct z as [a|b]. - intros e; elim e. - intros; exact b. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | un_inr | 7,034 |
{A B} (x : A + B) (na : ~ A) : is_inr x := match x with | inl a => na a | inr b => tt end. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | is_inl_not_inr | 7,035 |
{A B} (x : A + B) (nb : ~ B) : is_inl x := match x with | inl a => tt | inr b => nb b end. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | is_inr_not_inl | 7,036 |
{A B : Type} (a : A) (w : is_inl (inl a)) : un_inl (@inl A B a) w = a := 1. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | un_inl_inl | 7,037 |
{A B : Type} (b : B) (w : is_inr (inr b)) : un_inr (@inr A B b) w = b := 1. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | un_inr_inr | 7,038 |
{A B : Type} (z : A + B) (w : is_inl z) : inl (un_inl z w) = z. Proof. destruct z as [a|b]; simpl. - reflexivity. - elim w. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | inl_un_inl | 7,039 |
{A B : Type} (z : A + B) (w : is_inr z) : inr (un_inr z w) = z. Proof. destruct z as [a|b]; simpl. - elim w. - reflexivity. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | inr_un_inr | 7,040 |
{A B} (P : A -> Type) (Q : B -> Type) (x : A + B) : is_inl_and P x -> is_inr_and Q x -> Empty. Proof. destruct x as [a|b]; simpl. - exact (fun _ e => e). - exact (fun e _ => e). Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | not_is_inl_and_inr | 7,041 |
not_is_inl_and_inr' {A B} (x : A + B) : is_inl x -> is_inr x -> Empty := not_is_inl_and_inr (fun _ => Unit) (fun _ => Unit) x. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | not_is_inl_and_inr' | 7,042 |
{A B} (x : A + B) : (is_inl x) + (is_inr x) := match x return (is_inl x) + (is_inr x) with | inl _ => inl tt | inr _ => inr tt end. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | is_inl_or_is_inr | 7,043 |
{A B : Type} (P : A + B -> Type) (f : forall a:A, P (inl a)) : forall (x:A+B), is_inl x -> P x. Proof. intros [a|b] H; [ exact (f a) | elim H ]. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | is_inl_ind | 7,044 |
{A B : Type} (P : A + B -> Type) (f : forall b:B, P (inr b)) : forall (x:A+B), is_inr x -> P x. Proof. intros [a|b] H; [ elim H | exact (f b) ]. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | is_inr_ind | 7,045 |
A + B -> A' + B' := fun z => match z with inl z' => inl (f z') | inr z' => inr (g z') end. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | functor_sum | 7,046 |
{z z' : A + B} (c : code_sum z z') : code_sum (functor_sum z) (functor_sum z'). Proof. destruct z, z'. - destruct c. reflexivity. - elim c. - elim c. - destruct c. reflexivity. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | functor_code_sum | 7,047 |
{z z' : A + B} (c : code_sum z z') : ap functor_sum (path_sum c) = path_sum (functor_code_sum c). Proof. destruct z, z'. - destruct c. reflexivity. - elim c. - elim c. - destruct c. reflexivity. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | ap_functor_sum | 7,048 |
(a' : A') : hfiber functor_sum (inl a') <~> hfiber f a'. Proof. simple refine (equiv_adjointify _ _ _ _). - intros [[a|b] p]. + exists a. exact (path_sum_inl _ p). + elim (inr_ne_inl _ _ p). - intros [a p]. exists (inl a). exact (ap inl p). - intros [a p]. apply ap. pose (@isequiv_path_sum A' B' (inl (f a)) (inl a')). exact (eissect (@path_sum A' B' (inl (f a)) (inl a')) p). - intros [[a|b] p]; simpl. + apply ap. pose (@isequiv_path_sum A' B' (inl (f a)) (inl a')). exact (eisretr (@path_sum A' B' (inl (f a)) (inl a')) p). + elim (inr_ne_inl _ _ p). Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | hfiber_functor_sum_l | 7,049 |
(b' : B') : hfiber functor_sum (inr b') <~> hfiber g b'. Proof. simple refine (equiv_adjointify _ _ _ _). - intros [[a|b] p]. + elim (inl_ne_inr _ _ p). + exists b. exact (path_sum_inr _ p). - intros [b p]. exists (inr b). exact (ap inr p). - intros [b p]. apply ap. pose (@isequiv_path_sum A' B' (inr (g b)) (inr b')). exact (eissect (@path_sum A' B' (inr (g b)) (inr b')) p). - intros [[a|b] p]; simpl. + elim (inl_ne_inr _ _ p). + apply ap. pose (@isequiv_path_sum A' B' (inr (g b)) (inr b')). exact (eisretr (@path_sum A' B' (inr (g b)) (inr b')) p). Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | hfiber_functor_sum_r | 7,050 |
{A A' B B' : Type} {f f' : A -> A'} {g g' : B -> B'} (p : f == f') (q : g == g') : functor_sum f g == functor_sum f' g'. Proof. intros [a|b]. - exact (ap inl (p a)). - exact (ap inr (q b)). Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | functor_sum_homotopic | 7,051 |
{A A' B B' : Type} (h : A + B -> A' + B') (Ha : forall a:A, is_inl (h (inl a))) : A -> A' := fun a => un_inl (h (inl a)) (Ha a). | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | unfunctor_sum_l | 7,052 |
{A A' B B' : Type} (h : A + B -> A' + B') (Hb : forall b:B, is_inr (h (inr b))) : B -> B' := fun b => un_inr (h (inr b)) (Hb b). | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | unfunctor_sum_r | 7,053 |
{A A' B B' : Type} (h : A + B -> A' + B') (Ha : forall a:A, is_inl (h (inl a))) (Hb : forall b:B, is_inr (h (inr b))) : functor_sum (unfunctor_sum_l h Ha) (unfunctor_sum_r h Hb) == h. Proof. intros [a|b]; simpl. - unfold unfunctor_sum_l; apply inl_un_inl. - unfold unfunctor_sum_r; apply inr_un_inr. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | unfunctor_sum_eta | 7,054 |
{A A' B B' : Type} (h : A + B -> A' + B') (Ha : forall a:A, is_inl (h (inl a))) : inl o unfunctor_sum_l h Ha == h o inl. Proof. intros a; unfold unfunctor_sum_l; apply inl_un_inl. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | unfunctor_sum_l_beta | 7,055 |
{A A' B B' : Type} (h : A + B -> A' + B') (Hb : forall b:B, is_inr (h (inr b))) : inr o unfunctor_sum_r h Hb == h o inr. Proof. intros b; unfold unfunctor_sum_r; apply inr_un_inr. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | unfunctor_sum_r_beta | 7,056 |
{A A' A'' B B' B'' : Type} (h : A + B -> A' + B') (k : A' + B' -> A'' + B'') (Ha : forall a:A, is_inl (h (inl a))) (Ha' : forall a':A', is_inl (k (inl a'))) : unfunctor_sum_l k Ha' o unfunctor_sum_l h Ha == unfunctor_sum_l (k o h) (fun a => is_inl_ind (fun x' => is_inl (k x')) Ha' (h (inl a)) (Ha a)). Proof. intros a. refine (path_sum_inl B'' _). refine (unfunctor_sum_l_beta _ _ _ @ _). refine (ap k (unfunctor_sum_l_beta _ _ _) @ _). refine ((unfunctor_sum_l_beta _ _ _)^). Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | unfunctor_sum_l_compose | 7,057 |
{A A' A'' B B' B'' : Type} (h : A + B -> A' + B') (k : A' + B' -> A'' + B'') (Hb : forall b:B, is_inr (h (inr b))) (Hb' : forall b':B', is_inr (k (inr b'))) : unfunctor_sum_r k Hb' o unfunctor_sum_r h Hb == unfunctor_sum_r (k o h) (fun b => is_inr_ind (fun x' => is_inr (k x')) Hb' (h (inr b)) (Hb b)). Proof. intros b. refine (path_sum_inr A'' _). refine (unfunctor_sum_r_beta _ _ _ @ _). refine (ap k (unfunctor_sum_r_beta _ _ _) @ _). refine ((unfunctor_sum_r_beta _ _ _)^). Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | unfunctor_sum_r_compose | 7,058 |
{A A' B B' : Type} (h : A + B -> A' + B') (Ha : forall a:A, is_inl (h (inl a))) (Hb : forall b:B, is_inr (h (inr b))) (a' : A') : hfiber (unfunctor_sum_l h Ha) a' <~> hfiber h (inl a'). Proof. simple refine (equiv_adjointify _ _ _ _). - intros [a p]. exists (inl a). refine (_ @ ap inl p). symmetry; apply inl_un_inl. - intros [[a|b] p]. + exists a. apply path_sum_inl with B'. refine (_ @ p). apply inl_un_inl. + specialize (Hb b). abstract (rewrite p in Hb; elim Hb). - intros [[a|b] p]; simpl. + apply ap. apply moveR_Vp. exact (eisretr (@path_sum A' B' _ _) (inl_un_inl (h (inl a)) (Ha a) @ p)). + apply Empty_rec. specialize (Hb b). abstract (rewrite p in Hb; elim Hb). - intros [a p]. apply ap. rewrite concat_p_Vp. pose (@isequiv_path_sum A' B' (inl (unfunctor_sum_l h Ha a)) (inl a')). exact (eissect (@path_sum A' B' (inl (unfunctor_sum_l h Ha a)) (inl a')) p). Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | hfiber_unfunctor_sum_l | 7,059 |
{A A' B B' : Type} (h : A + B -> A' + B') (Ha : forall a:A, is_inl (h (inl a))) (Hb : forall b:B, is_inr (h (inr b))) (b' : B') : hfiber (unfunctor_sum_r h Hb) b' <~> hfiber h (inr b'). Proof. simple refine (equiv_adjointify _ _ _ _). - intros [b p]. exists (inr b). refine (_ @ ap inr p). symmetry; apply inr_un_inr. - intros [[a|b] p]. + specialize (Ha a). abstract (rewrite p in Ha; elim Ha). + exists b. apply path_sum_inr with A'. refine (_ @ p). apply inr_un_inr. - intros [[a|b] p]; simpl. + apply Empty_rec. specialize (Ha a). abstract (rewrite p in Ha; elim Ha). + apply ap. apply moveR_Vp. exact (eisretr (@path_sum A' B' _ _) (inr_un_inr (h (inr b)) (Hb b) @ p)). - intros [b p]. apply ap. rewrite concat_p_Vp. pose (@isequiv_path_sum A' B' (inr (unfunctor_sum_r h Hb b)) (inr b')). exact (eissect (@path_sum A' B' (inr (unfunctor_sum_r h Hb b)) (inr b')) p). Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | hfiber_unfunctor_sum_r | 7,060 |
`{IsEquiv A A' f} `{IsEquiv B B' g} : A + B <~> A' + B' := Build_Equiv _ _ (functor_sum f g) _. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_functor_sum | 7,061 |
equiv_functor_sum' {A A' B B' : Type} (f : A <~> A') (g : B <~> B') : A + B <~> A' + B' := equiv_functor_sum (f := f) (g := g). | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_functor_sum' | 7,062 |
{A B B' : Type} (g : B <~> B') : A + B <~> A + B' := 1 +E g. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_functor_sum_l | 7,063 |
{A A' B : Type} (f : A <~> A') : A + B <~> A' + B := f +E 1. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_functor_sum_r | 7,064 |
{A A' B B' : Type} (f : A <-> A') (g : B <-> B') : A + B <-> A' + B' := (functor_sum (fst f) (fst g), functor_sum (snd f) (snd g)). Global Instance isequiv_unfunctor_sum_l {A A' B B' : Type} (h : A + B <~> A' + B') (Ha : forall a:A, is_inl (h (inl a))) (Hb : forall b:B, is_inr (h (inr b))) : IsEquiv (unfunctor_sum_l h Ha). Proof. simple refine (isequiv_adjointify _ _ _ _). - refine (unfunctor_sum_l h^-1 _); intros a'. remember (h^-1 (inl a')) as x eqn:p. destruct x as [a|b]. + exact tt. + apply moveL_equiv_M in p. elim (p^ # (Hb b)). - intros a'. refine (unfunctor_sum_l_compose _ _ _ _ _ @ _). refine (path_sum_inl B' _). refine (unfunctor_sum_l_beta _ _ _ @ _). apply eisretr. - intros a. refine (unfunctor_sum_l_compose _ _ _ _ _ @ _). refine (path_sum_inl B _). refine (unfunctor_sum_l_beta (h^-1 o h) _ a @ _). apply eissect. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | iff_functor_sum | 7,065 |
{A A' B B' : Type} (h : A + B <~> A' + B') (Ha : forall a:A, is_inl (h (inl a))) (Hb : forall b:B, is_inr (h (inr b))) : A <~> A' := Build_Equiv _ _ (unfunctor_sum_l h Ha) (isequiv_unfunctor_sum_l h Ha Hb). Global Instance isequiv_unfunctor_sum_r {A A' B B' : Type} (h : A + B <~> A' + B') (Ha : forall a:A, is_inl (h (inl a))) (Hb : forall b:B, is_inr (h (inr b))) : IsEquiv (unfunctor_sum_r h Hb). Proof. simple refine (isequiv_adjointify _ _ _ _). - refine (unfunctor_sum_r h^-1 _); intros b'. remember (h^-1 (inr b')) as x eqn:p. destruct x as [a|b]. + apply moveL_equiv_M in p. elim (p^ # (Ha a)). + exact tt. - intros b'. refine (unfunctor_sum_r_compose _ _ _ _ _ @ _). refine (path_sum_inr A' _). refine (unfunctor_sum_r_beta _ _ _ @ _). apply eisretr. - intros b. refine (unfunctor_sum_r_compose _ _ _ _ _ @ _). refine (path_sum_inr A _). refine (unfunctor_sum_r_beta (h^-1 o h) _ b @ _). apply eissect. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_unfunctor_sum_l | 7,066 |
{A A' B B' : Type} (h : A + B <~> A' + B') (Ha : forall a:A, is_inl (h (inl a))) (Hb : forall b:B, is_inr (h (inr b))) : B <~> B' := Build_Equiv _ _ (unfunctor_sum_r h Hb) (isequiv_unfunctor_sum_r h Ha Hb). | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_unfunctor_sum_r | 7,067 |
{A A' B B' : Type} (h : A + B <~> A' + B') (Ha : forall a:A, is_inl (h (inl a))) (Hb : forall b:B, is_inr (h (inr b))) : (A <~> A') * (B <~> B') := (equiv_unfunctor_sum_l h Ha Hb , equiv_unfunctor_sum_r h Ha Hb). | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_unfunctor_sum | 7,068 |
equiv_sum_symm@{u v k | u <= k, v <= k} (A : Type@{u}) (B : Type@{v}) : Equiv@{k k} (A + B) (B + A). Proof. apply (equiv_adjointify (fun ab => match ab with inl a => inr a | inr b => inl b end) (fun ab => match ab with inl a => inr a | inr b => inl b end)); intros [?|?]; exact idpath. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_sum_symm@ | 7,069 |
(A B C : Type) : (A + B) + C <~> A + (B + C). Proof. simple refine (equiv_adjointify _ _ _ _). - intros [[a|b]|c]; [ exact (inl a) | exact (inr (inl b)) | exact (inr (inr c)) ]. - intros [a|[b|c]]; [ exact (inl (inl a)) | exact (inl (inr b)) | exact (inr c) ]. - intros [a|[b|c]]; reflexivity. - intros [[a|b]|c]; reflexivity. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_sum_assoc | 7,070 |
sum_empty_l@{u|} (A : Type@{u}) : Equiv@{u u} (Empty + A) A. Proof. snrapply equiv_adjointify@{u u}. - intros [e|a]; [ exact (Empty_rec@{u} e) | exact a ]. - intros a; exact (inr@{Set u} a). - intro x; exact idpath@{u}. - intros [e|z]; [ elim e | exact idpath@{u}]. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | sum_empty_l@ | 7,071 |
sum_empty_r@{u} (A : Type@{u}) : Equiv@{u u} (A + Empty) A := equiv_compose'@{u u u} (sum_empty_l A) (equiv_sum_symm@{u Set u} _ _). | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | sum_empty_r@ | 7,072 |
A B C : A * (B + C) <~> (A * B) + (A * C). Proof. snrapply Build_Equiv. 2: snrapply Build_IsEquiv. - intros [a [b|c]]. + exact (inl@{u u} (a, b)). + exact (inr@{u u} (a, c)). - intros [[a b]|[a c]]. + exact (a, inl@{u u} b). + exact (a, inr@{u u} c). - intros [[a b]|[a c]]; reflexivity. - intros [a [b|c]]; reflexivity. - intros [a [b|c]]; reflexivity. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | sum_distrib_l | 7,073 |
A B C : (B + C) * A <~> (B * A) + (C * A). Proof. refine (Build_Equiv ((B + C) * A) ((B * A) + (C * A)) (fun abc => let (bc,a) := abc in match bc with | inl b => inl (b,a) | inr c => inr (c,a) end) _). simple refine (Build_IsEquiv ((B + C) * A) ((B * A) + (C * A)) _ (fun ax => match ax with | inl (b,a) => (inl b,a) | inr (c,a) => (inr c,a) end) _ _ _). - intros [[b a]|[c a]]; reflexivity. - intros [[b|c] a]; reflexivity. - intros [[b|c] a]; reflexivity. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | sum_distrib_r | 7,074 |
A B (C : A + B -> Type) : { x : A+B & C x } <~> { a : A & C (inl a) } + { b : B & C (inr b) }. Proof. refine (Build_Equiv { x : A+B & C x } ({ a : A & C (inl a) } + { b : B & C (inr b) }) (fun xc => let (x,c) := xc in match x return C x -> ({ a : A & C (inl a) } + { b : B & C (inr b) }) with | inl a => fun c => inl (a;c) | inr b => fun c => inr (b;c) end c) _). simple refine (Build_IsEquiv { x : A+B & C x } ({ a : A & C (inl a) } + { b : B & C (inr b) }) _ (fun abc => match abc with | inl (a;c) => (inl a ; c) | inr (b;c) => (inr b ; c) end) _ _ _). - intros [[a c]|[b c]]; reflexivity. - intros [[a|b] c]; reflexivity. - intros [[a|b] c]; reflexivity. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_sigma_sum | 7,075 |
{A B C} (f : C -> A + B) : Type := { c:C & is_inl (f c) }. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | decompose_l | 7,076 |
{A B C} (f : C -> A + B) : Type := { c:C & is_inr (f c) }. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | decompose_r | 7,077 |
{A B C} (f : C -> A + B) : decompose_l f + decompose_r f <~> C. Proof. simple refine (equiv_adjointify (sum_ind (fun _ => C) pr1 pr1) _ _ _). - intros c; destruct (is_inl_or_is_inr (f c)); [ left | right ]; exists c; assumption. - intros c; destruct (is_inl_or_is_inr (f c)); reflexivity. - intros [[c l]|[c r]]; simpl; destruct (is_inl_or_is_inr (f c)). + apply ap, ap, path_ishprop. + elim (not_is_inl_and_inr' _ l i). + elim (not_is_inl_and_inr' _ i r). + apply ap, ap, path_ishprop. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_decompose | 7,078 |
{A B C} (f : C -> A + B) (z : decompose_l f) : is_inl (f (equiv_decompose f (inl z))) := z. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | is_inl_decompose_l | 7,079 |
{A B C} (f : C -> A + B) (z : decompose_r f) : is_inr (f (equiv_decompose f (inr z))) := z.2. Class Indecomposable (X : Type) := { indecompose : forall A B (f : X -> A + B), (forall x, is_inl (f x)) + (forall x, is_inr (f x)) ; indecompose0 : ~~X }. Global Instance indecomposable_contr `{Contr X} : Indecomposable X. Proof. constructor. - intros A B f. destruct (is_inl_or_is_inr (f (center X))); [ left | right ]; intros x. all:refine (transport _ (ap f (contr x)) _); assumption. - intros nx; exact (nx (center X)). Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | is_inr_decompose_r | 7,080 |
{X A B} `{Indecomposable X} (f : X <~> A + B) : ((X <~> A) * (Empty <~> B)) + ((X <~> B) * (Empty <~> A)). Proof. destruct (indecompose A B f) as [i|i]; [ left | right ]. 1:pose (g := (f oE sum_empty_r X)). 2:pose (g := (f oE sum_empty_l X)). 2:apply (equiv_prod_symm _ _). all:refine (equiv_unfunctor_sum g _ _); try assumption; try intros []. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_indecomposable_sum | 7,081 |
{A B B' : Type} `{Indecomposable A} (h : A + B <~> A + B') : B <~> B'. Proof. pose (f := equiv_decompose (h o inl)). pose (g := equiv_decompose (h o inr)). pose (k := (h oE (f +E g))). pose (k' := k oE (equiv_sum_assoc _ _ _) oE ((equiv_sum_assoc _ _ _)^-1 +E 1) oE (1 +E (equiv_sum_symm _ _) +E 1) oE ((equiv_sum_assoc _ _ _) +E 1) oE (equiv_sum_assoc _ _ _)^-1). destruct (equiv_unfunctor_sum k' (fun x : decompose_l (h o inl) + decompose_l (h o inr) => match x as x0 return (is_inl (k' (inl x0))) with | inl x0 => x0.2 | inr x0 => x0.2 end) (fun x : decompose_r (h o inl) + decompose_r (h o inr) => match x as x0 return (is_inr (k' (inr x0))) with | inl x0 => x0.2 | inr x0 => x0.2 end)) as [s t]; clear k k'. refine (t oE (_ +E 1) oE g^-1). destruct (equiv_indecomposable_sum s^-1) as [[p q]|[p q]]; destruct (equiv_indecomposable_sum f^-1) as [[u v]|[u v]]. - refine (v oE q^-1). - elim (indecompose0 (v^-1 o p)). - refine (Empty_rec (indecompose0 _)); intros a. destruct (is_inl_or_is_inr (h (inl a))) as [l|r]. * exact (q^-1 (a;l)). * exact (v^-1 (a;r)). - refine (u oE p^-1). Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_unfunctor_sum_indecomposable_ll | 7,082 |
{A A' B B' : Type} `{Contr A} `{Contr A'} (h : A + B <~> A' + B') : B <~> B' := equiv_unfunctor_sum_indecomposable_ll ((equiv_contr_contr +E 1) oE h). | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_unfunctor_sum_contr_ll | 7,083 |
{A B} (P : A + B -> Type) (fg : (forall a, P (inl a)) * (forall b, P (inr b))) : forall s, P s := @sum_ind A B P (fst fg) (snd fg). Global Instance isequiv_sum_ind `{Funext} `(P : A + B -> Type) : IsEquiv ( P) | 0. Proof. apply (isequiv_adjointify ( P) (fun f => (fun a => f (inl a), fun b => f (inr b)))); repeat ((exact idpath) || intros [] || intro || apply path_forall). Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | sum_ind_uncurried | 7,084 |
`{Funext} `(P : A + B -> Type) := Build_Equiv _ _ _ (isequiv_sum_ind P). | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_sum_ind | 7,085 |
`{Funext} (A B C : Type) : (A -> C) * (B -> C) <~> (A + B -> C) := equiv_sum_ind (fun _ => C). Global Instance istrunc_sum n' (n := n'.+2) `{IsTrunc n A, IsTrunc n B} : IsTrunc n (A + B) | 100. Proof. apply istrunc_S. intros a b. eapply istrunc_equiv_istrunc; [ exact (equiv_path_sum _ _) | ]. destruct a, b; exact _. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | equiv_sum_distributive | 7,086 |
A B (x : A + B) : { b : Bool & if b then A else B } := (_; match x as s return (if match s with | inl _ => true | inr _ => false end then A else B) with | inl a => a | inr b => b end). | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | sig_of_sum | 7,087 |
A B (x : { b : Bool & if b then A else B }) : A + B := match x with | (true; a) => inl a | (false; b) => inr b end. Global Instance isequiv_sig_of_sum A B : IsEquiv (@sig_of_sum A B) | 0. Proof. apply (isequiv_adjointify (@sig_of_sum A B) (@ A B)). - intros [[] ?]; exact idpath. - intros []; exact idpath. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | sum_of_sig | 7,088 |
trunc_sum' n A B `{IsTrunc n Bool, IsTrunc n A, IsTrunc n B} : (IsTrunc n (A + B)). Proof. eapply istrunc_equiv_istrunc; [ esplit; exact (@isequiv_sum_of_sig _ _) | ]. typeclasses eauto. Defined. | Definition | Require Import HoTT.Basics. Require Import Types.Empty Types.Unit Types.Prod Types.Sigma. Require Import Types.Bool. | Types\Sum.v | trunc_sum' | 7,089 |
(z : Unit) : tt = z := match z with tt => 1 end. | Definition | Require Import Basics.Overture Basics.Equivalences. | Types\Unit.v | eta_unit | 7,090 |
(z z' : Unit) : Unit -> z = z' := fun _ => match z, z' with tt, tt => 1 end. | Definition | Require Import Basics.Overture Basics.Equivalences. | Types\Unit.v | path_unit_uncurried | 7,091 |
(z z' : Unit) : z = z' := path_unit_uncurried z z' tt. | Definition | Require Import Basics.Overture Basics.Equivalences. | Types\Unit.v | path_unit | 7,092 |
{z z' : Unit} (p : z = z') : path_unit z z' = p. Proof. destruct p. destruct z. reflexivity. Defined. | Definition | Require Import Basics.Overture Basics.Equivalences. | Types\Unit.v | eta_path_unit | 7,093 |
(z z' : Unit) : Unit <~> (z = z') := Build_Equiv _ _ (path_unit_uncurried z z') _. | Definition | Require Import Basics.Overture Basics.Equivalences. | Types\Unit.v | equiv_path_unit | 7,094 |
`{Funext} (A : Type) : A <~> (Unit -> A) := (Build_Equiv _ _ (@Unit_ind (fun _ => A)) _). Notation unit_name x := (fun (_ : Unit) => x). Global Instance isequiv_unit_name@{i j} `{Funext} (A : Type@{i}) : @IsEquiv@{i j} _ (Unit -> _) (fun (a:A) => unit_name a). Proof. refine (isequiv_adjointify _ (fun f : Unit -> _ => f tt) _ _). - intros f; apply path_forall@{i i j}; intros x. apply ap@{i i}, path_unit. - intros a; reflexivity. Defined. | Definition | Require Import Basics.Overture Basics.Equivalences. | Types\Unit.v | equiv_unit_rec | 7,095 |
{A : Type} : Unit -> (A -> Unit) := fun _ _ => tt. Global Instance isequiv_unit_coind `{Funext} (A : Type) : IsEquiv (@ A) | 0. Proof. refine (isequiv_adjointify _ (fun f => tt) _ _). - intro f. apply path_forall; intros x; apply path_unit. - intro x; destruct x; reflexivity. Defined. | Definition | Require Import Basics.Overture Basics.Equivalences. | Types\Unit.v | unit_coind | 7,096 |
`{Funext} (A : Type) : Unit <~> (A -> Unit) := Build_Equiv _ _ (@unit_coind A) _. | Definition | Require Import Basics.Overture Basics.Equivalences. | Types\Unit.v | equiv_unit_coind | 7,097 |
`{Contr A} : A <~> Unit := equiv_contr_contr. | Definition | Require Import Basics.Overture Basics.Equivalences. | Types\Unit.v | equiv_contr_unit | 7,098 |
(A : Type) (f : A <~> Unit) : Contr A := contr_equiv' Unit f^-1%equiv. | Definition | Require Import Basics.Overture Basics.Equivalences. | Types\Unit.v | contr_equiv_unit | 7,099 |