Martin Escardo, August 2023 More about injectivity. \begin{code} {-# OPTIONS --safe --without-K #-} open import UF.FunExt module InjectiveTypes.OverSmallMaps (fe : FunExt) where open import InjectiveTypes.Blackboard fe open import MLTT.Spartan open import UF.Embeddings open import UF.Equiv open import UF.Size open import UF.Subsingletons private fe' : Fun-Ext fe' {π€} {π₯} = fe π€ π₯ \end{code} Added 3rd August 2023. Extensions over small embeddings induced by algebraic flabbiness. The point is to reduce size without resizing axioms. An application is in Taboos.Decomposability. \begin{code} module _ (D : π¦ Μ ) (D-is-flabby : aflabby D π£) {X : π€ Μ } {Y : π₯ Μ } (j : X β Y) (j-is-embedding : is-embedding j) (j-small : j is π£ small-map) (f : X β D) where private R : Y β π£ Μ R y = resized (fiber j y) (j-small y) Ο : (y : Y) β R y β fiber j y Ο y = resizing-condition (j-small y) R-is-prop : (y : Y) β is-prop (R y) R-is-prop y = equiv-to-prop (Ο y) (j-is-embedding y) e : (y : Y) β Ξ£ d κ D , ((r : R y) β d οΌ f (prβ (β Ο y β r))) e y = D-is-flabby (R y) (R-is-prop y) (Ξ» r β f (prβ (β Ο y β r))) sflabby-extension : (Y β D) sflabby-extension y = prβ (e y) sflabby-extension-property : sflabby-extension β j βΌ f sflabby-extension-property x = sflabby-extension (j x) οΌβ¨ I β© f (prβ (β Ο (j x) β (β Ο (j x) ββ»ΒΉ w))) οΌβ¨ II β© f (prβ w) οΌβ¨ refl β© f x β where w : fiber j (j x) w = x , refl I = prβ (e (j x)) (β Ο (j x) ββ»ΒΉ w) II = ap (f β prβ) (β-sym-is-rinv (Ο (j x)) w) aflabbiness-gives-injectivity-over-small-maps : Ξ£ f' κ (Y β D) , f' β j βΌ f aflabbiness-gives-injectivity-over-small-maps = sflabby-extension , sflabby-extension-property \end{code} An extension property for injective types, with more general universes and less general embeddings. \begin{code} ainjectivity-over-small-maps : {π€ π₯ π¦ π£β π£β π£β : Universe} β (D : π¦ Μ ) β ainjective-type D (π£β β π£β) π£β β {X : π€ Μ } {Y : π₯ Μ } (j : X β Y) β is-embedding j β j is π£β small-map β (f : X β D) β Ξ£ f' κ (Y β D) , f' β j βΌ f ainjectivity-over-small-maps {π€} {π₯} {π¦} {π£β} {π£β} {π£β} D D-ainj = aflabbiness-gives-injectivity-over-small-maps D (aflabbiness-resizingβ {π¦} {π£β} {π£β} D (ainjective-types-are-aflabby D D-ainj)) \end{code} Added by Martin Escardo and Tom de Jong 24th October 2024. As an application of the above, we get the following version of embedding-retract from InjectiveTypes/Blackboard with better universe levels. \begin{code} open import UF.Retracts embedding-retract' : {π€ π₯ π¦ π£ π£' : Universe} β (D : π€ Μ ) (Y : π₯ Μ ) (j : D β Y) β is-embedding j β j is π£ small-map β ainjective-type D (π£ β π£') π¦ β retract D of Y embedding-retract' {π€} {π₯} {π¦} {π£} {π£'} D Y j e s i = prβ a , j , prβ a where a : Ξ£ f' κ (Y β D) , f' β j βΌ id a = ainjectivity-over-small-maps {π€} {π₯} {π€} {π£} {π£'} {π¦} D i j e s id \end{code} Added by Martin Escardo and Tom de Jong 7th November 2024. We now improve the universe levels of the module ainjectivity-of-Lifting in the file BlackBoard. \begin{code} open import UF.Univalence module ainjectivity-of-Lifting' (π£ : Universe) (ua : is-univalent π£) where private pe : propext π£ pe = univalence-gives-propext ua open ainjectivity-of-Lifting π£ open import Lifting.UnivalentPrecategory π£ open import UF.UA-FunExt open import UF.EquivalenceExamples Ξ·-is-small-map : {X : π€ Μ } β (Ξ· βΆ (X β π X)) is π£ small-map Ξ·-is-small-map {π€} {X} l = is-defined l , β-sym (Ξ·-fiber-same-as-is-defined X pe fe' fe' fe' l) ainjective-is-retract-of-free-π-algebra' : (D : π€ Μ ) β ainjective-type D (π£ β π₯) π¦ β retract D of (π D) ainjective-is-retract-of-free-π-algebra' {π€} {π₯} {π¦} D = embedding-retract' {π€} {π£ βΊ β π€} {π¦} {π£} {π₯} D (π D) Ξ· (Ξ·-is-embedding' π€ D ua fe') Ξ·-is-small-map ainjectives-in-terms-of-free-π-algebras' : (D : π€ Μ ) β ainjective-type D π£ π£ β (Ξ£ X κ π€ Μ , retract D of (π X)) ainjectives-in-terms-of-free-π-algebras' {π€} D = a , b where a : ainjective-type D π£ π£ β Ξ£ X κ π€ Μ , retract D of (π X) a i = D , ainjective-is-retract-of-free-π-algebra' {π€} {π£} {π£} D i b : (Ξ£ X κ π€ Μ , retract D of (π X)) β ainjective-type D π£ π£ b (X , r) = retract-of-ainjective D (π X) (free-π-algebra-ainjective ua X) r \end{code} A particular case of interest that arises in practice is the following. \begin{code} ainjectives-in-terms-of-free-π-algebrasβΊ : (D : π£ βΊ Μ ) β ainjective-type D π£ π£ β (Ξ£ X κ π£ βΊ Μ , retract D of (π X)) ainjectives-in-terms-of-free-π-algebrasβΊ = ainjectives-in-terms-of-free-π-algebras' _ : {X : π£ βΊ Μ } β type-of (π X) οΌ π£ βΊ Μ _ = refl \end{code}