Built with Alectryon, running Coq+SerAPI v8.18.0+0.18.3. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use ⌘ instead of Ctrl.
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import Types.Require Import HSet.Require Import TruncType.Require Import Colimits.GraphQuotient.Require Import Truncations.Core.Require Import PropResizing.LocalOpen Scope path_scope.(** * The set-quotient of a type by an hprop-valued relationWe aim to model:<<Inductive Quotient R : Type := | class_of R : A -> Quotient R | qglue : forall x y, (R x y) -> class_of R x = class_of R y | ishset_quotient : IsHSet (Quotient R)>>We do this by defining the quotient as a 0-truncated graph quotient. *)DefinitionQuotient@{i j k} {A : Type@{i}} (R : Relation@{i j} A) : Type@{k}
:= Trunc@{k} 0 (GraphQuotient@{i j k} R).Definitionclass_of@{i j k} {A : Type@{i}} (R : Relation@{i j} A)
: A -> Quotient@{i j k} R := tr o gq.Definitionqglue@{i j k} {A : Type@{i}} {R : Relation@{i j} A}
{x y : A}
: R x y -> class_of@{i j k} R x = class_of R y
:= funp => ap tr (gqglue p).Global Instanceishset_quotient {A : Type} (R : Relation A)
: IsHSet (Quotient R) := _.
A: Type R: Relation A P: Quotient R -> Type sP: forallx : Quotient R, IsHSet (P x) pclass: forallx : A, P (class_of R x) peq: forall (xy : A) (H : R x y),
transport P (qglue H) (pclass x) = pclass y
forallq : Quotient R, P q
A: Type R: Relation A P: Quotient R -> Type sP: forallx : Quotient R, IsHSet (P x) pclass: forallx : A, P (class_of R x) peq: forall (xy : A) (H : R x y),
transport P (qglue H) (pclass x) = pclass y
forallq : Quotient R, P q
A: Type R: Relation A P: Quotient R -> Type sP: forallx : Quotient R, IsHSet (P x) pclass: forallx : A, P (class_of R x) peq: forall (xy : A) (H : R x y),
transport P (qglue H) (pclass x) = pclass y
A: Type R: Relation A P: Quotient R -> Type sP: forallx : Quotient R, IsHSet (P x) pclass: forallx : A, P (class_of R x) peq: forall (xy : A) (H : R x y),
transport P (qglue H) (pclass x) = pclass y
forall (ab : A) (s : R a b),
transport (funx : GraphQuotient R => P (tr x))
(gqglue s) (?gq' a) =
?gq' b
A: Type R: Relation A P: Quotient R -> Type sP: forallx : Quotient R, IsHSet (P x) pclass: forallx : A, P (class_of R x) peq: forall (xy : A) (H : R x y),
transport P (qglue H) (pclass x) = pclass y
forall (ab : A) (s : R a b),
transport (funx : GraphQuotient R => P (tr x))
(gqglue s) (?gq' a) = ?gq' b
A: Type R: Relation A P: Quotient R -> Type sP: forallx : Quotient R, IsHSet (P x) pclass: forallx : A, P (class_of R x) peq: forall (xy : A) (H : R x y),
transport P (qglue H) (pclass x) = pclass y a, b: A p: R a b
transport (funx : GraphQuotient R => P (tr x))
(gqglue p) (?gq' a) = ?gq' b
A: Type R: Relation A P: Quotient R -> Type sP: forallx : Quotient R, IsHSet (P x) pclass: forallx : A, P (class_of R x) peq: forall (xy : A) (H : R x y),
transport P (qglue H) (pclass x) = pclass y a, b: A p: R a b
transport P (ap tr (gqglue p)) (?gq' a) = ?gq' b
apply peq.Defined.
A: Type R: Relation A P: Quotient R -> Type sP: forallx : Quotient R, IsHSet (P x) pclass: forallx : A, P (class_of R x) peq: forall (xy : A) (H : R x y),
transport P (qglue H) (pclass x) = pclass y x, y: A p: R x y
apD (Quotient_ind R P pclass peq) (qglue p) =
peq x y p
A: Type R: Relation A P: Quotient R -> Type sP: forallx : Quotient R, IsHSet (P x) pclass: forallx : A, P (class_of R x) peq: forall (xy : A) (H : R x y),
transport P (qglue H) (pclass x) = pclass y x, y: A p: R x y
apD (Quotient_ind R P pclass peq) (qglue p) =
peq x y p
A: Type R: Relation A P: Quotient R -> Type sP: forallx : Quotient R, IsHSet (P x) pclass: forallx : A, P (class_of R x) peq: forall (xy : A) (H : R x y),
transport P (qglue H) (pclass x) = pclass y x, y: A p: R x y
(transport_compose P tr (gqglue p)
(Quotient_ind R P pclass peq (tr (gq x))))^ @
apD
(funx : GraphQuotient R =>
Quotient_ind R P pclass peq (tr x)) (gqglue p) =
peq x y p
A: Type R: Relation A P: Quotient R -> Type sP: forallx : Quotient R, IsHSet (P x) pclass: forallx : A, P (class_of R x) peq: forall (xy : A) (H : R x y),
transport P (qglue H) (pclass x) = pclass y x, y: A p: R x y
(transport_compose P tr (gqglue p)
(Trunc_ind P
(GraphQuotient_ind
(funx : GraphQuotient R => P (tr x))
(funa : A => pclass a)
(fun (ab : A) (p : R a b) =>
transport_compose P tr (gqglue p) (pclass a) @
peq a b p)) (tr (gq x))))^ @
apD
(funx : GraphQuotient R =>
Trunc_ind P
(GraphQuotient_ind
(funx0 : GraphQuotient R => P (tr x0))
(funa : A => pclass a)
(fun (ab : A) (p : R a b) =>
transport_compose P tr (gqglue p) (pclass a) @
peq a b p)) (tr x)) (gqglue p) = peq x y p
A: Type R: Relation A P: Quotient R -> Type sP: forallx : Quotient R, IsHSet (P x) pclass: forallx : A, P (class_of R x) peq: forall (xy : A) (H : R x y),
transport P (qglue H) (pclass x) = pclass y x, y: A p: R x y
(transport_compose P tr (gqglue p)
(Trunc_ind P
(GraphQuotient_ind
(funx : GraphQuotient R => P (tr x))
(funa : A => pclass a)
(fun (ab : A) (p : R a b) =>
transport_compose P tr (gqglue p) (pclass a) @
peq a b p)) (tr (gq x))))^ @
(transport_compose P tr (gqglue p) (pclass x) @
peq x y p) = peq x y p
rapply concat_V_pp.Defined.
A: Type R: Relation A P: Type IsHSet0: IsHSet P pclass: A -> P peq: forallxy : A, R x y -> pclass x = pclass y
Quotient R -> P
A: Type R: Relation A P: Type IsHSet0: IsHSet P pclass: A -> P peq: forallxy : A, R x y -> pclass x = pclass y
Quotient R -> P
A: Type R: Relation A P: Type IsHSet0: IsHSet P pclass: A -> P peq: forallxy : A, R x y -> pclass x = pclass y
forallab : A, R a b -> ?c a = ?c b
apply peq.Defined.
A: Type R: Relation A P: Type IsHSet0: IsHSet P pclass: A -> P peq: forallxy : A, R x y -> pclass x = pclass y x, y: A p: R x y
ap (Quotient_rec R P pclass peq) (qglue p) = peq x y p
A: Type R: Relation A P: Type IsHSet0: IsHSet P pclass: A -> P peq: forallxy : A, R x y -> pclass x = pclass y x, y: A p: R x y
ap (Quotient_rec R P pclass peq) (qglue p) = peq x y p
A: Type R: Relation A P: Type IsHSet0: IsHSet P pclass: A -> P peq: forallxy : A, R x y -> pclass x = pclass y x, y: A p: R x y
ap
(funx : GraphQuotient R =>
Quotient_rec R P pclass peq (tr x)) (gqglue p) =
peq x y p
srapply GraphQuotient_rec_beta_gqglue.Defined.Arguments Quotient : simpl never.Arguments class_of : simpl never.Arguments qglue : simpl never.Arguments Quotient_ind_beta_qglue : simpl never.Arguments Quotient_rec_beta_qglue : simpl never.Notation"A / R" := (Quotient (A:=A) R).SectionEquiv.Context `{Univalence} {A : Type} (R : Relation A) `{is_mere_relation _ R}
`{Transitive _ R} `{Symmetric _ R} `{Reflexive _ R}.(* The proposition of being in a given class in a quotient. *)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
A / R -> A -> HProp
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
A / R -> A -> HProp
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
forallx : A,
(fun_ : A / R => A -> HProp) (class_of R x)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
forall (xy : A) (H3 : R x y),
transport (fun_ : A / R => A -> HProp)
(qglue H3) (?pclass x) =
?pclass y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
forallx : A,
(fun_ : A / R => A -> HProp) (class_of R x)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R a, b: A
HProp
exact (Build_HProp (R a b)).
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
forall (xy : A) (H : R x y),
transport (fun_ : A / R => A -> HProp) (qglue H)
((funa : A =>
(funb : A => Build_HProp (R a b))
:
(fun_ : A / R => A -> HProp) (class_of R a)) x) =
(funa : A =>
(funb : A => Build_HProp (R a b))
:
(fun_ : A / R => A -> HProp) (class_of R a)) y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A p: R x y
transport (fun_ : A / R => A -> HProp) (qglue p)
((funa : A =>
(funb : A => Build_HProp (R a b))
:
(fun_ : A / R => A -> HProp) (class_of R a)) x) =
(funa : A =>
(funb : A => Build_HProp (R a b))
:
(fun_ : A / R => A -> HProp) (class_of R a)) y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A p: R x y
(funb : A => Build_HProp (R x b)) =
(funb : A => Build_HProp (R y b))
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A p: R x y z: A
Build_HProp (R x z) = Build_HProp (R y z)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A p: R x y z: A
Build_HProp (R x z) <~> Build_HProp (R y z)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A p: R x y z: A
R x z -> R y z
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A p: R x y z: A
R y z -> R x z
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A p: R x y z: A
R y z -> R x z
apply (transitivity p).Defined.(* Quotient induction into a hprop. *)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R P: A / R -> Type H3: forallx : A / R, IsHProp (P x) dclass: forallx : A, P (class_of R x)
forallq : A / R, P q
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R P: A / R -> Type H3: forallx : A / R, IsHProp (P x) dclass: forallx : A, P (class_of R x)
forallq : A / R, P q
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R P: A / R -> Type H3: forallx : A / R, IsHProp (P x) dclass: forallx : A, P (class_of R x)
forall (xy : A) (H : R x y),
transport P (qglue H) (dclass x) = dclass y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R P: A / R -> Type H3: forallx : A / R, IsHProp (P x) dclass: forallx : A, P (class_of R x)
forall (xy : A) (H : R x y),
transport P (qglue H) (dclass x) = dclass y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R P: A / R -> Type H3: forallx : A / R, IsHProp (P x) dclass: forallx : A, P (class_of R x) x, y: A p: R x y
transport P (qglue p) (dclass x) = dclass y
apply path_ishprop.Defined.(* Being in a class is decidable if the Relation is decidable. *)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: forallxy : A, Decidable (R x y)
forall (x : A / R) (a : A), Decidable (in_class x a)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: forallxy : A, Decidable (R x y)
forall (x : A / R) (a : A), Decidable (in_class x a)
by srapply Quotient_ind_hprop.Defined.(* if x is in a class q, then the class of x is equal to q. *)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
forall (q : A / R) (x : A),
in_class q x -> q = class_of R x
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
forall (q : A / R) (x : A),
in_class q x -> q = class_of R x
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
forallx : A,
(funq : A / R =>
forallx0 : A, in_class q x0 -> q = class_of R x0)
(class_of R x)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
forall (xy : A) (H3 : R x y),
transport
(funq : A / R =>
forallx0 : A, in_class q x0 -> q = class_of R x0)
(qglue H3) (?pclass x) =
?pclass y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
forallx : A,
(funq : A / R =>
forallx0 : A, in_class q x0 -> q = class_of R x0)
(class_of R x)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A p: in_class (class_of R x) y
class_of R x = class_of R y
apply (qglue p).
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
forall (xy : A) (H : R x y),
transport
(funq : A / R =>
forallx0 : A, in_class q x0 -> q = class_of R x0)
(qglue H)
((funx0 : A =>
(fun (y0 : A) (p : in_class (class_of R x0) y0) =>
qglue p)
:
(funq : A / R =>
forallx1 : A, in_class q x1 -> q = class_of R x1)
(class_of R x0)) x) =
(funx0 : A =>
(fun (y0 : A) (p : in_class (class_of R x0) y0) =>
qglue p)
:
(funq : A / R =>
forallx1 : A, in_class q x1 -> q = class_of R x1)
(class_of R x0)) y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A p: R x y
transport
(funq : A / R =>
forallx : A, in_class q x -> q = class_of R x)
(qglue p)
((funx : A =>
(fun (y : A) (p : in_class (class_of R x) y) =>
qglue p)
:
(funq : A / R =>
forallx0 : A, in_class q x0 -> q = class_of R x0)
(class_of R x)) x) =
(funx : A =>
(fun (y : A) (p : in_class (class_of R x) y) =>
qglue p)
:
(funq : A / R =>
forallx0 : A, in_class q x0 -> q = class_of R x0)
(class_of R x)) y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A p: R x y x0: A x1: in_class (class_of R y) x0
transport
(funq : A / R =>
forallx : A, in_class q x -> q = class_of R x)
(qglue p)
(fun (y : A) (p : in_class (class_of R x) y) =>
qglue p) x0 x1 = qglue x1
apply hset_path2.Defined.
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
forallxy : A, class_of R x = class_of R y -> R x y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
forallxy : A, class_of R x = class_of R y -> R x y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A p: class_of R x = class_of R y
R x y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A p: class_of R x = class_of R y
in_class (class_of R x) y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A p: class_of R y = class_of R y
in_class (class_of R y) y
cbv; reflexivity.Defined.(** Thm 10.1.8 *)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
forallxy : A, R x y <~> class_of R x = class_of R y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
forallxy : A, R x y <~> class_of R x = class_of R y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A
R x y <~> class_of R x = class_of R y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A
R x y -> class_of R x = class_of R y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A
class_of R x = class_of R y -> R x y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A
R x y -> class_of R x = class_of R y
apply qglue.
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x, y: A
class_of R x = class_of R y -> R x y
apply related_quotient_paths.Defined.
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y'
A / R -> A / R -> B
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y'
A / R -> A / R -> B
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y'
A -> A / R -> B
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y'
forallxy : A, R x y -> ?pclass x = ?pclass y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y'
A -> A / R -> B
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y' a: A
A / R -> B
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y' a: A
A -> B
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y' a: A
forallxy : A, R x y -> ?pclass x = ?pclass y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y' a: A
A -> B
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y'
A -> A -> B
assumption.
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y' a: A
forallxy : A, R x y -> dclass a x = dclass a y
byapply (dequiv a a).
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y'
forallxy : A,
R x y ->
(funa : A =>
Quotient_rec R B (dclass a) (dequiv a a (H2 a))) x =
(funa : A =>
Quotient_rec R B (dclass a) (dequiv a a (H2 a))) y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y' x, y: A p: R x y
(funa : A =>
Quotient_rec R B (dclass a) (dequiv a a (H2 a))) x =
(funa : A =>
Quotient_rec R B (dclass a) (dequiv a a (H2 a))) y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y' x, y: A p: R x y
Quotient_rec R B (dclass x) (dequiv x x (H2 x)) ==
Quotient_rec R B (dclass y) (dequiv y y (H2 y))
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y' x, y: A p: R x y
forallx0 : A,
(funq : A / R =>
Quotient_rec R B (dclass x) (dequiv x x (H2 x)) q =
Quotient_rec R B (dclass y) (dequiv y y (H2 y)) q)
(class_of R x0)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y' x, y: A p: R x y
forall (x0y0 : A)
(H4 : R x0 y0),
transport
(funq : A / R =>
Quotient_rec R B (dclass x) (dequiv x x (H2 x)) q =
Quotient_rec R B (dclass y) (dequiv y y (H2 y)) q)
(qglue H4) (?pclass x0) =
?pclass y0
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y' x, y: A p: R x y
forallx0 : A,
(funq : A / R =>
Quotient_rec R B (dclass x) (dequiv x x (H2 x)) q =
Quotient_rec R B (dclass y) (dequiv y y (H2 y)) q)
(class_of R x0)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y' x, y: A p: R x y a: A
Quotient_rec R B (dclass x) (dequiv x x (H2 x))
(class_of R a) =
Quotient_rec R B (dclass y) (dequiv y y (H2 y))
(class_of R a)
byapply dequiv.
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y' x, y: A p: R x y
forall (x0y0 : A) (H : R x0 y0),
transport
(funq : A / R =>
Quotient_rec R B (dclass x) (dequiv x x (H2 x)) q =
Quotient_rec R B (dclass y) (dequiv y y (H2 y)) q)
(qglue H)
(((funa : A => dequiv x y p a a (H2 a))
:
forallx1 : A,
(funq : A / R =>
Quotient_rec R B (dclass x) (dequiv x x (H2 x)) q =
Quotient_rec R B (dclass y) (dequiv y y (H2 y)) q)
(class_of R x1)) x0) =
((funa : A => dequiv x y p a a (H2 a))
:
forallx1 : A,
(funq : A / R =>
Quotient_rec R B (dclass x) (dequiv x x (H2 x)) q =
Quotient_rec R B (dclass y) (dequiv y y (H2 y)) q)
(class_of R x1)) y0
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R H3: Funext B: HSet dclass: A -> A -> B dequiv: forallxx' : A,
R x x' ->
forallyy' : A,
R y y' -> dclass x y = dclass x' y' x, y: A p: R x y a, b: A q: R a b
transport
(funq : A / R =>
Quotient_rec R B (dclass x) (dequiv x x (H2 x)) q =
Quotient_rec R B (dclass y) (dequiv y y (H2 y)) q)
(qglue q)
(((funa : A => dequiv x y p a a (H2 a))
:
forallx0 : A,
(funq : A / R =>
Quotient_rec R B (dclass x) (dequiv x x (H2 x)) q =
Quotient_rec R B (dclass y) (dequiv y y (H2 y)) q)
(class_of R x0)) a) =
((funa : A => dequiv x y p a a (H2 a))
:
forallx0 : A,
(funq : A / R =>
Quotient_rec R B (dclass x) (dequiv x x (H2 x)) q =
Quotient_rec R B (dclass y) (dequiv y y (H2 y)) q)
(class_of R x0)) b
apply path_ishprop.Defined.
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R P: A / R -> Type H3: forallx : A, IsHProp (P (class_of R x)) dclass: forallx : A, P (class_of R x)
forally : A / R, P y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R P: A / R -> Type H3: forallx : A, IsHProp (P (class_of R x)) dclass: forallx : A, P (class_of R x)
forally : A / R, P y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R P: A / R -> Type H3: forallx : A, IsHProp (P (class_of R x)) dclass: forallx : A, P (class_of R x)
forallx : A / R, IsHSet (P x)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R P: A / R -> Type H3: forallx : A, IsHProp (P (class_of R x)) dclass: forallx : A, P (class_of R x)
forall (xy : A) (H : R x y),
transport P (qglue H) (dclass x) = dclass y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R P: A / R -> Type H3: forallx : A, IsHProp (P (class_of R x)) dclass: forallx : A, P (class_of R x)
forallx : A / R, IsHSet (P x)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R P: A / R -> Type H3: forallx : A, IsHProp (P (class_of R x)) dclass: forallx : A, P (class_of R x)
forallx : A,
(funq : A / R => IsHSet (P q)) (class_of R x)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R P: A / R -> Type H3: forallx : A, IsHProp (P (class_of R x)) dclass: forallx : A, P (class_of R x)
forall (xy : A) (H4 : R x y),
transport (funq : A / R => IsHSet (P q))
(qglue H4) (?pclass x) =
?pclass y
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R P: A / R -> Type H3: forallx : A, IsHProp (P (class_of R x)) dclass: forallx : A, P (class_of R x)
forall (xy : A) (H : R x y),
transport (funq : A / R => IsHSet (P q)) (qglue H)
((funx0 : A => istrunc_succ) x) =
(funx0 : A => istrunc_succ) y
intros ???; apply path_ishprop.
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R P: A / R -> Type H3: forallx : A, IsHProp (P (class_of R x)) dclass: forallx : A, P (class_of R x)
forall (xy : A) (H : R x y),
transport P (qglue H) (dclass x) = dclass y
intros; apply path_ishprop.Defined.(** The map class_of : A -> A/R is a surjection. *)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
forallb : A / R, merely (hfiber (class_of R) b)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R
forallx : A,
(funq : A / R =>
trunctype_type (merely (hfiber (class_of R) q)))
(class_of R x)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x: A
(funq : A / R =>
trunctype_type (merely (hfiber (class_of R) q)))
(class_of R x)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R x: A
hfiber (class_of R) (class_of R x)
byexistsx.Defined.(* Universal property of quotient *)(* Lemma 6.10.3 *)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet
(A / R -> B) <~>
{f : A -> B & forallxy : A, R x y -> f x = f y}
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet
(A / R -> B) <~>
{f : A -> B & forallxy : A, R x y -> f x = f y}
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet
(A / R -> B) ->
{f : A -> B & forallxy : A, R x y -> f x = f y}
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet
{f : A -> B & forallxy : A, R x y -> f x = f y} ->
A / R -> B
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet
?f o ?g == idmap
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet
?g o ?f == idmap
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet
(A / R -> B) ->
{f : A -> B & forallxy : A, R x y -> f x = f y}
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet f: A / R -> B
{f : A -> B & forallxy : A, R x y -> f x = f y}
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet f: A / R -> B
forallxy : A,
R x y -> f (class_of R x) = f (class_of R y)
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet f: A / R -> B x, y: A X: R x y
class_of R x = class_of R y
byapply qglue.
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet
{f : A -> B & forallxy : A, R x y -> f x = f y} ->
A / R -> B
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet f: A -> B H': forallxy : A, R x y -> f x = f y
A / R -> B
apply (Quotient_rec _ _ _ H').
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet
(funf : A / R -> B =>
(funx : A => f (class_of R x);
fun (xy : A) (H : R x y) => ap11 1 (qglue H)))
o (funX : {f : A -> B &
forallxy : A, R x y -> f x = f y} =>
(fun (f : A -> B)
(H' : forallxy : A, R x y -> f x = f y) =>
Quotient_rec R B f H') X.1 X.2) == idmap
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet f: A -> B Hf: forallxy : A, R x y -> f x = f y
(funx : A => Quotient_rec R B f Hf (class_of R x);
fun (xy : A) (H : R x y) => ap11 1 (qglue H)) =
(f; Hf)
byapply equiv_path_sigma_hprop.
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet
(funX : {f : A -> B &
forallxy : A, R x y -> f x = f y} =>
(fun (f : A -> B)
(H' : forallxy : A, R x y -> f x = f y) =>
Quotient_rec R B f H') X.1 X.2)
o (funf : A / R -> B =>
(funx : A => f (class_of R x);
fun (xy : A) (H : R x y) => ap11 1 (qglue H))) ==
idmap
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet f: A / R -> B
Quotient_rec R B (funx : A => f (class_of R x))
(fun (xy : A) (H : R x y) => ap11 1 (qglue H)) = f
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet f: A / R -> B
Quotient_rec R B (funx : A => f (class_of R x))
(fun (xy : A) (H : R x y) => ap11 1 (qglue H)) == f
H: Univalence A: Type R: Relation A is_mere_relation0: is_mere_relation A R H0: Transitive R H1: Symmetric R H2: Reflexive R B: HSet f: A / R -> B
forallx : A,
(funq : A / R =>
Quotient_rec R B (funx0 : A => f (class_of R x0))
(fun (x0y : A) (H : R x0 y) => ap11 1 (qglue H)) q =
f q) (class_of R x)
reflexivity.Defined.(** TODO: The equivalence with VVquotient [A//R]. 10.1.10. Equivalence Relations are effective and there is an equivalence [A/R<~>A//R]. This will need propositional resizing if we don't want to raise the universe level.*)(** The theory of canonical quotients is developed by C.Cohen: http://perso.crans.org/cohen/work/quotients/ *)EndEquiv.SectionFunctoriality.(* TODO: Develop a notion of set with Relation and use that instead of manually adding Relation preserving conditions. *)
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y -> S (f x) (f y)
A / R -> B / S
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y -> S (f x) (f y)
A / R -> B / S
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y -> S (f x) (f y)
forallxy : A,
R x y -> class_of S (f x) = class_of S (f y)
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y -> S (f x) (f y) x, y: A r: R x y
class_of S (f x) = class_of S (f y)
apply qglue, fresp, r.Defined.
A: Type R: Relation A
Quotient_functor R R idmap (funxy : A => idmap) ==
idmap
A: Type R: Relation A
Quotient_functor R R idmap (funxy : A => idmap) ==
idmap
by srapply Quotient_ind_hprop.Defined.
A: Type R: Relation A B: Type S: Relation B C: Type T: Relation C f: A -> B fresp: forallxy : A, R x y -> S (f x) (f y) g: B -> C gresp: forallxy : B, S x y -> T (g x) (g y)
Quotient_functor R T (g o f)
(funxy : A => gresp (f x) (f y) o fresp x y) ==
Quotient_functor S T g gresp
o Quotient_functor R S f fresp
A: Type R: Relation A B: Type S: Relation B C: Type T: Relation C f: A -> B fresp: forallxy : A, R x y -> S (f x) (f y) g: B -> C gresp: forallxy : B, S x y -> T (g x) (g y)
Quotient_functor R T (g o f)
(funxy : A => gresp (f x) (f y) o fresp x y) ==
Quotient_functor S T g gresp
o Quotient_functor R S f fresp
by srapply Quotient_ind_hprop.Defined.Context {A : Type} (R : Relation A)
{B : Type} (S : Relation B).
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f
IsEquiv
(Quotient_functor R S f
(funxy : A => fst (fresp x y)))
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f
IsEquiv
(Quotient_functor R S f
(funxy : A => fst (fresp x y)))
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f
forallxy : B, S x y -> R (f^-1 x) (f^-1 y)
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f
Quotient_functor R S f
(funxy : A => fst (fresp x y))
o Quotient_functor S R f^-1?fresp == idmap
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f
Quotient_functor S R f^-1?fresp
o Quotient_functor R S f
(funxy : A => fst (fresp x y)) == idmap
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f
forallxy : B, S x y -> R (f^-1 x) (f^-1 y)
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f u, v: B s: S u v
R (f^-1 u) (f^-1 v)
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f u, v: B s: S u v
S (f (f^-1 u)) (f (f^-1 v))
abstract (do2rewrite eisretr; apply s).
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f
Quotient_functor R S f
(funxy : A => fst (fresp x y))
o Quotient_functor S R f^-1
(fun (uv : B) (s : S u v) =>
snd (fresp (f^-1 u) (f^-1 v))
(isequiv_quotient_functor_subproof f H u v s)) ==
idmap
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f
Quotient_functor S R f^-1
(fun (uv : B) (s : S u v) =>
snd (fresp (f^-1 u) (f^-1 v))
(isequiv_quotient_functor_subproof f H u v s))
o Quotient_functor R S f
(funxy : A => fst (fresp x y)) == idmap
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f
forallx : B,
(funq : B / S =>
(Quotient_functor R S f
(funx0y : A => fst (fresp x0 y))
o Quotient_functor S R f^-1
(fun (uv : B) (s : S u v) =>
snd (fresp (f^-1 u) (f^-1 v))
(isequiv_quotient_functor_subproof f H u v s)))
q = idmap q) (class_of S x)
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f
forall (xy : B) (H0 : S x y),
transport
(funq : B / S =>
(Quotient_functor R S f
(funx0y0 : A => fst (fresp x0 y0))
o Quotient_functor S R f^-1
(fun (uv : B) (s : S u v) =>
snd (fresp (f^-1 u) (f^-1 v))
(isequiv_quotient_functor_subproof f H u v
s))) q = idmap q)
(qglue H0) (?pclass x) =
?pclass y
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f
forallx : A,
(funq : A / R =>
(Quotient_functor S R f^-1
(fun (uv : B) (s : S u v) =>
snd (fresp (f^-1 u) (f^-1 v))
(isequiv_quotient_functor_subproof f H u v s))
o Quotient_functor R S f
(funx0y : A => fst (fresp x0 y))) q =
idmap q) (class_of R x)
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f
forall (xy : A) (H0 : R x y),
transport
(funq : A / R =>
(Quotient_functor S R f^-1
(fun (uv : B) (s : S u v) =>
snd (fresp (f^-1 u) (f^-1 v))
(isequiv_quotient_functor_subproof f H u v s))
o Quotient_functor R S f
(funx0y0 : A => fst (fresp x0 y0))) q =
idmap q) (qglue H0) (?pclass0 x) =
?pclass0 y
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f
forallx : B,
(funq : B / S =>
(Quotient_functor R S f
(funx0y : A => fst (fresp x0 y))
o Quotient_functor S R f^-1
(fun (uv : B) (s : S u v) =>
snd (fresp (f^-1 u) (f^-1 v))
(isequiv_quotient_functor_subproof f H u v s)))
q = idmap q) (class_of S x)
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f b: B
class_of S (f (f^-1 b)) = class_of S b
apply ap, eisretr.
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f
forall (xy : B) (H0 : S x y),
transport
(funq : B / S =>
(Quotient_functor R S f
(funx0y0 : A => fst (fresp x0 y0))
o Quotient_functor S R f^-1
(fun (uv : B) (s : S u v) =>
snd (fresp (f^-1 u) (f^-1 v))
(isequiv_quotient_functor_subproof f H u v
s))) q = idmap q) (qglue H0)
((funb : B =>
ap (class_of S) (eisretr f b)
:
(funq : B / S =>
(Quotient_functor R S f
(funx0y0 : A => fst (fresp x0 y0))
o Quotient_functor S R f^-1
(fun (uv : B) (s : S u v) =>
snd (fresp (f^-1 u) (f^-1 v))
(isequiv_quotient_functor_subproof f H u
v s))) q = idmap q) (class_of S b)) x) =
(funb : B =>
ap (class_of S) (eisretr f b)
:
(funq : B / S =>
(Quotient_functor R S f
(funx0y0 : A => fst (fresp x0 y0))
o Quotient_functor S R f^-1
(fun (uv : B) (s : S u v) =>
snd (fresp (f^-1 u) (f^-1 v))
(isequiv_quotient_functor_subproof f H u v s)))
q = idmap q) (class_of S b)) y
intros; apply path_ishprop.
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f
forallx : A,
(funq : A / R =>
(Quotient_functor S R f^-1
(fun (uv : B) (s : S u v) =>
snd (fresp (f^-1 u) (f^-1 v))
(isequiv_quotient_functor_subproof f H u v s))
o Quotient_functor R S f
(funx0y : A => fst (fresp x0 y))) q = idmap q)
(class_of R x)
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f a: A
class_of R (f^-1 (f a)) = class_of R a
apply ap, eissect.
A: Type R: Relation A B: Type S: Relation B f: A -> B fresp: forallxy : A, R x y <-> S (f x) (f y) H: IsEquiv f
forall (xy : A) (H0 : R x y),
transport
(funq : A / R =>
(Quotient_functor S R f^-1
(fun (uv : B) (s : S u v) =>
snd (fresp (f^-1 u) (f^-1 v))
(isequiv_quotient_functor_subproof f H u v s))
o Quotient_functor R S f
(funx0y0 : A => fst (fresp x0 y0))) q =
idmap q) (qglue H0)
((funa : A =>
ap (class_of R) (eissect f a)
:
(funq : A / R =>
(Quotient_functor S R f^-1
(fun (uv : B) (s : S u v) =>
snd (fresp (f^-1 u) (f^-1 v))
(isequiv_quotient_functor_subproof f H u v
s))
o Quotient_functor R S f
(funx0y0 : A => fst (fresp x0 y0))) q =
idmap q) (class_of R a)) x) =
(funa : A =>
ap (class_of R) (eissect f a)
:
(funq : A / R =>
(Quotient_functor S R f^-1
(fun (uv : B) (s : S u v) =>
snd (fresp (f^-1 u) (f^-1 v))
(isequiv_quotient_functor_subproof f H u v s))
o Quotient_functor R S f
(funx0y0 : A => fst (fresp x0 y0))) q =
idmap q) (class_of R a)) y
intros; apply path_ishprop.Defined.Definitionequiv_quotient_functor (f : A -> B) `{IsEquiv _ _ f}
(fresp : forallxy, R x y <-> S (f x) (f y))
: Quotient R <~> Quotient S
:= Build_Equiv _ _ (Quotient_functor R S f (funxy => fst (fresp x y))) _.Definitionequiv_quotient_functor' (f : A <~> B)
(fresp : forallxy, R x y <-> S (f x) (f y))
: Quotient R <~> Quotient S
:= equiv_quotient_functor f fresp.EndFunctoriality.SectionKernel.(** ** Quotients of kernels of maps to sets give a surjection/mono factorization. *)(** Because the statement uses nested Sigma types, we need several variables to serve as [max] and [u+1]. We write [ar] for [max(a,r)], [ar'] for [ar+1], etc. *)Universes a r ar ar' b ab abr.Constrainta <= ar, r <= ar, ar < ar', a <= ab, b <= ab, ab <= abr, ar <= abr.Context `{Funext}.(** A function we want to factor. *)Context {A : Type@{a}} {B : Type@{b}} `{IsHSet B} (f : A -> B).(** A mere Relation equivalent to its kernel. *)Context (R : Relation@{a r} A)
(is_ker : forallxy, f x = f y <~> R x y).(** The factorization theorem. An advantage of stating it as one bundled result is that it is easier to state variations as we do below. Disadvantages are that it requires more universe variables and that each piece of the answer depends on [Funext] and all of the universe variables, even when these aren't needed for that piece. Below we will clean up the universe variables slightly, so we make this version [Local]. *)
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y
{C : Type &
{e : A -> C &
{m : C -> B &
IsHSet C * ReflectiveSubuniverse.IsConnMap (Tr (-1)) e *
IsEmbedding m * (f = m o e)}}}
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y
{C : Type &
{e : A -> C &
{m : C -> B &
IsHSet C * ReflectiveSubuniverse.IsConnMap (Tr (-1)) e *
IsEmbedding m * (f = m o e)}}}
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y
{e : A -> A / R &
{m : A / R -> B &
IsHSet (A / R) *
ReflectiveSubuniverse.IsConnMap (Tr (-1)) e *
IsEmbedding m * (f = (funx : A => m (e x)))}}
(* [exists (class_of R)] works, but the next line reduces the universe variables in a way that makes Coq 8.18 and 8.19 compatible. *)
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y
{m : A / R -> B &
IsHSet (A / R) *
ReflectiveSubuniverse.IsConnMap (Tr (-1)) (class_of R) *
IsEmbedding m * (f = (funx : A => m (class_of R x)))}
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y
A / R -> B
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y
(funm : A / R -> B =>
IsHSet (A / R) *
ReflectiveSubuniverse.IsConnMap
(Tr (-1)) (class_of R) *
IsEmbedding m * (f = (funx : A => m (class_of R x))))
?proj1
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y
A / R -> B
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y
forall (xy : A) (H : R x y),
transport (fun_ : A / R => B) (qglue H) (f x) = f y
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y x, y: A p: R x y
transport (fun_ : A / R => B) (qglue p) (f x) = f y
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y x, y: A p: R x y
f x = f y
exact ((is_ker x y)^-1 p).
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y
(funm : A / R -> B =>
IsHSet (A / R) *
ReflectiveSubuniverse.IsConnMap (Tr (-1))
(class_of R) * IsEmbedding m *
(f = (funx : A => m (class_of R x))))
(Quotient_ind R (fun_ : A / R => B) f
(fun (xy : A) (p : R x y) =>
transport_const (qglue p) (f x) @
(is_ker x y)^-1 p))
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y
IsEmbedding
(Quotient_ind R (fun_ : A / R => B) f
(fun (xy : A) (p : R x y) =>
transport_const (qglue p) (f x) @
(is_ker x y)^-1 p))
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y u: B
IsHProp
(hfiber
(Quotient_ind R (fun_ : A / R => B) f
(fun (xy : A) (p : R x y) =>
transport_const (qglue p) (f x) @
(is_ker x y)^-1 p)) u)
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y u: B
forall
(x : hfiber
(Quotient_ind R (fun_ : A / R => B) f
(fun (xy : A) (p : R x y) =>
transport_const (qglue p) (f x) @
(is_ker x y)^-1 p)) u)
(y : hfiber
(Quotient_ind R (fun_ : A / R => B) f
(fun (x0y : A) (p : R x0 y) =>
transport_const (qglue p) (f x0) @
(is_ker x0 y)^-1 p)) u), x = y
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y u: B x: A / R q: Quotient_ind R (fun_ : A / R => B) f
(fun (xy : A) (p : R x y) =>
transport_const (qglue p) (f x) @
(is_ker x y)^-1 p) x = u y: A / R p': Quotient_ind R (fun_ : A / R => B) f
(fun (xy : A) (p : R x y) =>
transport_const (qglue p) (f x) @
(is_ker x y)^-1 p) y = u
(x; q) = (y; p')
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y u: B x: A / R q: Quotient_ind R (fun_ : A / R => B) f
(fun (xy : A) (p : R x y) =>
transport_const (qglue p) (f x) @
(is_ker x y)^-1 p) x = u y: A / R p': Quotient_ind R (fun_ : A / R => B) f
(fun (xy : A) (p : R x y) =>
transport_const (qglue p) (f x) @
(is_ker x y)^-1 p) y = u
x = y
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y u: B
forallxy : A / R,
Quotient_ind R (fun_ : A / R => B) f
(fun (x0y0 : A) (p : R x0 y0) =>
transport_const (qglue p) (f x0) @
(is_ker x0 y0)^-1 p) x = u ->
Quotient_ind R (fun_ : A / R => B) f
(fun (x0y0 : A) (p : R x0 y0) =>
transport_const (qglue p) (f x0) @
(is_ker x0 y0)^-1 p) y = u -> x = y
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y u: B
forallx : A,
(funq : A / R =>
forally : A / R,
Quotient_ind R (fun_ : A / R => B) f
(fun (x0y0 : A) (p : R x0 y0) =>
transport_const (qglue p) (f x0) @
(is_ker x0 y0)^-1 p) q = u ->
Quotient_ind R (fun_ : A / R => B) f
(fun (x0y0 : A) (p : R x0 y0) =>
transport_const (qglue p) (f x0) @
(is_ker x0 y0)^-1 p) y = u -> q = y)
(class_of R x)
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y u: B
forall (xy : A) (H0 : R x y),
transport
(funq : A / R =>
forally0 : A / R,
Quotient_ind R (fun_ : A / R => B) f
(fun (x0y1 : A) (p : R x0 y1) =>
transport_const (qglue p) (f x0) @
(is_ker x0 y1)^-1 p) q = u ->
Quotient_ind R (fun_ : A / R => B) f
(fun (x0y1 : A) (p : R x0 y1) =>
transport_const (qglue p) (f x0) @
(is_ker x0 y1)^-1 p) y0 = u ->
q = y0) (qglue H0) (?pclass x) =
?pclass y
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y u: B
forallx : A,
(funq : A / R =>
forally : A / R,
Quotient_ind R (fun_ : A / R => B) f
(fun (x0y0 : A) (p : R x0 y0) =>
transport_const (qglue p) (f x0) @
(is_ker x0 y0)^-1 p) q = u ->
Quotient_ind R (fun_ : A / R => B) f
(fun (x0y0 : A) (p : R x0 y0) =>
transport_const (qglue p) (f x0) @
(is_ker x0 y0)^-1 p) y = u -> q = y)
(class_of R x)
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y u: B a: A
(funq : A / R =>
forally : A / R,
Quotient_ind R (fun_ : A / R => B) f
(fun (xy0 : A) (p : R x y0) =>
transport_const (qglue p) (f x) @
(is_ker x y0)^-1 p) q = u ->
Quotient_ind R (fun_ : A / R => B) f
(fun (xy0 : A) (p : R x y0) =>
transport_const (qglue p) (f x) @
(is_ker x y0)^-1 p) y = u -> q = y) (class_of R a)
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y u: B a: A
forallx : A,
(funq : A / R =>
Quotient_ind R (fun_ : A / R => B) f
(fun (x0y : A) (p : R x0 y) =>
transport_const (qglue p) (f x0) @
(is_ker x0 y)^-1 p) (class_of R a) = u ->
Quotient_ind R (fun_ : A / R => B) f
(fun (x0y : A) (p : R x0 y) =>
transport_const (qglue p) (f x0) @
(is_ker x0 y)^-1 p) q = u -> class_of R a = q)
(class_of R x)
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y u: B a: A
forall (xy : A) (H0 : R x y),
transport
(funq : A / R =>
Quotient_ind R (fun_ : A / R => B) f
(fun (x0y0 : A) (p : R x0 y0) =>
transport_const (qglue p) (f x0) @
(is_ker x0 y0)^-1 p)
(class_of R a) = u ->
Quotient_ind R (fun_ : A / R => B) f
(fun (x0y0 : A) (p : R x0 y0) =>
transport_const (qglue p) (f x0) @
(is_ker x0 y0)^-1 p) q = u ->
class_of R a = q) (qglue H0)
(?pclass x) = ?pclass y
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y u: B a: A
forallx : A,
(funq : A / R =>
Quotient_ind R (fun_ : A / R => B) f
(fun (x0y : A) (p : R x0 y) =>
transport_const (qglue p) (f x0) @
(is_ker x0 y)^-1 p) (class_of R a) = u ->
Quotient_ind R (fun_ : A / R => B) f
(fun (x0y : A) (p : R x0 y) =>
transport_const (qglue p) (f x0) @
(is_ker x0 y)^-1 p) q = u -> class_of R a = q)
(class_of R x)
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y u: B a, a': A p: Quotient_ind R (fun_ : A / R => B) f
(fun (xy : A) (p : R x y) =>
transport_const (qglue p) (f x) @
(is_ker x y)^-1 p) (class_of R a) = u p': Quotient_ind R (fun_ : A / R => B) f
(fun (xy : A) (p : R x y) =>
transport_const (qglue p) (f x) @
(is_ker x y)^-1 p) (class_of R a') = u
class_of R a = class_of R a'
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B R: Relation A is_ker: forallxy : A, f x = f y <~> R x y u: B a, a': A p: Quotient_ind R (fun_ : A / R => B) f
(fun (xy : A) (p : R x y) =>
transport_const (qglue p) (f x) @
(is_ker x y)^-1 p) (class_of R a) = u p': Quotient_ind R (fun_ : A / R => B) f
(fun (xy : A) (p : R x y) =>
transport_const (qglue p) (f x) @
(is_ker x y)^-1 p) (class_of R a') = u
f a = f a'
exact (p @ p'^).Defined.(** We clean up the universe variables here, using only those declared in this Section. *)Definitionquotient_kernel_factor_general@{|}
:= Evalunfold quotient_kernel_factor_internal in
quotient_kernel_factor_internal@{ar' ar abr abr ab}.EndKernel.(** A common special case of [quotient_kernel_factor] is when we define [R] to be [f x = f y]. Then universes [r] and [b] are unified. *)
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B
{C : Type &
{e : A -> C &
{m : C -> B &
IsHSet C * ReflectiveSubuniverse.IsConnMap (Tr (-1)) e *
IsEmbedding m * (f = m o e)}}}
H: Funext A, B: Type IsHSet0: IsHSet B f: A -> B
{C : Type &
{e : A -> C &
{m : C -> B &
IsHSet C * ReflectiveSubuniverse.IsConnMap (Tr (-1)) e *
IsEmbedding m * (f = m o e)}}}
exact (quotient_kernel_factor_general@{a b ab ab' b ab ab}
f (funxy => f x = f y) (funxy => equiv_idmap)).Defined.(** If we use propositional resizing, we can replace [f x = f y] with a proposition [R x y] in universe [a], so that the universe of [C] is the same as the universe of [A]. *)
H: Funext H0: PropResizing A, B: Type IsHSet0: IsHSet B f: A -> B
{C : Type &
{e : A -> C &
{m : C -> B &
IsHSet C * ReflectiveSubuniverse.IsConnMap (Tr (-1)) e *
IsEmbedding m * (f = m o e)}}}
H: Funext H0: PropResizing A, B: Type IsHSet0: IsHSet B f: A -> B
{C : Type &
{e : A -> C &
{m : C -> B &
IsHSet C * ReflectiveSubuniverse.IsConnMap (Tr (-1)) e *
IsEmbedding m * (f = m o e)}}}
exact (quotient_kernel_factor_general@{a a a a' b ab ab}
f (funxy => resize_hprop@{b a} (f x = f y)) (funxy => equiv_resize_hprop _)).Defined.