Built with Alectryon, running Coq+SerAPI v8.19.0+0.19.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 Truncations.Core Truncations.SeparatedTrunc.Require Import Modalities.Modality Modalities.Identity.Require Import Limits.Pullback.(** * Projective types *)(** To quantify over all truncation levels including infinity, we parametrize [IsOProjective] by a [Modality]. When specializing to [IsOProjective purely] we get an (oo,-1)-projectivity predicate, [IsProjective]. When specializing to [IsOProjective (Tr n)] we get an (n,-1)-projectivity predicate, [IsTrProjective]. *)DefinitionIsOProjective (O : Modality) (X : Type) : Type
:= forallA, In O A -> forallB, In O B ->
forallf : X -> B, forallp : A -> B,
IsSurjection p -> merely (existss : X -> A, p o s == f).(** (oo,-1)-projectivity. *)NotationIsProjective := (IsOProjective purely).(** (n,-1)-projectivity. *)NotationIsTrProjective n := (IsOProjective (Tr n)).(** A type X is projective if and only if surjections into X merely split. *)
O: Modality X: Type H: In O X
IsOProjective O X <->
(forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely {s : X -> Y & p o s == idmap})
O: Modality X: Type H: In O X
IsOProjective O X <->
(forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely {s : X -> Y & p o s == idmap})
O: Modality X: Type H: In O X
IsOProjective O X ->
forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely {s : X -> Y & (funx : X => p (s x)) == idmap}
O: Modality X: Type H: In O X
(forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely {s : X -> Y & (funx : X => p (s x)) == idmap}) ->
IsOProjective O X
O: Modality X: Type H: In O X
IsOProjective O X ->
forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely {s : X -> Y & (funx : X => p (s x)) == idmap}
O: Modality X: Type H: In O X isprojX: forallA : Type,
In O A ->
forallB : Type,
In O B ->
forall (f : X -> B) (p : A -> B),
IsConnMap (Tr (-1)) p ->
merely
{s : X -> A & (funx : X => p (s x)) == f} Y: Type oY: In O Y p: Y -> X S: IsConnMap (Tr (-1)) p
merely {s : X -> Y & (funx : X => p (s x)) == idmap}
exact (isprojX Y _ X _ idmap p S).
O: Modality X: Type H: In O X
(forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely {s : X -> Y & (funx : X => p (s x)) == idmap}) ->
IsOProjective O X
O: Modality X: Type H: In O X splits: forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely
{s : X -> Y &
(funx : X => p (s x)) == idmap}
IsOProjective O X
O: Modality X: Type H: In O X splits: forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely
{s : X -> Y &
(funx : X => p (s x)) == idmap}
forallA : Type,
In O A ->
forallB : Type,
In O B ->
forall (f : X -> B) (p : A -> B),
IsConnMap (Tr (-1)) p ->
merely {s : X -> A & (funx : X => p (s x)) == f}
O: Modality X: Type H: In O X splits: forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely
{s : X -> Y &
(funx : X => p (s x)) == idmap} A: Type oA: In O A B: Type oB: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p
merely {s : X -> A & (funx : X => p (s x)) == f}
O: Modality X: Type H: In O X splits: forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely
{s : X -> Y &
(funx : X => p (s x)) == idmap} A: Type oA: In O A B: Type oB: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p s': merely
{s : X -> Pullback p f &
(funx : X => pullback_pr2 (s x)) == idmap}
merely {s : X -> A & (funx : X => p (s x)) == f}
O: Modality X: Type H: In O X splits: forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely
{s : X -> Y &
(funx : X => p (s x)) == idmap} A: Type oA: In O A B: Type oB: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p s': {s : X -> Pullback p f &
(funx : X => pullback_pr2 (s x)) == idmap}
merely {s : X -> A & (funx : X => p (s x)) == f}
O: Modality X: Type H: In O X splits: forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely
{s : X -> Y &
(funx : X => p (s x)) == idmap} A: Type oA: In O A B: Type oB: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p s: X -> Pullback p f E: (funx : X => pullback_pr2 (s x)) == idmap
merely {s : X -> A & (funx : X => p (s x)) == f}
O: Modality X: Type H: In O X splits: forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely
{s : X -> Y &
(funx : X => p (s x)) == idmap} A: Type oA: In O A B: Type oB: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p s: X -> Pullback p f E: (funx : X => pullback_pr2 (s x)) == idmap
(funx : X => p (pullback_pr1 (s x))) == f
O: Modality X: Type H: In O X splits: forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely
{s : X -> Y &
(funx : X => p (s x)) == idmap} A: Type oA: In O A B: Type oB: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p s: X -> Pullback p f E: (funx : X => pullback_pr2 (s x)) == idmap x: X
p (pullback_pr1 (s x)) = f x
O: Modality X: Type H: In O X splits: forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely
{s : X -> Y &
(funx : X => p (s x)) == idmap} A: Type oA: In O A B: Type oB: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p s: X -> Pullback p f E: (funx : X => pullback_pr2 (s x)) == idmap x: X
f (pullback_pr2 (s x)) = f x
O: Modality X: Type H: In O X splits: forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely
{s : X -> Y &
(funx : X => p (s x)) == idmap} A: Type oA: In O A B: Type oB: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p s: X -> Pullback p f E: (funx : X => pullback_pr2 (s x)) == idmap x: X
pullback_pr2 (s x) = x
apply E.Defined.
H: Funext O: Modality X: Type H0: In O X
IsOProjective O X <~>
(forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely {s : X -> Y & p o s == idmap})
H: Funext O: Modality X: Type H0: In O X
IsOProjective O X <~>
(forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely {s : X -> Y & p o s == idmap})
exact (equiv_iff_hprop_uncurried (iff_isoprojective_surjections_split O X)).Defined.(** ** Projectivity and the axiom of choice *)(** In topos theory, an object X is said to be projective if the axiom of choice holds when making choices indexed by X. We will refer to this as [HasOChoice], to avoid confusion with [IsOProjective] above. In similarity with [IsOProjective], we parametrize it by a [Modality]. *)ClassHasOChoice (O : Modality) (A : Type) :=
hasochoice :
forall (B : A -> Type), (forallx, In O (B x)) ->
(forallx, merely (B x)) -> merely (forallx, B x).(** (oo,-1)-choice. *)NotationHasChoice := (HasOChoice purely).(** (n,-1)-choice. *)NotationHasTrChoice n := (HasOChoice (Tr n)).
H: Funext A: Type B: A -> Type O: Modality chA: HasOChoice O A chB: foralla : A, HasOChoice O (B a)
HasOChoice O {a : A & B a}
H: Funext A: Type B: A -> Type O: Modality chA: HasOChoice O A chB: foralla : A, HasOChoice O (B a)
HasOChoice O {a : A & B a}
H: Funext A: Type B: A -> Type O: Modality chA: HasOChoice O A chB: foralla : A, HasOChoice O (B a) C: {a : A & B a} -> Type sC: forallx : {a : A & B a}, In O (C x) f: forallx : {a : A & B a}, merely (C x)
merely (forallx : {a : A & B a}, C x)
H: Funext A: Type B: A -> Type O: Modality chA: HasOChoice O A chB: foralla : A, HasOChoice O (B a) C: {a : A & B a} -> Type sC: forallx : {a : A & B a}, In O (C x) f: forallx : {a : A & B a}, merely (C x) f':= funa : A =>
chB a (funb : B a => C (a; b))
(funx : B a => sC (a; x))
(funb : B a => f (a; b)): foralla : A,
merely
(forallx : B a, (funb : B a => C (a; b)) x)
merely (forallx : {a : A & B a}, C x)
H: Funext A: Type B: A -> Type O: Modality C: {a : A & B a} -> Type chA: merely
(forallx : A, (funa : A => forallb : (funa0 : A => B a0) a, C (a; b)) x) chB: foralla : A, HasOChoice O (B a) sC: forallx : {a : A & B a}, In O (C x) f: forallx : {a : A & B a}, merely (C x) f':= funa : A =>
chB a (funb : B a => C (a; b))
(funx : B a => sC (a; x))
(funb : B a => f (a; b)): foralla : A,
merely
(forallx : B a, (funb : B a => C (a; b)) x)
merely (forallx : {a : A & B a}, C x)
H: Funext A: Type B: A -> Type O: Modality C: {a : A & B a} -> Type chB: foralla : A, HasOChoice O (B a) sC: forallx : {a : A & B a}, In O (C x) f: forallx : {a : A & B a}, merely (C x) f':= funa : A =>
chB a (funb : B a => C (a; b))
(funx : B a => sC (a; x))
(funb : B a => f (a; b)): foralla : A,
merely
(forallx : B a, (funb : B a => C (a; b)) x) chA: forall (x : A) (b : B x), C (x; b)
merely (forallx : {a : A & B a}, C x)
H: Funext A: Type B: A -> Type O: Modality C: {a : A & B a} -> Type chB: foralla : A, HasOChoice O (B a) sC: forallx : {a : A & B a}, In O (C x) f: forallx : {a : A & B a}, merely (C x) f':= funa : A =>
chB a (funb : B a => C (a; b))
(funx : B a => sC (a; x))
(funb : B a => f (a; b)): foralla : A,
merely
(forallx : B a, (funb : B a => C (a; b)) x) chA: forall (x : A) (b : B x), C (x; b)
forallx : {a : A & B a}, C x
H: Funext A: Type B: A -> Type O: Modality C: {a : A & B a} -> Type chB: foralla : A, HasOChoice O (B a) sC: forallx : {a : A & B a}, In O (C x) f: forallx : {a : A & B a}, merely (C x) f':= funa : A =>
chB a (funb : B a => C (a; b))
(funx : B a => sC (a; x))
(funb : B a => f (a; b)): foralla : A,
merely
(forallx : B a, (funb : B a => C (a; b)) x) chA: forall (x : A) (b : B x), C (x; b) x: {a : A & B a}
C x
apply chA.Defined.
O: Modality X: Type
HasOChoice O X -> IsOProjective O X
O: Modality X: Type
HasOChoice O X -> IsOProjective O X
O: Modality X: Type chX: HasOChoice O X A: Type X0: In O A B: Type X1: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p
merely {s : X -> A & (funx : X => p (s x)) == f}
O: Modality X: Type chX: HasOChoice O X A: Type X0: In O A B: Type X1: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p
merely (forallx : X, hfiber p (f x))
O: Modality X: Type chX: HasOChoice O X A: Type X0: In O A B: Type X1: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p g: merely (forallx : X, hfiber p (f x))
merely {s : X -> A & (funx : X => p (s x)) == f}
O: Modality X: Type chX: HasOChoice O X A: Type X0: In O A B: Type X1: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p
merely (forallx : X, hfiber p (f x))
O: Modality X: Type chX: HasOChoice O X A: Type X0: In O A B: Type X1: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p
forallx : X, merely (hfiber p (f x))
O: Modality X: Type chX: HasOChoice O X A: Type X0: In O A B: Type X1: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p x: X
merely (hfiber p (f x))
exact (center _).
O: Modality X: Type chX: HasOChoice O X A: Type X0: In O A B: Type X1: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p g: merely (forallx : X, hfiber p (f x))
merely {s : X -> A & (funx : X => p (s x)) == f}
O: Modality X: Type chX: HasOChoice O X A: Type X0: In O A B: Type X1: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p g: forallx : X, hfiber p (f x)
{s : X -> A & (funx : X => p (s x)) == f}
O: Modality X: Type chX: HasOChoice O X A: Type X0: In O A B: Type X1: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p g: forallx : X, hfiber p (f x)
(funx : X => p (g x).1) == f
O: Modality X: Type chX: HasOChoice O X A: Type X0: In O A B: Type X1: In O B f: X -> B p: A -> B S: IsConnMap (Tr (-1)) p g: forallx : X, hfiber p (f x) x: X
p (g x).1 = f x
exact (g x).2.Defined.
O: Modality X: Type H: In O X
IsOProjective O X -> HasOChoice O X
O: Modality X: Type H: In O X
IsOProjective O X -> HasOChoice O X
O: Modality X: Type H: In O X
(forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely {s : X -> Y & (funx : X => p (s x)) == idmap}) ->
HasOChoice O X
O: Modality X: Type H: In O X splits: forallY : Type,
In O Y ->
forallp : Y -> X,
IsConnMap (Tr (-1)) p ->
merely
{s : X -> Y &
(funx : X => p (s x)) == idmap} P: X -> Type oP: forallx : X, In O (P x) S: forallx : X, merely (P x)
merely (forallx : X, P x)
O: Modality X: Type H: In O X P: X -> Type splits: In O {x : X & P x} ->
IsConnMap (Tr (-1)) pr1 ->
merely
{s : X -> {x : X & P x} &
(funx : X => (s x).1) == idmap} oP: forallx : X, In O (P x) S: forallx : X, merely (P x)
merely (forallx : X, P x)
O: Modality X: Type H: In O X P: X -> Type splits: In O {x : X & P x} ->
IsConnMap (Tr (-1)) pr1 ->
merely
{s : X -> {x : X & P x} &
(funx : X => (s x).1) == idmap} oP: forallx : X, In O (P x) S: forallx : X, merely (P x) M: merely
{s : X -> {x : X & P x} &
(funx : X => (s x).1) == idmap}
merely (forallx : X, P x)
O: Modality X: Type H: In O X P: X -> Type oP: forallx : X, In O (P x) M: merely
{s : X -> {x : X & P x} &
(funx : X => (s x).1) == idmap}
merely (forallx : X, P x)
O: Modality X: Type H: In O X P: X -> Type oP: forallx : X, In O (P x) M: {s : X -> {x : X & P x} &
(funx : X => (s x).1) == idmap}
forallx : X, P x
O: Modality X: Type H: In O X P: X -> Type oP: forallx : X, In O (P x) s: X -> {x : X & P x} p: (funx : X => (s x).1) == idmap
forallx : X, P x
O: Modality X: Type H: In O X P: X -> Type oP: forallx : X, In O (P x) s: X -> {x : X & P x} p: (funx : X => (s x).1) == idmap x: X
P x
exact (transport _ (p x) (s x).2).Defined.
O: Modality X: Type H: In O X
IsOProjective O X <-> HasOChoice O X
O: Modality X: Type H: In O X
IsOProjective O X <-> HasOChoice O X
O: Modality X: Type H: In O X
IsOProjective O X -> HasOChoice O X
O: Modality X: Type H: In O X
HasOChoice O X -> IsOProjective O X
O: Modality X: Type H: In O X
IsOProjective O X -> HasOChoice O X
O: Modality X: Type H: In O X
In O X
exact _.
O: Modality X: Type H: In O X
HasOChoice O X -> IsOProjective O X
apply isoprojective_ochoice.Defined.
H: Funext O: Modality X: Type H0: In O X
IsOProjective O X <~> HasOChoice O X
H: Funext O: Modality X: Type H0: In O X
IsOProjective O X <~> HasOChoice O X
H: Funext O: Modality X: Type H0: In O X
IsHProp (HasOChoice O X)
exact istrunc_forall.Defined.
IsProjective Unit
IsProjective Unit
HasChoice Unit
P: Unit -> Type trP: forallx : Unit, In purely (P x) S: forallx : Unit, merely (P x)
merely (forallx : Unit, P x)
P: Unit -> Type trP: forallx : Unit, In purely (P x) S: merely (P tt)
merely (forallx : Unit, P x)
P: Unit -> Type trP: forallx : Unit, In purely (P x) S: P tt
forallx : Unit, P x
P: Unit -> Type trP: forallx : Unit, In purely (P x) S: P tt
P tt
exact S.Defined.SectionAC_oo_neg1.(** ** Projectivity and AC_(oo,-1) (defined in HoTT book, Exercise 7.8) *)(* TODO: Generalize to n, m. *)Context {AC : forallX : HSet, HasChoice X}.(** (Exercise 7.9) Assuming AC_(oo,-1) every type merely has a projective cover. *)
AC: forallX : HSet, HasChoice X H: Univalence A: Type
merely
{X : HSet & {p : X -> A & IsConnMap (Tr (-1)) p}}
AC: forallX : HSet, HasChoice X H: Univalence A: Type
merely
{X : HSet & {p : X -> A & IsConnMap (Tr (-1)) p}}
AC: forallX : HSet, HasChoice X H: Univalence A: Type X:= Build_HSet (Tr 0 A): HSet
merely
{X : HSet & {p : X -> A & IsConnMap (Tr (-1)) p}}
AC: forallX : HSet, HasChoice X H: Univalence A: Type X:= Build_HSet (Tr 0 A): HSet P: IsProjective X
merely
{X : HSet & {p : X -> A & IsConnMap (Tr (-1)) p}}
AC: forallX : HSet, HasChoice X H: Univalence A: Type X:= Build_HSet (Tr 0 A): HSet F: merely {s : X -> A & tr o s == idmap}
merely
{X : HSet & {p : X -> A & IsConnMap (Tr (-1)) p}}
AC: forallX : HSet, HasChoice X H: Univalence A: Type X:= Build_HSet (Tr 0 A): HSet F: {s : X -> A & (funx : X => tr (s x)) == idmap}
merely
{X : HSet & {p : X -> A & IsConnMap (Tr (-1)) p}}
AC: forallX : HSet, HasChoice X H: Univalence A: Type X:= Build_HSet (Tr 0 A): HSet f: X -> A p: (funx : X => tr (f x)) == idmap
merely
{X : HSet & {p : X -> A & IsConnMap (Tr (-1)) p}}
AC: forallX : HSet, HasChoice X H: Univalence A: Type X:= Build_HSet (Tr 0 A): HSet f: X -> A p: (funx : X => tr (f x)) == idmap
forallb : A, merely (hfiber f b)
AC: forallX : HSet, HasChoice X H: Univalence A: Type X:= Build_HSet (Tr 0 A): HSet f: X -> A p: (funx : X => tr (f x)) == idmap a: A
merely {x : X & f x = a}
AC: forallX : HSet, HasChoice X H: Univalence A: Type X:= Build_HSet (Tr 0 A): HSet f: X -> A p: (funx : X => tr (f x)) == idmap a: A
Tr (-1) {x : X & Tr (-1) (f x = a)}
AC: forallX : HSet, HasChoice X H: Univalence A: Type X:= Build_HSet (Tr 0 A): HSet f: X -> A p: (funx : X => tr (f x)) == idmap a: A
Tr (-1) (f (tr a) = a)
AC: forallX : HSet, HasChoice X H: Univalence A: Type X:= Build_HSet (Tr 0 A): HSet f: X -> A p: (funx : X => tr (f x)) == idmap a: A
tr (f (tr a)) = tr a
apply p.Defined.(** Assuming AC_(oo,-1), projective types are exactly sets. *)
AC: forallX : HSet, HasChoice X H: Univalence X: Type
IsProjective X <~> IsHSet X
AC: forallX : HSet, HasChoice X H: Univalence X: Type
IsProjective X <~> IsHSet X
AC: forallX : HSet, HasChoice X H: Univalence X: Type
IsProjective X -> IsHSet X
AC: forallX : HSet, HasChoice X H: Univalence X: Type
IsHSet X -> IsProjective X
AC: forallX : HSet, HasChoice X H: Univalence X: Type
IsProjective X -> IsHSet X
AC: forallX : HSet, HasChoice X H: Univalence X: Type isprojX: IsProjective X
IsHSet X
AC: forallX : HSet, HasChoice X H: Univalence X: Type isprojX: forallA : Type,
In purely A ->
forallB : Type,
In purely B ->
forall (f : X -> B) (p : A -> B),
IsConnMap (Tr (-1)) p ->
merely
{s : X -> A & (funx : X => p (s x)) == f}
IsHSet X
AC: forallX : HSet, HasChoice X H: Univalence X: Type isprojX: forallA : Type,
In purely A ->
forallB : Type,
In purely B ->
forall (f : X -> B) (p : A -> B),
IsConnMap (Tr (-1)) p ->
merely
{s : X -> A & (funx : X => p (s x)) == f} P: {X0 : HSet &
{p : X0 -> X & IsConnMap (Tr (-1)) p}}
IsHSet X
AC: forallX : HSet, HasChoice X H: Univalence X: Type isprojX: forallA : Type,
In purely A ->
forallB : Type,
In purely B ->
forall (f : X -> B) (p : A -> B),
IsConnMap (Tr (-1)) p ->
merely
{s : X -> A & (funx : X => p (s x)) == f} P: HSet p: P -> X issurj_p: IsConnMap (Tr (-1)) p
IsHSet X
AC: forallX : HSet, HasChoice X H: Univalence X: Type isprojX: forallA : Type,
In purely A ->
forallB : Type,
In purely B ->
forall (f : X -> B) (p : A -> B),
IsConnMap (Tr (-1)) p ->
merely
{s : X -> A & (funx : X => p (s x)) == f} P: HSet p: P -> X issurj_p: IsConnMap (Tr (-1)) p S: {s : X -> P & (funx : X => p (s x)) == idmap}
IsHSet X
exact (inO_retract_inO (Tr 0) X P S.1 p S.2).
AC: forallX : HSet, HasChoice X H: Univalence X: Type
IsHSet X -> IsProjective X
AC: forallX : HSet, HasChoice X H: Univalence X: Type ishsetX: IsHSet X
IsProjective X
AC: forallX : HSet, HasChoice X H: Univalence X: Type ishsetX: IsHSet X