aa r X i v : . [ m a t h . C T ] M a r Injective types in univalent mathematics
Mart´ın H¨otzel Escard´oSchool of Computer ScienceUniversity of Birmingham, UKMarch 10, 2020
Abstract
We investigate the injective types and the algebraically injective typesin univalent mathematics, both in the absence and in the presence ofpropositional resizing. Injectivity is defined by the surjectivity of the re-striction map along any embedding, and algebraic injectivity is definedby a given section of the restriction map along any embedding. Underpropositional resizing axioms, the main results are easy to state: (1) Injec-tivity is equivalent to the propositional truncation of algebraic injectivity.(2) The algebraically injective types are precisely the retracts of exponen-tial powers of universes. (2a) The algebraically injective sets are preciselythe retracts of powersets. (2b) The algebraically injective ( n + 1)-typesare precisely the retracts of exponential powers of universes of n -types.(3) The algebraically injective types are also precisely the retracts of alge-bras of the partial-map classifier. From (2) it follows that any universe isembedded as a retract of any larger universe. In the absence of proposi-tional resizing, we have similar results that have subtler statements whichneed to keep track of universe levels rather explicitly, and are applied toget the results that require resizing. Keywords.
Injective type, flabby type, Kan extension, partial-map clas-sifier, univalent mathematics, univalence axiom.
MSC 2010.
We investigate the injective types and the algebraically injective types in uni-valent mathematics, both in the absence and in the presence of propositionalresizing axioms. These notions of injectivity are about the extension problem X ⊂ j ✲ YD. ✛ ............................... f ✲ D : U is defined by the surjectivity of the restrictionmap ( − ) ◦ j along any embedding j :Π( X, Y : U ) Π( j : X ֒ → Y ) Π( f : X → D ) ∃ ( g : Y → D ) g ◦ j = f, so that we get an unspecified extension g of f along j . The algebraic injectivityof D is defined by a given section ( − ) | j of the restriction map ( − ) ◦ j , followingBourke’s terminology [2]. By Σ − Π-distributivity, this amounts toΠ(
X, Y : U ) Π( j : X ֒ → Y ) Π( f : X → D ) Σ( f | j : Y → D ) , f | j ◦ j = f, so that we get a designated extension f | j of f along j . Formally, in thisdefinition, f | j can be regarded as a variable, but we instead think of thesymbol “ | ” as a binary operator.For the sake of generality, we work without assuming or rejecting the princi-ple of excluded middle, and hence without assuming the axiom of choice either.Moreover, we show that the principle of excluded middle holds if and only ifall pointed types are algebraically injective, and, assuming resizing, if and onlyif all inhabited types are injective, so that there is nothing interesting to sayabout (algebraic) injectivity in its presence. That pointness and inhabitednessare needed is seen by considering the embedding ֒ → .Under propositional resizing principles [15] (Definitions 25 and 52 below),the main results are easy to state:1. Injectivity is equivalent to the propositional truncation of algebraic injec-tivity.(This can be seen as a form of choice that just holds, as it moves a propo-sitional truncation inside a Π-type to outside the Π-type, and may berelated to [9].)2. The algebraically injective types are precisely the retracts of exponentialpowers of universes. Here by an exponential power of a type B we meana type of the form A → B , also written B A .In particular,(a) The algebraically injective sets are precisely the retracts of powersets.(b) The algebraically injective ( n + 1)-types are precisely retracts of ex-ponential powers of the universes of n -types.Another consequence is that any universe is embedded as a retract of anylarger universe.3. The algebraically injective types are also precisely the underlying objectsof the algebras of the partial-map classifier.In the absence of propositional resizing, we have similar results that have subtlerstatements that need to keep track of universe levels rather explicitly. Mostconstructions developed in this paper are in the absence of propositional resizing.We apply them, with the aid of a notion of algebraic flabbiness, which is relatedto the partial-map classifier, to derive the results that rely on resizing mentionedabove. 2 cknowledgements. Mike Shulman has acted as a sounding board over theyears, with many helpful remarks, including in particular the suggestion of theterminology algebraic injectivity from [2] for the notion we consider here.
Our handling of universes has a model in ∞ -toposes following Shulman [14]. Itdiffers from that of the HoTT book [15], and Coq [4], in that we don’t assumecumulativity, and it agrees with that of Agda [3]. Our underlying formal system can be considered to be a subsystem of that usedin UniMath [16].1. We work within an intensional Martin-L¨of type theory with types (emptytype), (one-element type with ⋆ : ), N (natural numbers), and typeformers + (binary sum), Π (product), Σ (sum) and Id (identity type),and a hierarchy of type universes ranged over by U , V , W , T , closed underthem in a suitable sense discussed below.We take these as required closure properties of our formal system, ratherthan as an inductive definition.2. We assume a universe U , and for each universe U we assume a successoruniverse U + with U : U + , and for any two universes U , V a least upperbound U ⊔ V . We stipulate that we have U ⊔ U = U and U ⊔ U + = U + definitionally, and that the operation ( − ) ⊔ ( − ) is definitionally idempo-tent, commutative, and associative, and that the successor operation ( − ) + distributes over ( − ) ⊔ ( − ) definitionally.3. We don’t assume that the universes are cumulative on the nose, in thesense that from X : U we would be able to deduce that X : U ⊔ V forany V , but we also don’t assume that they are not. However, from theassumptions formulated below, it follows that for any two universes U , V there is a map lift U , V : U → U ⊔ V , for instance X X + V , whichis an embedding with lift X ≃ X if univalence holds (we cannot writethe identity type lift X = X , as the left- and right-hand sides live in thedifferent types U and U ⊔ V , which are not (definitionally) the same ingeneral).4. We stipulate that we have copies U and V of the empty and singletontypes in each universe U (with the subscripts often elided).5. We stipulate that if X : U and Y : V , then X + Y : U ⊔ V .6. We stipulate that if X : U and A : X → V then Π X A : U ⊔ V . Weabbreviate this product type as Π A when X can be inferred from A , andsometimes we write it verbosely as Π( x : X ) , A x .3n particular, for types X : U and Y : V , we have the function type X → Y : U ⊔ V .7. The same type stipulations as for Π, and the same grammatical conven-tions apply to the sum type former Σ.In particular, for types X : U and Y : V , we have the cartesian product X × Y : U ⊔ V .8. We assume the η rules for Π and Σ, namely that f = λx, f x holds defini-tionally for any f in a Π-type and that z = (pr z, pr z ) holds definition-ally for any z in a Σ type, where pr and pr are the projections.9. For a type X and points x, y : X , the identity type Id X x y is abbreviatedas Id x y and often written x = X y or simply x = y .The elements of the identity type x = y are called identifications or pathsfrom x to y .10. When making definitions, definitional equality is written “ def = ”. When itis invoked, it is written e.g. “ x = y definitionally”. This is consistent withthe fact that any definitional equality x = y gives rise to an element ofthe identity type x = y and should therefore be unambiguous.11. When we say that something is the case by construction, this means weare expanding definitional equalities.12. We tacitly assume univalence [15], which gives function extensionality(pointwise equal functions are equal) and propositional extensionality (log-ically equivalent subsingletons are equal).13. We work with the existence of propositional, or subsingleton, truncationsas an assumption, also tacit. The HoTT book [15], instead, defines typeformation rules for propositional truncation as a syntactical construct ofthe formal system. Here we take propositional truncation as an axiom forany pair of universes U , V :Π( X : U ) Σ( J X K : U ) , J X K is a proposition × ( X → J X K ) × ( Π( P : V ) , P is a proposition → ( X → P ) → J X K → P ) . We write | x | for the insertion of x : X into the type J X K by the assumedfunction X → J X K . We also denote by ¯ f the function J X K → P obtainedby the given “elimination rule” ( X → P ) → J X K → P applied to afunction f : X → P . The universe U is that of types we truncate, and V is the universe where the propositions we eliminate into live. Because4he existence of propositional truncations is an assumption rather than atype formation rule, its so-called “computation” rule¯ f | x | = f x doesn’t hold definitionally, of course, but is established as a derived iden-tification, by the definition of proposition. We assume that the readers are already familiar with the notions of univalentmathematics, e.g. from the HoTT book [15]. The purpose of this section is toestablish terminology and notation only, particularly regarding our modes ofexpression that diverge from the HoTT book.1. A type X is a singleton, or contractible, if there is a designated c : X with x = c for all x : X : X is a singleton def = Σ( c : X ) , Π( x : X ) , x = c.
2. A proposition, or subsingleton, or truth value, is a type with at most oneelement, meaning that any two of its elements are identified: X is a proposition def = Π( x, y : X ) , x = y.
3. By an unspecified element of a type X we mean a (specified) element ofits propositional truncation J X K .We say that a type is inhabited if it has an unspecified element.If the type X codifies a mathematical statement, we say that X holds inan unspecified way to mean the assertion J X K . For example, if we saythat the type A is a retract of the type B in an unspecified way, what wemean is that J A is a retract of B K .4. Phrases such as “there exists”, “there is”, “there is some”, “for some” etc.indicate a propositionally truncated Σ, and symbolically we write( ∃ ( x : X ) , A x ) def = J Σ( x : X ) , A x K . For emphasis, we may say that there is an unspecified x : X with A x .When the meaning of existence is intended to be (untruncated) Σ, we usephrases such as “there is a designated”, “there is a specified”, “there is adistinguished”, “there is a given”, “there is a chosen”, “for some chosen”,“we can find” etc.The statement that there is a unique x : X with A x amounts to theassertion that the type Σ( x : X ) , A x is a singleton:( ∃ !( x : X ) , A x ) def = the type Σ( x : X ) , A x is a singleton . x, a ) with x : X and a : A x . This doesn’tneed to be explicitly propositionally truncated, because singleton typesare automatically propositions.The statement that there is at most one x : X with A x amounts to theassertion that the type Σ( x : X ) , A x is a subsingleton (so we have at mostone pair ( x, a ) with x : X and a : A x ).5. We often express a type of the form Σ( x : X ) , A x by phrases such as “thetype of x : X with A x ”.For example, if we define the fiber of a point y : Y under a function f : X → Y to be the type f − ( y ) of points x : X that are mapped by f to a point identified with y , it should be clear from the above conventionsthat we mean f − ( y ) def = Σ( x : X ) , f x = y. Also, with the above terminological conventions, saying that the fibers of f are singletons (that is, that f is an equivalence) amounts to the samething as saying that for every y : Y there is a unique x : X with f ( x ) = y .Similarly, we say that such an f is an embedding if for every y : Y thereis at most one x : X with f ( x ) = y . In passing, we remark that, ingeneral, this is stronger than f being left-cancellable, but coincides withleft-cancellability if the type Y is a set (its identity types are all subsin-gletons).6. We sometimes use the mathematically more familiar “maps to” nota-tion instead of type-theoretical lambda notation λ for defining namelessfunctions.7. Contrarily to an existing convention among some practitioners, we willnot reserve the word is for mathematical statements that are subsingletontypes. For example, we say that a type is algebraically injective to meanthat it comes equipped with suitable data, or that a type X is a retractof a type Y to mean that there are designated functions s : X → Y and r : Y → X , and a designated pointwise identification r ◦ s ∼ id.8. Similarly, we don’t reserve the words theorem , lemma , corollary and proof for constructions of elements of subsingleton types, and all our construc-tions are indicated by the word proof, including the construction of dataor structure.Because proposition is a semantical rather than syntactical notion in uni-valent mathematics, we often have situations when we know that a typeis a proposition only much later in the mathematical development. Anexample of this is univalence. To know that this is a proposition, wefirst need to state and prove many lemmas, and even if these lemmas arepropositions themselves, we will not know this at the time they are stated6nd proved. For instance, knowing that the notion of being an equiva-lence is a proposition requires function extensionality, which follows fromunivalence. Then this is used to prove that univalence is a proposition. A computer-aided formal development of the material of this paper has beenperformed in Agda [3], occasionally preceded by pencil and paper scribbles, butmostly directly in the computer with the aid of Agda’s interactive features.This paper is an unformalization of that development. We emphasize that notonly numbered statements in this paper have formal counterparts, but also thecomments in passing, and that the formal version has more information thanwhat we choose to report here.We have two versions. One of them [7] is in blackboard style , with the ideasin the order they have come to our mind over the years, in a fairly disorga-nized way, and with local assumptions of univalence, function extensionality,propositional extensionality and propositional truncation. The other one [6]is in article style , with univalence and existence of propositional truncationsas global assumptions, and functional and propositional extensionality derivedfrom univalence. This second version follows closely this paper (or rather thispaper follows closely that version), organized in a way more suitable for dissem-ination, repeating the blackboard definitions, in a definitionally equal way, andreproducing the proofs and constructions that we consider to be relevant whileinvoking the blackboard for the routine, unenlightening ones. The blackboardversion also has additional information that we have chosen not to include inthe article version of the Agda development or this paper.An advantage of the availability of a formal version is that, whatever stepswe have omitted here because we considered them to be obvious or routine, canbe found there, in case of doubt.
As discussed in the introduction, in the absence of propositional resizing we areforced to keep track of universe levels rather explicitly.
We say that a type D in a universe W is U , V -injective to meanΠ( X : U ) Π( Y : V ) Π( j : X ֒ → Y ) Π( f : X → D ) , ∃ ( g : Y → D ) , g ◦ j ∼ f, and that it is algebraically U , V -injective to meanΠ( X : U ) Π( Y : V ) Π( j : X ֒ → Y ) Π( f : X → D ) , Σ( f | j : Y → D ) , f | j ◦ j ∼ f. Notice that, because we have function extensionality, pointwise equality ∼ offunctions is equivalent to equality, and hence equal to equality by univalence.But it is more convenient for the purposes of this paper to work with pointwiseequality in these definitions. 7 The algebraic injectivity of universes
Let U , V , W be universes, X : U and Y : V be types, and f : X → W and j : X → Y be given functions, where j is not necessarily an embedding. Wedefine functions f ↓ j and f ↑ j of type Y → U ⊔ V ⊔ W by( f ↓ j ) y def = Σ( w : j − ( y )) , f (pr w ) , ( f ↑ j ) y def = Π( w : j − ( y )) , f (pr w ) . If j is an embedding, then both f ↓ j and f ↑ j are extensions of f along j up to equivalence, in the sense that ( f ↓ j ◦ j ) x ≃ f x ≃ ( f ↑ j ◦ j ) x, and hence extensions up to equality if W is taken to be U ⊔ V , by univalence.
Notice that if W is kept arbitrary, then univalence cannot be applied becauseequality is defined only for elements of the same type. Proof.
Because a sum indexed by a subsingleton is equivalent to any of itssummands, and similarly a product indexed by a subsingleton is equivalent toany of its factors, and because a map is an embedding precisely when its fibersare all subsingletons.We record this corollary:
The universe
U ⊔ V is algebraically U , V -injective, in at least twoways. And in particular, e.g. U is U , U -injective, but of course U doesn’t live in U anddoesn’t even have a copy in U . For the following, we say that y : Y is not in theimage of j to mean that j x = y for all x : X . For y : Y not in the image of j , we have ( f ↓ j ) y ≃ and ( f ↑ j ) y ≃ . With excluded middle, this would give that the two extensions have the samesum and product as the non-extended map, respectively, but excluded middleis not needed, as it is not hard to see:
We have canonical equivalences Σ f ≃ Σ( f ↓ j ) and Π f ≃ Π( f ↑ j ) . Notice that the functions f , f ↓ j and f ↑ j , being universe valued, are typefamilies, and hence the notations Σ f , Σ( f ↓ j ), Π f and Π( f ↑ j ) are just particularcases of the notations for the sum and product of a type family.The two extensions are left and right Kan extensions in the following sense,without the need to assume that j is an embedding. First, a map f : X → U ,when X is viewed as an ∞ -groupoid and hence an ∞ -category, and when U is8iewed as the ∞ -generalization of the category of sets, can be considered as asort of ∞ -presheaf, because its functoriality is automatic: If we define f [ p ] def = transport f p of type f x → f y for p : Id x y , then for q : Id y z we have f [refl x ] = id f x , f [ p • q ] = f [ q ] ◦ f [ p ] . Then we can consider the type of transformations between such ∞ -presheaves f : X → W and f ′ : X → W ′ defined by f (cid:22) f ′ def = Π( x : X ) , f x → f ′ x, which are automatically natural in the sense that for all τ : f (cid:22) f ′ and p : Id x y , τ y ◦ f [ p ] = f ′ [ p ] ◦ τ x . It is easy to check that we have the following canonical transformations: f ↓ j (cid:22) f ↑ j if j is an embedding. It is also easy to see that, without assuming j to be an embedding,1. f (cid:22) f ↓ j ◦ j ,2. f ↑ j ◦ j (cid:22) f .These are particular cases of the following constructions, which are evident andcanonical, even if they may be a bit laborious: For any g : Y → T , we have canonical equivalences1. ( f ↓ j (cid:22) g ) ≃ ( f (cid:22) g ◦ j ) , i.e. f ↓ j is a left Kan extension,2. ( g (cid:22) f ↑ j ) ≃ ( g ◦ j (cid:22) f ) , i.e. f ↑ j is a right Kan extension. We also have that the left and right Kan extension operators along an em-bedding are themselves embeddings, as we now show.
For any types
X, Y : U and any embedding j : X → Y , left Kanextension along j is an embedding of the function type X → U into the functiontype Y → U .Proof. Define s : ( X → U ) → ( Y → U ) and r : ( Y → U ) → ( X → U ) by s f def = f ↓ j,r g def = g ◦ j. By function extensionality, we have that r ( s f ) = f , because s is a pointwise-extension operator as j is an embedding, and by construction we have that s ( r g ) = ( g ◦ j ) ↓ j . Now define κ : Π( g : Y → U ) , s ( r g ) (cid:22) g by κ g y (( x, p ) , C ) def = transport g p C g : Y → U , y : Y , x : X , p : j x = y and C : g ( j x ), so that transport g p C has type g y , and consider the type M def = Σ( g : Y → U ) Π( y : Y ) , the map κ g y : s ( r g ) y → g y is an equivalence.Because the notion of being an equivalence is a proposition and because productsof propositions are propositions, the first projectionpr : M → ( Y → U )is an embedding. To complete the proof, we show that there is an equivalence φ : ( X → U ) → M whose composition with this projection is s , so that s , beingthe composition of two embeddings, is itself an embedding. We construct φ andits inverse γ by φ f def = ( sf, ε f ) ,γ ( g, e ) def = r g, where ε f is a proof that the map κ ( sf ) y is an equivalence for every y : Y ,to be constructed shortly. Before we know this construction, we can see that γ ( φ f ) = r ( s f ) = f so that γ ◦ φ ∼ id, and that φ ( γ ( g, e )) = ( s ( rg ) , ε ( rg )). Tocheck that the pairs ( s ( rg ) , ε ( rg )) and ( g, e ) are equal and hence φ ◦ γ ∼ id,it suffices to check the equality of the first components, because the secondcomponents live in subsingleton types. But e y says that s ( r g ) y ≃ g y for any y : Y , and hence by univalence and function extensionality, s ( r g ) = g . Thusthe functions φ and γ are mutually inverse. Now, pr ◦ φ = s definitionallyusing the η -rule for Π, so that indeed s is the composition of two embeddings,as we wanted to show.It remains to show that the map κ ( sf ) y : s ( f y ) → s ( r ( s f )) y is indeed anequivalence. The domain and codomain of this function amount, by construc-tion, to respectively A def = Σ( t : j − ( y )) , Σ( w : j − ( j (pr t ))) , f (pr w ) B def = Σ( w : j − ( y )) , f (pr w ) . We construct an inverse δ : B → A by δ (( x, p ) , C ) def = (( x, p ) , ( x, refl j x ) , C ) . It is routine to check that the functions κ ( sf ) y and δ are mutually inverse,which concludes the proof.The proof of the theorem below follows the same pattern as the previousone with some portions “dualized” in some sense, and so we are slightly moreeconomic with its formulation this time. For any types
X, Y : U and any embedding j : X → Y , the rightKan extension operation along j is an embedding of the function type X → U into the function type Y → U . roof. Define s : ( X → U ) → ( Y → U ) and r : ( Y → U ) → ( X → U ) by s f def = f ↑ j,r g def = g ◦ j. By function extensionality, we have that r ( s f ) = f , and, by construction, s ( r g ) = ( g ◦ j ) ↑ j . Now define κ : Π( g : Y → U ) , g (cid:22) s ( r g ) by κ g y C ( x, p ) def = transport g p − C for all g : Y → U , y : Y , C : g y , x : X , p : j x = y , so that transport g p − C has type g ( j x ), and consider the type M def = Σ( g : Y → U ) Π( y : Y ) , the map κ g y : g y → s ( r g ) y is an equivalence.Then the first projection pr : M → ( Y → U ) is an embedding. To completethe proof, we show that there is an equivalence φ : ( X → U ) → M whosecomposition with this projection is s , so that it follows that s is an embedding.We construct φ and its inverse γ by φ f def = ( sf, ε f ) ,γ ( g, e ) def = r g, where ε f is a proof that the map κ ( sf ) y is an equivalence for every y : Y , sothat φ and γ are mutually inverse by the argument of the previous proof.To prove that the map κ ( sf ) y : s ( r ( s f )) y → s ( f y ) is an equivalence, noticethat its domain and codomain amount, by construction, to respectively A def = Π( w : j − ( y )) , f (pr w ) ,B def = Π( t : j − ( y )) , Π( w : j − ( j (pr t ))) , f (pr w ) . We construct an inverse δ : B → A by δ C ( x, p ) def = C ( x, p )( x, refl j x ) . It is routine to check that the functions κ ( sf ) y and δ are mutually inverse,which concludes the proof.The left and right Kan extensions trivially satisfy f ↓ id ∼ f and f ↑ id ∼ f because the identity map is an embedding, by the extension property, and soare contravariantly functorial in view of the following.
10 Remark.
For types X : U , Y : V and Z : W , and functions j : X → Y , k : Y → Z and f : X → U ⊔ V ⊔ W , we have canonical identifications f ↓ ( k ◦ j ) ∼ ( f ↓ j ) ↓ k,f ↑ ( k ◦ j ) ∼ ( f ↑ j ) ↑ k. roof. This is a direct consequence of the canonical equivalences(Σ( t : Σ B ) , C t ) ≃ (Σ( a : A ) Σ( b : B a ) , C ( a, b ))(Π( t : Σ B ) , C t ) ≃ (Π( a : A ) Π( b : B a ) , C ( a, b ))for arbitrary universes U , V , W and A : U , B : A → V , and C : Σ B → W .The above and the following are applied in work on compact ordinals (re-ported in our repository [8]).
11 Remark.
For types X : U and Y : V , and functions j : X → Y , f : X → W and f ′ : X → W ′ , if the type f x is a retract of f ′ x for any x : X , then the type ( f ↑ j ) y is a retract of ( f ′ ↑ j ) y for any y : Y . The construction is routine, and presumably can be performed for left Kanextensions too, but we haven’t paused to check this.
Algebraic injectives are closed under retracts:
12 Lemma.
If a type D in a universe W is algebraically U , V -injective, thenso is any retract D ′ : W ′ of D in any universe W ′ . In particular, any type equivalent to an algebraically injective type is itselfalgebraically injective, without the need to invoke univalence.
Proof.
X j ✲ YD ′ f | j ✛ .............................. f ✲ D.s ❄ r ✻ ( s ◦ f ) | j ✛ s ◦ f ✲ For a given section-retraction pair ( s, r ), the construction of the extension op-erator for D ′ from that of D is given by f | j def = r ◦ (( s ◦ f ) | j ).
13 Lemma.
The product of any family D a of algebraically U , V -injective typesin a universe W , with indices a in a type A of any universe T , is itself alge-braically U , V -injective. In particular, if a type D in a universe W is algebraically U , V -injective, thenso is any exponential power A → D : T ⊔ W for any type A in any universe T .12 roof. We construct the extension operator ( − ) | ( − ) of the product Π D : T ⊔ W in a pointwise fashion from the extension operators ( − ) | a ( − ) of thealgebraically injective types D a : For f : X → Π D , we let f | j : Y → Π D be( f | j ) y def = a (( x f x a ) | a j ) y.
14 Lemma.
Every algebraically U , V -injective type D : W is a retract of anytype Y : V in which it is embedded into.Proof. D ⊂ j ✲ YD. r def = id | j ✛ ............................... id ✲ We just extend the identity function along the embedding to get the desiredretraction r .The following is a sort of ∞ -Yoneda embedding:
15 Lemma.
The identity type former Id X of any type X : U is an embeddingof the type X into the type X → U .Proof. To show that the Id-fiber of a given A : X → U is a subsingleton, itsuffices to show that if is pointed then it is a singleton. So let ( x, p ) : Σ( x : X ) , Id x = A be a point of the fiber. Applying Σ, seen as a map of type( X → U ) → U , to the identification p : Id x = A , we get an identificationap Σ p : Σ(Id x ) = Σ A, and hence, being equal to the singleton type Σ(Id x ), the type Σ A is itself asingleton. Hence we have A x ≃ Id x (cid:22) A By the Yoneda Lemma [11],= Π( y : X ) , Id x y → A y by definition of (cid:22) , ≃ Π( y : X ) , Id x y ≃ A y because Σ A is a singleton (Yoneda corollary), ≃ Π( y : X ) , Id x y = A y by univalence, ≃ Id x = A by function extensionality.So by a second application of univalence we get A x = (Id x = A ). Hence,applying Σ on both sides, we get Σ A = (Σ( x : X ) , Id x = A ). Therefore,because the type Σ A is a singleton, so is the fiber Σ( x : X ) , Id x = A of A .
16 Lemma.
If a type D in a universe U is algebraically U , U + -injective, then D is a retract of the exponential power D → U of U . roof. D ⊂ Id ✲ ( D → U ) D. r def = id | Id ✛ ............................. id ✲ This is obtained by combining the previous two constructions, using the factthat D → U lives in the successor universe U + . We now discuss resizing constructions that don’t assume resizing axioms. Theabove results, when combined together in the obvious way, almost give directlythat the algebraically injective types are precisely the retracts of exponentialpowers of universes, but there is a universe mismatch. Keeping track of theuniverses to avoid the mismatch, what we get instead is a resizing constructionwithout the need for resizing axioms:
17 Lemma.
Algebraically U , U + -injective types D : U are algebraically U , U -injective too.Proof. By the above constructions, we first get that D , being algebraically U , U + -injective, is a retract of D → U . But then U is algebraically U , U -injective, and, being a power of U , so is D → U . Finally, being a retract of D → U , we have that D is algebraically U , U -injective.This is resizing down and so is not surprising. Of course, such a constructioncan be performed directly by considering an embedding U → U + , but the ideais to generalize it to obtain further resizing-for-free constructions, and, later,resizing-for-a-price constructions. We achieve this by considering a notion offlabbiness as data, rather than as property as in the 1-topos literature (seee.g. Blechschmidt [1]). The notion of flabbiness considered in topos theory isdefined with truncated Σ, that is, the existential quantifier ∃ with values in thesubobject classifier Ω. We refer to the notion defined with untruncated Σ asalgebraic flabbiness.
18 Definition.
We say that a type D : W is algebraically U -flabby ifΠ( P : U ) , if P is a subsingleton then Π( f : P → D ) Σ( d : D ) Π( p : P ) , d = f p .This terminology is more than a mere analogy with algebraic injectivity: noticethat flabbiness and algebraic flabbiness amount to simply injectivity and alge-braic injectivity with respect to the class of embeddings P → with P ranging14ver subsingletons: P ⊂ ✲ D. ✛ ............................... f ✲ Notice also that an algebraically flabby type D is pointed, by considering thecase when f is the unique map → D .
19 Lemma.
If a type D in the universe W is algebraically U , V -injective, thenit is algebraically U -flabby.Proof. Given a subsingleton P : U and a map f : P → D , we can take itsextension f | ! : → D along the unique map ! : P → , because it is anembedding, and then we let d def = ( f | !) ⋆ , and the extension property gives d = f p for any p : P .The interesting thing about this is that the universe V is forgotten, and thenwe can put any other universe below U back, as follows.
20 Lemma.
If a type D in the universe W is algebraically U ⊔ V -flabby, thenit is also algebraically U , V -injective.Proof. Given an embedding j : X → Y of types X : U and V , a map f : X → D and a point y : Y , in order to construct ( f | j ) y we consider the map f y : j − ( y ) → D defined by ( x, p ) f x . Because the fiber j − ( y ) : U ⊔ V isa subsingleton as j is an embedding, we can apply algebraic flabbiness to get d y : D with d y = f y ( x, p ) for all ( x, p ) : j − ( y ). By the construction of f y andthe definition of fiber, this amounts to saying that for any x : X and p : j x = y ,we have d y = f x . Therefore we can take( f | j ) y def = d y , because we then have( f | j )( j x ) = d j x = f j x ( x, refl j x ) = f x for any x : X , as required.We then get the following resizing construction by composing the above twoconversions between algebraic flabbiness and injectivity:
21 Lemma.
If a type D in the universe W is algebraically ( U ⊔ T ) , V -injective,then it is also algebraically U , T -injective. In particular, algebraic U , V -injectivity gives algebraic U , U - and U , U -injectivity.So this is no longer necessarily resizing down, by taking V to be e.g. the firstuniverse U . 15 Injectivity of subuniverses
We now apply algebraic flabbiness to show that any subuniverse closed undersubsingletons and under sums, or alternatively under products, is also alge-braically injective.
22 Definition.
By a subuniverse of U we mean a projection Σ A → U with A : U → T subsingleton-valued and the universe T arbitrary. By a customaryabuse of language, we also sometimes refer to the domain of the projectionas the subuniverse. Closure under subsingletons means that A P holds for anysubsingleton P : U . Closure under sums amounts to saying that if X : U satisfies A and every Y x satisfies A for a family Y : X → U , then so does Σ Y . Closureunder products is defined in the same way with Π in place of Σ.Notice that A being subsingleton-valued is precisely what is needed for theprojection to be an embedding, and that all embeddings are of this form up toequivalence (more precisely, every embedding of any two types is the compositionof an equivalence into a sum type followed by the first projection).
23 Lemma.
Any subuniverse of U which is closed under subsingletons andsums, or alternatively under subsingletons and products, is algebraically U -flabbyand hence algebraically U , U -injective.Proof. Let Σ A be a subuniverse of U , let P : U be a subsingleton and f : P → Σ A be given. Then define(1) X def = Σ(pr ◦ f ) or (2) X def = Π(pr ◦ f )according to whether we have closure under sums or products. Because P , beinga subsingleton satisfies A and because the values of the map pr ◦ f : P → U satisfy A by definition of subuniverse, we have a : A X by the sum or productclosure property, and d def = ( X, a ) has type Σ A . To conclude the proof, we needto show that d = f p for any p : P . Because the second component a livesin a subsingleton by definition of subuniverse, it suffices to show that the firstcomponents are equal, that is, that X = pr ( f p ). But this follows by univalence,because a sum indexed by a subsingleton is equivalent to any of summands, anda product indexed by a subsingleton is equivalent to any of its factors.We index n -types from n = − −
24 Theorem.
The subuniverse of n -types in a universe U is algebraically U -flabby, in at least two ways, and hence algebraically U , U -injective.Proof. We have a subuniverse because the notion of being an n -type is a propo-sition. For n = −
2, the subuniverse of singletons is itself a singleton, andhence trivially injective. For n > −
2, the n -types are known to be closed undersubsingletons and both sums and products.16n particular:1. The type Ω U of subsingletons in a universe U is algebraically U , U -injective.(Another way to see that Ω U is algebraically injective is that it is a retractof the universe by propositional truncation. The same would be the casefor n -types if we were assuming n -truncations, which we are not.)2. Powersets, being exponential powers of Ω U , are algebraically U , U -injective.An anonymous referee suggested the following additional examples: (i) Thesubuniverse of subfinite types, i.e., subtypes of types for which there is an uun-specified equivalence with Fin( n ) for some n . This subuniverse is closed underboth Π and Σ. (ii) Reflective subuniverses, as they are closed under Π. (iii)Any universe U seen as a subuniverse of U ⊔ V . Returning to size issues, we now apply algebraic flabbiness to show that propo-sitional resizing gives unrestricted algebraic injective resizing.
25 Definition.
The propositional resizing principle, from U to V , that weconsider here says that every proposition in the universe U has an equivalentcopy in the universe V . By propositional resizing without qualification, we meanpropositional resizing between any of the universes involved in the discussion.This is consistent because it is implied by excluded middle, but, as far aswe are aware, there is no known computational interpretation of this axiom. Amodel in which excluded middle fails but propositional resizing holds is givenby Shulman [12].We begin with the following construction, which says that algebraic flabbi-ness is universe independent in the presence of propositional resizing:
26 Lemma.
If propositional resizing holds, then the algebraic V -flabbiness of atype in any universe gives its algebraic U -flabbiness.Proof. Let D : W be a type in any universe W , let P : U be a proposition and f : P → D . By resizing, we have an equivalence β : Q → P for a suitableproposition Q : V . Then the algebraic V -flabbiness of D gives a point d : D with d = ( f ◦ β ) q for all q : Q , and hence with d = f p for all p : P , because wehave p = β q for q = α p where α is a quasi-inverse of β , which establishes thealgebraic U -flabbiness of D .And from this it follows that algebraic injectivity is also universe independentin the presence of propositional resizing: we convert back-and-forth betweenalgebraic injectivity and algebraic flabbiness.
27 Lemma.
If propositional resizing holds, then for any type D in any universe W , the algebraic U , V -injectivity of D gives its algebraic U ′ , V ′ -injectivity. roof. We first get the U -flabbiness of D by 19, and then its U ′ ⊔ V ′ -flabbinessby 27, and finally its algebraic U ′ , V ′ -injectivity by 20.As an application of this and of the algebraic injectivity of universes, we getthat any universe is a retract of any larger universe. We remark that for typesthat are not sets, sections are not automatically embeddings [13]. But we canchoose the retraction so that the section is an embedding in our situation.
28 Lemma.
We have an embedding of any universe U into any larger universe U ⊔ V .Proof.
For example, we have the embedding given by X X + V . We don’tconsider an argument that this is indeed an embedding to be entirely routinewithout a significant amount of experience in univalent mathematics, even if thismay seem obvious. Nevertheless, it is certainly safe to leave it as a challenge tothe reader, and a proof can be found in [6] in case of doubt.
29 Theorem.
If propositional resizing holds, then any universe U is a retractof any larger universe U ⊔ V with a section that is an embedding.Proof.
The universe U is algebraically U , U -injective by 3, and hence it is alge-braically U + , ( U ⊔ V ) + -injective by 27, which has the right universe assignmentsto apply the construction 16 that gives a retraction from an embedding of aninjective type into a larger type, in this case the embedding of the universe U into the larger universe U ⊔ V constructed in 28.As mentioned above, we almost have that the algebraically injective typesare precisely the retracts of exponential powers of universes, up to a universemismatch. This mismatch is side-stepped by propositional resizing. The follow-ing is one of the main results of this paper:
30 Theorem. (First characterization of algebraic injectives.)
If propositionalresizing holds, then a type D in a universe U is algebraically U , U -injective ifand only if D is a retract of an exponential power of U with exponent in U . We emphasize that this is a logical equivalence “if and only if” rather than an ∞ -groupoid equivalence “ ≃ ”. More precisely, the theorem gives two constructionsin opposite directions. So this characterizes the types that can be equipped withalgebraic-injective structure. Proof. ( ⇒ ): Because D is algebraically U , U -injective, it is algebraically U , U + -injective by resizing, and hence it is a retract of D → U because it is embeddedinto it by the identity type former, by taking the extension of the identityfunction along this embedding.( ⇐ ): If D is a retract of X → U for some given X : U , then, because X → U , being an exponential power of the algebraically U , U -injective type U ,is algebraically U , U -injective, and hence so is D because it is a retract of thispower. 18e also have that any algebraically injective ( n + 1)-type is a retract ofan exponential power of the universe of n -types. We establish something moregeneral first.
31 Lemma.
Under propositional resizing, for any subuniverse Σ A of a universe U closed under subsingletons, we have that any algebraically U , U -injective type X : U whose identity types x = X x ′ all satisfy the property A is a retract of thetype X → Σ A .Proof. Because the first projection j : Σ A → U is an embedding by the as-sumption, so is the map k def = j ◦ ( − ) : ( X → Σ A ) → ( X → U ) by a generalproperty of embeddings. Now consider the map l : X → ( X → Σ A ) defined by x ( x ′ ( x = x ′ , p x x ′ )), where p x x ′ : A ( x = x ′ ) is given by the assumption.We have that k ◦ l = Id X by construction. Hence l is an embedding because l and Id X are, where we are using the general fact that if g ◦ f and g are em-beddings then so is the factor f . But X , being algebraically U , U -injective byassumption, is algebraically U , ( U + ⊔ T )-injective by resizing, and hence so isthe exponential power X → Σ A , and therefore we get the desired retraction byextending its identity map along l .Using this, we get the following as an immediate consequence.
32 Theorem. (Characterization of algebraic injective ( n + 1)-types.) If propo-sitional resizing holds, then an ( n + 1) -type D in U is algebraically U , U -injectiveif and only if D is a retract of an exponential power of the universe of n -typesin U , with exponent in U .
33 Corollary.
The algebraically injective sets in U are the retracts of powersetsof (arbitrary) types in U , assuming propositional resizing. Notice that the powerset of any type is a set, because Ω U is a set and becausesets (and more generally n -types) form an exponential ideal. We now compare injectivity with algebraic injectivity. The following observationfollows from the fact that retractions are surjections:
34 Lemma.
If a type D in a universe W is algebraically U , V -injective, then itis U , V -injective The following observation follows from the fact that propositions are closedunder products.
35 Lemma.
Injectivity is a proposition.
But of course algebraic injectivity is not. From this we immediately get thefollowing by the universal property of propositional truncation:19
For any type D in a universe W , the truncation of the algebraic U , V -injectivity of D gives its U , V -injectivity. In order to relate injectivity to the propositional truncation of algebraicinjectivity in the other direction, we first establish some facts about injectivitythat we already proved for algebraic injectivity. These facts cannot be obtainedby reduction (in particular products of injectives are not necessarily injective,in the absence of choice, but exponential powers are).
37 Lemma.
Any W , V -injective type D in a universe W is a retract of anytype in V it is embedded into, in an unspecified way.Proof. Given Y : V with an embedding j : D → Y , by the W , V -injectivity of D there is an unspecified r : Y → D with r ◦ j ∼ id. Now, if there is a specified r : Y → D with r ◦ j ∼ id then there is a specified retraction. Therefore, bythe functoriality of propositional truncation on objects applied to the previousstatement, there is an unspecified retraction.
38 Lemma.
If a type D ′ : U ′ is a retract of a type D : U then the W , T -injectivity of D implies that of D ′ .Proof. Let r : D → D ′ and s : D ′ → D be the given section retraction pair, and,to show that D ′ is W , T -injective, let an embedding j : X → Y and a function f : X → D ′ be given. By the injectivity of D , we have some unspecifiedextension f ′ : Y → D of s ◦ f : X → D . If such a designated extension isgiven, then we get the designated extension r ◦ f ′ of f . By the functorialityof propositional truncation on objects and the previous two statements, we getthe required, unspecified extension.The universe assignments in the following are probably not very friendly,but we are aiming for maximum generality.
39 Lemma.
If a type D : W is ( U ⊔ T ) , ( V ⊔ T ) -injective, then the exponentialpower A → D is U , V -injective for any A : T .Proof. For a given embedding j : X → Y and a given map f : X → ( A → D ),take the exponential transpose g : X × A → D of f , then extend it along theembedding j × id : X × A → Y × A to get g ′ : Y × A → D and then back-transpose to get f ′ : Y → ( A → D ), and check that this construction of f ′ does give an extension of f along j . For this, we need to know that if j is anembedding then so is j × id, but this is not hard to check. The result thenfollows by the functoriality-on-objects of the propositional truncation.
40 Lemma.
If a type D : U is U , U + injective, then it is a retract of D → U in an unspecified way.Proof. This is an immediate consequence of 37 and the fact that the identitytype former Id X : X → ( X → U ) is an embedding.20ith this we get an almost converse to the fact that truncated algebraicinjectivity implies injectivity: the universe levels are different in the converse:
41 Lemma.
If a type D : U is U , U + -injective, then it is algebraically U , U + -injective in an unspecified way. So, in summary, regarding the relationship between injectivity and truncatedalgebraic injectivity, so far we know thatif D is algebraically U , V -injective in an unspecified way then it is U , V -injective,and, not quite conversely,if D is U , U + -injective then it is algebraically U , U -injective in anunspecified way.Therefore, using propositional resizing, we get the following characterization ofa particular case of injectivity in terms of algebraic injectivity.
42 Proposition. (Injectivity in terms of algebraic injectivity.)
If propositionalresizing holds, then a type D : U is U , U + -injective if and only if it is algebraically U , U + -injective in an unspecified way. We would like to do better than this. For that purpose, we consider the partial-map classifier in conjunction with flabbiness and resizing.
10 Algebraic flabbiness via the partial-map clas-sifier
We begin with a generalization [5] of a familiar construction in 1-topos the-ory [10].
43 Definition.
The lifting L T X : T + ⊔ U of a type X : U with respect to auniverse T is defined by L T X def = Σ( P : T ) , ( P → X ) × P is a subsingleton . When the universes T and U are the same and the last component of thetriple is omitted, we have the familiar canonical correspondence( X → T ) ≃ (Σ( P : T ) , P → X )that maps A : X → T to P def = Σ A and the projection Σ A → X . If theuniverse U is not necessarily the same as T , then the equivalence becomes(Σ( A : X → T ⊔ U ) , Σ( T : T ) , T ≃ Σ A ) ≃ (Σ( P : T ) , P → X ) . This says that although the total space Σ A doesn’t live in the universe T , itmust have a copy in T . 21hat the third component of the triple does is to restrict the above equiv-alences to the subtype of those A whose total spaces Σ A are subsingletons. Ifwe define the type of partial maps by( X ⇀ Y ) def = Σ( A : T ) , ( A ֒ → X ) × ( A → Y ) , where A ֒ → X is the type of embeddings, then for any X, Y : T , we have anequivalence ( X ⇀ Y ) ≃ ( X → L T Y ) , so that L T is the partial-map classifier for the universe T . When the universe U is not necessarily the same as T , the lifting classifies partial maps in U whoseembeddings have fibers with copies in T .This is a sort of an ∞ -monad “across universes” [8], and modulo providingcoherence data, which we haven’t done at the time of writing, but which is notneeded for our purposes. We could call this a “wild monad”, but we will referto it as simply a monad with this warning.In order to discuss the lifting in more detail, we first characterize its equalitytypes. We denote the projections from L T X by δ ( P, φ, i ) def = P (domain of definition), υ ( P, φ, i ) def = φ (value function), σ ( P, φ, i ) def = i (subsingleton-hood of the domain of definition).For l, m : L T X , define( l ⋍ m ) def = Σ( e : δ l ≃ δ m ) , υ l = υ m ◦ e, as indicated in the commuting triangle δl e ✲ δmX vm ✛ vl ✲
44 Lemma.
The canonical transformation ( l = m ) → ( l ⋍ m ) that sends refl l to the identity equivalence paired with refl υ l is an equivalence. The unit η : X → L T X is given by η X x = ( , ( p x ) , i )where i is a proof that is a proposition.
45 Lemma.
The unit η X : X → L T X is an embedding.Proof. This is easily proved using the above characterization of equality.22
The unit satisfies the unit equations for a monad.Proof.
Using the above characterization of equality, the left and right unit lawsamount to the fact that the type is the left and right unit for the operation( − ) × ( − ) on types.Next, L T is functorial by mapping a function f : X → Y to the function L T f : L T X → L T Y defined by L T f ( P, φ, i ) = (
P, f ◦ φ, i ) . This commutes with identities and composition definitionally. We define themultiplication µ X : L T ( L T X ) → L T X by δ ( µ ( P, φ, i )) def = Σ( p : P ) , δ ( φ p ) ,υ ( µ ( P, φ, i )) def = ( p, q ) υ ( φ p ) q,σ ( µ ( P, φ, i )) def = because subsingletons are closed under sums.
47 Lemma.
The multiplication satisfies the associativity equation for a monad.Proof.
Using the above characterization of equality, we see that this amountsto the associativity of Σ, which says that for P : T , Q : X → T , R : Σ Q → T we have (Σ( t : Σ Q ) , R t ) ≃ (Σ( p : P ) Σ( q : Q p ) , R ( p, q )).The naturality conditions for the unit and multiplication are even easier tocheck, and we omit the verification. We now turn to algebras. We omit thedirect verification of the following.
48 Lemma.
Let X : U be any type.1. A function α : L T X → X , that is, a functor algebra, amounts to a familyof functions F P : ( P → X ) → X with P : T ranging over subsingletons.We will write F P φ as F p : P φ p .2. The unit law for monad algebras amounts to, for any x : X , G p : x = x, which is equivalent to, for all subsingletons P , functions φ : P → X andpoints p : P , G p : P φ p = φ p . Therefore a functor algebra satisfying the unit law amounts to the samething as algebraic flabbiness data. In other words, the algebraically T -flabby types are the algebras of the pointed functor ( L T , η ) . In particular,monad algebras are algebraically flabby. . The associativity law for monad algebras amounts to, for any subsingleton P : T and family Q : P → T of subsingletons, and any φ : Σ Q → X , G t :Σ Q φ t = G p : P G q : Q p φ ( p, q ) . So the associativity law for algebras plays no role in flabbiness. But of coursewe can have algebraic flabbiness data that is associative, such as not only thefree algebra L T X , but also the following two examples that connect to theopening development of this paper on the injectivity of universes, in particularthe construction 10:
49 Lemma.
The universe T is a monad algebra of L T in at least two ways,with F = Σ and F = Π . We now apply these ideas to injectivity.
50 Lemma.
Any algebraically T , T + -injective type D : T is a retract of L T D .Proof. Because the unit is an embedding, and so we can extend the identityof D along it.
51 Theorem. (Second characterization of algebraic injectives.)
With proposi-tional resizing, a type D : T is algebraically T , T -injective if and only if it is aretract of a monad algebra of L T .Proof. ( ⇒ ): Because D is algebraically T , T -injective, it is algebraically T , T + -injective by resizing, and hence it is a retract of L T D . ( ⇐ ): Algebraic injectivityis closed under retracts.
52 Definition.
Now, instead of propositional resizing, we consider the proposi-tional impredicativity of the universe U , which says that the type Ω U of propo-sitions in U , which lives in the next universe U + , has an equivalent copy in U .We refer to this kind of impredicativity as Ω-resizing.It is not hard to see that propositional resizing implies Ω-resizing for alluniverses other than the first one [8], and so all the assumption of Ω-resizingdoes is to account for the first universe too.
53 Lemma.
Under Ω -resizing, for any type X : T , the type L T X : T + has anequivalent copy in the universe T .Proof. We can take Σ( p : Ω ′ ) , pr ( ρ p ) → X where ρ : Ω ′ → Ω T is the givenequivalence.We apply this lifting machinery to get the following, which doesn’t mentionlifting in its formulation.
54 Theorem. (Characterization of injectivity in terms of algebraic injectivity.)In the presence of Ω -resizing, the T , T -injectivity of a type D in a universe T is equivalent to the propositional truncation of its algebraic T , T -injectivity. roof. We already know that the truncation of algebraic injectivity (trivially)gives injectivity. For the other direction, let L be a resized copy of L T D inthe universe T . Composing the unit with the equivalence given by resizing, weget an embedding D → L , because embeddings are closed under compositionand equivalences are embeddings. Hence D is a retract of L in an unspecifiedway by the injectivity of D , by extending its identity. But L , being equivalentto a free algebra, is algebraically injective, and hence, being a retract of L inan unspecified way, D is algebraically injective in an unspecified way, becauseretracts of algebraically injectives are algebraically injective, by the functorialityof truncation on objects.As an immediate consequence, by reduction to the above results about alge-braic injectivity, we have the following corollary.
55 Theorem.
Under Ω -resizing and propositional resizing, if a type D in auniverse T is T , T -injective , then it is also U , V -injective for any universes U and V .Proof. The type D is algebraically T , T -injective in an unspecified way, andso by functoriality of truncation on objects and algebraic injective resizing,it is algebraically U , V -injective in an unspecified way, and hence it is U , V -injective.At the time of writing, we are not able to establish the converse. In partic-ular, we don’t have the analogue of 27.
11 The equivalence of excluded middle with the(algebraic) injectivity of all pointed types
Algebraic flabbiness can also be applied to show that all pointed types are(algebraically) injective if and only if excluded middle holds, where for injectivityresizing is needed as an assumption, but for algebraic injectivity it is not.The decidability of a type X is defined to be the assertion X + ( X → ),which says that we can exhibit a point of X or else tell that X is empty. Theprinciple of excluded middle in univalent mathematics, for the universe U , istaken to mean that all subsingleton types in U are decidable:EM U def = Π( P : U ) , P is a subsingleton → P + ( P → ).As discussed in the introduction, we are not assuming or rejecting this prin-ciple, which is independent of the other axioms. Notice that, in the presenceof function extensionality, this principle is a subsingleton, because products ofsubsingletons are subsingletons and because P + ( P → ) is a subsingleton forany subsingleton P . So in the following we get data out of a proposition.
56 Lemma.
If excluded middle holds in the universe U , then every pointed type D in any universe W is algebraically U -flabby. roof. Let d be the given point of D and f : P → D be a function withsubsingleton domain. If we have a point p : P , then we can take f p as theflabbiness witness. Otherwise, if P → , we can take d as the flabbiness witness.For the converse, we use the following.
57 Lemma.
If the type P + ( P → ) + is algebraically W -flabby for a givensubsingleton P in a universe W , then P is decidable.Proof. Denote by D the type P + ( P → ) + and let f : P + ( P → ) → D bethe inclusion. Because P + ( P → ) is a subsingleton, the algebraic flabbinessof D gives d : D with d = f z for all z : P + ( P → ). Now, by definition ofbinary sum, d must be in one of the three components of the sum that defines D .If it were in the third component, namely , then P couldn’t hold, because ifit did we would have p : P and hence, omitting the inclusions into sums, andconsidering z = p , we would have, d = f p = p , because f is the inclusion, whichis not in the component. But also P → couldn’t hold, because if it did wewould have φ : P → and hence, again omitting the inclusion, and considering z = φ , we would have d = f φ = φ , which again is not in the component.But it is impossible for both P and P → to fail, because this would meanthat we would have functions P → (the failure of P ) and ( P → ) → (thefailure of P → ), and so we could apply the second function to the first to geta point of the empty type, which is not available. Therefore d can’t be in thethird component, and so it must be in the first or the second, which means that P is decidable.From this we immediately conclude the following:
58 Lemma.
If all pointed types in a universe W are algebraically W -flabby,then excluded middle holds in W . And then we have the same situation for algebraically injective types, by reduc-tion to algebraic flabbiness:
59 Lemma.
If excluded middle holds in the universe
U ⊔ V , then any pointedtype D in any universe W is algebraically U , V -injective. Putting this together with some universe specializations, we have the followingconstruction.
60 Theorem.
All pointed types in a universe U are algebraically U , U -injectiveif and only if excluded middle holds in U . And we have a similar situation with injective types.
61 Lemma.
If excluded middle holds, then every inhabited type of any universeis injective with respect to any two universes.Proof.
Because excluded middle gives algebraic injectivity, which in turn givesinjectivity. 26ithout resizing, we have the following.
62 Lemma.
If every inhabited type D : W is W , W + -injective, then excludedmiddle holds in the universe W .Proof. Given a proposition P , we have that the type D def = P + ( P → ) + W isinjective by the assumption. Hence it is algebraically injective in an unspecifiedway by Proposition 42. And so it is algebraically flabby in an unspecified way.By the lemma, P is decidable in an unspecified way, but then it is decidablebecause the decidability of a proposition is a proposition.With resizing we can do better:
63 Lemma.
Under Ω -resizing, if every inhabited type in a universe U is U , U -injective, then excluded middle holds in U .Proof. Given a proposition P , we have that the type D def = P + ( P → ) + U is injective by the assumption. Hence it is injective in an unspecified way byTheorem 54. And so it is algebraically flabby in an unspecified way. By thelemma, P is decidable in an unspecified way, and hence decidable.
64 Theorem.
Under Ω -resizing, all inhabited types in a universe U are U , U -injective if and only if excluded middles holds in U . It would be interesting to get rid of the resizing assumption, which, as we haveseen, is not needed for the equivalence of the algebraic injectivity of all pointedtypes with excluded middle.
References [1] Ingo Blechschmidt. Flabby and injective objects in toposes. arXiv e-prints ,page arXiv:1810.12708, Oct 2018.[2] John Bourke. Equipping weak equivalences with algebraic structure. arXive-prints , page arXiv:1712.02523, Dec 2017.[3] The Agda community. Agda wiki. https://wiki.portal.chalmers.se/agda/pmwiki.php .[4] The Coq development team. The coq proof assistant. https://coq.inria.fr/ .[5] Mart´ın H. Escard´o and Cory M. Knapp. Partial elements and recursionvia dominances in univalent type theory. In
Computer science logic 2017 ,volume 82 of
LIPIcs. Leibniz Int. Proc. Inform. , pages Art. No. 21, 16.Schloss Dagstuhl. Leibniz-Zent. Inform., Wadern, 2017.[6] Mart´ın H¨otzel Escard´o. Injective types in univalent mathematics. https://github.com/martinescardo/TypeTopology/blob/master/source/InjectiveTypes-article.lagda , February 2019.Agda development. 277] Mart´ın H¨otzel Escard´o. Injective types in univalent mathematics(blackboard version). https://github.com/martinescardo/TypeTopology/blob/master/source/InjectiveTypes.lagda ,February 2019. Agda development.[8] Mart´ın H¨otzel Escard´o. Various new theorems in constructive univalentmathematics written in Agda. https://github.com/martinescardo/TypeTopology/ , February 2019.Agda development.[9] Toby Kenney. Injective power objects and the axiom of choice.
J. PureAppl. Algebra , 215(2):131–144, 2011.[10] Anders Kock. Algebras for the partial map classifier monad. In
Categorytheory (Como, 1990) , volume 1488 of
Lecture Notes in Math. , pages 262–278. Springer, Berlin, 1991.[11] Egbert Rijke. Homotopy type theory. Master’s thesis, Utrecht University,2012. https://homotopytypetheory.org/2012/08/18/a-master-thesis-on-homotopy-type-theory/ .[12] Michael Shulman. Univalence for inverse diagrams and homotopy canonic-ity.
Math. Structures Comput. Sci. , 25(5):1203–1277, 2015.[13] Michael Shulman. Idempotents in intensional type theory.