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 Modalities.Modality Modalities.Open.LocalOpen Scope path_scope.(** * Coreflective subuniverses. *)(** In this file we study "coreflective subuniverses" that are defined dually to reflective subuniverses. However, it turns out that there are many fewer examples of these. The "internal" nature of such definitions, which in the reflective case makes the subuniverse automatically an exponential ideal, in the coreflective case has much stronger consequences: it forces the entire coreflection to be determined by the image of [Unit], which can be an arbitrary hprop. Thus, this file is essentially just a no-go theorem: there are no coreflective subuniverses other than a certain class of fairly simple ones (which we call "co-open" since they are dual to open modalities).In particular, since we do not foresee many applications of this file, we don't bother introducing modules to make the definitions more universe polymorphic the way we did for reflective subuniverses. *)RecordCoreflectiveSubuniverse :=
{ inF : Type -> HProp ;
F_coreflector : Type -> Type ;
F_inF : forallX, inF (F_coreflector X) ;
fromF : forallX, F_coreflector X -> X ;
(** We also don't bother defining [ooLiftableAlong] so as to state the universal property without [Funext]. *)
isequiv_fromF_postcompose
: forall {YX} {Y_inF : inF Y},
IsEquiv (fun (g : Y -> F_coreflector X) => fromF X o g)
(** Similarly, we don't bother asserting repleteness; we'll just use univalence. *)
}.CoercionF_coreflector : CoreflectiveSubuniverse >-> Funclass.SectionCoreflectiveSubuniverse.Context `{Univalence}.Context {F : CoreflectiveSubuniverse}.(** We begin by extracting the corecursor, its computation rule, and its eta principle. *)
H: Univalence F: CoreflectiveSubuniverse Y, X: Type inF0: inF F Y f: Y -> X
Y -> F X
H: Univalence F: CoreflectiveSubuniverse Y, X: Type inF0: inF F Y f: Y -> X
Y -> F X
H: Univalence F: CoreflectiveSubuniverse Y, X: Type inF0: inF F Y f: Y -> X
IsEquiv
(fun (g : Y -> F X) (x : Y) => fromF F X (g x))
byapply isequiv_fromF_postcompose.Defined.
H: Univalence F: CoreflectiveSubuniverse Y, X: Type YF: inF F Y f: Y -> X
fromF F X o F_corec YF f == f
H: Univalence F: CoreflectiveSubuniverse Y, X: Type YF: inF F Y f: Y -> X
fromF F X o F_corec YF f == f
apply ap10, (eisretr (fung => fromF F X o g)).Defined.
H: Univalence F: CoreflectiveSubuniverse Y, X: Type inF0: inF F Y g, h: Y -> F X p: fromF F X o g == fromF F X o h
g == h
H: Univalence F: CoreflectiveSubuniverse Y, X: Type inF0: inF F Y g, h: Y -> F X p: fromF F X o g == fromF F X o h
g == h
H: Univalence F: CoreflectiveSubuniverse Y, X: Type inF0: inF F Y g, h: Y -> F X p: fromF F X o g == fromF F X o h
g = h
H: Univalence F: CoreflectiveSubuniverse Y, X: Type inF0: inF F Y g, h: Y -> F X p: fromF F X o g == fromF F X o h
IsEquiv
(fun (k : Y -> F X) (x : Y) => fromF F X (k x))
H: Univalence F: CoreflectiveSubuniverse Y, X: Type inF0: inF F Y g, h: Y -> F X p: fromF F X o g == fromF F X o h
(funx : Y => fromF F X (g x)) =
(funx : Y => fromF F X (h x))
H: Univalence F: CoreflectiveSubuniverse Y, X: Type inF0: inF F Y g, h: Y -> F X p: fromF F X o g == fromF F X o h
IsEquiv
(fun (k : Y -> F X) (x : Y) => fromF F X (k x))
byapply isequiv_fromF_postcompose.
H: Univalence F: CoreflectiveSubuniverse Y, X: Type inF0: inF F Y g, h: Y -> F X p: fromF F X o g == fromF F X o h
(funx : Y => fromF F X (g x)) =
(funx : Y => fromF F X (h x))
byapply path_arrow.Defined.(** The functorial action of the coreflector. *)DefinitionF_functor {XY} (f : X -> Y) : F X -> F Y
:= F_corec (F_inF F X) (f o fromF F X).(** The coreflector preserves hprops (since it is a right adjoint and thus preserves limits). *)
H: Univalence F: CoreflectiveSubuniverse A: Type IsHProp0: IsHProp A
IsHProp (F A)
H: Univalence F: CoreflectiveSubuniverse A: Type IsHProp0: IsHProp A
IsHProp (F A)
H: Univalence F: CoreflectiveSubuniverse A: Type IsHProp0: IsHProp A x, y: F A
x = y
exact (F_coindpaths (F_inF F A) (const x) (const y)
(fun_ => path_ishprop _ _) x).Defined.(** A type lies in [F] as soon as [fromF] admits a section. *)
H: Univalence F: CoreflectiveSubuniverse X: Type s: X -> F X p: fromF F X o s == idmap
inF F X
H: Univalence F: CoreflectiveSubuniverse X: Type s: X -> F X p: fromF F X o s == idmap
inF F X
H: Univalence F: CoreflectiveSubuniverse X: Type s: X -> F X p: fromF F X o s == idmap
IsEquiv (fromF F X)
H: Univalence F: CoreflectiveSubuniverse X: Type s: X -> F X p: fromF F X o s == idmap
(funx : F X => s (fromF F X x)) == idmap
H: Univalence F: CoreflectiveSubuniverse X: Type s: X -> F X p: fromF F X o s == idmap
s o fromF F X == idmap
H: Univalence F: CoreflectiveSubuniverse X: Type s: X -> F X p: fromF F X o s == idmap
(funx : F X => fromF F X (s (fromF F X x))) ==
(funx : F X => fromF F X x)
intros x; apply p.Defined.(** So far, nothing unexpected has happened. Now, however, we claim that [F] is completely determined by the image of [Unit], which by [ishprop_coreflection] is an hprop. Specifically, we claim that [X] lies in [F] exactly when [X -> F Unit]. *)
H: Univalence F: CoreflectiveSubuniverse X: Type
inF F X <~> (X -> F Unit)
H: Univalence F: CoreflectiveSubuniverse X: Type
inF F X <~> (X -> F Unit)
H: Univalence F: CoreflectiveSubuniverse X: Type
inF F X -> X -> F Unit
H: Univalence F: CoreflectiveSubuniverse X: Type
(X -> F Unit) -> inF F X
H: Univalence F: CoreflectiveSubuniverse X: Type
inF F X -> X -> F Unit
H: Univalence F: CoreflectiveSubuniverse X: Type X0: inF F X
X -> F Unit
H: Univalence F: CoreflectiveSubuniverse X: Type X0: inF F X
X -> Unit
exact (fun_ => tt).
H: Univalence F: CoreflectiveSubuniverse X: Type
(X -> F Unit) -> inF F X
H: Univalence F: CoreflectiveSubuniverse X: Type f: X -> F Unit
inF F X
H: Univalence F: CoreflectiveSubuniverse X: Type f: X -> F Unit
X -> F X
H: Univalence F: CoreflectiveSubuniverse X: Type f: X -> F Unit
fromF F X o ?s == idmap
H: Univalence F: CoreflectiveSubuniverse X: Type f: X -> F Unit
X -> F X
H: Univalence F: CoreflectiveSubuniverse X: Type f: X -> F Unit x: X
F X
exact (F_functor (unit_name x) (f x)).
H: Univalence F: CoreflectiveSubuniverse X: Type f: X -> F Unit
fromF F X
o (funx : X => F_functor (unit_name x) (f x)) ==
idmap
H: Univalence F: CoreflectiveSubuniverse X: Type f: X -> F Unit x: X
fromF F X
(F_corec (F_inF F Unit) (fun_ : F Unit => x) (f x)) =
x
exact (F_corec_beta (F_inF F Unit) (const x) (f x)).Defined.EndCoreflectiveSubuniverse.(** Conversely, we will now show that for any hprop [U], the types [X] such that [X -> U] are a coreflective subuniverse, which we call "co-open" since it is dual to the open modality. *)SectionCoOpen.Context `{Funext} (U : HProp).
H: Funext U: HProp
CoreflectiveSubuniverse
H: Funext U: HProp
CoreflectiveSubuniverse
H: Funext U: HProp
forallYX : Type,
(funX0 : Type => Build_HProp (X0 -> U)) Y ->
IsEquiv
(fung : Y -> (funX0 : Type => X0 * U) X =>
(funX0 : Type => fst) X o g)
H: Funext U: HProp Y, X: Type YU: Y -> U
IsEquiv (fun (g : Y -> X * U) (x : Y) => fst (g x))
H: Funext U: HProp Y, X: Type YU: Y -> U
(fun (x : Y -> X) (x0 : Y) => x x0) == idmap
H: Funext U: HProp Y, X: Type YU: Y -> U
(fun (x : Y -> X * U) (y : Y) => (fst (x y), YU y)) ==
idmap
(fun (x : Y -> X * U) (y : Y) => (fst (x y), YU y)) ==
idmap
H: Funext U: HProp Y, X: Type YU: Y -> U h: Y -> X * U y: Y
(fst (h y), YU y) = h y
apply path_prod; [ reflexivity | byapply path_ishprop ].Defined.(** Thus, each coreflective subuniverses are uniquely determined by an hprop. Moreover, the coreflective subuniverse corresponding to an hprop [U] is closely related to the open modality [Op U]. Specifically, they form an _adjoint modality pair_ in the sense that the subuniverses are canonically equivalent, and the coreflection and reflection respect this equivalence. In categorical language, this says that the inclusion of an open subtopos is the center of a local geometric morphism in the other direction. We express this concisely as follows. *)
H: Funext U: HProp X: Type
O_inverts (Op U) (fromF coOp X)
H: Funext U: HProp X: Type
O_inverts (Op U) (fromF coOp X)
H: Funext U: HProp X: Type
(funx : U -> X =>
O_functor (Op U) (fromF coOp X)
(funu : U => (x u, u))) == idmap
H: Funext U: HProp X: Type
(fun (x : U -> X * U) (u : U) =>
(O_functor (Op U) (fromF coOp X) x u, u)) == idmap
H: Funext U: HProp X: Type
(funx : U -> X =>
O_functor (Op U) (fromF coOp X)
(funu : U => (x u, u))) == idmap
H: Funext U: HProp X: Type ux: U -> X
O_functor (Op U) fst (funu : U => (ux u, u)) = ux
H: Funext U: HProp X: Type ux: U -> X u: U
O_functor (Op U) fst (funu : U => (ux u, u)) u = ux u
H: Funext U: HProp X: Type ux: U -> X u: U
O_functor (Op U) fst (funu : U => (ux u, u)) u =
O_functor (Op U) fst (to (Op U) (X * U) (ux u, u)) u
H: Funext U: HProp X: Type ux: U -> X u: U
O_functor (Op U) fst (to (Op U) (X * U) (ux u, u)) u =
ux u
H: Funext U: HProp X: Type ux: U -> X u: U
O_functor (Op U) fst (funu : U => (ux u, u)) u =
O_functor (Op U) fst (to (Op U) (X * U) (ux u, u)) u
H: Funext U: HProp X: Type ux: U -> X u, u': U
(ux u', u') = (ux u, u)
apply path_prod; simpl; [ apply ap | ]; apply path_ishprop.
H: Funext U: HProp X: Type ux: U -> X u: U
O_functor (Op U) fst (to (Op U) (X * U) (ux u, u)) u =
ux u
exact (ap10 (to_O_natural (Op U) (@fst X U) (ux u , u)) u).
H: Funext U: HProp X: Type
(fun (x : U -> X * U) (u : U) =>
(O_functor (Op U) (fromF coOp X) x u, u)) == idmap
H: Funext U: HProp X: Type uux: U -> X * U
(funu : U => (O_functor (Op U) fst uux u, u)) = uux