From 01ea45b763a3742768d20cf9533ab70ca6b0c89e Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 30 Aug 2025 22:47:59 +0200 Subject: [PATCH 01/41] renaming polynomial endofunctors --- ...unctoriality-dependent-pair-types.lagda.md | 57 +++++++---- .../transport-along-identifications.lagda.md | 5 + ...equality-dependent-function-types.lagda.md | 10 ++ src/foundation/function-types.lagda.md | 4 +- src/foundation/path-cosplit-maps.lagda.md | 2 +- src/foundation/slice.lagda.md | 2 +- src/foundation/type-duality.lagda.md | 4 +- .../algebras-polynomial-endofunctors.lagda.md | 4 +- ...lgebra-of-enriched-directed-trees.lagda.md | 2 +- ...oalgebras-polynomial-endofunctors.lagda.md | 4 +- ...-algebras-polynomial-endofunctors.lagda.md | 16 ++-- ...oalgebras-polynomial-endofunctors.lagda.md | 16 ++-- src/trees/polynomial-endofunctors.lagda.md | 95 ++++++++++++++----- src/trees/w-types.lagda.md | 20 ++-- 14 files changed, 162 insertions(+), 79 deletions(-) diff --git a/src/foundation-core/functoriality-dependent-pair-types.lagda.md b/src/foundation-core/functoriality-dependent-pair-types.lagda.md index f3d941d326..30b3e05d74 100644 --- a/src/foundation-core/functoriality-dependent-pair-types.lagda.md +++ b/src/foundation-core/functoriality-dependent-pair-types.lagda.md @@ -55,8 +55,7 @@ Any family of maps induces a map on the total spaces. ```agda tot : Σ A B → Σ A C - pr1 (tot t) = pr1 t - pr2 (tot t) = f (pr1 t) (pr2 t) + tot t = (pr1 t , f (pr1 t) (pr2 t)) ``` ### Any map `f : A → B` induces a map `Σ A (C ∘ f) → Σ B C` @@ -67,8 +66,7 @@ module _ where map-Σ-map-base : Σ A (λ x → C (f x)) → Σ B C - pr1 (map-Σ-map-base s) = f (pr1 s) - pr2 (map-Σ-map-base s) = pr2 s + map-Σ-map-base s = (f (pr1 s) , pr2 s) ``` ### The functorial action of dependent pair types, and its defining homotopy @@ -79,10 +77,8 @@ module _ (D : B → UU l4) where - map-Σ : - (f : A → B) (g : (x : A) → C x → D (f x)) → Σ A C → Σ B D - pr1 (map-Σ f g t) = f (pr1 t) - pr2 (map-Σ f g t) = g (pr1 t) (pr2 t) + map-Σ : (f : A → B) (g : (x : A) → C x → D (f x)) → Σ A C → Σ B D + map-Σ f g t = (f (pr1 t) , g (pr1 t) (pr2 t)) triangle-map-Σ : (f : A → B) (g : (x : A) → C x → D (f x)) → @@ -123,7 +119,7 @@ tot-htpy H (pair x y) = eq-pair-eq-fiber (H x y) tot-id : {l1 l2 : Level} {A : UU l1} (B : A → UU l2) → (tot (λ x (y : B x) → y)) ~ id -tot-id B (pair x y) = refl +tot-id B p = refl ``` ### The map `tot` preserves composition @@ -134,7 +130,7 @@ preserves-comp-tot : {A : UU l1} {B : A → UU l2} {B' : A → UU l3} {B'' : A → UU l4} (f : (x : A) → B x → B' x) (g : (x : A) → B' x → B'' x) → tot (λ x → (g x) ∘ (f x)) ~ ((tot g) ∘ (tot f)) -preserves-comp-tot f g (pair x y) = refl +preserves-comp-tot f g p = refl ``` ### The fibers of `tot` @@ -414,7 +410,8 @@ module _ equiv-Σ-equiv-base : {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} (C : B → UU l3) (e : A ≃ B) → Σ A (C ∘ map-equiv e) ≃ Σ B C -pr1 (equiv-Σ-equiv-base C (pair f is-equiv-f)) = map-Σ-map-base f C +pr1 (equiv-Σ-equiv-base C (pair f is-equiv-f)) = + map-Σ-map-base f C pr2 (equiv-Σ-equiv-base C (pair f is-equiv-f)) = is-equiv-map-Σ-map-base f C is-equiv-f ``` @@ -477,13 +474,13 @@ module _ fiber-triangle : (x : X) → fiber f x → fiber g x - pr1 (fiber-triangle .(f a) (pair a refl)) = h a - pr2 (fiber-triangle .(f a) (pair a refl)) = inv (H a) + pr1 (fiber-triangle .(f a) (a , refl)) = h a + pr2 (fiber-triangle .(f a) (a , refl)) = inv (H a) square-tot-fiber-triangle : ( h ∘ map-equiv-total-fiber f) ~ ( map-equiv-total-fiber g ∘ tot fiber-triangle) - square-tot-fiber-triangle (pair .(f a) (pair a refl)) = refl + square-tot-fiber-triangle (.(f a) , a , refl) = refl ``` ### In a commuting triangle, the top map is an equivalence if and only if it induces an equivalence on fibers @@ -560,10 +557,36 @@ module _ (g : (a : A) → X a → Y a) {a a' : A} {x : X a} {x' : X a'} where - compute-ap-tot : + coh-ap-tot : pair-eq-Σ ∘ ap (tot g) {a , x} {a' , x'} ~ - tot (λ p q → inv (preserves-tr g p x) ∙ ap (g a') q) ∘ pair-eq-Σ - compute-ap-tot refl = refl + tot (λ p q → inv-preserves-tr g p x ∙ ap (g a') q) ∘ pair-eq-Σ + coh-ap-tot refl = refl + + compute-ap-tot : + (p : a = a') → + (q : dependent-identification X p x x') → + ap (tot g) {a , x} {a' , x'} (eq-pair-Σ p q) = + eq-pair-Σ p (inv-preserves-tr g p x ∙ ap (g a') q) + compute-ap-tot refl refl = refl + + compute-ap-tot' : + (p : (a , x) = (a' , x')) → + ap (tot g) {a , x} {a' , x'} p = + eq-pair-Σ + ( ap pr1 p) + ( inv-preserves-tr g (ap pr1 p) x ∙ + ap (g a') (tr-ap pr1 (λ x _ → pr2 x) p a)) + compute-ap-tot' refl = refl + + inv-compute-ap-tot' : + (p : (a , x) = (a' , x')) → + eq-pair-Σ + ( ap pr1 p) + ( inv-preserves-tr g (ap pr1 p) x ∙ + ap (g a') (tr-ap pr1 (λ x _ → pr2 x) p a)) = + ap (tot g) {a , x} {a' , x'} p + inv-compute-ap-tot' p = inv (compute-ap-tot' p) + ``` ### Computing the action on identifications of the functorial action of Σ diff --git a/src/foundation-core/transport-along-identifications.lagda.md b/src/foundation-core/transport-along-identifications.lagda.md index 49b511e7e0..c808e18233 100644 --- a/src/foundation-core/transport-along-identifications.lagda.md +++ b/src/foundation-core/transport-along-identifications.lagda.md @@ -63,6 +63,11 @@ module _ f j (tr A p x) = tr B p (f i x) preserves-tr refl x = refl + inv-preserves-tr : + {i j : I} (p : i = j) (x : A i) → + tr B p (f i x) = f j (tr A p x) + inv-preserves-tr p x = inv (preserves-tr p x) + compute-preserves-tr : {i j : I} (p : i = j) (x : A i) → preserves-tr p x = diff --git a/src/foundation/equality-dependent-function-types.lagda.md b/src/foundation/equality-dependent-function-types.lagda.md index 04e62574f7..5a58c07765 100644 --- a/src/foundation/equality-dependent-function-types.lagda.md +++ b/src/foundation/equality-dependent-function-types.lagda.md @@ -54,6 +54,16 @@ module _ ( equiv-explicit-implicit-Π) ( λ _ → equiv-explicit-implicit-Π)) ( is-torsorial-Eq-Π) + + + is-torsorial-Eq-implicit-Π' : is-torsorial (λ g → (x : A) → C x (g {x})) + is-torsorial-Eq-implicit-Π' = + is-contr-equiv + ( Σ ((x : A) → B x) (λ g → (x : A) → C x (g x))) + ( equiv-Σ-equiv-base + ( λ g → (x : A) → C x (g x)) + ( equiv-explicit-implicit-Π)) + ( is-torsorial-Eq-Π) ``` ### Extensionality diff --git a/src/foundation/function-types.lagda.md b/src/foundation/function-types.lagda.md index d6fb4ed16f..600fdfb138 100644 --- a/src/foundation/function-types.lagda.md +++ b/src/foundation/function-types.lagda.md @@ -91,8 +91,8 @@ module _ compute-dependent-identification-function-type : (p : x = y) (f : B x → C x) (g : B y → C y) → - ((b : B x) → tr C p (f b) = g (tr B p b)) ≃ - dependent-identification (λ a → B a → C a) p f g + ( (b : B x) → tr C p (f b) = g (tr B p b)) ≃ + ( dependent-identification (λ a → B a → C a) p f g) compute-dependent-identification-function-type refl f g = inv-equiv equiv-funext diff --git a/src/foundation/path-cosplit-maps.lagda.md b/src/foundation/path-cosplit-maps.lagda.md index 854352b42a..1e86bc9b54 100644 --- a/src/foundation/path-cosplit-maps.lagda.md +++ b/src/foundation/path-cosplit-maps.lagda.md @@ -507,7 +507,7 @@ is-path-cosplit-tot {k = succ-𝕋 k} {f = f} F x y = is-path-cosplit-equiv-arrow ( equiv-pair-eq-Σ x y , equiv-pair-eq-Σ (tot f x) (tot f y) , - compute-ap-tot f) + coh-ap-tot f) ( is-path-cosplit-tot { f = λ p q → inv (preserves-tr f p (pr2 x)) ∙ ap (f (pr1 y)) q} ( λ where refl → F (pr1 y) (pr2 x) (pr2 y))) diff --git a/src/foundation/slice.lagda.md b/src/foundation/slice.lagda.md index 0a41b6dd82..cf5d855706 100644 --- a/src/foundation/slice.lagda.md +++ b/src/foundation/slice.lagda.md @@ -52,7 +52,7 @@ definitions for types. ```agda Slice : (l : Level) {l1 : Level} (A : UU l1) → UU (l1 ⊔ lsuc l) -Slice l = type-polynomial-endofunctor (UU l) (λ X → X) +Slice l = type-polynomial-endofunctor' (UU l) (λ X → X) ``` ### The morphisms in the slice category of types diff --git a/src/foundation/type-duality.lagda.md b/src/foundation/type-duality.lagda.md index c2beea330e..d29f7756a8 100644 --- a/src/foundation/type-duality.lagda.md +++ b/src/foundation/type-duality.lagda.md @@ -73,7 +73,7 @@ type-polynomial-endofunctor-UU l = Slice l map-polynomial-endofunctor-UU : (l : Level) {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → type-polynomial-endofunctor-UU l A → type-polynomial-endofunctor-UU l B -map-polynomial-endofunctor-UU l = map-polynomial-endofunctor (UU l) (λ X → X) +map-polynomial-endofunctor-UU l = map-polynomial-endofunctor' (UU l) (λ X → X) ``` ### Type families @@ -90,7 +90,7 @@ map-exp-UU l f P = P ∘ f ## Properties -### If `A` is locally `l`-small, then we can construct an embedding `type-polynomial-endofunctor l A ↪ type-exp-UU A` +### If `A` is locally `l`-small, then we can construct an embedding `type-polynomial-endofunctor' l A ↪ type-exp-UU A` ```agda map-type-duality : diff --git a/src/trees/algebras-polynomial-endofunctors.lagda.md b/src/trees/algebras-polynomial-endofunctors.lagda.md index ca1ac4e432..bd2daee03f 100644 --- a/src/trees/algebras-polynomial-endofunctors.lagda.md +++ b/src/trees/algebras-polynomial-endofunctors.lagda.md @@ -29,7 +29,7 @@ algebra-polynomial-endofunctor : (l : Level) {l1 l2 : Level} (A : UU l1) (B : A → UU l2) → UU (lsuc l ⊔ l1 ⊔ l2) algebra-polynomial-endofunctor l A B = - Σ (UU l) (λ X → type-polynomial-endofunctor A B X → X) + Σ (UU l) (λ X → type-polynomial-endofunctor' A B X → X) type-algebra-polynomial-endofunctor : {l l1 l2 : Level} {A : UU l1} {B : A → UU l2} → @@ -39,7 +39,7 @@ type-algebra-polynomial-endofunctor X = pr1 X structure-algebra-polynomial-endofunctor : {l l1 l2 : Level} {A : UU l1} {B : A → UU l2} (X : algebra-polynomial-endofunctor l A B) → - type-polynomial-endofunctor A B (type-algebra-polynomial-endofunctor X) → + type-polynomial-endofunctor' A B (type-algebra-polynomial-endofunctor X) → type-algebra-polynomial-endofunctor X structure-algebra-polynomial-endofunctor X = pr2 X ``` diff --git a/src/trees/coalgebra-of-enriched-directed-trees.lagda.md b/src/trees/coalgebra-of-enriched-directed-trees.lagda.md index 32cae5c137..36112c9f2a 100644 --- a/src/trees/coalgebra-of-enriched-directed-trees.lagda.md +++ b/src/trees/coalgebra-of-enriched-directed-trees.lagda.md @@ -38,7 +38,7 @@ module _ structure-coalgebra-Enriched-Directed-Tree : Enriched-Directed-Tree l3 l3 A B → - type-polynomial-endofunctor A B (Enriched-Directed-Tree l3 l3 A B) + type-polynomial-endofunctor' A B (Enriched-Directed-Tree l3 l3 A B) pr1 (structure-coalgebra-Enriched-Directed-Tree T) = shape-root-Enriched-Directed-Tree A B T pr2 (structure-coalgebra-Enriched-Directed-Tree T) = diff --git a/src/trees/coalgebras-polynomial-endofunctors.lagda.md b/src/trees/coalgebras-polynomial-endofunctors.lagda.md index 85f9f915c3..ab0f5c5e7b 100644 --- a/src/trees/coalgebras-polynomial-endofunctors.lagda.md +++ b/src/trees/coalgebras-polynomial-endofunctors.lagda.md @@ -33,7 +33,7 @@ module _ coalgebra-polynomial-endofunctor : UU (l1 ⊔ l2 ⊔ lsuc l) coalgebra-polynomial-endofunctor = - Σ (UU l) (λ X → X → type-polynomial-endofunctor A B X) + Σ (UU l) (λ X → X → type-polynomial-endofunctor' A B X) module _ {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} @@ -45,7 +45,7 @@ module _ structure-coalgebra-polynomial-endofunctor : type-coalgebra-polynomial-endofunctor → - type-polynomial-endofunctor A B type-coalgebra-polynomial-endofunctor + type-polynomial-endofunctor' A B type-coalgebra-polynomial-endofunctor structure-coalgebra-polynomial-endofunctor = pr2 X shape-coalgebra-polynomial-endofunctor : diff --git a/src/trees/morphisms-algebras-polynomial-endofunctors.lagda.md b/src/trees/morphisms-algebras-polynomial-endofunctors.lagda.md index d40f1944ee..78d7ec75ab 100644 --- a/src/trees/morphisms-algebras-polynomial-endofunctors.lagda.md +++ b/src/trees/morphisms-algebras-polynomial-endofunctors.lagda.md @@ -61,7 +61,7 @@ hom-algebra-polynomial-endofunctor {A = A} {B} X Y = ( λ f → ( f ∘ (structure-algebra-polynomial-endofunctor X)) ~ ( ( structure-algebra-polynomial-endofunctor Y) ∘ - ( map-polynomial-endofunctor A B f))) + ( map-polynomial-endofunctor' A B f))) map-hom-algebra-polynomial-endofunctor : {l1 l2 l3 l4 : Level} {A : UU l1} {B : A → UU l2} @@ -80,7 +80,7 @@ structure-hom-algebra-polynomial-endofunctor : ( ( map-hom-algebra-polynomial-endofunctor X Y f) ∘ ( structure-algebra-polynomial-endofunctor X)) ~ ( ( structure-algebra-polynomial-endofunctor Y) ∘ - ( map-polynomial-endofunctor A B + ( map-polynomial-endofunctor' A B ( map-hom-algebra-polynomial-endofunctor X Y f))) structure-hom-algebra-polynomial-endofunctor X Y f = pr2 f ``` @@ -105,7 +105,7 @@ module _ ( λ H → ( ( structure-hom-algebra-polynomial-endofunctor X Y f) ∙h ( ( structure-algebra-polynomial-endofunctor Y) ·l - ( htpy-polynomial-endofunctor A B H))) ~ + ( htpy-polynomial-endofunctor' A B H))) ~ ( ( H ·r structure-algebra-polynomial-endofunctor X) ∙h ( structure-hom-algebra-polynomial-endofunctor X Y g))) @@ -118,10 +118,10 @@ module _ concat ( structure-hom-algebra-polynomial-endofunctor X Y f z) ( structure-algebra-polynomial-endofunctor Y - ( map-polynomial-endofunctor A B + ( map-polynomial-endofunctor' A B ( map-hom-algebra-polynomial-endofunctor X Y f) z)) ( ap (structure-algebra-polynomial-endofunctor Y) t)) - ( coh-refl-htpy-polynomial-endofunctor A B + ( coh-refl-htpy-polynomial-endofunctor' A B ( map-hom-algebra-polynomial-endofunctor X Y f) z)) ∙ ( right-unit) @@ -139,7 +139,7 @@ module _ ( pair (map-hom-algebra-polynomial-endofunctor X Y f) refl-htpy) ( is-contr-equiv' ( Σ ( ( (pr1 f) ∘ pr2 X) ~ - ( pr2 Y ∘ map-polynomial-endofunctor A B (pr1 f))) + ( pr2 Y ∘ map-polynomial-endofunctor' A B (pr1 f))) ( λ H → (pr2 f) ~ H)) ( equiv-tot ( λ H → @@ -149,10 +149,10 @@ module _ ( concat ( pr2 f x) ( structure-algebra-polynomial-endofunctor Y - ( map-polynomial-endofunctor A B (pr1 f) x))) + ( map-polynomial-endofunctor' A B (pr1 f) x))) ( ap ( ap (pr2 Y)) - ( coh-refl-htpy-polynomial-endofunctor A B (pr1 f) x))) + ( coh-refl-htpy-polynomial-endofunctor' A B (pr1 f) x))) ( H)) ∘e ( equiv-concat-htpy right-unit-htpy H))) ( is-torsorial-htpy (pr2 f))) diff --git a/src/trees/morphisms-coalgebras-polynomial-endofunctors.lagda.md b/src/trees/morphisms-coalgebras-polynomial-endofunctors.lagda.md index f6771ba67b..0f883d63c1 100644 --- a/src/trees/morphisms-coalgebras-polynomial-endofunctors.lagda.md +++ b/src/trees/morphisms-coalgebras-polynomial-endofunctors.lagda.md @@ -62,7 +62,7 @@ hom-coalgebra-polynomial-endofunctor {A = A} {B} X Y = ( coherence-square-maps f ( structure-coalgebra-polynomial-endofunctor X) ( structure-coalgebra-polynomial-endofunctor Y) - ( map-polynomial-endofunctor A B f))) + ( map-polynomial-endofunctor' A B f))) map-hom-coalgebra-polynomial-endofunctor : {l1 l2 l3 l4 : Level} {A : UU l1} {B : A → UU l2} @@ -82,7 +82,7 @@ structure-hom-coalgebra-polynomial-endofunctor : ( map-hom-coalgebra-polynomial-endofunctor X Y f) ( structure-coalgebra-polynomial-endofunctor X) ( structure-coalgebra-polynomial-endofunctor Y) - ( map-polynomial-endofunctor A B + ( map-polynomial-endofunctor' A B ( map-hom-coalgebra-polynomial-endofunctor X Y f)) structure-hom-coalgebra-polynomial-endofunctor X Y f = pr2 f ``` @@ -107,7 +107,7 @@ module _ ( λ H → ( ( structure-hom-coalgebra-polynomial-endofunctor X Y f) ∙h ( structure-coalgebra-polynomial-endofunctor Y ·l H)) ~ - ( ( ( htpy-polynomial-endofunctor A B H) ·r + ( ( ( htpy-polynomial-endofunctor' A B H) ·r ( structure-coalgebra-polynomial-endofunctor X)) ∙h ( structure-hom-coalgebra-polynomial-endofunctor X Y g))) @@ -119,11 +119,11 @@ module _ ( inv ( ap ( concat' - ( map-polynomial-endofunctor A B + ( map-polynomial-endofunctor' A B ( map-hom-coalgebra-polynomial-endofunctor X Y f) ( structure-coalgebra-polynomial-endofunctor X z)) ( structure-hom-coalgebra-polynomial-endofunctor X Y f z)) - ( coh-refl-htpy-polynomial-endofunctor A B + ( coh-refl-htpy-polynomial-endofunctor' A B ( map-hom-coalgebra-polynomial-endofunctor X Y f) ( structure-coalgebra-polynomial-endofunctor X z)))) @@ -144,7 +144,7 @@ module _ ( map-hom-coalgebra-polynomial-endofunctor X Y f) ( structure-coalgebra-polynomial-endofunctor X) ( structure-coalgebra-polynomial-endofunctor Y) - ( map-polynomial-endofunctor A B + ( map-polynomial-endofunctor' A B ( map-hom-coalgebra-polynomial-endofunctor X Y f))) ( λ G → ( ( structure-hom-coalgebra-polynomial-endofunctor X Y f) ∙h @@ -158,12 +158,12 @@ module _ ( λ x → ap ( concat' - ( ( map-polynomial-endofunctor A B + ( ( map-polynomial-endofunctor' A B ( map-hom-coalgebra-polynomial-endofunctor X Y f) ( structure-coalgebra-polynomial-endofunctor X x))) (G x)) ( inv - ( coh-refl-htpy-polynomial-endofunctor A B + ( coh-refl-htpy-polynomial-endofunctor' A B ( map-hom-coalgebra-polynomial-endofunctor X Y f) ( structure-coalgebra-polynomial-endofunctor X x)))))) ( is-torsorial-htpy diff --git a/src/trees/polynomial-endofunctors.lagda.md b/src/trees/polynomial-endofunctors.lagda.md index e43a9d39d7..5479e449a0 100644 --- a/src/trees/polynomial-endofunctors.lagda.md +++ b/src/trees/polynomial-endofunctors.lagda.md @@ -31,7 +31,8 @@ open import foundation-core.torsorial-type-families ## Idea Given a type `A` [equipped](foundation.structure.md) with a type family `B` over -`A`, the {{#concept "polynomial endofunctor"}} `𝑃 A B` is defined by +`A`, the {{#concept "polynomial endofunctor" Agda=polynomial-endofunctor}} +`𝑃 A B` is defined by ```text X ↦ Σ (x : A), (B x → X) @@ -43,13 +44,38 @@ Polynomial endofunctors are important in the study of ## Definitions +### The type of polynomial endofunctors + +```agda +polynomial-endofunctor : (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2) +polynomial-endofunctor l1 l2 = Σ (UU l1) (λ A → (A → UU l2)) + +module _ + {l1 l2 : Level} (𝑃 : polynomial-endofunctor l1 l2) + where + + shapes-polynomial-endofunctor : UU l1 + shapes-polynomial-endofunctor = pr1 𝑃 + + positions-polynomial-endofunctor : shapes-polynomial-endofunctor → UU l2 + positions-polynomial-endofunctor = pr2 𝑃 + +make-polynomial-endofunctor : + {l1 l2 : Level} {A : UU l1} → (A → UU l2) → polynomial-endofunctor l1 l2 +make-polynomial-endofunctor B = (_ , B) +``` + ### The action on types of a polynomial endofunctor ```agda -type-polynomial-endofunctor : +type-polynomial-endofunctor' : {l1 l2 l3 : Level} (A : UU l1) (B : A → UU l2) (X : UU l3) → UU (l1 ⊔ l2 ⊔ l3) -type-polynomial-endofunctor A B X = Σ A (λ x → B x → X) +type-polynomial-endofunctor' A B X = Σ A (λ x → B x → X) + +type-polynomial-endofunctor : + {l1 l2 l3 : Level} → polynomial-endofunctor l1 l2 → UU l3 → UU (l1 ⊔ l2 ⊔ l3) +type-polynomial-endofunctor (A , B) = type-polynomial-endofunctor' A B ``` ### The identity type of `type-polynomial-endofunctor` @@ -60,23 +86,23 @@ module _ where Eq-type-polynomial-endofunctor : - (x y : type-polynomial-endofunctor A B X) → UU (l1 ⊔ l2 ⊔ l3) + (x y : type-polynomial-endofunctor' A B X) → UU (l1 ⊔ l2 ⊔ l3) Eq-type-polynomial-endofunctor x y = Σ (pr1 x = pr1 y) (λ p → coherence-triangle-maps (pr2 x) (pr2 y) (tr B p)) refl-Eq-type-polynomial-endofunctor : - (x : type-polynomial-endofunctor A B X) → + (x : type-polynomial-endofunctor' A B X) → Eq-type-polynomial-endofunctor x x refl-Eq-type-polynomial-endofunctor (x , α) = (refl , refl-htpy) Eq-eq-type-polynomial-endofunctor : - (x y : type-polynomial-endofunctor A B X) → + (x y : type-polynomial-endofunctor' A B X) → x = y → Eq-type-polynomial-endofunctor x y Eq-eq-type-polynomial-endofunctor x .x refl = refl-Eq-type-polynomial-endofunctor x is-torsorial-Eq-type-polynomial-endofunctor : - (x : type-polynomial-endofunctor A B X) → + (x : type-polynomial-endofunctor' A B X) → is-torsorial (Eq-type-polynomial-endofunctor x) is-torsorial-Eq-type-polynomial-endofunctor (x , α) = is-torsorial-Eq-structure @@ -85,7 +111,7 @@ module _ ( is-torsorial-htpy α) is-equiv-Eq-eq-type-polynomial-endofunctor : - (x y : type-polynomial-endofunctor A B X) → + (x y : type-polynomial-endofunctor' A B X) → is-equiv (Eq-eq-type-polynomial-endofunctor x y) is-equiv-Eq-eq-type-polynomial-endofunctor x = fundamental-theorem-id @@ -93,13 +119,13 @@ module _ ( Eq-eq-type-polynomial-endofunctor x) eq-Eq-type-polynomial-endofunctor : - (x y : type-polynomial-endofunctor A B X) → + (x y : type-polynomial-endofunctor' A B X) → Eq-type-polynomial-endofunctor x y → x = y eq-Eq-type-polynomial-endofunctor x y = map-inv-is-equiv (is-equiv-Eq-eq-type-polynomial-endofunctor x y) is-retraction-eq-Eq-type-polynomial-endofunctor : - (x y : type-polynomial-endofunctor A B X) → + (x y : type-polynomial-endofunctor' A B X) → is-retraction ( Eq-eq-type-polynomial-endofunctor x y) ( eq-Eq-type-polynomial-endofunctor x y) @@ -108,7 +134,7 @@ module _ ( is-equiv-Eq-eq-type-polynomial-endofunctor x y) coh-refl-eq-Eq-type-polynomial-endofunctor : - (x : type-polynomial-endofunctor A B X) → + (x : type-polynomial-endofunctor' A B X) → ( eq-Eq-type-polynomial-endofunctor x x ( refl-Eq-type-polynomial-endofunctor x)) = refl coh-refl-eq-Eq-type-polynomial-endofunctor x = @@ -118,33 +144,52 @@ module _ ### The action on maps of the polynomial endofunctor ```agda -map-polynomial-endofunctor : +map-polynomial-endofunctor' : {l1 l2 l3 l4 : Level} (A : UU l1) (B : A → UU l2) {X : UU l3} {Y : UU l4} (f : X → Y) → - type-polynomial-endofunctor A B X → type-polynomial-endofunctor A B Y -map-polynomial-endofunctor A B f = tot (λ x α → f ∘ α) + type-polynomial-endofunctor' A B X → type-polynomial-endofunctor' A B Y +map-polynomial-endofunctor' A B f = tot (λ x α → f ∘ α) + +map-polynomial-endofunctor : + {l1 l2 l3 l4 : Level} (𝑃 : polynomial-endofunctor l1 l2) + {X : UU l3} {Y : UU l4} (f : X → Y) → + type-polynomial-endofunctor 𝑃 X → type-polynomial-endofunctor 𝑃 Y +map-polynomial-endofunctor (A , B) = map-polynomial-endofunctor' A B ``` ### The action on homotopies of the polynomial endofunctor ```agda -htpy-polynomial-endofunctor : +htpy-polynomial-endofunctor' : {l1 l2 l3 l4 : Level} (A : UU l1) (B : A → UU l2) {X : UU l3} {Y : UU l4} {f g : X → Y} → - f ~ g → map-polynomial-endofunctor A B f ~ map-polynomial-endofunctor A B g -htpy-polynomial-endofunctor A B {f = f} {g} H (x , α) = + f ~ g → map-polynomial-endofunctor' A B f ~ map-polynomial-endofunctor' A B g +htpy-polynomial-endofunctor' A B {f = f} {g} H (x , α) = eq-Eq-type-polynomial-endofunctor - ( map-polynomial-endofunctor A B f (x , α)) - ( map-polynomial-endofunctor A B g (x , α)) + ( map-polynomial-endofunctor' A B f (x , α)) + ( map-polynomial-endofunctor' A B g (x , α)) ( refl , H ·r α) -coh-refl-htpy-polynomial-endofunctor : - {l1 l2 l3 l4 : Level} (A : UU l1) (B : A → UU l2) {X : UU l3} {Y : UU l4} - (f : X → Y) → - htpy-polynomial-endofunctor A B (refl-htpy {f = f}) ~ refl-htpy -coh-refl-htpy-polynomial-endofunctor A B f (x , α) = +htpy-polynomial-endofunctor : + {l1 l2 l3 l4 : Level} (𝑃 : polynomial-endofunctor l1 l2) + {X : UU l3} {Y : UU l4} {f g : X → Y} → + f ~ g → map-polynomial-endofunctor 𝑃 f ~ map-polynomial-endofunctor 𝑃 g +htpy-polynomial-endofunctor (A , B) = htpy-polynomial-endofunctor' A B + +coh-refl-htpy-polynomial-endofunctor' : + {l1 l2 l3 l4 : Level} (A : UU l1) (B : A → UU l2) + {X : UU l3} {Y : UU l4} (f : X → Y) → + htpy-polynomial-endofunctor' A B (refl-htpy' f) ~ refl-htpy +coh-refl-htpy-polynomial-endofunctor' A B f (x , α) = coh-refl-eq-Eq-type-polynomial-endofunctor - ( map-polynomial-endofunctor A B f (x , α)) + ( map-polynomial-endofunctor' A B f (x , α)) + +coh-refl-htpy-polynomial-endofunctor : + {l1 l2 l3 l4 : Level} (𝑃 : polynomial-endofunctor l1 l2) + {X : UU l3} {Y : UU l4} (f : X → Y) → + htpy-polynomial-endofunctor 𝑃 (refl-htpy' f) ~ refl-htpy +coh-refl-htpy-polynomial-endofunctor (A , B) = + coh-refl-htpy-polynomial-endofunctor' A B ``` ## See also diff --git a/src/trees/w-types.lagda.md b/src/trees/w-types.lagda.md index cf2df81dea..6e6426257f 100644 --- a/src/trees/w-types.lagda.md +++ b/src/trees/w-types.lagda.md @@ -70,7 +70,7 @@ module _ ```agda structure-𝕎-Alg : {l1 l2 : Level} {A : UU l1} {B : A → UU l2} → - type-polynomial-endofunctor A B (𝕎 A B) → 𝕎 A B + type-polynomial-endofunctor' A B (𝕎 A B) → 𝕎 A B structure-𝕎-Alg (pair x α) = tree-𝕎 x α 𝕎-Alg : @@ -202,7 +202,7 @@ module _ ```agda map-inv-structure-𝕎-Alg : {l1 l2 : Level} {A : UU l1} {B : A → UU l2} → - 𝕎 A B → type-polynomial-endofunctor A B (𝕎 A B) + 𝕎 A B → type-polynomial-endofunctor' A B (𝕎 A B) map-inv-structure-𝕎-Alg (tree-𝕎 x α) = pair x α is-section-map-inv-structure-𝕎-Alg : @@ -226,7 +226,7 @@ is-equiv-structure-𝕎-Alg = equiv-structure-𝕎-Alg : {l1 l2 : Level} {A : UU l1} {B : A → UU l2} → - type-polynomial-endofunctor A B (𝕎 A B) ≃ 𝕎 A B + type-polynomial-endofunctor' A B (𝕎 A B) ≃ 𝕎 A B equiv-structure-𝕎-Alg = pair structure-𝕎-Alg is-equiv-structure-𝕎-Alg @@ -241,7 +241,7 @@ is-equiv-map-inv-structure-𝕎-Alg = inv-equiv-structure-𝕎-Alg : {l1 l2 : Level} {A : UU l1} {B : A → UU l2} → - 𝕎 A B ≃ type-polynomial-endofunctor A B (𝕎 A B) + 𝕎 A B ≃ type-polynomial-endofunctor' A B (𝕎 A B) inv-equiv-structure-𝕎-Alg = pair map-inv-structure-𝕎-Alg is-equiv-map-inv-structure-𝕎-Alg ``` @@ -262,7 +262,7 @@ structure-hom-𝕎-Alg : (X : algebra-polynomial-endofunctor l3 A B) → ( (map-hom-𝕎-Alg X) ∘ structure-𝕎-Alg) ~ ( ( structure-algebra-polynomial-endofunctor X) ∘ - ( map-polynomial-endofunctor A B (map-hom-𝕎-Alg X))) + ( map-polynomial-endofunctor' A B (map-hom-𝕎-Alg X))) structure-hom-𝕎-Alg X (pair x α) = refl hom-𝕎-Alg : @@ -292,7 +292,7 @@ compute-structure-htpy-hom-𝕎-Alg : (H : map-hom-𝕎-Alg X ~ f) → ( ap ( structure-algebra-polynomial-endofunctor X) - ( htpy-polynomial-endofunctor A B H (pair x α))) = + ( htpy-polynomial-endofunctor' A B H (pair x α))) = ( ap ( λ t → structure-algebra-polynomial-endofunctor X (pair x t)) ( htpy-postcomp (B x) H α)) @@ -302,13 +302,13 @@ compute-structure-htpy-hom-𝕎-Alg {A = A} {B} X x α = ( λ f H → ( ap ( structure-algebra-polynomial-endofunctor X) - ( htpy-polynomial-endofunctor A B H (pair x α))) = + ( htpy-polynomial-endofunctor' A B H (pair x α))) = ( ap ( λ t → structure-algebra-polynomial-endofunctor X (pair x t)) ( htpy-postcomp (B x) H α))) ( ap ( ap (pr2 X)) - ( coh-refl-htpy-polynomial-endofunctor A B + ( coh-refl-htpy-polynomial-endofunctor' A B ( map-hom-𝕎-Alg X) ( pair x α)) ∙ ( inv @@ -322,7 +322,7 @@ structure-htpy-hom-𝕎-Alg : (f : hom-algebra-polynomial-endofunctor (𝕎-Alg A B) X) → ( structure-hom-𝕎-Alg X ∙h ( ( structure-algebra-polynomial-endofunctor X) ·l - ( htpy-polynomial-endofunctor A B (htpy-htpy-hom-𝕎-Alg X f)))) ~ + ( htpy-polynomial-endofunctor' A B (htpy-htpy-hom-𝕎-Alg X f)))) ~ ( ( (htpy-htpy-hom-𝕎-Alg X f) ·r structure-𝕎-Alg {B = B}) ∙h ( structure-hom-algebra-polynomial-endofunctor (𝕎-Alg A B) X f)) structure-htpy-hom-𝕎-Alg {A = A} {B} X (pair f μ-f) (pair x α) = @@ -334,7 +334,7 @@ structure-htpy-hom-𝕎-Alg {A = A} {B} X (pair f μ-f) (pair x α) = ( ap ( λ t → pr2 X (pair x t)) ( eq-htpy (htpy-htpy-hom-𝕎-Alg X (pair f μ-f) ·r α))) - ( pr2 X (map-polynomial-endofunctor A B f (pair x α)))) + ( pr2 X (map-polynomial-endofunctor' A B f (pair x α)))) ( inv (left-inv ( μ-f (pair x α)))))) ∙ ( inv ( assoc From 7a75548f14dc6f57bbece65869a7546bbaba99f8 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 30 Aug 2025 23:21:22 +0200 Subject: [PATCH 02/41] natural transformations of polynomial endofunctors --- ...unctoriality-dependent-pair-types.lagda.md | 1 - ...equality-dependent-function-types.lagda.md | 1 - src/trees.lagda.md | 1 + ...ormations-polynomial-endofunctors.lagda.md | 277 ++++++++++++++++++ 4 files changed, 278 insertions(+), 2 deletions(-) create mode 100644 src/trees/natural-transformations-polynomial-endofunctors.lagda.md diff --git a/src/foundation-core/functoriality-dependent-pair-types.lagda.md b/src/foundation-core/functoriality-dependent-pair-types.lagda.md index 30b3e05d74..35d6415cb5 100644 --- a/src/foundation-core/functoriality-dependent-pair-types.lagda.md +++ b/src/foundation-core/functoriality-dependent-pair-types.lagda.md @@ -586,7 +586,6 @@ module _ ap (g a') (tr-ap pr1 (λ x _ → pr2 x) p a)) = ap (tot g) {a , x} {a' , x'} p inv-compute-ap-tot' p = inv (compute-ap-tot' p) - ``` ### Computing the action on identifications of the functorial action of Σ diff --git a/src/foundation/equality-dependent-function-types.lagda.md b/src/foundation/equality-dependent-function-types.lagda.md index 5a58c07765..f42a34a801 100644 --- a/src/foundation/equality-dependent-function-types.lagda.md +++ b/src/foundation/equality-dependent-function-types.lagda.md @@ -55,7 +55,6 @@ module _ ( λ _ → equiv-explicit-implicit-Π)) ( is-torsorial-Eq-Π) - is-torsorial-Eq-implicit-Π' : is-torsorial (λ g → (x : A) → C x (g {x})) is-torsorial-Eq-implicit-Π' = is-contr-equiv diff --git a/src/trees.lagda.md b/src/trees.lagda.md index c2cfc02fbc..16b97923f4 100644 --- a/src/trees.lagda.md +++ b/src/trees.lagda.md @@ -45,6 +45,7 @@ open import trees.morphisms-enriched-directed-trees public open import trees.multiset-indexed-dependent-products-of-types public open import trees.multisets public open import trees.multivariable-polynomial-functors public +open import trees.natural-transformations-polynomial-endofunctors public open import trees.planar-binary-trees public open import trees.plane-trees public open import trees.polynomial-endofunctors public diff --git a/src/trees/natural-transformations-polynomial-endofunctors.lagda.md b/src/trees/natural-transformations-polynomial-endofunctors.lagda.md new file mode 100644 index 0000000000..03425e401f --- /dev/null +++ b/src/trees/natural-transformations-polynomial-endofunctors.lagda.md @@ -0,0 +1,277 @@ +# Natural transformations between polynomial endofunctors + +```agda +module trees.natural-transformations-polynomial-endofunctors where +``` + +
Imports + +```agda +open import foundation.action-on-identifications-binary-functions +open import foundation.action-on-identifications-functions +open import foundation.binary-homotopies +open import foundation.commuting-squares-of-homotopies +open import foundation.commuting-squares-of-maps +open import foundation.contractible-types +open import foundation.dependent-pair-types +open import foundation.equality-dependent-function-types +open import foundation.equivalences +open import foundation.function-types +open import foundation.functoriality-dependent-pair-types +open import foundation.fundamental-theorem-of-identity-types +open import foundation.homotopies +open import foundation.homotopy-induction +open import foundation.identity-types +open import foundation.implicit-function-types +open import foundation.precomposition-functions +open import foundation.sections +open import foundation.structure-identity-principle +open import foundation.transport-along-identifications +open import foundation.universe-levels +open import foundation.whiskering-homotopies-composition + +open import foundation-core.equality-dependent-pair-types +open import foundation-core.retractions +open import foundation-core.torsorial-type-families + +open import trees.polynomial-endofunctors +``` + +
+ +## Idea + +Given two [polynomial endofunctors](trees.polynomial-endofunctors.md) +$𝑃 ≐ (A ◃ B)$ and $𝑄 ≐ (C ◃ D)$, a +{{#concept "natural transformation" Disambiguation="of polynomial endofunctors of types" Agda=natural-transformation-polynomial-endofunctor}} +$α$ from $𝑃$ to $𝑄$ is a family of maps $α : (X : Type) → 𝑃(X) → 𝑄(X)$ such that +for every map of types $f : X → Y$, the following square commutes + +```text + 𝑃(f) + 𝑃(X) -----------> 𝑃(Y) + | | + | | + α(X) | | α(Y) + | | + ∨ ∨ + 𝑄(X) -----------> 𝑄(Y). + 𝑄(f) +``` + +## Definitions + +### Natural transformations between polynomial endofunctors + +```agda +module _ + {l1 l2 l3 l4 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + where + + coherence-natural-transformation-polynomial-endofunctor : + {l : Level} → + ( {X : UU l} → + type-polynomial-endofunctor 𝑃 X → + type-polynomial-endofunctor 𝑄 X) → + UU (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ lsuc l) + coherence-natural-transformation-polynomial-endofunctor {l} φ₀ = + {X Y : UU l} (f : X → Y) → + coherence-square-maps + ( map-polynomial-endofunctor 𝑃 f) + ( φ₀) + ( φ₀) + ( map-polynomial-endofunctor 𝑄 f) + + natural-transformation-polynomial-endofunctor : + (l : Level) → UU (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ lsuc l) + natural-transformation-polynomial-endofunctor l = + Σ ( {X : UU l} → + type-polynomial-endofunctor 𝑃 X → + type-polynomial-endofunctor 𝑄 X) + ( coherence-natural-transformation-polynomial-endofunctor) + +module _ + {l1 l2 l3 l4 l5 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l5) + where + + type-natural-transformation-polynomial-endofunctor : + {X : UU l5} → + type-polynomial-endofunctor 𝑃 X → + type-polynomial-endofunctor 𝑄 X + type-natural-transformation-polynomial-endofunctor = pr1 α + + naturality-natural-transformation-polynomial-endofunctor : + coherence-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( type-natural-transformation-polynomial-endofunctor) + naturality-natural-transformation-polynomial-endofunctor = pr2 α +``` + +### The identity natural transformation + +```agda +id-natural-transformation-polynomial-endofunctor : + {l1 l2 l3 : Level} (𝑃 : polynomial-endofunctor l1 l2) → + natural-transformation-polynomial-endofunctor 𝑃 𝑃 l3 +pr1 (id-natural-transformation-polynomial-endofunctor 𝑃) = id +pr2 (id-natural-transformation-polynomial-endofunctor 𝑃) f x = refl +``` + +## Properties + +### Characterizing equality of natural transformations + +```agda +module _ + {l1 l2 l3 l4 l5 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + where + + htpy-natural-transformation-polynomial-endofunctor : + (α β : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l5) → + UU (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ lsuc l5) + htpy-natural-transformation-polynomial-endofunctor α β = + Σ ( (X : UU l5) → + type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α {X} ~ + type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 β {X}) + ( λ H → + (X Y : UU l5) (f : X → Y) → + coherence-square-homotopies + ( map-polynomial-endofunctor 𝑄 f ·l H X) + ( naturality-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α f) + ( naturality-natural-transformation-polynomial-endofunctor 𝑃 𝑄 β f) + ( H Y ·r map-polynomial-endofunctor 𝑃 f)) + + refl-htpy-natural-transformation-polynomial-endofunctor : + (α : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l5) → + htpy-natural-transformation-polynomial-endofunctor α α + refl-htpy-natural-transformation-polynomial-endofunctor α = + ( (λ X x → refl) , (λ X Y f x → right-unit)) + + htpy-eq-natural-transformation-polynomial-endofunctor : + (α β : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l5) → + (α = β) → htpy-natural-transformation-polynomial-endofunctor α β + htpy-eq-natural-transformation-polynomial-endofunctor α .α refl = + refl-htpy-natural-transformation-polynomial-endofunctor α + + is-torsorial-htpy-natural-transformation-polynomial-endofunctor : + (α : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l5) → + is-torsorial (htpy-natural-transformation-polynomial-endofunctor α) + is-torsorial-htpy-natural-transformation-polynomial-endofunctor α = + is-torsorial-Eq-structure + ( is-torsorial-Eq-implicit-Π' + ( λ X → + is-torsorial-htpy + ( type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α)) + ) + ( type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α , + ( λ _ _ → refl)) + ( is-torsorial-Eq-implicit-Π' + ( λ X → + is-torsorial-Eq-implicit-Π' + ( λ Y → + is-torsorial-Eq-Π + ( λ f → + is-torsorial-htpy + ( ( naturality-natural-transformation-polynomial-endofunctor + 𝑃 𝑄 α f) ∙h + ( refl-htpy)))))) + + is-equiv-htpy-eq-natural-transformation-polynomial-endofunctor : + (α β : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l5) → + is-equiv (htpy-eq-natural-transformation-polynomial-endofunctor α β) + is-equiv-htpy-eq-natural-transformation-polynomial-endofunctor α = + fundamental-theorem-id + ( is-torsorial-htpy-natural-transformation-polynomial-endofunctor α) + ( htpy-eq-natural-transformation-polynomial-endofunctor α) + + equiv-htpy-eq-natural-transformation-polynomial-endofunctor : + (α β : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l5) → + (α = β) ≃ htpy-natural-transformation-polynomial-endofunctor α β + equiv-htpy-eq-natural-transformation-polynomial-endofunctor α β = + ( htpy-eq-natural-transformation-polynomial-endofunctor α β , + is-equiv-htpy-eq-natural-transformation-polynomial-endofunctor α β) + + eq-htpy-natural-transformation-polynomial-endofunctor : + (α β : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l5) → + htpy-natural-transformation-polynomial-endofunctor α β → + α = β + eq-htpy-natural-transformation-polynomial-endofunctor α β = + map-inv-equiv + ( equiv-htpy-eq-natural-transformation-polynomial-endofunctor α β) +``` + +### Composition of natural transformations + +```agda +comp-natural-transformation-polynomial-endofunctor : + {l1 l2 l3 l4 l5 l6 l : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (𝑅 : polynomial-endofunctor l5 l6) → + natural-transformation-polynomial-endofunctor 𝑄 𝑅 l → + natural-transformation-polynomial-endofunctor 𝑃 𝑄 l → + natural-transformation-polynomial-endofunctor 𝑃 𝑅 l +comp-natural-transformation-polynomial-endofunctor 𝑃 𝑄 𝑅 (β₀ , β₁) (α₀ , α₁) = + ( ( β₀ ∘ α₀) , + ( λ f → + pasting-vertical-coherence-square-maps + ( map-polynomial-endofunctor 𝑃 f) + ( α₀) + ( α₀) + ( map-polynomial-endofunctor 𝑄 f) + ( β₀) + ( β₀) + ( map-polynomial-endofunctor 𝑅 f) + ( α₁ f) + ( β₁ f))) +``` + +### Unit laws for composition of natural transformations + +```agda +left-unit-law-comp-natural-transformation-polynomial-endofunctor : + {l1 l2 l3 l4 l : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) → + (α : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l) → + ( comp-natural-transformation-polynomial-endofunctor 𝑃 𝑄 𝑄 + ( id-natural-transformation-polynomial-endofunctor 𝑄) + ( α)) = + α +left-unit-law-comp-natural-transformation-polynomial-endofunctor + 𝑃 𝑄 α@(α₀ , α₁) = + eq-htpy-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( comp-natural-transformation-polynomial-endofunctor 𝑃 𝑄 𝑄 + ( id-natural-transformation-polynomial-endofunctor 𝑄) + ( α)) + ( α) + ( ( λ X x → refl) , (λ X Y f x → right-unit ∙ ap-id (α₁ f x))) + +right-unit-law-comp-natural-transformation-polynomial-endofunctor : + {l1 l2 l3 l4 l : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) → + (α : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l) → + ( comp-natural-transformation-polynomial-endofunctor 𝑃 𝑃 𝑄 + ( α) + ( id-natural-transformation-polynomial-endofunctor 𝑃)) = + α +right-unit-law-comp-natural-transformation-polynomial-endofunctor + 𝑃 𝑄 α@(α₀ , α₁) = + eq-htpy-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( comp-natural-transformation-polynomial-endofunctor 𝑃 𝑃 𝑄 + ( α) + ( id-natural-transformation-polynomial-endofunctor 𝑃)) + ( α) + ( ( λ X x → refl) , (λ X Y f x → right-unit ∙ right-unit)) +``` + +## See also + +- [Morphisms of polynomial endofunctors](trees.morphisms-polynomial-endofunctors.md) From 57afb14597bf8b4820376b4f7506a51f6c7fe524 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sun, 31 Aug 2025 19:25:57 +0200 Subject: [PATCH 03/41] edits natural transformations --- ...ormations-polynomial-endofunctors.lagda.md | 190 ++++++++++-------- 1 file changed, 110 insertions(+), 80 deletions(-) diff --git a/src/trees/natural-transformations-polynomial-endofunctors.lagda.md b/src/trees/natural-transformations-polynomial-endofunctors.lagda.md index 03425e401f..f1946f2c0e 100644 --- a/src/trees/natural-transformations-polynomial-endofunctors.lagda.md +++ b/src/trees/natural-transformations-polynomial-endofunctors.lagda.md @@ -20,9 +20,11 @@ open import foundation.function-types open import foundation.functoriality-dependent-pair-types open import foundation.fundamental-theorem-of-identity-types open import foundation.homotopies +open import foundation.homotopies-morphisms-arrows open import foundation.homotopy-induction open import foundation.identity-types open import foundation.implicit-function-types +open import foundation.morphisms-arrows open import foundation.precomposition-functions open import foundation.sections open import foundation.structure-identity-principle @@ -48,15 +50,15 @@ $α$ from $𝑃$ to $𝑄$ is a family of maps $α : (X : Type) → 𝑃(X) → for every map of types $f : X → Y$, the following square commutes ```text - 𝑃(f) - 𝑃(X) -----------> 𝑃(Y) + α(X) + 𝑃(X) -----------> 𝑄(X) | | | | - α(X) | | α(Y) + 𝑃(f) | | 𝑄(f) | | ∨ ∨ - 𝑄(X) -----------> 𝑄(Y). - 𝑄(f) + 𝑃(Y) -----------> 𝑄(Y). + α(Y) ``` ## Definitions @@ -64,39 +66,38 @@ for every map of types $f : X → Y$, the following square commutes ### Natural transformations between polynomial endofunctors ```agda -module _ - {l1 l2 l3 l4 : Level} +coherence-natural-transformation-polynomial-endofunctor : + {l1 l2 l3 l4 l : Level} (𝑃 : polynomial-endofunctor l1 l2) - (𝑄 : polynomial-endofunctor l3 l4) - where - - coherence-natural-transformation-polynomial-endofunctor : - {l : Level} → - ( {X : UU l} → - type-polynomial-endofunctor 𝑃 X → - type-polynomial-endofunctor 𝑄 X) → + (𝑄 : polynomial-endofunctor l3 l4) → + ( {X : UU l} → + type-polynomial-endofunctor 𝑃 X → + type-polynomial-endofunctor 𝑄 X) → + UU (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ lsuc l) +coherence-natural-transformation-polynomial-endofunctor {l = l} 𝑃 𝑄 α₀ = + {X Y : UU l} (f : X → Y) → + coherence-square-maps + ( α₀) + ( map-polynomial-endofunctor 𝑃 f) + ( map-polynomial-endofunctor 𝑄 f) + ( α₀) + +natural-transformation-polynomial-endofunctor : + {l1 l2 l3 l4 : Level} (l : Level) → + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) → UU (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ lsuc l) - coherence-natural-transformation-polynomial-endofunctor {l} φ₀ = - {X Y : UU l} (f : X → Y) → - coherence-square-maps - ( map-polynomial-endofunctor 𝑃 f) - ( φ₀) - ( φ₀) - ( map-polynomial-endofunctor 𝑄 f) - - natural-transformation-polynomial-endofunctor : - (l : Level) → UU (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ lsuc l) - natural-transformation-polynomial-endofunctor l = - Σ ( {X : UU l} → - type-polynomial-endofunctor 𝑃 X → - type-polynomial-endofunctor 𝑄 X) - ( coherence-natural-transformation-polynomial-endofunctor) +natural-transformation-polynomial-endofunctor l 𝑃 𝑄 = + Σ ( {X : UU l} → + type-polynomial-endofunctor 𝑃 X → + type-polynomial-endofunctor 𝑄 X) + ( coherence-natural-transformation-polynomial-endofunctor 𝑃 𝑄) module _ {l1 l2 l3 l4 l5 : Level} (𝑃 : polynomial-endofunctor l1 l2) (𝑄 : polynomial-endofunctor l3 l4) - (α : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l5) + (α : natural-transformation-polynomial-endofunctor l5 𝑃 𝑄) where type-natural-transformation-polynomial-endofunctor : @@ -111,12 +112,26 @@ module _ naturality-natural-transformation-polynomial-endofunctor = pr2 α ``` +### The associated family of morphisms of arrows + +```agda +hom-arrow-natural-transformation-polynomial-endofunctor : + {l1 l2 l3 l4 l5 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α : natural-transformation-polynomial-endofunctor l5 𝑃 𝑄) + {X Y : UU l5} (f : X → Y) → + hom-arrow (map-polynomial-endofunctor 𝑃 f) (map-polynomial-endofunctor 𝑄 f) +hom-arrow-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α@(α₀ , α₁) f = + ( α₀ , α₀ , α₁ f) +``` + ### The identity natural transformation ```agda id-natural-transformation-polynomial-endofunctor : {l1 l2 l3 : Level} (𝑃 : polynomial-endofunctor l1 l2) → - natural-transformation-polynomial-endofunctor 𝑃 𝑃 l3 + natural-transformation-polynomial-endofunctor l3 𝑃 𝑃 pr1 (id-natural-transformation-polynomial-endofunctor 𝑃) = id pr2 (id-natural-transformation-polynomial-endofunctor 𝑃) f x = refl ``` @@ -133,7 +148,7 @@ module _ where htpy-natural-transformation-polynomial-endofunctor : - (α β : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l5) → + (α β : natural-transformation-polynomial-endofunctor l5 𝑃 𝑄) → UU (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ lsuc l5) htpy-natural-transformation-polynomial-endofunctor α β = Σ ( (X : UU l5) → @@ -142,33 +157,32 @@ module _ ( λ H → (X Y : UU l5) (f : X → Y) → coherence-square-homotopies - ( map-polynomial-endofunctor 𝑄 f ·l H X) ( naturality-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α f) - ( naturality-natural-transformation-polynomial-endofunctor 𝑃 𝑄 β f) - ( H Y ·r map-polynomial-endofunctor 𝑃 f)) + ( H Y ·r map-polynomial-endofunctor 𝑃 f) + ( map-polynomial-endofunctor 𝑄 f ·l H X) + ( naturality-natural-transformation-polynomial-endofunctor 𝑃 𝑄 β f)) refl-htpy-natural-transformation-polynomial-endofunctor : - (α : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l5) → + (α : natural-transformation-polynomial-endofunctor l5 𝑃 𝑄) → htpy-natural-transformation-polynomial-endofunctor α α refl-htpy-natural-transformation-polynomial-endofunctor α = - ( (λ X x → refl) , (λ X Y f x → right-unit)) + ( (λ X x → refl) , (λ X Y f x → inv right-unit)) htpy-eq-natural-transformation-polynomial-endofunctor : - (α β : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l5) → + (α β : natural-transformation-polynomial-endofunctor l5 𝑃 𝑄) → (α = β) → htpy-natural-transformation-polynomial-endofunctor α β htpy-eq-natural-transformation-polynomial-endofunctor α .α refl = refl-htpy-natural-transformation-polynomial-endofunctor α is-torsorial-htpy-natural-transformation-polynomial-endofunctor : - (α : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l5) → + (α : natural-transformation-polynomial-endofunctor l5 𝑃 𝑄) → is-torsorial (htpy-natural-transformation-polynomial-endofunctor α) is-torsorial-htpy-natural-transformation-polynomial-endofunctor α = is-torsorial-Eq-structure ( is-torsorial-Eq-implicit-Π' ( λ X → is-torsorial-htpy - ( type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α)) - ) + ( type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α))) ( type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α , ( λ _ _ → refl)) ( is-torsorial-Eq-implicit-Π' @@ -177,13 +191,13 @@ module _ ( λ Y → is-torsorial-Eq-Π ( λ f → - is-torsorial-htpy + is-torsorial-htpy' ( ( naturality-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α f) ∙h ( refl-htpy)))))) is-equiv-htpy-eq-natural-transformation-polynomial-endofunctor : - (α β : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l5) → + (α β : natural-transformation-polynomial-endofunctor l5 𝑃 𝑄) → is-equiv (htpy-eq-natural-transformation-polynomial-endofunctor α β) is-equiv-htpy-eq-natural-transformation-polynomial-endofunctor α = fundamental-theorem-id @@ -191,14 +205,14 @@ module _ ( htpy-eq-natural-transformation-polynomial-endofunctor α) equiv-htpy-eq-natural-transformation-polynomial-endofunctor : - (α β : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l5) → + (α β : natural-transformation-polynomial-endofunctor l5 𝑃 𝑄) → (α = β) ≃ htpy-natural-transformation-polynomial-endofunctor α β equiv-htpy-eq-natural-transformation-polynomial-endofunctor α β = ( htpy-eq-natural-transformation-polynomial-endofunctor α β , is-equiv-htpy-eq-natural-transformation-polynomial-endofunctor α β) eq-htpy-natural-transformation-polynomial-endofunctor : - (α β : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l5) → + (α β : natural-transformation-polynomial-endofunctor l5 𝑃 𝑄) → htpy-natural-transformation-polynomial-endofunctor α β → α = β eq-htpy-natural-transformation-polynomial-endofunctor α β = @@ -214,20 +228,20 @@ comp-natural-transformation-polynomial-endofunctor : (𝑃 : polynomial-endofunctor l1 l2) (𝑄 : polynomial-endofunctor l3 l4) (𝑅 : polynomial-endofunctor l5 l6) → - natural-transformation-polynomial-endofunctor 𝑄 𝑅 l → - natural-transformation-polynomial-endofunctor 𝑃 𝑄 l → - natural-transformation-polynomial-endofunctor 𝑃 𝑅 l + natural-transformation-polynomial-endofunctor l 𝑄 𝑅 → + natural-transformation-polynomial-endofunctor l 𝑃 𝑄 → + natural-transformation-polynomial-endofunctor l 𝑃 𝑅 comp-natural-transformation-polynomial-endofunctor 𝑃 𝑄 𝑅 (β₀ , β₁) (α₀ , α₁) = ( ( β₀ ∘ α₀) , ( λ f → - pasting-vertical-coherence-square-maps - ( map-polynomial-endofunctor 𝑃 f) - ( α₀) + pasting-horizontal-coherence-square-maps ( α₀) - ( map-polynomial-endofunctor 𝑄 f) - ( β₀) ( β₀) + ( map-polynomial-endofunctor 𝑃 f) + ( map-polynomial-endofunctor 𝑄 f) ( map-polynomial-endofunctor 𝑅 f) + ( α₀) + ( β₀) ( α₁ f) ( β₁ f))) ``` @@ -235,41 +249,57 @@ comp-natural-transformation-polynomial-endofunctor 𝑃 𝑄 𝑅 (β₀ , β₁ ### Unit laws for composition of natural transformations ```agda -left-unit-law-comp-natural-transformation-polynomial-endofunctor : +module _ {l1 l2 l3 l4 l : Level} (𝑃 : polynomial-endofunctor l1 l2) - (𝑄 : polynomial-endofunctor l3 l4) → - (α : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l) → - ( comp-natural-transformation-polynomial-endofunctor 𝑃 𝑄 𝑄 - ( id-natural-transformation-polynomial-endofunctor 𝑄) - ( α)) = - α -left-unit-law-comp-natural-transformation-polynomial-endofunctor - 𝑃 𝑄 α@(α₀ , α₁) = - eq-htpy-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + (𝑄 : polynomial-endofunctor l3 l4) + (α@(α₀ , α₁) : natural-transformation-polynomial-endofunctor l 𝑃 𝑄) + where + + htpy-left-unit-law-comp-natural-transformation-polynomial-endofunctor : + htpy-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( comp-natural-transformation-polynomial-endofunctor 𝑃 𝑄 𝑄 + ( id-natural-transformation-polynomial-endofunctor 𝑄) + ( α)) + ( α) + htpy-left-unit-law-comp-natural-transformation-polynomial-endofunctor = + ( ( λ X x → refl) , + ( λ X Y f x → inv (right-unit ∙ right-unit ∙ ap-id (α₁ f x)))) + + left-unit-law-comp-natural-transformation-polynomial-endofunctor : ( comp-natural-transformation-polynomial-endofunctor 𝑃 𝑄 𝑄 ( id-natural-transformation-polynomial-endofunctor 𝑄) - ( α)) + ( α)) = ( α) - ( ( λ X x → refl) , (λ X Y f x → right-unit ∙ ap-id (α₁ f x))) + left-unit-law-comp-natural-transformation-polynomial-endofunctor = + eq-htpy-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( comp-natural-transformation-polynomial-endofunctor 𝑃 𝑄 𝑄 + ( id-natural-transformation-polynomial-endofunctor 𝑄) + ( α)) + ( α) + ( htpy-left-unit-law-comp-natural-transformation-polynomial-endofunctor) -right-unit-law-comp-natural-transformation-polynomial-endofunctor : - {l1 l2 l3 l4 l : Level} - (𝑃 : polynomial-endofunctor l1 l2) - (𝑄 : polynomial-endofunctor l3 l4) → - (α : natural-transformation-polynomial-endofunctor 𝑃 𝑄 l) → - ( comp-natural-transformation-polynomial-endofunctor 𝑃 𝑃 𝑄 - ( α) - ( id-natural-transformation-polynomial-endofunctor 𝑃)) = - α -right-unit-law-comp-natural-transformation-polynomial-endofunctor - 𝑃 𝑄 α@(α₀ , α₁) = - eq-htpy-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + htpy-right-unit-law-comp-natural-transformation-polynomial-endofunctor : + htpy-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( comp-natural-transformation-polynomial-endofunctor 𝑃 𝑃 𝑄 + ( α) + ( id-natural-transformation-polynomial-endofunctor 𝑃)) + ( α) + htpy-right-unit-law-comp-natural-transformation-polynomial-endofunctor = + ( ( λ X x → refl) , (λ X Y f x → inv right-unit)) + + right-unit-law-comp-natural-transformation-polynomial-endofunctor : ( comp-natural-transformation-polynomial-endofunctor 𝑃 𝑃 𝑄 ( α) - ( id-natural-transformation-polynomial-endofunctor 𝑃)) + ( id-natural-transformation-polynomial-endofunctor 𝑃)) = ( α) - ( ( λ X x → refl) , (λ X Y f x → right-unit ∙ right-unit)) + right-unit-law-comp-natural-transformation-polynomial-endofunctor = + eq-htpy-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( comp-natural-transformation-polynomial-endofunctor 𝑃 𝑃 𝑄 + ( α) + ( id-natural-transformation-polynomial-endofunctor 𝑃)) + ( α) + ( htpy-right-unit-law-comp-natural-transformation-polynomial-endofunctor) ``` ## See also From 43be92848d8b01b7ee0c83a6d22d86b872273f5e Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sun, 31 Aug 2025 19:26:04 +0200 Subject: [PATCH 04/41] define morphisms of polynomial endofunctors --- src/trees.lagda.md | 1 + ...morphisms-polynomial-endofunctors.lagda.md | 294 ++++++++++++++++++ 2 files changed, 295 insertions(+) create mode 100644 src/trees/morphisms-polynomial-endofunctors.lagda.md diff --git a/src/trees.lagda.md b/src/trees.lagda.md index 16b97923f4..034d2ebc0c 100644 --- a/src/trees.lagda.md +++ b/src/trees.lagda.md @@ -42,6 +42,7 @@ open import trees.morphisms-algebras-polynomial-endofunctors public open import trees.morphisms-coalgebras-polynomial-endofunctors public open import trees.morphisms-directed-trees public open import trees.morphisms-enriched-directed-trees public +open import trees.morphisms-polynomial-endofunctors public open import trees.multiset-indexed-dependent-products-of-types public open import trees.multisets public open import trees.multivariable-polynomial-functors public diff --git a/src/trees/morphisms-polynomial-endofunctors.lagda.md b/src/trees/morphisms-polynomial-endofunctors.lagda.md new file mode 100644 index 0000000000..e2f0208da4 --- /dev/null +++ b/src/trees/morphisms-polynomial-endofunctors.lagda.md @@ -0,0 +1,294 @@ +# Morphisms of polynomial endofunctors + +```agda +module trees.morphisms-polynomial-endofunctors where +``` + +
Imports + +```agda +open import foundation.action-on-identifications-functions +open import foundation.binary-homotopies +open import foundation.commuting-squares-of-homotopies +open import foundation.commuting-squares-of-maps +open import foundation.contractible-types +open import foundation.dependent-pair-types +open import foundation.equality-dependent-function-types +open import foundation.equivalences +open import foundation.function-types +open import foundation.functoriality-dependent-pair-types +open import foundation.fundamental-theorem-of-identity-types +open import foundation.homotopies +open import foundation.homotopy-induction +open import foundation.identity-types +open import foundation.implicit-function-types +open import foundation.precomposition-functions +open import foundation.sections +open import foundation.structure-identity-principle +open import foundation.transport-along-identifications +open import foundation.truncated-types +open import foundation.truncation-levels +open import foundation.universe-levels +open import foundation.whiskering-homotopies-composition + +open import foundation-core.equality-dependent-pair-types +open import foundation-core.retractions +open import foundation-core.torsorial-type-families + +open import trees.natural-transformations-polynomial-endofunctors +open import trees.polynomial-endofunctors +``` + +
+ +## Idea + +Given two [polynomial endofunctors](trees.polynomial-endofunctors.md) +$𝑃 ≐ (A ◃ B)$ and $𝑄 ≐ (C ◃ D)$, a +{{#concept "morphism" Disambiguation="of polynomial endofunctors of types" Agda=hom-polynomial-endofunctor}} +$α$ from $𝑃$ to $𝑄$ consists of a map $α₀ : A → C$ and a family of maps +$$α₁ : (a : A) → D (α₀ a) → B a.$$ + +## Definitions + +### Morphisms of polynomial endofunctors + +```agda +hom-polynomial-endofunctor : + {l1 l2 l3 l4 : Level} → + polynomial-endofunctor l1 l2 → + polynomial-endofunctor l3 l4 → UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) +hom-polynomial-endofunctor (A , B) (C , D) = + Σ (A → C) (λ α₀ → ((a : A) → D (α₀ a) → B a)) + +module _ + {l1 l2 l3 l4 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α : hom-polynomial-endofunctor 𝑃 𝑄) + where + + shapes-hom-polynomial-endofunctor : + shapes-polynomial-endofunctor 𝑃 → shapes-polynomial-endofunctor 𝑄 + shapes-hom-polynomial-endofunctor = pr1 α + + positions-hom-polynomial-endofunctor : + (a : shapes-polynomial-endofunctor 𝑃) → + positions-polynomial-endofunctor 𝑄 (shapes-hom-polynomial-endofunctor a) → + positions-polynomial-endofunctor 𝑃 a + positions-hom-polynomial-endofunctor = pr2 α + + type-hom-polynomial-endofunctor : + {l3 : Level} {X : UU l3} → + type-polynomial-endofunctor 𝑃 X → + type-polynomial-endofunctor 𝑄 X + type-hom-polynomial-endofunctor {X = X} = + map-Σ + ( λ c → positions-polynomial-endofunctor 𝑄 c → X) + ( shapes-hom-polynomial-endofunctor) + ( λ a → precomp (positions-hom-polynomial-endofunctor a) X) +``` + +## Properties + +### Characterizing equality of morphisms + +```agda +module _ + {l1 l2 l3 l4 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + where + + htpy-hom-polynomial-endofunctor : + (α β : hom-polynomial-endofunctor 𝑃 𝑄) → UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) + htpy-hom-polynomial-endofunctor α β = + Σ ( shapes-hom-polynomial-endofunctor 𝑃 𝑄 α ~ + shapes-hom-polynomial-endofunctor 𝑃 𝑄 β) + ( λ H → + (a : shapes-polynomial-endofunctor 𝑃) + (d : + positions-polynomial-endofunctor 𝑄 + ( shapes-hom-polynomial-endofunctor 𝑃 𝑄 α a)) → + positions-hom-polynomial-endofunctor 𝑃 𝑄 α a d = + positions-hom-polynomial-endofunctor 𝑃 𝑄 β a + ( tr (positions-polynomial-endofunctor 𝑄) (H a) d)) + + refl-htpy-hom-polynomial-endofunctor : + (α : hom-polynomial-endofunctor 𝑃 𝑄) → htpy-hom-polynomial-endofunctor α α + refl-htpy-hom-polynomial-endofunctor α = (refl-htpy , λ a d → refl) + + htpy-eq-hom-polynomial-endofunctor : + (α β : hom-polynomial-endofunctor 𝑃 𝑄) → + (α = β) → htpy-hom-polynomial-endofunctor α β + htpy-eq-hom-polynomial-endofunctor α .α refl = + refl-htpy-hom-polynomial-endofunctor α + + is-torsorial-htpy-hom-polynomial-endofunctor : + (α : hom-polynomial-endofunctor 𝑃 𝑄) → + is-torsorial (htpy-hom-polynomial-endofunctor α) + is-torsorial-htpy-hom-polynomial-endofunctor α = + is-torsorial-Eq-structure + ( is-torsorial-htpy (shapes-hom-polynomial-endofunctor 𝑃 𝑄 α)) + ( shapes-hom-polynomial-endofunctor 𝑃 𝑄 α , refl-htpy) + ( is-torsorial-binary-htpy (positions-hom-polynomial-endofunctor 𝑃 𝑄 α)) + + is-equiv-htpy-eq-hom-polynomial-endofunctor : + (α β : hom-polynomial-endofunctor 𝑃 𝑄) → + is-equiv (htpy-eq-hom-polynomial-endofunctor α β) + is-equiv-htpy-eq-hom-polynomial-endofunctor α = + fundamental-theorem-id + ( is-torsorial-htpy-hom-polynomial-endofunctor α) + ( htpy-eq-hom-polynomial-endofunctor α) + + equiv-htpy-eq-hom-polynomial-endofunctor : + (α β : hom-polynomial-endofunctor 𝑃 𝑄) → + (α = β) ≃ htpy-hom-polynomial-endofunctor α β + equiv-htpy-eq-hom-polynomial-endofunctor α β = + ( htpy-eq-hom-polynomial-endofunctor α β , + is-equiv-htpy-eq-hom-polynomial-endofunctor α β) + + eq-htpy-hom-polynomial-endofunctor : + (α β : hom-polynomial-endofunctor 𝑃 𝑄) → + htpy-hom-polynomial-endofunctor α β → + α = β + eq-htpy-hom-polynomial-endofunctor α β = + map-inv-equiv (equiv-htpy-eq-hom-polynomial-endofunctor α β) +``` + +### Truncatedness of the type of morphisms + +If the shapes of $𝑄$ and the positions of $𝑃$ are $k$-truncated then the type of +morphisms $𝑃 → 𝑄$ is $k$-truncated. + +```agda +module _ + {l1 l2 l3 l4 l5 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + where + + is-trunc-hom-polynomial-endofunctor : + (k : 𝕋) → + is-trunc k (shapes-polynomial-endofunctor 𝑄) → + ( (a : shapes-polynomial-endofunctor 𝑃) → + is-trunc k (positions-polynomial-endofunctor 𝑃 a)) → + is-trunc k (hom-polynomial-endofunctor 𝑃 𝑄) + is-trunc-hom-polynomial-endofunctor k hQ hP = + is-trunc-Σ + ( is-trunc-function-type k hQ) + ( λ f → is-trunc-Π k (λ a → is-trunc-function-type k (hP a))) +``` + +### Morphisms are natural transformations + +```agda +module _ + {l1 l2 l3 l4 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α : hom-polynomial-endofunctor 𝑃 𝑄) + where + + naturality-hom-polynomial-endofunctor : + {l5 l6 : Level} {X : UU l5} {Y : UU l6} (f : X → Y) → + coherence-square-maps + ( map-polynomial-endofunctor 𝑃 f) + ( type-hom-polynomial-endofunctor 𝑃 𝑄 α) + ( type-hom-polynomial-endofunctor 𝑃 𝑄 α) + ( map-polynomial-endofunctor 𝑄 f) + naturality-hom-polynomial-endofunctor f = refl-htpy + + natural-transformation-hom-polynomial-endofunctor : + {l : Level} → natural-transformation-polynomial-endofunctor l 𝑃 𝑄 + natural-transformation-hom-polynomial-endofunctor = + ( type-hom-polynomial-endofunctor 𝑃 𝑄 α , + naturality-hom-polynomial-endofunctor) +``` + +### Natural transformations define morphisms + +```agda +module _ + {l1 l2 l3 l4 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α : natural-transformation-polynomial-endofunctor l2 𝑃 𝑄) + where + + shapes-natural-transformation-polynomial-endofunctor : + shapes-polynomial-endofunctor 𝑃 → + shapes-polynomial-endofunctor 𝑄 + shapes-natural-transformation-polynomial-endofunctor a = + pr1 (type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α (a , id)) + + positions-natural-transformation-polynomial-endofunctor : + (a : shapes-polynomial-endofunctor 𝑃) → + positions-polynomial-endofunctor 𝑄 + ( shapes-natural-transformation-polynomial-endofunctor a) → + positions-polynomial-endofunctor 𝑃 a + positions-natural-transformation-polynomial-endofunctor a = + pr2 (type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α (a , id)) + + hom-natural-transformation-polynomial-endofunctor : + hom-polynomial-endofunctor 𝑃 𝑄 + hom-natural-transformation-polynomial-endofunctor = + ( shapes-natural-transformation-polynomial-endofunctor , + positions-natural-transformation-polynomial-endofunctor) +``` + +### Equivalence between morphisms and natural transformations + +```agda +module _ + {l1 l2 l3 l4 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + where + + is-retraction-hom-natural-transformation-polynomial-endofunctor : + is-retraction + ( λ α → natural-transformation-hom-polynomial-endofunctor 𝑃 𝑄 α {l2}) + ( hom-natural-transformation-polynomial-endofunctor 𝑃 𝑄) + is-retraction-hom-natural-transformation-polynomial-endofunctor α = refl + + is-section-type-hom-natural-transformation-polynomial-endofunctor : + (α : natural-transformation-polynomial-endofunctor l2 𝑃 𝑄) + (X : UU l2) → + type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( natural-transformation-hom-polynomial-endofunctor 𝑃 𝑄 + ( hom-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α)) ~ + type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α {X} + is-section-type-hom-natural-transformation-polynomial-endofunctor + α X (a , x) = + inv + ( naturality-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α x + ( a , id)) +``` + +Finally, we need to show the following equality: + +$$ + α₁ (f ∘ x) (a , id) = ap (𝑄 f) (α₁ x (a , id)) ∙ α₁ f (a , x) +$$ + +```text +module _ + {l : Level} + (𝑃 : polynomial-endofunctor l l) + (𝑄 : polynomial-endofunctor l l) + where + + is-section-is-set-positions-hom-natural-transformation-polynomial-endofunctor : + is-section + ( λ α → natural-transformation-hom-polynomial-endofunctor 𝑃 𝑄 α {l}) + ( hom-natural-transformation-polynomial-endofunctor 𝑃 𝑄) + is-section-is-set-positions-hom-natural-transformation-polynomial-endofunctor α = + eq-htpy-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( natural-transformation-hom-polynomial-endofunctor 𝑃 𝑄 + ( hom-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α)) + ( α) + ( ( is-section-type-hom-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( α)) , + ?) +``` From f8304fe3d17ec950ddf164ae346f6679ee162677 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sun, 31 Aug 2025 19:26:35 +0200 Subject: [PATCH 05/41] define cartesian natural transformations of polynomial endofunctors --- src/trees.lagda.md | 1 + ...ormations-polynomial-endofunctors.lagda.md | 228 ++++++++++++++++++ 2 files changed, 229 insertions(+) create mode 100644 src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md diff --git a/src/trees.lagda.md b/src/trees.lagda.md index 034d2ebc0c..a3fad6bbf4 100644 --- a/src/trees.lagda.md +++ b/src/trees.lagda.md @@ -14,6 +14,7 @@ open import trees.bases-directed-trees public open import trees.bases-enriched-directed-trees public open import trees.binary-w-types public open import trees.bounded-multisets public +open import trees.cartesian-natural-transformations-polynomial-endofunctors public open import trees.coalgebra-of-directed-trees public open import trees.coalgebra-of-enriched-directed-trees public open import trees.coalgebras-polynomial-endofunctors public diff --git a/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md new file mode 100644 index 0000000000..107b903571 --- /dev/null +++ b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md @@ -0,0 +1,228 @@ +# Cartesian natural transformations between polynomial endofunctors + +```agda +module trees.cartesian-natural-transformations-polynomial-endofunctors where +``` + +
Imports + +```agda +open import foundation.action-on-identifications-binary-functions +open import foundation.action-on-identifications-functions +open import foundation.binary-homotopies +open import foundation.cartesian-morphisms-arrows +open import foundation.commuting-squares-of-homotopies +open import foundation.commuting-squares-of-maps +open import foundation.contractible-types +open import foundation.dependent-pair-types +open import foundation.equality-dependent-function-types +open import foundation.equivalences +open import foundation.function-types +open import foundation.functoriality-dependent-pair-types +open import foundation.fundamental-theorem-of-identity-types +open import foundation.homotopies +open import foundation.homotopy-induction +open import foundation.identity-types +open import foundation.implicit-function-types +open import foundation.morphisms-arrows +open import foundation.precomposition-functions +open import foundation.propositions +open import foundation.pullbacks +open import foundation.sections +open import foundation.structure-identity-principle +open import foundation.transport-along-identifications +open import foundation.universe-levels +open import foundation.whiskering-homotopies-composition + +open import foundation-core.equality-dependent-pair-types +open import foundation-core.retractions +open import foundation-core.torsorial-type-families + +open import trees.natural-transformations-polynomial-endofunctors +open import trees.polynomial-endofunctors +``` + +
+ +## Idea + +Given two [polynomial endofunctors](trees.polynomial-endofunctors.md) +$𝑃 ≐ (A ◃ B)$ and $𝑄 ≐ (C ◃ D)$, then a +[natural transformation](trees.natural-transformations-polynomial-endofunctors.md) +$α$ between them is +{{#concept "cartesian" Disambiguation="natural transformations of polynomial endofunctors of types" Agda=is-cartesian-natural-transformation-polynomial-endofunctor}} + +if every naturality square + +```text + α(X) + 𝑃(X) -----------> 𝑄(X) + | | + | | + 𝑃(f) | | 𝑄(f) + | | + ∨ ∨ + 𝑃(Y) -----------> 𝑄(Y) + α(Y) +``` + +is a [pullback](foundation-core.pullbacks.md). + +## Definitions + +### The cartesianness predicate on natural transformations between polynomial endofunctors + +```agda +module _ + {l1 l2 l3 l4 l : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α : natural-transformation-polynomial-endofunctor l 𝑃 𝑄) + where + + is-cartesian-natural-transformation-polynomial-endofunctor : + UU (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ lsuc l) + is-cartesian-natural-transformation-polynomial-endofunctor = + {X Y : UU l} (f : X → Y) → + is-cartesian-hom-arrow + ( map-polynomial-endofunctor 𝑃 f) + ( map-polynomial-endofunctor 𝑄 f) + ( hom-arrow-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α f) + + is-prop-is-cartesian-natural-transformation-polynomial-endofunctor : + is-prop is-cartesian-natural-transformation-polynomial-endofunctor + is-prop-is-cartesian-natural-transformation-polynomial-endofunctor = + is-prop-implicit-Π + ( λ X → + is-prop-implicit-Π + ( λ Y → + is-prop-Π + ( λ f → + is-prop-is-cartesian-hom-arrow + ( map-polynomial-endofunctor 𝑃 f) + ( map-polynomial-endofunctor 𝑄 f) + ( hom-arrow-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( α) + ( f))))) + + is-cartesian-natural-transformation-polynomial-endofunctor-Prop : + Prop (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ lsuc l) + is-cartesian-natural-transformation-polynomial-endofunctor-Prop = + ( is-cartesian-natural-transformation-polynomial-endofunctor , + is-prop-is-cartesian-natural-transformation-polynomial-endofunctor) +``` + +### Cartesian natural transformations between polynomial endofunctors + +```agda +cartesian-natural-transformation-polynomial-endofunctor : + {l1 l2 l3 l4 : Level} (l : Level) → + polynomial-endofunctor l1 l2 → + polynomial-endofunctor l3 l4 → + UU (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ lsuc l) +cartesian-natural-transformation-polynomial-endofunctor l 𝑃 𝑄 = + Σ ( natural-transformation-polynomial-endofunctor l 𝑃 𝑄) + ( is-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄) + +module _ + {l1 l2 l3 l4 l : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α : cartesian-natural-transformation-polynomial-endofunctor l 𝑃 𝑄) + where + + natural-transformation-cartesian-natural-transformation-polynomial-endofunctor : + natural-transformation-polynomial-endofunctor l 𝑃 𝑄 + natural-transformation-cartesian-natural-transformation-polynomial-endofunctor = + pr1 α + + type-cartesian-natural-transformation-polynomial-endofunctor : + {X : UU l} → + type-polynomial-endofunctor 𝑃 X → + type-polynomial-endofunctor 𝑄 X + type-cartesian-natural-transformation-polynomial-endofunctor = + type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + natural-transformation-cartesian-natural-transformation-polynomial-endofunctor + + naturality-cartesian-natural-transformation-polynomial-endofunctor : + coherence-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( type-cartesian-natural-transformation-polynomial-endofunctor) + naturality-cartesian-natural-transformation-polynomial-endofunctor = + naturality-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + natural-transformation-cartesian-natural-transformation-polynomial-endofunctor + + is-cartesian-cartesian-natural-transformation-polynomial-endofunctor : + is-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + natural-transformation-cartesian-natural-transformation-polynomial-endofunctor + is-cartesian-cartesian-natural-transformation-polynomial-endofunctor = pr2 α +``` + +### The associated family of cartesian morphisms of arrows + +```agda +module _ + {l1 l2 l3 l4 l5 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α@(α' , H) : cartesian-natural-transformation-polynomial-endofunctor l5 𝑃 𝑄) + where + + hom-arrow-cartesian-natural-transformation-polynomial-endofunctor : + {X Y : UU l5} (f : X → Y) → + hom-arrow (map-polynomial-endofunctor 𝑃 f) (map-polynomial-endofunctor 𝑄 f) + hom-arrow-cartesian-natural-transformation-polynomial-endofunctor = + hom-arrow-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α' + + cartesian-hom-arrow-cartesian-natural-transformation-polynomial-endofunctor : + {X Y : UU l5} (f : X → Y) → + cartesian-hom-arrow + ( map-polynomial-endofunctor 𝑃 f) + ( map-polynomial-endofunctor 𝑄 f) + cartesian-hom-arrow-cartesian-natural-transformation-polynomial-endofunctor + f = + ( hom-arrow-cartesian-natural-transformation-polynomial-endofunctor f , H f) +``` + +### The identity cartesian natural transformation + +```agda +id-cartesian-natural-transformation-polynomial-endofunctor : + {l1 l2 l3 : Level} (𝑃 : polynomial-endofunctor l1 l2) → + cartesian-natural-transformation-polynomial-endofunctor l3 𝑃 𝑃 +pr1 (id-cartesian-natural-transformation-polynomial-endofunctor 𝑃) = + id-natural-transformation-polynomial-endofunctor 𝑃 +pr2 (id-cartesian-natural-transformation-polynomial-endofunctor 𝑃) f = + is-cartesian-id-hom-arrow +``` + +### Composition of cartesian natural transformations + +```agda +module _ + {l1 l2 l3 l4 l5 l6 l : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (𝑅 : polynomial-endofunctor l5 l6) + (β@(β' , H) : cartesian-natural-transformation-polynomial-endofunctor l 𝑄 𝑅) + (α@(α' , K) : cartesian-natural-transformation-polynomial-endofunctor l 𝑃 𝑄) + where + + is-cartesian-comp-cartesian-natural-transformation-polynomial-endofunctor : + is-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑅 + ( comp-natural-transformation-polynomial-endofunctor 𝑃 𝑄 𝑅 β' α') + is-cartesian-comp-cartesian-natural-transformation-polynomial-endofunctor f = + is-cartesian-comp-hom-arrow + ( map-polynomial-endofunctor 𝑃 f) + ( map-polynomial-endofunctor 𝑄 f) + ( map-polynomial-endofunctor 𝑅 f) + ( hom-arrow-natural-transformation-polynomial-endofunctor 𝑄 𝑅 β' f) + ( hom-arrow-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α' f) + ( H f) + ( K f) + + comp-cartesian-natural-transformation-polynomial-endofunctor : + cartesian-natural-transformation-polynomial-endofunctor l 𝑃 𝑅 + comp-cartesian-natural-transformation-polynomial-endofunctor = + ( comp-natural-transformation-polynomial-endofunctor 𝑃 𝑄 𝑅 β' α' , + is-cartesian-comp-cartesian-natural-transformation-polynomial-endofunctor) +``` From 5ec4c5878df64f29d892fea6f9fb51229c1e40ec Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sun, 31 Aug 2025 22:18:04 +0200 Subject: [PATCH 06/41] work --- ...morphisms-polynomial-endofunctors.lagda.md | 28 +++++++++++++++++-- src/trees/polynomial-endofunctors.lagda.md | 2 ++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/trees/morphisms-polynomial-endofunctors.lagda.md b/src/trees/morphisms-polynomial-endofunctors.lagda.md index e2f0208da4..5770feaa87 100644 --- a/src/trees/morphisms-polynomial-endofunctors.lagda.md +++ b/src/trees/morphisms-polynomial-endofunctors.lagda.md @@ -89,6 +89,31 @@ module _ ( λ a → precomp (positions-hom-polynomial-endofunctor a) X) ``` +### The identity morphism + +```agda +id-hom-polynomial-endofunctor : + {l1 l2 : Level} + (𝑃 : polynomial-endofunctor l1 l2) → + hom-polynomial-endofunctor 𝑃 𝑃 +id-hom-polynomial-endofunctor 𝑃 = (id , (λ a → id)) +``` + +### Composition of morphisms + +```agda +comp-hom-polynomial-endofunctor : + {l1 l2 l3 l4 l5 l6 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (𝑅 : polynomial-endofunctor l5 l6) → + hom-polynomial-endofunctor 𝑄 𝑅 → + hom-polynomial-endofunctor 𝑃 𝑄 → + hom-polynomial-endofunctor 𝑃 𝑅 +comp-hom-polynomial-endofunctor 𝑃 𝑄 𝑅 (β₀ , β₁) (α₀ , α₁) = + ( β₀ ∘ α₀ , (λ a → α₁ a ∘ β₁ (α₀ a))) +``` + ## Properties ### Characterizing equality of morphisms @@ -217,8 +242,7 @@ module _ where shapes-natural-transformation-polynomial-endofunctor : - shapes-polynomial-endofunctor 𝑃 → - shapes-polynomial-endofunctor 𝑄 + shapes-polynomial-endofunctor 𝑃 → shapes-polynomial-endofunctor 𝑄 shapes-natural-transformation-polynomial-endofunctor a = pr1 (type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α (a , id)) diff --git a/src/trees/polynomial-endofunctors.lagda.md b/src/trees/polynomial-endofunctors.lagda.md index 5479e449a0..52534d3473 100644 --- a/src/trees/polynomial-endofunctors.lagda.md +++ b/src/trees/polynomial-endofunctors.lagda.md @@ -204,3 +204,5 @@ coh-refl-htpy-polynomial-endofunctor (A , B) = In other words, given a [species of types](species.species-of-types.md) `S`, the shapes are types equipped with `S`-structure, and the positions are points. +- Via [type duality](foundation.type-duality.md), polynomial endofunctors are + classified by maps of types. From 4683b4b0e3b26ada0cbf19a548d1d2e2b6f60732 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Tue, 2 Sep 2025 00:19:17 +0200 Subject: [PATCH 07/41] work cart poly fun --- src/trees.lagda.md | 2 + ...morphisms-polynomial-endofunctors.lagda.md | 300 ++++++++++++++++++ src/trees/polynomial-endofunctors.lagda.md | 2 +- 3 files changed, 303 insertions(+), 1 deletion(-) create mode 100644 src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md diff --git a/src/trees.lagda.md b/src/trees.lagda.md index a3fad6bbf4..be9ef14d32 100644 --- a/src/trees.lagda.md +++ b/src/trees.lagda.md @@ -14,6 +14,7 @@ open import trees.bases-directed-trees public open import trees.bases-enriched-directed-trees public open import trees.binary-w-types public open import trees.bounded-multisets public +open import trees.cartesian-morphisms-polynomial-endofunctors public open import trees.cartesian-natural-transformations-polynomial-endofunctors public open import trees.coalgebra-of-directed-trees public open import trees.coalgebra-of-enriched-directed-trees public @@ -51,6 +52,7 @@ open import trees.natural-transformations-polynomial-endofunctors public open import trees.planar-binary-trees public open import trees.plane-trees public open import trees.polynomial-endofunctors public +open import trees.polynomial-endofunctors-from-subuniverses public open import trees.raising-universe-levels-directed-trees public open import trees.ranks-of-elements-w-types public open import trees.rooted-morphisms-directed-trees public diff --git a/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md new file mode 100644 index 0000000000..47a81df38f --- /dev/null +++ b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md @@ -0,0 +1,300 @@ +# Cartesian morphisms of polynomial endofunctors + +```agda +module trees.cartesian-morphisms-polynomial-endofunctors where +``` + +
Imports + +```agda +open import foundation.action-on-identifications-functions +open import foundation.binary-homotopies +open import foundation.commuting-squares-of-homotopies +open import foundation.commuting-squares-of-maps +open import foundation.contractible-types +open import foundation.dependent-pair-types +open import foundation.equality-dependent-function-types +open import foundation.equivalences +open import foundation.function-types +open import foundation.functoriality-dependent-pair-types +open import foundation.fundamental-theorem-of-identity-types +open import foundation.homotopies +open import foundation.homotopy-induction +open import foundation.identity-types +open import foundation.implicit-function-types +open import foundation.precomposition-functions +open import foundation.propositions +open import foundation.sections +open import foundation.structure-identity-principle +open import foundation.subtypes +open import foundation.transport-along-identifications +open import foundation.truncated-types +open import foundation.truncation-levels +open import foundation.type-arithmetic-dependent-pair-types +open import foundation.type-theoretic-principle-of-choice +open import foundation.universe-levels +open import foundation.whiskering-homotopies-composition + +open import foundation-core.equality-dependent-pair-types +open import foundation-core.retractions +open import foundation-core.torsorial-type-families + +open import trees.cartesian-natural-transformations-polynomial-endofunctors +open import trees.morphisms-polynomial-endofunctors +open import trees.natural-transformations-polynomial-endofunctors +open import trees.polynomial-endofunctors +``` + +
+ +## Idea + +Given two [polynomial endofunctors](trees.polynomial-endofunctors.md) +$𝑃 ≐ (A ◃ B)$ and $𝑄 ≐ (C ◃ D)$, a +[morphism](trees.morphisms-polynomial-endofunctors.md) $α : 𝑃 → 𝑄$ is +{{#concept "cartesian" Disambiguation="morphism of polynomial endofunctors of types" Agda=is-cartesian-hom-polynomial-endofunctor Agda=cartesian-hom-polynomial-endofunctor}} +if the family of maps + +$$α₁ : (a : A) → D (α₀ a) → B a$$ + +is a family of [equivalences](foundation-core.equivalences.md). + +## Definitions + +### The predicate of being cartesian + +```agda +module _ + {l1 l2 l3 l4 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α : hom-polynomial-endofunctor 𝑃 𝑄) + where + + is-cartesian-hom-polynomial-endofunctor : UU (l1 ⊔ l2 ⊔ l4) + is-cartesian-hom-polynomial-endofunctor = + (a : shapes-polynomial-endofunctor 𝑃) → + is-equiv (positions-hom-polynomial-endofunctor 𝑃 𝑄 α a) + + is-prop-is-cartesian-hom-polynomial-endofunctor : + is-prop is-cartesian-hom-polynomial-endofunctor + is-prop-is-cartesian-hom-polynomial-endofunctor = + is-prop-Π + ( λ a → + is-property-is-equiv (positions-hom-polynomial-endofunctor 𝑃 𝑄 α a)) + + is-cartesian-hom-polynomial-endofunctor-Prop : Prop (l1 ⊔ l2 ⊔ l4) + is-cartesian-hom-polynomial-endofunctor-Prop = + ( is-cartesian-hom-polynomial-endofunctor , + is-prop-is-cartesian-hom-polynomial-endofunctor) +``` + +### The type of cartesian morphisms + +```agda +cartesian-hom-polynomial-endofunctor : + {l1 l2 l3 l4 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) → + UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) +cartesian-hom-polynomial-endofunctor 𝑃 𝑄 = + Σ ( hom-polynomial-endofunctor 𝑃 𝑄) + ( is-cartesian-hom-polynomial-endofunctor 𝑃 𝑄) + +make-cartesian-hom-polynomial-endofunctor : + {l1 l2 l3 l4 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α₀ : shapes-polynomial-endofunctor 𝑃 → shapes-polynomial-endofunctor 𝑄) → + ( (a : shapes-polynomial-endofunctor 𝑃) → + positions-polynomial-endofunctor 𝑄 (α₀ a) ≃ + positions-polynomial-endofunctor 𝑃 a) → + cartesian-hom-polynomial-endofunctor 𝑃 𝑄 +make-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α₀ α₁ = + ( ( α₀ , map-equiv ∘ α₁) , is-equiv-map-equiv ∘ α₁) + +module _ + {l1 l2 l3 l4 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α : cartesian-hom-polynomial-endofunctor 𝑃 𝑄) + where + + hom-cartesian-hom-polynomial-endofunctor : hom-polynomial-endofunctor 𝑃 𝑄 + hom-cartesian-hom-polynomial-endofunctor = pr1 α + + shapes-cartesian-hom-polynomial-endofunctor : + shapes-polynomial-endofunctor 𝑃 → shapes-polynomial-endofunctor 𝑄 + shapes-cartesian-hom-polynomial-endofunctor = + shapes-hom-polynomial-endofunctor 𝑃 𝑄 + hom-cartesian-hom-polynomial-endofunctor + + positions-cartesian-hom-polynomial-endofunctor : + (a : shapes-polynomial-endofunctor 𝑃) → + positions-polynomial-endofunctor 𝑄 + ( shapes-hom-polynomial-endofunctor 𝑃 𝑄 + ( hom-cartesian-hom-polynomial-endofunctor) + ( a)) → + positions-polynomial-endofunctor 𝑃 a + positions-cartesian-hom-polynomial-endofunctor = + positions-hom-polynomial-endofunctor 𝑃 𝑄 + hom-cartesian-hom-polynomial-endofunctor + + type-cartesian-hom-polynomial-endofunctor : + {l5 : Level} {X : UU l5} → + type-polynomial-endofunctor 𝑃 X → type-polynomial-endofunctor 𝑄 X + type-cartesian-hom-polynomial-endofunctor = + type-hom-polynomial-endofunctor 𝑃 𝑄 + hom-cartesian-hom-polynomial-endofunctor + + is-cartesian-cartesian-hom-polynomial-endofunctor : + is-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 + hom-cartesian-hom-polynomial-endofunctor + is-cartesian-cartesian-hom-polynomial-endofunctor = pr2 α + + equiv-positions-cartesian-hom-polynomial-endofunctor : + (a : shapes-polynomial-endofunctor 𝑃) → + positions-polynomial-endofunctor 𝑄 + ( shapes-hom-polynomial-endofunctor 𝑃 𝑄 + ( hom-cartesian-hom-polynomial-endofunctor) + ( a)) ≃ + positions-polynomial-endofunctor 𝑃 a + equiv-positions-cartesian-hom-polynomial-endofunctor a = + ( positions-cartesian-hom-polynomial-endofunctor a , + is-cartesian-cartesian-hom-polynomial-endofunctor a) +``` + +### The identity cartesian morphism + +```agda +id-cartesian-hom-polynomial-endofunctor : + {l1 l2 : Level} + (𝑃 : polynomial-endofunctor l1 l2) → + cartesian-hom-polynomial-endofunctor 𝑃 𝑃 +id-cartesian-hom-polynomial-endofunctor 𝑃 = + (id-hom-polynomial-endofunctor 𝑃 , (λ a → is-equiv-id)) +``` + +### Composition of cartesian morphisms + +```agda +comp-cartesian-hom-polynomial-endofunctor : + {l1 l2 l3 l4 l5 l6 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (𝑅 : polynomial-endofunctor l5 l6) → + cartesian-hom-polynomial-endofunctor 𝑄 𝑅 → + cartesian-hom-polynomial-endofunctor 𝑃 𝑄 → + cartesian-hom-polynomial-endofunctor 𝑃 𝑅 +comp-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 𝑅 (β , H) (α , K) = + ( comp-hom-polynomial-endofunctor 𝑃 𝑄 𝑅 β α , + λ a → is-equiv-comp (pr2 α a) (pr2 β (pr1 α a)) (H (pr1 α a)) (K a)) +``` + +## Properties + +### Truncatedness of the type of morphisms + +If the shapes and positions of the codomain $𝑄$ are $k$-truncated, for $k ≥ -1$, +then the type of cartesian morphisms $𝑃 → 𝑄$ is $k$-truncated. + +```agda +module _ + {l1 l2 l3 l4 l5 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + where + + is-trunc-succ-cartesian-hom-polynomial-endofunctor : + (k : 𝕋) → + is-trunc (succ-𝕋 k) (shapes-polynomial-endofunctor 𝑄) → + ( (c : shapes-polynomial-endofunctor 𝑄) → + is-trunc (succ-𝕋 k) (positions-polynomial-endofunctor 𝑄 c)) → + is-trunc (succ-𝕋 k) (cartesian-hom-polynomial-endofunctor 𝑃 𝑄) + is-trunc-succ-cartesian-hom-polynomial-endofunctor k hQ hP = + is-trunc-equiv (succ-𝕋 k) _ + ( equiv-tot (λ _ → inv-distributive-Π-Σ) ∘e associative-Σ _ _ _) + ( is-trunc-Σ + ( is-trunc-function-type (succ-𝕋 k) hQ) + ( λ f → + is-trunc-Π + ( succ-𝕋 k) + ( λ e → is-trunc-equiv-is-trunc-domain k (hP (f e))))) +``` + +### Cartesian morphisms are cartesian natural transformations + +```text +module _ + {l1 l2 l3 l4 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α : hom-polynomial-endofunctor 𝑃 𝑄) + where + + is-cartesian-natural-transformation-hom-polynomial-endofunctor : + {l : Level} → + is-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( natural-transformation-hom-polynomial-endofunctor 𝑃 𝑄 α {l}) + is-cartesian-natural-transformation-hom-polynomial-endofunctor f = + {! !} +``` + +### Cartesian natural transformations define cartesian morphisms + +```text +module _ + {l1 l2 l3 l4 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α : natural-transformation-polynomial-endofunctor l2 𝑃 𝑄) + where + + shapes-natural-transformation-polynomial-endofunctor : + shapes-polynomial-endofunctor 𝑃 → shapes-polynomial-endofunctor 𝑄 + shapes-natural-transformation-polynomial-endofunctor a = + pr1 (type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α (a , id)) + + positions-natural-transformation-polynomial-endofunctor : + (a : shapes-polynomial-endofunctor 𝑃) → + positions-polynomial-endofunctor 𝑄 + ( shapes-natural-transformation-polynomial-endofunctor a) → + positions-polynomial-endofunctor 𝑃 a + positions-natural-transformation-polynomial-endofunctor a = + pr2 (type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α (a , id)) + + hom-natural-transformation-polynomial-endofunctor : + hom-polynomial-endofunctor 𝑃 𝑄 + hom-natural-transformation-polynomial-endofunctor = + ( shapes-natural-transformation-polynomial-endofunctor , + positions-natural-transformation-polynomial-endofunctor) +``` + +### Equivalence between cartesian morphisms and cartesian natural transformations + +```text +module _ + {l1 l2 l3 l4 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + where + + is-retraction-hom-natural-transformation-polynomial-endofunctor : + is-retraction + ( λ α → natural-transformation-hom-polynomial-endofunctor 𝑃 𝑄 α {l2}) + ( hom-natural-transformation-polynomial-endofunctor 𝑃 𝑄) + is-retraction-hom-natural-transformation-polynomial-endofunctor α = refl + + is-section-type-hom-natural-transformation-polynomial-endofunctor : + (α : natural-transformation-polynomial-endofunctor l2 𝑃 𝑄) + (X : UU l2) → + type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( natural-transformation-hom-polynomial-endofunctor 𝑃 𝑄 + ( hom-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α)) ~ + type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α {X} + is-section-type-hom-natural-transformation-polynomial-endofunctor + α X (a , x) = + inv + ( naturality-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α x + ( a , id)) +``` diff --git a/src/trees/polynomial-endofunctors.lagda.md b/src/trees/polynomial-endofunctors.lagda.md index 52534d3473..ebfea18c3c 100644 --- a/src/trees/polynomial-endofunctors.lagda.md +++ b/src/trees/polynomial-endofunctors.lagda.md @@ -35,7 +35,7 @@ Given a type `A` [equipped](foundation.structure.md) with a type family `B` over `𝑃 A B` is defined by ```text - X ↦ Σ (x : A), (B x → X) + X ↦ Σ (x : A), (B x → X). ``` Polynomial endofunctors are important in the study of From 2bce3f4a119715a4e4b2fc88796d6761e4079cda Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Tue, 2 Sep 2025 00:31:45 +0200 Subject: [PATCH 08/41] edit --- ...morphisms-polynomial-endofunctors.lagda.md | 53 +++++++++++++++---- 1 file changed, 44 insertions(+), 9 deletions(-) diff --git a/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md index 47a81df38f..5048854bf2 100644 --- a/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md +++ b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md @@ -193,6 +193,30 @@ comp-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 𝑅 (β , H) (α , K) = ## Properties +### A computation of the type of cartesian morphisms + +```agda +module _ + {l1 l2 l3 l4 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + where + + cartesian-hom-polynomial-endofunctor' : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) + cartesian-hom-polynomial-endofunctor' = + Σ ( shapes-polynomial-endofunctor 𝑃 → shapes-polynomial-endofunctor 𝑄) + ( λ α₀ → + ((a : shapes-polynomial-endofunctor 𝑃) → + positions-polynomial-endofunctor 𝑄 (α₀ a) ≃ + positions-polynomial-endofunctor 𝑃 a)) + + reassociate-type-cartesian-hom-polynomial-endofunctor : + cartesian-hom-polynomial-endofunctor 𝑃 𝑄 ≃ + cartesian-hom-polynomial-endofunctor' + reassociate-type-cartesian-hom-polynomial-endofunctor = + ( equiv-tot (λ _ → inv-distributive-Π-Σ)) ∘e (associative-Σ _ _ _) +``` + ### Truncatedness of the type of morphisms If the shapes and positions of the codomain $𝑄$ are $k$-truncated, for $k ≥ -1$, @@ -205,21 +229,32 @@ module _ (𝑄 : polynomial-endofunctor l3 l4) where + is-trunc-succ-cartesian-hom-polynomial-endofunctor' : + (k : 𝕋) → + is-trunc (succ-𝕋 k) (shapes-polynomial-endofunctor 𝑄) → + ( (c : shapes-polynomial-endofunctor 𝑄) → + is-trunc (succ-𝕋 k) (positions-polynomial-endofunctor 𝑄 c)) → + is-trunc (succ-𝕋 k) (cartesian-hom-polynomial-endofunctor' 𝑃 𝑄) + is-trunc-succ-cartesian-hom-polynomial-endofunctor' k hQ hQ' = + is-trunc-Σ + ( is-trunc-function-type (succ-𝕋 k) hQ) + ( λ f → + is-trunc-Π + ( succ-𝕋 k) + ( λ e → is-trunc-equiv-is-trunc-domain k (hQ' (f e)))) + is-trunc-succ-cartesian-hom-polynomial-endofunctor : (k : 𝕋) → is-trunc (succ-𝕋 k) (shapes-polynomial-endofunctor 𝑄) → ( (c : shapes-polynomial-endofunctor 𝑄) → is-trunc (succ-𝕋 k) (positions-polynomial-endofunctor 𝑄 c)) → is-trunc (succ-𝕋 k) (cartesian-hom-polynomial-endofunctor 𝑃 𝑄) - is-trunc-succ-cartesian-hom-polynomial-endofunctor k hQ hP = - is-trunc-equiv (succ-𝕋 k) _ - ( equiv-tot (λ _ → inv-distributive-Π-Σ) ∘e associative-Σ _ _ _) - ( is-trunc-Σ - ( is-trunc-function-type (succ-𝕋 k) hQ) - ( λ f → - is-trunc-Π - ( succ-𝕋 k) - ( λ e → is-trunc-equiv-is-trunc-domain k (hP (f e))))) + is-trunc-succ-cartesian-hom-polynomial-endofunctor k hQ hQ' = + is-trunc-equiv + ( succ-𝕋 k) + ( cartesian-hom-polynomial-endofunctor' 𝑃 𝑄) + ( reassociate-type-cartesian-hom-polynomial-endofunctor 𝑃 𝑄) + ( is-trunc-succ-cartesian-hom-polynomial-endofunctor' k hQ hQ') ``` ### Cartesian morphisms are cartesian natural transformations From 3703bc145416879884af4e52a0254693f4c5dea7 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Tue, 2 Sep 2025 16:15:32 +0200 Subject: [PATCH 09/41] fix references that should be citations in `coherently-idempotent-maps` --- src/foundation/coherently-idempotent-maps.lagda.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/foundation/coherently-idempotent-maps.lagda.md b/src/foundation/coherently-idempotent-maps.lagda.md index d746a1ec6a..c88e1bf662 100644 --- a/src/foundation/coherently-idempotent-maps.lagda.md +++ b/src/foundation/coherently-idempotent-maps.lagda.md @@ -46,9 +46,9 @@ given in {{#cite Shu17}}: ``` **Terminology.** Our definition of a _coherently idempotent map_ corresponds to -the definition of a _(fully coherent) idempotent map_ in {{#reference Shu17}} -and {{#reference Shu14SplittingIdempotents}}. Our definition of an _idempotent -map_ corresponds in their terminology to a _pre-idempotent map_. +the definition of a _(fully coherent) idempotent map_ in {{#cite Shu17}} and +{{#cite Shu14SplittingIdempotents}}. Our definition of an _idempotent map_ +corresponds in their terminology to a _pre-idempotent map_. ## Definitions From 1ee4e3e4f0170db65660f9b9040793da708ac265 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 13 Sep 2025 12:30:04 +0200 Subject: [PATCH 10/41] fiber computations --- .../dependent-sums-pullbacks.lagda.md | 3 +- src/trees.lagda.md | 1 - ...morphisms-polynomial-endofunctors.lagda.md | 92 +++++++++++++++++++ src/trees/polynomial-endofunctors.lagda.md | 27 ++++++ 4 files changed, 120 insertions(+), 3 deletions(-) diff --git a/src/foundation/dependent-sums-pullbacks.lagda.md b/src/foundation/dependent-sums-pullbacks.lagda.md index c1f09588ee..eb6bd139dc 100644 --- a/src/foundation/dependent-sums-pullbacks.lagda.md +++ b/src/foundation/dependent-sums-pullbacks.lagda.md @@ -283,8 +283,7 @@ module _ is-pullback-family-is-pullback-tot : is-pullback f g c → - is-pullback - (map-Σ PX f f') (map-Σ PX g g') tot-cone-cone-family → + is-pullback (map-Σ PX f f') (map-Σ PX g g') tot-cone-cone-family → (x : C) → is-pullback ( ( tr PX (coherence-square-cone f g c x)) ∘ diff --git a/src/trees.lagda.md b/src/trees.lagda.md index be9ef14d32..5d2a613423 100644 --- a/src/trees.lagda.md +++ b/src/trees.lagda.md @@ -52,7 +52,6 @@ open import trees.natural-transformations-polynomial-endofunctors public open import trees.planar-binary-trees public open import trees.plane-trees public open import trees.polynomial-endofunctors public -open import trees.polynomial-endofunctors-from-subuniverses public open import trees.raising-universe-levels-directed-trees public open import trees.ranks-of-elements-w-types public open import trees.rooted-morphisms-directed-trees public diff --git a/src/trees/morphisms-polynomial-endofunctors.lagda.md b/src/trees/morphisms-polynomial-endofunctors.lagda.md index 5770feaa87..901315003f 100644 --- a/src/trees/morphisms-polynomial-endofunctors.lagda.md +++ b/src/trees/morphisms-polynomial-endofunctors.lagda.md @@ -11,10 +11,13 @@ open import foundation.action-on-identifications-functions open import foundation.binary-homotopies open import foundation.commuting-squares-of-homotopies open import foundation.commuting-squares-of-maps +open import foundation.commuting-triangles-of-maps +open import foundation.cones-over-cospan-diagrams open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.equality-dependent-function-types open import foundation.equivalences +open import foundation.fibers-of-maps open import foundation.function-types open import foundation.functoriality-dependent-pair-types open import foundation.fundamental-theorem-of-identity-types @@ -22,6 +25,7 @@ open import foundation.homotopies open import foundation.homotopy-induction open import foundation.identity-types open import foundation.implicit-function-types +open import foundation.morphisms-arrows open import foundation.precomposition-functions open import foundation.sections open import foundation.structure-identity-principle @@ -229,6 +233,26 @@ module _ natural-transformation-hom-polynomial-endofunctor = ( type-hom-polynomial-endofunctor 𝑃 𝑄 α , naturality-hom-polynomial-endofunctor) + + hom-arrow-hom-polynomial-endofunctor : + {l5 l6 : Level} {X : UU l5} {Y : UU l6} (f : X → Y) → + hom-arrow (map-polynomial-endofunctor 𝑃 f) (map-polynomial-endofunctor 𝑄 f) + hom-arrow-hom-polynomial-endofunctor f = + ( type-hom-polynomial-endofunctor 𝑃 𝑄 α , + type-hom-polynomial-endofunctor 𝑃 𝑄 α , + naturality-hom-polynomial-endofunctor f) + + cone-hom-polynomial-endofunctor : + {l5 l6 : Level} {X : UU l5} {Y : UU l6} (f : X → Y) → + cone + ( type-hom-polynomial-endofunctor 𝑃 𝑄 α) + ( map-polynomial-endofunctor 𝑄 f) + ( type-polynomial-endofunctor 𝑃 X) + cone-hom-polynomial-endofunctor f = + cone-hom-arrow + ( map-polynomial-endofunctor 𝑃 f) + ( map-polynomial-endofunctor 𝑄 f) + ( hom-arrow-hom-polynomial-endofunctor f) ``` ### Natural transformations define morphisms @@ -261,6 +285,74 @@ module _ positions-natural-transformation-polynomial-endofunctor) ``` +### Computing the fibers of the induced natural transformation + +```agda +module _ + {l1 l2 l3 l4 l5 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α@(α₀ , α₁) : hom-polynomial-endofunctor 𝑃 𝑄) + (let 𝑃₁ = positions-polynomial-endofunctor 𝑃) + (let 𝑄₀ = shapes-polynomial-endofunctor 𝑄) + (let 𝑄₁ = positions-polynomial-endofunctor 𝑄) + {X : UU l5} + where + + fiber-type-hom-polynomial-endofunctor : + (c : 𝑄₀) (x : 𝑄₁ c → X) → UU (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ l5) + fiber-type-hom-polynomial-endofunctor c x = + Σ ( fiber α₀ c) + ( λ (a , p) → + Σ (𝑃₁ a → X) (λ x' → coherence-square-maps (tr 𝑄₁ p) (α₁ a) x x')) + + compute-fiber-type-hom-polynomial-endofunctor : + (c : 𝑄₀) (x : 𝑄₁ c → X) → + fiber (type-hom-polynomial-endofunctor 𝑃 𝑄 α {X = X}) (c , x) ≃ + fiber-type-hom-polynomial-endofunctor c x + compute-fiber-type-hom-polynomial-endofunctor c x = + equivalence-reasoning + fiber (type-hom-polynomial-endofunctor 𝑃 𝑄 α {X = X}) (c , x) + ≃ Σ ( fiber α₀ c) + ( λ (a , p) → + fiber + ( precomp (α₁ a) X) + ( inv-tr (λ c' → pr2 𝑄 c' → X) p x)) + by + compute-fiber-map-Σ + ( λ c → positions-polynomial-endofunctor 𝑄 c → X) + ( α₀) + ( λ a → precomp (α₁ a) X) + ( c , x) + ≃ Σ ( fiber α₀ c) + ( λ (a , p) → + Σ (𝑃₁ a → X) + (λ x' → + coherence-triangle-maps' + ( inv-tr (λ c' → 𝑄₁ c' → X) p x) + ( x') + ( α₁ a))) + by + equiv-tot + ( λ (a , p) → + compute-coherence-triangle-fiber-precomp' + ( α₁ a) + ( X) + ( inv-tr (λ c' → pr2 𝑄 c' → X) p x)) + ≃ Σ ( fiber α₀ c) + ( λ (a , p) → + Σ (𝑃₁ a → X) (λ x' → coherence-square-maps (tr 𝑄₁ p) (α₁ a) x x')) + by + equiv-tot + ( λ (a , p) → + equiv-tot + ( λ x' → + equiv-tr + ( λ u → coherence-triangle-maps' u x' (α₁ a)) + ( ( tr-function-type-fixed-codomain 𝑄₁ X (inv p) x) ∙ + ( ap (λ q → x ∘ tr 𝑄₁ q) (inv-inv p))))) +``` + ### Equivalence between morphisms and natural transformations ```agda diff --git a/src/trees/polynomial-endofunctors.lagda.md b/src/trees/polynomial-endofunctors.lagda.md index ebfea18c3c..6139f5a1b8 100644 --- a/src/trees/polynomial-endofunctors.lagda.md +++ b/src/trees/polynomial-endofunctors.lagda.md @@ -10,12 +10,14 @@ module trees.polynomial-endofunctors where open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.equivalences +open import foundation.fibers-of-maps open import foundation.function-types open import foundation.functoriality-dependent-pair-types open import foundation.fundamental-theorem-of-identity-types open import foundation.homotopies open import foundation.homotopy-induction open import foundation.identity-types +open import foundation.postcomposition-functions open import foundation.structure-identity-principle open import foundation.transport-along-identifications open import foundation.universe-levels @@ -192,6 +194,31 @@ coh-refl-htpy-polynomial-endofunctor (A , B) = coh-refl-htpy-polynomial-endofunctor' A B ``` +### Computing the fiber of the action on maps + +```agda +module _ + {l1 l2 l3 l4 : Level} (𝑃 : polynomial-endofunctor l1 l2) + {X : UU l3} {Y : UU l4} (f : X → Y) + where + + compute-fiber-map-polynomial-endofunctor : + (a : shapes-polynomial-endofunctor 𝑃) + (y : positions-polynomial-endofunctor 𝑃 a → Y) → + fiber (map-polynomial-endofunctor 𝑃 f) (a , y) ≃ + ( (b : positions-polynomial-endofunctor 𝑃 a) → fiber f (y b)) + compute-fiber-map-polynomial-endofunctor a y = + equivalence-reasoning + fiber (map-polynomial-endofunctor 𝑃 f) (a , y) + ≃ fiber (postcomp (positions-polynomial-endofunctor 𝑃 a) f) y + by + compute-fiber-tot + ( λ a → postcomp (positions-polynomial-endofunctor 𝑃 a) f) + ( a , y) + ≃ ((b : positions-polynomial-endofunctor 𝑃 a) → fiber f (y b)) + by inv-compute-Π-fiber-postcomp (positions-polynomial-endofunctor 𝑃 a) f y +``` + ## See also - [Multivariable polynomial functors](trees.multivariable-polynomial-functors.md) From 330bf02a6e15f2757f9c2267dcb14f329e1d0fa1 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 13 Sep 2025 12:54:04 +0200 Subject: [PATCH 11/41] Cartesian morphisms are cartesian natural transformations --- ...morphisms-polynomial-endofunctors.lagda.md | 123 ++++++++++++++++-- ...ormations-polynomial-endofunctors.lagda.md | 25 +++- 2 files changed, 132 insertions(+), 16 deletions(-) diff --git a/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md index 5048854bf2..7df96d5e4d 100644 --- a/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md +++ b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md @@ -11,19 +11,26 @@ open import foundation.action-on-identifications-functions open import foundation.binary-homotopies open import foundation.commuting-squares-of-homotopies open import foundation.commuting-squares-of-maps +open import foundation.cones-over-cospan-diagrams +open import foundation.contractible-maps open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.equality-dependent-function-types open import foundation.equivalences +open import foundation.equivalences-arrows +open import foundation.fibers-of-maps open import foundation.function-types open import foundation.functoriality-dependent-pair-types +open import foundation.functoriality-fibers-of-maps open import foundation.fundamental-theorem-of-identity-types open import foundation.homotopies open import foundation.homotopy-induction open import foundation.identity-types open import foundation.implicit-function-types +open import foundation.morphisms-arrows open import foundation.precomposition-functions open import foundation.propositions +open import foundation.pullbacks open import foundation.sections open import foundation.structure-identity-principle open import foundation.subtypes @@ -32,6 +39,7 @@ open import foundation.truncated-types open import foundation.truncation-levels open import foundation.type-arithmetic-dependent-pair-types open import foundation.type-theoretic-principle-of-choice +open import foundation.universal-property-equivalences open import foundation.universe-levels open import foundation.whiskering-homotopies-composition @@ -162,6 +170,39 @@ module _ equiv-positions-cartesian-hom-polynomial-endofunctor a = ( positions-cartesian-hom-polynomial-endofunctor a , is-cartesian-cartesian-hom-polynomial-endofunctor a) + + naturality-cartesian-hom-polynomial-endofunctor : + {l5 l6 : Level} {X : UU l5} {Y : UU l6} (f : X → Y) → + coherence-square-maps + ( map-polynomial-endofunctor 𝑃 f) + ( type-cartesian-hom-polynomial-endofunctor) + ( type-cartesian-hom-polynomial-endofunctor) + ( map-polynomial-endofunctor 𝑄 f) + naturality-cartesian-hom-polynomial-endofunctor = + naturality-hom-polynomial-endofunctor 𝑃 𝑄 + hom-cartesian-hom-polynomial-endofunctor + + natural-transformation-cartesian-hom-polynomial-endofunctor : + {l : Level} → natural-transformation-polynomial-endofunctor l 𝑃 𝑄 + natural-transformation-cartesian-hom-polynomial-endofunctor = + natural-transformation-hom-polynomial-endofunctor 𝑃 𝑄 + hom-cartesian-hom-polynomial-endofunctor + + hom-arrow-cartesian-hom-polynomial-endofunctor : + {l5 l6 : Level} {X : UU l5} {Y : UU l6} (f : X → Y) → + hom-arrow (map-polynomial-endofunctor 𝑃 f) (map-polynomial-endofunctor 𝑄 f) + hom-arrow-cartesian-hom-polynomial-endofunctor = + hom-arrow-hom-polynomial-endofunctor 𝑃 𝑄 + hom-cartesian-hom-polynomial-endofunctor + + cone-cartesian-hom-polynomial-endofunctor : + {l5 l6 : Level} {X : UU l5} {Y : UU l6} (f : X → Y) → + cone + ( type-cartesian-hom-polynomial-endofunctor) + ( map-polynomial-endofunctor 𝑄 f) + ( type-polynomial-endofunctor 𝑃 X) + cone-cartesian-hom-polynomial-endofunctor = + cone-hom-polynomial-endofunctor 𝑃 𝑄 hom-cartesian-hom-polynomial-endofunctor ``` ### The identity cartesian morphism @@ -172,7 +213,7 @@ id-cartesian-hom-polynomial-endofunctor : (𝑃 : polynomial-endofunctor l1 l2) → cartesian-hom-polynomial-endofunctor 𝑃 𝑃 id-cartesian-hom-polynomial-endofunctor 𝑃 = - (id-hom-polynomial-endofunctor 𝑃 , (λ a → is-equiv-id)) + ( id-hom-polynomial-endofunctor 𝑃 , (λ a → is-equiv-id)) ``` ### Composition of cartesian morphisms @@ -217,7 +258,7 @@ module _ ( equiv-tot (λ _ → inv-distributive-Π-Σ)) ∘e (associative-Σ _ _ _) ``` -### Truncatedness of the type of morphisms +### Truncatedness of the type of cartesian morphisms If the shapes and positions of the codomain $𝑄$ are $k$-truncated, for $k ≥ -1$, then the type of cartesian morphisms $𝑃 → 𝑄$ is $k$-truncated. @@ -257,22 +298,84 @@ module _ ( is-trunc-succ-cartesian-hom-polynomial-endofunctor' k hQ hQ') ``` +### Computing the fibers of the induced natural transformation + +```agda +module _ + {l1 l2 l3 l4 l5 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α : cartesian-hom-polynomial-endofunctor 𝑃 𝑄) + (let α₀ = shapes-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α) + (let α₁ = positions-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α) + {X : UU l5} + where + + compute-fiber-type-cartesian-hom-polynomial-endofunctor : + (c : shapes-polynomial-endofunctor 𝑄) + (x : positions-polynomial-endofunctor 𝑄 c → X) → + fiber (type-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α {X = X}) (c , x) ≃ + fiber α₀ c + compute-fiber-type-cartesian-hom-polynomial-endofunctor c x = + equivalence-reasoning + fiber (type-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α {X = X}) (c , x) + ≃ Σ ( fiber α₀ c) + ( λ (a , p) → + fiber + ( precomp (α₁ a) X) + ( inv-tr (λ c → positions-polynomial-endofunctor 𝑄 c → X) p x)) + by + compute-fiber-map-Σ + ( λ c → positions-polynomial-endofunctor 𝑄 c → X) + ( α₀) + ( λ a → precomp (α₁ a) X) + ( c , x) + ≃ fiber α₀ c + by + right-unit-law-Σ-is-contr + ( λ (a , p) → + is-contr-map-is-equiv + ( is-equiv-precomp-is-equiv + ( α₁ a) + ( is-cartesian-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α a) + ( X)) + ( inv-tr (λ c → positions-polynomial-endofunctor 𝑄 c → X) p x)) +``` + ### Cartesian morphisms are cartesian natural transformations -```text +```agda module _ {l1 l2 l3 l4 : Level} (𝑃 : polynomial-endofunctor l1 l2) (𝑄 : polynomial-endofunctor l3 l4) - (α : hom-polynomial-endofunctor 𝑃 𝑄) + (α : cartesian-hom-polynomial-endofunctor 𝑃 𝑄) where - is-cartesian-natural-transformation-hom-polynomial-endofunctor : - {l : Level} → - is-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 - ( natural-transformation-hom-polynomial-endofunctor 𝑃 𝑄 α {l}) - is-cartesian-natural-transformation-hom-polynomial-endofunctor f = - {! !} + abstract + is-cartesian-natural-transformation-cartesian-hom-polynomial-endofunctor : + {l : Level} → + is-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( natural-transformation-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α {l}) + is-cartesian-natural-transformation-cartesian-hom-polynomial-endofunctor f = + is-pullback-is-fiberwise-equiv-map-fiber-horizontal-map-cone + ( type-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α) + ( map-polynomial-endofunctor 𝑄 f) + ( cone-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α f) + ( λ (a , y) → + is-equiv-source-is-equiv-target-equiv-arrow + ( map-fiber-horizontal-map-cone + ( type-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α) + ( map-polynomial-endofunctor 𝑄 f) + ( cone-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α f) + ( a , y)) + ( id) + ( ( compute-fiber-type-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α a + ( y)) , + ( compute-fiber-type-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α a + ( f ∘ y)) , + ( λ where (u , refl) → refl)) + ( is-equiv-id)) ``` ### Cartesian natural transformations define cartesian morphisms diff --git a/src/trees/natural-transformations-polynomial-endofunctors.lagda.md b/src/trees/natural-transformations-polynomial-endofunctors.lagda.md index f1946f2c0e..72b9e168f2 100644 --- a/src/trees/natural-transformations-polynomial-endofunctors.lagda.md +++ b/src/trees/natural-transformations-polynomial-endofunctors.lagda.md @@ -12,6 +12,7 @@ open import foundation.action-on-identifications-functions open import foundation.binary-homotopies open import foundation.commuting-squares-of-homotopies open import foundation.commuting-squares-of-maps +open import foundation.cones-over-cospan-diagrams open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.equality-dependent-function-types @@ -26,6 +27,7 @@ open import foundation.identity-types open import foundation.implicit-function-types open import foundation.morphisms-arrows open import foundation.precomposition-functions +open import foundation.pullbacks open import foundation.sections open import foundation.structure-identity-principle open import foundation.transport-along-identifications @@ -115,15 +117,26 @@ module _ ### The associated family of morphisms of arrows ```agda -hom-arrow-natural-transformation-polynomial-endofunctor : +module _ {l1 l2 l3 l4 l5 : Level} (𝑃 : polynomial-endofunctor l1 l2) (𝑄 : polynomial-endofunctor l3 l4) - (α : natural-transformation-polynomial-endofunctor l5 𝑃 𝑄) - {X Y : UU l5} (f : X → Y) → - hom-arrow (map-polynomial-endofunctor 𝑃 f) (map-polynomial-endofunctor 𝑄 f) -hom-arrow-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α@(α₀ , α₁) f = - ( α₀ , α₀ , α₁ f) + (α@(α₀ , α₁) : natural-transformation-polynomial-endofunctor l5 𝑃 𝑄) + {X Y : UU l5} (f : X → Y) + where + + hom-arrow-natural-transformation-polynomial-endofunctor : + hom-arrow (map-polynomial-endofunctor 𝑃 f) (map-polynomial-endofunctor 𝑄 f) + hom-arrow-natural-transformation-polynomial-endofunctor = + ( α₀ , α₀ , α₁ f) + + cone-natural-transformation-polynomial-endofunctor : + cone α₀ (map-polynomial-endofunctor 𝑄 f) (type-polynomial-endofunctor 𝑃 X) + cone-natural-transformation-polynomial-endofunctor = + cone-hom-arrow + ( map-polynomial-endofunctor 𝑃 f) + ( map-polynomial-endofunctor 𝑄 f) + ( hom-arrow-natural-transformation-polynomial-endofunctor) ``` ### The identity natural transformation From b159965d7469fd48e3a5ec71fa6d3c85644e6855 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 13 Sep 2025 14:30:38 +0200 Subject: [PATCH 12/41] the underlying global subuniverse of a univalent type family --- src/foundation/monomorphisms.lagda.md | 16 ++++++- src/foundation/subuniverses.lagda.md | 24 +++++----- .../univalent-type-families.lagda.md | 45 ++++++++++++++++++- 3 files changed, 72 insertions(+), 13 deletions(-) diff --git a/src/foundation/monomorphisms.lagda.md b/src/foundation/monomorphisms.lagda.md index 1908560489..278c91c435 100644 --- a/src/foundation/monomorphisms.lagda.md +++ b/src/foundation/monomorphisms.lagda.md @@ -65,7 +65,7 @@ module _ (p : is-mono l3 f) {X : UU l3} (g h : X → A) where - equiv-postcomp-is-mono : (g = h) ≃ ((f ∘ g) = (f ∘ h)) + equiv-postcomp-is-mono : (g = h) ≃ (f ∘ g = f ∘ h) pr1 equiv-postcomp-is-mono = ap (f ∘_) pr2 equiv-postcomp-is-mono = p X g h @@ -92,6 +92,18 @@ module _ is-emb-is-prop-map ( is-trunc-map-is-trunc-map-postcomp neg-one-𝕋 f ( λ X → is-prop-map-is-emb (is-mono-f X))) + + equiv-postcomp-is-emb : + is-emb f → + {l3 : Level} {X : UU l3} (g h : X → A) → (g = h) ≃ (f ∘ g = f ∘ h) + equiv-postcomp-is-emb H {l3} = equiv-postcomp-is-mono l3 f (is-mono-is-emb H) + +equiv-postcomp-emb : + {l1 l2 l3 : Level} + {A : UU l1} {B : UU l2} {X : UU l3} + (f : A ↪ B) (g h : X → A) → + (g = h) ≃ (map-emb f ∘ g = map-emb f ∘ h) +equiv-postcomp-emb (f , H) = equiv-postcomp-is-emb f H ``` We construct an explicit equivalence for postcomposition for homotopies between @@ -122,7 +134,7 @@ module _ is-retraction-map-inv-is-equiv (pr2 f (g x) (h x)) (H x)) equiv-htpy-postcomp-is-emb : - (g ~ h) ≃ ((pr1 f ∘ g) ~ (pr1 f ∘ h)) + (g ~ h) ≃ (pr1 f ∘ g ~ pr1 f ∘ h) pr1 equiv-htpy-postcomp-is-emb = pr1 f ·l_ pr2 equiv-htpy-postcomp-is-emb = is-equiv-is-invertible diff --git a/src/foundation/subuniverses.lagda.md b/src/foundation/subuniverses.lagda.md index ddeb1e28d6..c16067397a 100644 --- a/src/foundation/subuniverses.lagda.md +++ b/src/foundation/subuniverses.lagda.md @@ -89,20 +89,24 @@ module _ is-essentially-in-subuniverse X = Σ (type-subuniverse P) (λ Y → inclusion-subuniverse P Y ≃ X) + is-proof-irrelevant-is-essentially-in-subuniverse : + {l3 : Level} (X : UU l3) → is-proof-irrelevant (is-essentially-in-subuniverse X) + is-proof-irrelevant-is-essentially-in-subuniverse X ((X' , p) , e) = + is-torsorial-Eq-subtype + ( is-contr-equiv' + ( Σ (UU _) (λ T → T ≃ X')) + ( equiv-tot (equiv-postcomp-equiv e)) + ( is-torsorial-equiv' X')) + ( is-prop-is-in-subuniverse P) + ( X') + ( e) + ( p) + is-prop-is-essentially-in-subuniverse : {l3 : Level} (X : UU l3) → is-prop (is-essentially-in-subuniverse X) is-prop-is-essentially-in-subuniverse X = is-prop-is-proof-irrelevant - ( λ ((X' , p) , e) → - is-torsorial-Eq-subtype - ( is-contr-equiv' - ( Σ (UU _) (λ T → T ≃ X')) - ( equiv-tot (equiv-postcomp-equiv e)) - ( is-torsorial-equiv' X')) - ( is-prop-is-in-subuniverse P) - ( X') - ( e) - ( p)) + ( is-proof-irrelevant-is-essentially-in-subuniverse X) is-essentially-in-subuniverse-Prop : {l3 : Level} (X : UU l3) → Prop (lsuc l1 ⊔ l2 ⊔ l3) diff --git a/src/foundation/univalent-type-families.lagda.md b/src/foundation/univalent-type-families.lagda.md index 9a7c109a9a..868ed207df 100644 --- a/src/foundation/univalent-type-families.lagda.md +++ b/src/foundation/univalent-type-families.lagda.md @@ -11,8 +11,15 @@ open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.equality-dependent-pair-types open import foundation.equivalences +open import foundation.monomorphisms +open import foundation.embeddings +open import foundation.subtype-identity-principle open import foundation.fundamental-theorem-of-identity-types open import foundation.identity-systems +open import foundation.identity-systems +open import foundation.contractible-types +open import foundation.functoriality-dependent-pair-types +open import foundation.fibers-of-maps open import foundation.iterated-dependent-product-types open import foundation.propositions open import foundation.subuniverses @@ -102,7 +109,7 @@ is-univalent-UU l = univalence ``` where the right edge is an equivalence by the univalence axiom. Hence, the top -map is an equivalence if and only if the left map is. +map is an equivalence if and only if the left map is. ∎ ```agda module _ @@ -169,6 +176,42 @@ module _ is-univalent-is-emb (is-emb-inclusion-subuniverse S) ``` +### The underlying subuniverse of a univalent type family + +```agda +module _ + {l1 l2 : Level} {A : UU l1} ((B , H) : univalent-type-family l2 A) + where + + emb-univalent-type-family : A ↪ UU l2 + emb-univalent-type-family = (B , is-emb-is-univalent H) + + is-in-subuniverse-univalent-family : {l3 : Level} → UU l3 → UU (l1 ⊔ l2 ⊔ l3) + is-in-subuniverse-univalent-family X = Σ A (λ a → (B a ≃ X)) + + abstract + is-prop-is-in-subuniverse-univalent-family : + {l3 : Level} {X : UU l3} → is-prop (is-in-subuniverse-univalent-family X) + is-prop-is-in-subuniverse-univalent-family {X = X} = + is-prop-emb + ( emb-Σ-emb-base emb-univalent-type-family (λ Y → Y ≃ X)) + ( is-prop-is-proof-irrelevant + ( λ (Y , e) → + is-contr-equiv' + ( Σ (UU l2) (λ Y' → Y' ≃ Y)) + ( equiv-tot (equiv-postcomp-equiv e)) + ( is-torsorial-equiv' Y))) + + is-in-subuniverse-prop-univalent-family : + {l3 : Level} → UU l3 → Prop (l1 ⊔ l2 ⊔ l3) + is-in-subuniverse-prop-univalent-family X = + ( is-in-subuniverse-univalent-family X , + is-prop-is-in-subuniverse-univalent-family) + + subuniverse-univalent-family : (l3 : Level) → subuniverse l3 (l1 ⊔ l2 ⊔ l3) + subuniverse-univalent-family l3 = is-in-subuniverse-prop-univalent-family +``` + ## See also - [Preunivalent type families](foundation.preunivalent-type-families.md) From 7fbc0f814d21c502b917c9f08523a11054726c10 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 13 Sep 2025 15:25:46 +0200 Subject: [PATCH 13/41] univalent polynomial endofunctors --- .../univalent-type-families.lagda.md | 53 +++- src/trees.lagda.md | 1 + src/trees/polynomial-endofunctors.lagda.md | 41 +-- ...univalent-polynomial-endofunctors.lagda.md | 262 ++++++++++++++++++ 4 files changed, 329 insertions(+), 28 deletions(-) create mode 100644 src/trees/univalent-polynomial-endofunctors.lagda.md diff --git a/src/foundation/univalent-type-families.lagda.md b/src/foundation/univalent-type-families.lagda.md index 868ed207df..f4da273881 100644 --- a/src/foundation/univalent-type-families.lagda.md +++ b/src/foundation/univalent-type-families.lagda.md @@ -8,27 +8,26 @@ module foundation.univalent-type-families where ```agda open import foundation.action-on-identifications-functions +open import foundation.contractible-types open import foundation.dependent-pair-types +open import foundation.embeddings open import foundation.equality-dependent-pair-types open import foundation.equivalences -open import foundation.monomorphisms -open import foundation.embeddings -open import foundation.subtype-identity-principle +open import foundation.fibers-of-maps +open import foundation.functoriality-dependent-pair-types open import foundation.fundamental-theorem-of-identity-types +open import foundation.global-subuniverses open import foundation.identity-systems -open import foundation.identity-systems -open import foundation.contractible-types -open import foundation.functoriality-dependent-pair-types -open import foundation.fibers-of-maps open import foundation.iterated-dependent-product-types +open import foundation.monomorphisms open import foundation.propositions +open import foundation.subtype-identity-principle open import foundation.subuniverses open import foundation.transport-along-identifications open import foundation.univalence open import foundation.universal-property-identity-systems open import foundation.universe-levels -open import foundation-core.embeddings open import foundation-core.function-types open import foundation-core.identity-types open import foundation-core.sections @@ -81,6 +80,26 @@ module _ univalent-type-family : {l1 : Level} (l2 : Level) (A : UU l1) → UU (l1 ⊔ lsuc l2) univalent-type-family l2 A = Σ (A → UU l2) is-univalent + +module _ + {l1 l2 : Level} {A : UU l1} (ℬ : univalent-type-family l2 A) + where + + type-family-univalent-type-family : A → UU l2 + type-family-univalent-type-family = pr1 ℬ + + is-univalent-univalent-type-family : + is-univalent type-family-univalent-type-family + is-univalent-univalent-type-family = + pr2 ℬ + + equiv-equiv-tr-univalent-type-family : + {x y : A} → + ( x = y) ≃ + ( type-family-univalent-type-family x ≃ type-family-univalent-type-family y) + equiv-equiv-tr-univalent-type-family {x} {y} = + ( equiv-tr type-family-univalent-type-family , + is-univalent-univalent-type-family x y) ``` ## Properties @@ -176,7 +195,7 @@ module _ is-univalent-is-emb (is-emb-inclusion-subuniverse S) ``` -### The underlying subuniverse of a univalent type family +### The underlying global subuniverse of a univalent type family ```agda module _ @@ -210,6 +229,22 @@ module _ subuniverse-univalent-family : (l3 : Level) → subuniverse l3 (l1 ⊔ l2 ⊔ l3) subuniverse-univalent-family l3 = is-in-subuniverse-prop-univalent-family + + is-closed-under-equiv-subuniverse-univalent-family : + {l3 l4 : Level} → + is-closed-under-equiv-subuniverses + (λ l → l1 ⊔ l2 ⊔ l) subuniverse-univalent-family l3 l4 + is-closed-under-equiv-subuniverse-univalent-family X Y f (a , e) = + ( a , f ∘e e) + + global-subuniverse-univalent-family : + global-subuniverse (λ l → l1 ⊔ l2 ⊔ l) + global-subuniverse-univalent-family = + λ where + .subuniverse-global-subuniverse → + subuniverse-univalent-family + .is-closed-under-equiv-global-subuniverse → + is-closed-under-equiv-subuniverse-univalent-family ``` ## See also diff --git a/src/trees.lagda.md b/src/trees.lagda.md index 5d2a613423..55c954262b 100644 --- a/src/trees.lagda.md +++ b/src/trees.lagda.md @@ -64,6 +64,7 @@ open import trees.transitive-multisets public open import trees.underlying-trees-elements-coalgebras-polynomial-endofunctors public open import trees.underlying-trees-of-elements-of-w-types public open import trees.undirected-trees public +open import trees.univalent-polynomial-endofunctors public open import trees.universal-multiset public open import trees.universal-tree public open import trees.w-type-of-natural-numbers public diff --git a/src/trees/polynomial-endofunctors.lagda.md b/src/trees/polynomial-endofunctors.lagda.md index 6139f5a1b8..044cec1a61 100644 --- a/src/trees/polynomial-endofunctors.lagda.md +++ b/src/trees/polynomial-endofunctors.lagda.md @@ -33,7 +33,8 @@ open import foundation-core.torsorial-type-families ## Idea Given a type `A` [equipped](foundation.structure.md) with a type family `B` over -`A`, the {{#concept "polynomial endofunctor" Agda=polynomial-endofunctor}} +`A`, the +{{#concept "polynomial endofunctor" WD="polynomial functor" WDID=Q48842893 Agda=polynomial-endofunctor}} `𝑃 A B` is defined by ```text @@ -80,7 +81,25 @@ type-polynomial-endofunctor : type-polynomial-endofunctor (A , B) = type-polynomial-endofunctor' A B ``` -### The identity type of `type-polynomial-endofunctor` +### The action on maps of the polynomial endofunctor + +```agda +map-polynomial-endofunctor' : + {l1 l2 l3 l4 : Level} (A : UU l1) (B : A → UU l2) {X : UU l3} {Y : UU l4} + (f : X → Y) → + type-polynomial-endofunctor' A B X → type-polynomial-endofunctor' A B Y +map-polynomial-endofunctor' A B f = tot (λ x α → f ∘ α) + +map-polynomial-endofunctor : + {l1 l2 l3 l4 : Level} (𝑃 : polynomial-endofunctor l1 l2) + {X : UU l3} {Y : UU l4} (f : X → Y) → + type-polynomial-endofunctor 𝑃 X → type-polynomial-endofunctor 𝑃 Y +map-polynomial-endofunctor (A , B) = map-polynomial-endofunctor' A B +``` + +## Properties + +### Characterizing identity in the image of polynomial endofunctors ```agda module _ @@ -143,22 +162,6 @@ module _ is-retraction-eq-Eq-type-polynomial-endofunctor x x refl ``` -### The action on maps of the polynomial endofunctor - -```agda -map-polynomial-endofunctor' : - {l1 l2 l3 l4 : Level} (A : UU l1) (B : A → UU l2) {X : UU l3} {Y : UU l4} - (f : X → Y) → - type-polynomial-endofunctor' A B X → type-polynomial-endofunctor' A B Y -map-polynomial-endofunctor' A B f = tot (λ x α → f ∘ α) - -map-polynomial-endofunctor : - {l1 l2 l3 l4 : Level} (𝑃 : polynomial-endofunctor l1 l2) - {X : UU l3} {Y : UU l4} (f : X → Y) → - type-polynomial-endofunctor 𝑃 X → type-polynomial-endofunctor 𝑃 Y -map-polynomial-endofunctor (A , B) = map-polynomial-endofunctor' A B -``` - ### The action on homotopies of the polynomial endofunctor ```agda @@ -194,7 +197,7 @@ coh-refl-htpy-polynomial-endofunctor (A , B) = coh-refl-htpy-polynomial-endofunctor' A B ``` -### Computing the fiber of the action on maps +### Computing the fibers of the action on maps ```agda module _ diff --git a/src/trees/univalent-polynomial-endofunctors.lagda.md b/src/trees/univalent-polynomial-endofunctors.lagda.md new file mode 100644 index 0000000000..b0ae7563a0 --- /dev/null +++ b/src/trees/univalent-polynomial-endofunctors.lagda.md @@ -0,0 +1,262 @@ +# Univalent polynomial endofunctors + +```agda +module trees.univalent-polynomial-endofunctors where +``` + +
Imports + +```agda +open import foundation.contractible-types +open import foundation.dependent-pair-types +open import foundation.equivalence-induction +open import foundation.equivalences +open import foundation.fibers-of-maps +open import foundation.function-types +open import foundation.functoriality-dependent-pair-types +open import foundation.fundamental-theorem-of-identity-types +open import foundation.global-subuniverses +open import foundation.homotopies +open import foundation.homotopy-induction +open import foundation.identity-types +open import foundation.locally-small-types +open import foundation.postcomposition-functions +open import foundation.propositions +open import foundation.structure-identity-principle +open import foundation.subuniverses +open import foundation.transport-along-identifications +open import foundation.univalence +open import foundation.univalent-type-families +open import foundation.universe-levels +open import foundation.whiskering-homotopies-composition + +open import foundation-core.commuting-triangles-of-maps +open import foundation-core.retractions +open import foundation-core.torsorial-type-families + +open import trees.polynomial-endofunctors +``` + +
+ +## Idea + +A [polynomial endofunctor](trees.polynomial-endofunctors.md) `𝑃` is +{{#concept "univalent" Disambiguation="polynomial endofunctor" Agda=is-univalent-polynomial-endofunctor Agda=univalent-polynomial-endofunctor}} +if its type family of positions is +[univalent](foundation.univalent-type-families.md). In other words, a polynomial +endofunctor is univalent if it is equivalent to the polynomial endofunctor given +by a [subuniverse](foundation.subuniverses.md) + +```text + 𝑃 ≃ (𝒮 ◃ pr1). +``` + +## Definitions + +### The predicate on polynomial endofunctors of being univalent + +```agda +is-univalent-polynomial-endofunctor : + {l1 l2 : Level} → polynomial-endofunctor l1 l2 → UU (l1 ⊔ l2) +is-univalent-polynomial-endofunctor (A , B) = is-univalent B + +is-prop-is-univalent-polynomial-endofunctor : + {l1 l2 : Level} (𝑃 : polynomial-endofunctor l1 l2) → + is-prop (is-univalent-polynomial-endofunctor 𝑃) +is-prop-is-univalent-polynomial-endofunctor 𝑃 = is-prop-is-univalent + +is-univalent-polynomial-endofunctor-Prop : + {l1 l2 : Level} → polynomial-endofunctor l1 l2 → Prop (l1 ⊔ l2) +is-univalent-polynomial-endofunctor-Prop 𝑃 = + ( is-univalent-polynomial-endofunctor 𝑃 , + is-prop-is-univalent-polynomial-endofunctor 𝑃) +``` + +### The type of univalent polynomial endofunctors + +```agda +univalent-polynomial-endofunctor : (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2) +univalent-polynomial-endofunctor l1 l2 = + Σ (polynomial-endofunctor l1 l2) (is-univalent-polynomial-endofunctor) + +module _ + {l1 l2 : Level} (𝑃 : univalent-polynomial-endofunctor l1 l2) + where + + polynomial-endofunctor-univalent-polynomial-endofunctor : + polynomial-endofunctor l1 l2 + polynomial-endofunctor-univalent-polynomial-endofunctor = pr1 𝑃 + + shapes-univalent-polynomial-endofunctor : UU l1 + shapes-univalent-polynomial-endofunctor = + shapes-polynomial-endofunctor + polynomial-endofunctor-univalent-polynomial-endofunctor + + positions-univalent-polynomial-endofunctor : + shapes-univalent-polynomial-endofunctor → UU l2 + positions-univalent-polynomial-endofunctor = + positions-polynomial-endofunctor + polynomial-endofunctor-univalent-polynomial-endofunctor + + is-univalent-univalent-polynomial-endofunctor : + is-univalent-polynomial-endofunctor + polynomial-endofunctor-univalent-polynomial-endofunctor + is-univalent-univalent-polynomial-endofunctor = pr2 𝑃 + + univalent-family-univalent-polynomial-endofunctor : + univalent-type-family l2 shapes-univalent-polynomial-endofunctor + univalent-family-univalent-polynomial-endofunctor = + ( positions-univalent-polynomial-endofunctor , + is-univalent-univalent-polynomial-endofunctor) + + equiv-equiv-tr-univalent-polynomial-endofunctor : + {x y : shapes-univalent-polynomial-endofunctor} → + ( x = y) ≃ + ( positions-univalent-polynomial-endofunctor x ≃ + positions-univalent-polynomial-endofunctor y) + equiv-equiv-tr-univalent-polynomial-endofunctor = + equiv-equiv-tr-univalent-type-family + univalent-family-univalent-polynomial-endofunctor + +make-univalent-polynomial-endofunctor : + {l1 l2 : Level} {A : UU l1} (B : A → UU l2) → is-univalent B → + univalent-polynomial-endofunctor l1 l2 +make-univalent-polynomial-endofunctor B H = ((_ , B) , H) +``` + +### The underlying subuniverse of a univalent polynomial endofunctor + +```agda +module _ + {l1 l2 : Level} (𝑃 : univalent-polynomial-endofunctor l1 l2) + where + + subuniverse-univalent-polynomial-endofunctor : + (l3 : Level) → subuniverse l3 (l1 ⊔ l2 ⊔ l3) + subuniverse-univalent-polynomial-endofunctor = + subuniverse-univalent-family + ( univalent-family-univalent-polynomial-endofunctor 𝑃) + + global-subuniverse-univalent-polynomial-endofunctor : + global-subuniverse (λ l3 → l1 ⊔ l2 ⊔ l3) + global-subuniverse-univalent-polynomial-endofunctor = + global-subuniverse-univalent-family + ( univalent-family-univalent-polynomial-endofunctor 𝑃) +``` + +### The action on types of a univalent polynomial endofunctor + +```agda +type-univalent-polynomial-endofunctor : + {l1 l2 l3 : Level} → + univalent-polynomial-endofunctor l1 l2 → + UU l3 → UU (l1 ⊔ l2 ⊔ l3) +type-univalent-polynomial-endofunctor 𝑃 = + type-polynomial-endofunctor + ( polynomial-endofunctor-univalent-polynomial-endofunctor 𝑃) +``` + +### The action on maps of a univalent polynomial endofunctor + +```agda +map-univalent-polynomial-endofunctor : + {l1 l2 l3 l4 : Level} (𝑃 : univalent-polynomial-endofunctor l1 l2) + {X : UU l3} {Y : UU l4} (f : X → Y) → + type-univalent-polynomial-endofunctor 𝑃 X → + type-univalent-polynomial-endofunctor 𝑃 Y +map-univalent-polynomial-endofunctor 𝑃 = + map-polynomial-endofunctor + ( polynomial-endofunctor-univalent-polynomial-endofunctor 𝑃) +``` + +### Characterizing identity in the image of univalent polynomial endofunctors + +```agda +module _ + {l1 l2 l3 : Level} (𝑃 : univalent-polynomial-endofunctor l1 l2) {X : UU l3} + where + + Eq-type-univalent-polynomial-endofunctor : + (x y : type-univalent-polynomial-endofunctor 𝑃 X) → UU (l2 ⊔ l3) + Eq-type-univalent-polynomial-endofunctor x y = + Σ ( positions-univalent-polynomial-endofunctor 𝑃 (pr1 x) ≃ + positions-univalent-polynomial-endofunctor 𝑃 (pr1 y)) + ( λ e → coherence-triangle-maps (pr2 x) (pr2 y) (map-equiv e)) + + refl-Eq-type-univalent-polynomial-endofunctor : + (x : type-univalent-polynomial-endofunctor 𝑃 X) → + Eq-type-univalent-polynomial-endofunctor x x + refl-Eq-type-univalent-polynomial-endofunctor (x , α) = (id-equiv , refl-htpy) + + Eq-eq-type-univalent-polynomial-endofunctor : + (x y : type-univalent-polynomial-endofunctor 𝑃 X) → + x = y → Eq-type-univalent-polynomial-endofunctor x y + Eq-eq-type-univalent-polynomial-endofunctor x .x refl = + refl-Eq-type-univalent-polynomial-endofunctor x + + abstract + is-torsorial-Eq-type-univalent-polynomial-endofunctor : + (x : type-univalent-polynomial-endofunctor 𝑃 X) → + is-torsorial (Eq-type-univalent-polynomial-endofunctor x) + is-torsorial-Eq-type-univalent-polynomial-endofunctor (x , α) = + is-torsorial-Eq-structure + ( is-contr-equiv' + ( Σ (shapes-univalent-polynomial-endofunctor 𝑃) (x =_)) + ( equiv-tot + ( λ y → equiv-equiv-tr-univalent-polynomial-endofunctor 𝑃 {x} {y})) + ( is-torsorial-Id x)) + ( x , id-equiv) + ( is-torsorial-htpy α) + + is-equiv-Eq-eq-type-univalent-polynomial-endofunctor : + (x y : type-univalent-polynomial-endofunctor 𝑃 X) → + is-equiv (Eq-eq-type-univalent-polynomial-endofunctor x y) + is-equiv-Eq-eq-type-univalent-polynomial-endofunctor x = + fundamental-theorem-id + ( is-torsorial-Eq-type-univalent-polynomial-endofunctor x) + ( Eq-eq-type-univalent-polynomial-endofunctor x) + + extensionality-type-univalent-polynomial-endofunctor : + (x y : type-univalent-polynomial-endofunctor 𝑃 X) → + (x = y) ≃ Eq-type-univalent-polynomial-endofunctor x y + extensionality-type-univalent-polynomial-endofunctor x y = + ( Eq-eq-type-univalent-polynomial-endofunctor x y , + is-equiv-Eq-eq-type-univalent-polynomial-endofunctor x y) + + eq-Eq-type-univalent-polynomial-endofunctor : + (x y : type-univalent-polynomial-endofunctor 𝑃 X) → + Eq-type-univalent-polynomial-endofunctor x y → x = y + eq-Eq-type-univalent-polynomial-endofunctor x y = + map-inv-equiv (extensionality-type-univalent-polynomial-endofunctor x y) + + is-retraction-eq-Eq-type-univalent-polynomial-endofunctor : + (x y : type-univalent-polynomial-endofunctor 𝑃 X) → + is-retraction + ( Eq-eq-type-univalent-polynomial-endofunctor x y) + ( eq-Eq-type-univalent-polynomial-endofunctor x y) + is-retraction-eq-Eq-type-univalent-polynomial-endofunctor x y = + is-retraction-map-inv-is-equiv + ( is-equiv-Eq-eq-type-univalent-polynomial-endofunctor x y) + + coh-refl-eq-Eq-type-univalent-polynomial-endofunctor : + (x : type-univalent-polynomial-endofunctor 𝑃 X) → + ( eq-Eq-type-univalent-polynomial-endofunctor x x + ( refl-Eq-type-univalent-polynomial-endofunctor x)) = refl + coh-refl-eq-Eq-type-univalent-polynomial-endofunctor x = + is-retraction-eq-Eq-type-univalent-polynomial-endofunctor x x refl +``` + +### Local smallness of the image of univalent endofunctors + +```agda +module _ + {l1 l2 l3 : Level} (𝑃 : univalent-polynomial-endofunctor l1 l2) {X : UU l3} + where + + is-locally-small-type-univalent-polynomial-endofunctor : + is-locally-small (l2 ⊔ l3) (type-univalent-polynomial-endofunctor 𝑃 X) + is-locally-small-type-univalent-polynomial-endofunctor x y = + ( Eq-type-univalent-polynomial-endofunctor 𝑃 x y , + extensionality-type-univalent-polynomial-endofunctor 𝑃 x y) +``` From 7db557284d4d75a82fb635ee813e7a44fa591cff Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 13 Sep 2025 17:30:08 +0200 Subject: [PATCH 14/41] The indexing type of a univalent type family is equivalent to the subuniverse --- .../univalent-type-families.lagda.md | 96 +++++++++++++++---- 1 file changed, 78 insertions(+), 18 deletions(-) diff --git a/src/foundation/univalent-type-families.lagda.md b/src/foundation/univalent-type-families.lagda.md index f4da273881..281caa5fa9 100644 --- a/src/foundation/univalent-type-families.lagda.md +++ b/src/foundation/univalent-type-families.lagda.md @@ -17,6 +17,7 @@ open import foundation.fibers-of-maps open import foundation.functoriality-dependent-pair-types open import foundation.fundamental-theorem-of-identity-types open import foundation.global-subuniverses +open import foundation.retractions open import foundation.identity-systems open import foundation.iterated-dependent-product-types open import foundation.monomorphisms @@ -77,29 +78,29 @@ module _ ### Univalent type families ```agda -univalent-type-family : +univalent-family : {l1 : Level} (l2 : Level) (A : UU l1) → UU (l1 ⊔ lsuc l2) -univalent-type-family l2 A = Σ (A → UU l2) is-univalent +univalent-family l2 A = Σ (A → UU l2) is-univalent module _ - {l1 l2 : Level} {A : UU l1} (ℬ : univalent-type-family l2 A) + {l1 l2 : Level} {A : UU l1} (ℬ : univalent-family l2 A) where - type-family-univalent-type-family : A → UU l2 - type-family-univalent-type-family = pr1 ℬ + type-family-univalent-family : A → UU l2 + type-family-univalent-family = pr1 ℬ - is-univalent-univalent-type-family : - is-univalent type-family-univalent-type-family - is-univalent-univalent-type-family = + is-univalent-univalent-family : + is-univalent type-family-univalent-family + is-univalent-univalent-family = pr2 ℬ - equiv-equiv-tr-univalent-type-family : + equiv-equiv-tr-univalent-family : {x y : A} → ( x = y) ≃ - ( type-family-univalent-type-family x ≃ type-family-univalent-type-family y) - equiv-equiv-tr-univalent-type-family {x} {y} = - ( equiv-tr type-family-univalent-type-family , - is-univalent-univalent-type-family x y) + ( type-family-univalent-family x ≃ type-family-univalent-family y) + equiv-equiv-tr-univalent-family {x} {y} = + ( equiv-tr type-family-univalent-family , + is-univalent-univalent-family x y) ``` ## Properties @@ -157,6 +158,10 @@ module _ ( λ where refl → refl) ( is-emb-B x y) ( univalence (B x) (B y)) + +emb-univalent-family : + {l1 l2 : Level} {A : UU l1} → univalent-family l2 A → A ↪ UU l2 +emb-univalent-family (B , H) = (B , is-emb-is-univalent H) ``` ### Univalent type families satisfy equivalence induction @@ -199,12 +204,9 @@ module _ ```agda module _ - {l1 l2 : Level} {A : UU l1} ((B , H) : univalent-type-family l2 A) + {l1 l2 : Level} {A : UU l1} ((B , H) : univalent-family l2 A) where - emb-univalent-type-family : A ↪ UU l2 - emb-univalent-type-family = (B , is-emb-is-univalent H) - is-in-subuniverse-univalent-family : {l3 : Level} → UU l3 → UU (l1 ⊔ l2 ⊔ l3) is-in-subuniverse-univalent-family X = Σ A (λ a → (B a ≃ X)) @@ -213,7 +215,7 @@ module _ {l3 : Level} {X : UU l3} → is-prop (is-in-subuniverse-univalent-family X) is-prop-is-in-subuniverse-univalent-family {X = X} = is-prop-emb - ( emb-Σ-emb-base emb-univalent-type-family (λ Y → Y ≃ X)) + ( emb-Σ-emb-base (emb-univalent-family (B , H)) (λ Y → Y ≃ X)) ( is-prop-is-proof-irrelevant ( λ (Y , e) → is-contr-equiv' @@ -247,6 +249,64 @@ module _ is-closed-under-equiv-subuniverse-univalent-family ``` +### The indexing type of a univalent type family is equivalent to the subuniverse + +```agda +module _ + {l1 l2 : Level} {A : UU l1} (ℬ : univalent-family l2 A) + where + + map-equiv-type-subuniverse-univalent-family : + A → type-subuniverse (subuniverse-univalent-family ℬ l2) + map-equiv-type-subuniverse-univalent-family a = + (type-family-univalent-family ℬ a , a , id-equiv) + + map-inv-equiv-type-subuniverse-univalent-family : + type-subuniverse (subuniverse-univalent-family ℬ l2) → A + map-inv-equiv-type-subuniverse-univalent-family (X , a , e) = a + + is-retraction-map-inv-equiv-type-subuniverse-univalent-family : + is-retraction + map-equiv-type-subuniverse-univalent-family + map-inv-equiv-type-subuniverse-univalent-family + is-retraction-map-inv-equiv-type-subuniverse-univalent-family a = refl + + is-section-map-inv-equiv-type-subuniverse-univalent-family : + is-section + map-equiv-type-subuniverse-univalent-family + map-inv-equiv-type-subuniverse-univalent-family + is-section-map-inv-equiv-type-subuniverse-univalent-family (X , a , e) = + eq-equiv-subuniverse (subuniverse-univalent-family ℬ l2) e + + is-equiv-map-equiv-type-subuniverse-univalent-family : + is-equiv map-equiv-type-subuniverse-univalent-family + is-equiv-map-equiv-type-subuniverse-univalent-family = + is-equiv-is-invertible + map-inv-equiv-type-subuniverse-univalent-family + is-section-map-inv-equiv-type-subuniverse-univalent-family + is-retraction-map-inv-equiv-type-subuniverse-univalent-family + + is-equiv-map-inv-equiv-type-subuniverse-univalent-family : + is-equiv map-inv-equiv-type-subuniverse-univalent-family + is-equiv-map-inv-equiv-type-subuniverse-univalent-family = + is-equiv-is-invertible + map-equiv-type-subuniverse-univalent-family + is-retraction-map-inv-equiv-type-subuniverse-univalent-family + is-section-map-inv-equiv-type-subuniverse-univalent-family + + equiv-type-subuniverse-univalent-family : + A ≃ type-subuniverse (subuniverse-univalent-family ℬ l2) + equiv-type-subuniverse-univalent-family = + ( map-equiv-type-subuniverse-univalent-family , + is-equiv-map-equiv-type-subuniverse-univalent-family) + + inv-equiv-type-subuniverse-univalent-family : + type-subuniverse (subuniverse-univalent-family ℬ l2) ≃ A + inv-equiv-type-subuniverse-univalent-family = + ( map-inv-equiv-type-subuniverse-univalent-family , + is-equiv-map-inv-equiv-type-subuniverse-univalent-family) +``` + ## See also - [Preunivalent type families](foundation.preunivalent-type-families.md) From 601be76663a00487dc72d64eb51f8c4c370a9726 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 13 Sep 2025 17:30:21 +0200 Subject: [PATCH 15/41] shorten to `univalent-family` --- src/trees/univalent-polynomial-endofunctors.lagda.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/trees/univalent-polynomial-endofunctors.lagda.md b/src/trees/univalent-polynomial-endofunctors.lagda.md index b0ae7563a0..aac0e4c1d4 100644 --- a/src/trees/univalent-polynomial-endofunctors.lagda.md +++ b/src/trees/univalent-polynomial-endofunctors.lagda.md @@ -105,7 +105,7 @@ module _ is-univalent-univalent-polynomial-endofunctor = pr2 𝑃 univalent-family-univalent-polynomial-endofunctor : - univalent-type-family l2 shapes-univalent-polynomial-endofunctor + univalent-family l2 shapes-univalent-polynomial-endofunctor univalent-family-univalent-polynomial-endofunctor = ( positions-univalent-polynomial-endofunctor , is-univalent-univalent-polynomial-endofunctor) @@ -116,7 +116,7 @@ module _ ( positions-univalent-polynomial-endofunctor x ≃ positions-univalent-polynomial-endofunctor y) equiv-equiv-tr-univalent-polynomial-endofunctor = - equiv-equiv-tr-univalent-type-family + equiv-equiv-tr-univalent-family univalent-family-univalent-polynomial-endofunctor make-univalent-polynomial-endofunctor : @@ -138,6 +138,11 @@ module _ subuniverse-univalent-family ( univalent-family-univalent-polynomial-endofunctor 𝑃) + is-in-subuniverse-univalent-polynomial-endofunctor : + {l3 : Level} → UU l3 → UU (l1 ⊔ l2 ⊔ l3) + is-in-subuniverse-univalent-polynomial-endofunctor {l3} = + is-in-subuniverse (subuniverse-univalent-polynomial-endofunctor l3) + global-subuniverse-univalent-polynomial-endofunctor : global-subuniverse (λ l3 → l1 ⊔ l2 ⊔ l3) global-subuniverse-univalent-polynomial-endofunctor = From cc7c9c59ebeb99bb238564e4f8f49fe90e114900 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 13 Sep 2025 18:01:41 +0200 Subject: [PATCH 16/41] add some "see also"s --- src/foundation-core/small-types.lagda.md | 2 ++ src/foundation/small-types.lagda.md | 2 ++ src/foundation/subuniverses.lagda.md | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/foundation-core/small-types.lagda.md b/src/foundation-core/small-types.lagda.md index 838cd07547..46f8711914 100644 --- a/src/foundation-core/small-types.lagda.md +++ b/src/foundation-core/small-types.lagda.md @@ -353,3 +353,5 @@ is-small-logical-equivalence H K = ## See also - [Small maps](foundation.small-maps.md) +- The `is-essentially-in-subuniverse` predicate in + [`foundation.subuniverses`](foundation.subuniverses.md) diff --git a/src/foundation/small-types.lagda.md b/src/foundation/small-types.lagda.md index 2d60593a75..45497899e8 100644 --- a/src/foundation/small-types.lagda.md +++ b/src/foundation/small-types.lagda.md @@ -45,3 +45,5 @@ is-small-is-surjective {f = f} H K L = ## See also - [Small maps](foundation.small-maps.md) +- The `is-essentially-in-subuniverse` predicate in + [`foundation.subuniverses`](foundation.subuniverses.md) diff --git a/src/foundation/subuniverses.lagda.md b/src/foundation/subuniverses.lagda.md index c16067397a..2a19ec8bfd 100644 --- a/src/foundation/subuniverses.lagda.md +++ b/src/foundation/subuniverses.lagda.md @@ -116,6 +116,8 @@ module _ is-prop-is-essentially-in-subuniverse X ``` +- See also [univalent type families](foundation.univalent-type-families.md). + ## Properties ### Subuniverses are closed under equivalences From 54c4cad082107ab050c0ff1b925722c0eb4ee58e Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 13 Sep 2025 18:18:59 +0200 Subject: [PATCH 17/41] edits --- .../univalent-type-families.lagda.md | 2 +- ...morphisms-polynomial-endofunctors.lagda.md | 71 +++++++------------ ...ormations-polynomial-endofunctors.lagda.md | 10 +++ ...morphisms-polynomial-endofunctors.lagda.md | 29 ++------ 4 files changed, 42 insertions(+), 70 deletions(-) diff --git a/src/foundation/univalent-type-families.lagda.md b/src/foundation/univalent-type-families.lagda.md index 281caa5fa9..1d11324a68 100644 --- a/src/foundation/univalent-type-families.lagda.md +++ b/src/foundation/univalent-type-families.lagda.md @@ -17,11 +17,11 @@ open import foundation.fibers-of-maps open import foundation.functoriality-dependent-pair-types open import foundation.fundamental-theorem-of-identity-types open import foundation.global-subuniverses -open import foundation.retractions open import foundation.identity-systems open import foundation.iterated-dependent-product-types open import foundation.monomorphisms open import foundation.propositions +open import foundation.retractions open import foundation.subtype-identity-principle open import foundation.subuniverses open import foundation.transport-along-identifications diff --git a/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md index 7df96d5e4d..a33bd8b4df 100644 --- a/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md +++ b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md @@ -20,6 +20,7 @@ open import foundation.equivalences open import foundation.equivalences-arrows open import foundation.fibers-of-maps open import foundation.function-types +open import foundation.functoriality-dependent-function-types open import foundation.functoriality-dependent-pair-types open import foundation.functoriality-fibers-of-maps open import foundation.fundamental-theorem-of-identity-types @@ -227,9 +228,10 @@ comp-cartesian-hom-polynomial-endofunctor : cartesian-hom-polynomial-endofunctor 𝑄 𝑅 → cartesian-hom-polynomial-endofunctor 𝑃 𝑄 → cartesian-hom-polynomial-endofunctor 𝑃 𝑅 -comp-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 𝑅 (β , H) (α , K) = - ( comp-hom-polynomial-endofunctor 𝑃 𝑄 𝑅 β α , - λ a → is-equiv-comp (pr2 α a) (pr2 β (pr1 α a)) (H (pr1 α a)) (K a)) +comp-cartesian-hom-polynomial-endofunctor + 𝑃 𝑄 𝑅 ((β₀ , β₁) , H) ((α₀ , α₁) , K) = + ( ( comp-hom-polynomial-endofunctor 𝑃 𝑄 𝑅 (β₀ , β₁) (α₀ , α₁)) , + ( λ a → is-equiv-comp (α₁ a) (β₁ (α₀ a)) (H (α₀ a)) (K a))) ``` ## Properties @@ -380,59 +382,40 @@ module _ ### Cartesian natural transformations define cartesian morphisms -```text +```agda module _ {l1 l2 l3 l4 : Level} (𝑃 : polynomial-endofunctor l1 l2) (𝑄 : polynomial-endofunctor l3 l4) - (α : natural-transformation-polynomial-endofunctor l2 𝑃 𝑄) + (α : cartesian-natural-transformation-polynomial-endofunctor l2 𝑃 𝑄) + (let 𝑃₀ = shapes-polynomial-endofunctor 𝑃) + (let 𝑃₁ = positions-polynomial-endofunctor 𝑃) + (let α₀ = type-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α) where - shapes-natural-transformation-polynomial-endofunctor : + shapes-cartesian-natural-transformation-polynomial-endofunctor : shapes-polynomial-endofunctor 𝑃 → shapes-polynomial-endofunctor 𝑄 - shapes-natural-transformation-polynomial-endofunctor a = - pr1 (type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α (a , id)) + shapes-cartesian-natural-transformation-polynomial-endofunctor = + shapes-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( natural-transformation-cartesian-natural-transformation-polynomial-endofunctor + 𝑃 𝑄 α) - positions-natural-transformation-polynomial-endofunctor : + positions-cartesian-natural-transformation-polynomial-endofunctor : (a : shapes-polynomial-endofunctor 𝑃) → positions-polynomial-endofunctor 𝑄 - ( shapes-natural-transformation-polynomial-endofunctor a) → + ( shapes-cartesian-natural-transformation-polynomial-endofunctor a) → positions-polynomial-endofunctor 𝑃 a - positions-natural-transformation-polynomial-endofunctor a = - pr2 (type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α (a , id)) + positions-cartesian-natural-transformation-polynomial-endofunctor = + positions-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( natural-transformation-cartesian-natural-transformation-polynomial-endofunctor + 𝑃 𝑄 α) - hom-natural-transformation-polynomial-endofunctor : + hom-cartesian-natural-transformation-polynomial-endofunctor : hom-polynomial-endofunctor 𝑃 𝑄 - hom-natural-transformation-polynomial-endofunctor = - ( shapes-natural-transformation-polynomial-endofunctor , - positions-natural-transformation-polynomial-endofunctor) + hom-cartesian-natural-transformation-polynomial-endofunctor = + hom-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( natural-transformation-cartesian-natural-transformation-polynomial-endofunctor + 𝑃 𝑄 α) ``` -### Equivalence between cartesian morphisms and cartesian natural transformations - -```text -module _ - {l1 l2 l3 l4 : Level} - (𝑃 : polynomial-endofunctor l1 l2) - (𝑄 : polynomial-endofunctor l3 l4) - where - - is-retraction-hom-natural-transformation-polynomial-endofunctor : - is-retraction - ( λ α → natural-transformation-hom-polynomial-endofunctor 𝑃 𝑄 α {l2}) - ( hom-natural-transformation-polynomial-endofunctor 𝑃 𝑄) - is-retraction-hom-natural-transformation-polynomial-endofunctor α = refl - - is-section-type-hom-natural-transformation-polynomial-endofunctor : - (α : natural-transformation-polynomial-endofunctor l2 𝑃 𝑄) - (X : UU l2) → - type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 - ( natural-transformation-hom-polynomial-endofunctor 𝑃 𝑄 - ( hom-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α)) ~ - type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α {X} - is-section-type-hom-natural-transformation-polynomial-endofunctor - α X (a , x) = - inv - ( naturality-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α x - ( a , id)) -``` +> TODO diff --git a/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md index 107b903571..3d1e32d549 100644 --- a/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md +++ b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md @@ -13,6 +13,7 @@ open import foundation.binary-homotopies open import foundation.cartesian-morphisms-arrows open import foundation.commuting-squares-of-homotopies open import foundation.commuting-squares-of-maps +open import foundation.cones-over-cospan-diagrams open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.equality-dependent-function-types @@ -173,6 +174,15 @@ module _ hom-arrow-cartesian-natural-transformation-polynomial-endofunctor = hom-arrow-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α' + cone-cartesian-natural-transformation-polynomial-endofunctor : + {X Y : UU l5} (f : X → Y) → + cone + ( type-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α) + ( map-polynomial-endofunctor 𝑄 f) + ( type-polynomial-endofunctor 𝑃 X) + cone-cartesian-natural-transformation-polynomial-endofunctor = + cone-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α' + cartesian-hom-arrow-cartesian-natural-transformation-polynomial-endofunctor : {X Y : UU l5} (f : X → Y) → cartesian-hom-arrow diff --git a/src/trees/morphisms-polynomial-endofunctors.lagda.md b/src/trees/morphisms-polynomial-endofunctors.lagda.md index 901315003f..c415810061 100644 --- a/src/trees/morphisms-polynomial-endofunctors.lagda.md +++ b/src/trees/morphisms-polynomial-endofunctors.lagda.md @@ -308,7 +308,7 @@ module _ compute-fiber-type-hom-polynomial-endofunctor : (c : 𝑄₀) (x : 𝑄₁ c → X) → - fiber (type-hom-polynomial-endofunctor 𝑃 𝑄 α {X = X}) (c , x) ≃ + fiber (type-hom-polynomial-endofunctor 𝑃 𝑄 α) (c , x) ≃ fiber-type-hom-polynomial-endofunctor c x compute-fiber-type-hom-polynomial-endofunctor c x = equivalence-reasoning @@ -353,7 +353,7 @@ module _ ( ap (λ q → x ∘ tr 𝑄₁ q) (inv-inv p))))) ``` -### Equivalence between morphisms and natural transformations +### Comparison betwen morphisms and natural transformations ```agda module _ @@ -382,29 +382,8 @@ module _ ( a , id)) ``` -Finally, we need to show the following equality: +To show these notions are equivalent, we need to show the following equality: $$ - α₁ (f ∘ x) (a , id) = ap (𝑄 f) (α₁ x (a , id)) ∙ α₁ f (a , x) + α₁ (f ∘ x) (a , id) = ap (𝑄 f) (α₁ x (a , id)) ∙ α₁ f (a , x). $$ - -```text -module _ - {l : Level} - (𝑃 : polynomial-endofunctor l l) - (𝑄 : polynomial-endofunctor l l) - where - - is-section-is-set-positions-hom-natural-transformation-polynomial-endofunctor : - is-section - ( λ α → natural-transformation-hom-polynomial-endofunctor 𝑃 𝑄 α {l}) - ( hom-natural-transformation-polynomial-endofunctor 𝑃 𝑄) - is-section-is-set-positions-hom-natural-transformation-polynomial-endofunctor α = - eq-htpy-natural-transformation-polynomial-endofunctor 𝑃 𝑄 - ( natural-transformation-hom-polynomial-endofunctor 𝑃 𝑄 - ( hom-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α)) - ( α) - ( ( is-section-type-hom-natural-transformation-polynomial-endofunctor 𝑃 𝑄 - ( α)) , - ?) -``` From f462576c44ba2459f34fd75f0e48aa5ad1897848 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Mon, 15 Sep 2025 14:32:33 +0200 Subject: [PATCH 18/41] more pullback pasting properties! --- src/foundation-core/pullbacks.lagda.md | 384 ++++++++++++++++++++----- 1 file changed, 306 insertions(+), 78 deletions(-) diff --git a/src/foundation-core/pullbacks.lagda.md b/src/foundation-core/pullbacks.lagda.md index 0170c208fc..60c3346407 100644 --- a/src/foundation-core/pullbacks.lagda.md +++ b/src/foundation-core/pullbacks.lagda.md @@ -232,8 +232,8 @@ module _ abstract is-pullback-htpy : - {c : cone f g C} (c' : cone f' g' C) - (Hc : htpy-parallel-cone Hf Hg c c') → + {c : cone f g C} (c' : cone f' g' C) → + htpy-parallel-cone Hf Hg c c' → is-pullback f' g' c' → is-pullback f g c is-pullback-htpy {c} c' H pb-c' = is-equiv-left-map-triangle @@ -246,8 +246,8 @@ module _ abstract is-pullback-htpy' : - (c : cone f g C) {c' : cone f' g' C} - (Hc : htpy-parallel-cone Hf Hg c c') → + (c : cone f g C) {c' : cone f' g' C} → + htpy-parallel-cone Hf Hg c c' → is-pullback f g c → is-pullback f' g' c' is-pullback-htpy' c {c'} H = is-equiv-top-map-triangle @@ -533,74 +533,74 @@ module _ {l1 l2 l3 l4 l5 l6 : Level} {A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4} {Y : UU l5} {Z : UU l6} (i : X → Y) (j : Y → Z) (h : C → Z) - (c : cone j h B) (d : cone i (vertical-map-cone j h c) A) + (right : cone j h B) (left : cone i (vertical-map-cone j h right) A) where abstract is-pullback-rectangle-is-pullback-left-square : - is-pullback j h c → is-pullback i (vertical-map-cone j h c) d → - is-pullback (j ∘ i) h (pasting-horizontal-cone i j h c d) + is-pullback j h right → is-pullback i (vertical-map-cone j h right) left → + is-pullback (j ∘ i) h (pasting-horizontal-cone i j h right left) is-pullback-rectangle-is-pullback-left-square pb-c pb-d = is-pullback-is-fiberwise-equiv-map-fiber-vertical-map-cone (j ∘ i) h - ( pasting-horizontal-cone i j h c d) + ( pasting-horizontal-cone i j h right left) ( λ x → is-equiv-left-map-triangle ( map-fiber-vertical-map-cone - ( j ∘ i) h (pasting-horizontal-cone i j h c d) x) - ( map-fiber-vertical-map-cone j h c (i x)) - ( map-fiber-vertical-map-cone i (vertical-map-cone j h c) d x) + ( j ∘ i) h (pasting-horizontal-cone i j h right left) x) + ( map-fiber-vertical-map-cone j h right (i x)) + ( map-fiber-vertical-map-cone i (vertical-map-cone j h right) left x) ( preserves-pasting-horizontal-map-fiber-vertical-map-cone ( i) ( j) ( h) - ( c) - ( d) + ( right) + ( left) ( x)) ( is-fiberwise-equiv-map-fiber-vertical-map-cone-is-pullback ( i) - ( vertical-map-cone j h c) - ( d) + ( vertical-map-cone j h right) + ( left) ( pb-d) ( x)) ( is-fiberwise-equiv-map-fiber-vertical-map-cone-is-pullback ( j) ( h) - ( c) + ( right) ( pb-c) ( i x))) abstract is-pullback-left-square-is-pullback-rectangle : - is-pullback j h c → - is-pullback (j ∘ i) h (pasting-horizontal-cone i j h c d) → - is-pullback i (vertical-map-cone j h c) d + is-pullback j h right → + is-pullback (j ∘ i) h (pasting-horizontal-cone i j h right left) → + is-pullback i (vertical-map-cone j h right) left is-pullback-left-square-is-pullback-rectangle pb-c pb-rect = is-pullback-is-fiberwise-equiv-map-fiber-vertical-map-cone i - ( vertical-map-cone j h c) - ( d) + ( vertical-map-cone j h right) + ( left) ( λ x → is-equiv-top-map-triangle ( map-fiber-vertical-map-cone - ( j ∘ i) h (pasting-horizontal-cone i j h c d) x) - ( map-fiber-vertical-map-cone j h c (i x)) - ( map-fiber-vertical-map-cone i (vertical-map-cone j h c) d x) + ( j ∘ i) h (pasting-horizontal-cone i j h right left) x) + ( map-fiber-vertical-map-cone j h right (i x)) + ( map-fiber-vertical-map-cone i (vertical-map-cone j h right) left x) ( preserves-pasting-horizontal-map-fiber-vertical-map-cone ( i) ( j) ( h) - ( c) - ( d) + ( right) + ( left) ( x)) ( is-fiberwise-equiv-map-fiber-vertical-map-cone-is-pullback ( j) ( h) - ( c) + ( right) ( pb-c) ( i x)) ( is-fiberwise-equiv-map-fiber-vertical-map-cone-is-pullback ( j ∘ i) ( h) - ( pasting-horizontal-cone i j h c d) + ( pasting-horizontal-cone i j h right left) ( pb-rect) ( x))) ``` @@ -628,107 +628,115 @@ module _ {l1 l2 l3 l4 l5 l6 : Level} {A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4} {Y : UU l5} {Z : UU l6} (f : C → Z) (g : Y → Z) (h : X → Y) - (c : cone f g B) (d : cone (horizontal-map-cone f g c) h A) + (lower : cone f g B) + (upper : cone (horizontal-map-cone f g lower) h A) where abstract is-pullback-top-square-is-pullback-rectangle : - is-pullback f g c → - is-pullback f (g ∘ h) (pasting-vertical-cone f g h c d) → - is-pullback (horizontal-map-cone f g c) h d - is-pullback-top-square-is-pullback-rectangle pb-c pb-dc = + is-pullback f g lower → + is-pullback f (g ∘ h) (pasting-vertical-cone f g h lower upper) → + is-pullback (horizontal-map-cone f g lower) h upper + is-pullback-top-square-is-pullback-rectangle pb-lower pb-rect = is-pullback-is-fiberwise-equiv-map-fiber-vertical-map-cone - ( horizontal-map-cone f g c) + ( horizontal-map-cone f g lower) ( h) - ( d) + ( upper) ( λ x → is-fiberwise-equiv-is-equiv-map-Σ ( λ t → fiber h (pr1 t)) - ( map-fiber-vertical-map-cone f g c (vertical-map-cone f g c x)) + ( map-fiber-vertical-map-cone f g + ( lower) + ( vertical-map-cone f g lower x)) ( λ t → map-fiber-vertical-map-cone - ( horizontal-map-cone f g c) + ( horizontal-map-cone f g lower) ( h) - ( d) + ( upper) ( pr1 t)) ( is-fiberwise-equiv-map-fiber-vertical-map-cone-is-pullback ( f) ( g) - ( c) - ( pb-c) - ( vertical-map-cone f g c x)) + ( lower) + ( pb-lower) + ( vertical-map-cone f g lower x)) ( is-equiv-top-is-equiv-bottom-square ( map-inv-compute-fiber-comp - ( vertical-map-cone f g c) - ( vertical-map-cone (horizontal-map-cone f g c) h d) - ( vertical-map-cone f g c x)) - ( map-inv-compute-fiber-comp g h (f (vertical-map-cone f g c x))) + ( vertical-map-cone f g lower) + ( vertical-map-cone (horizontal-map-cone f g lower) h upper) + ( vertical-map-cone f g lower x)) + ( map-inv-compute-fiber-comp g h + ( f (vertical-map-cone f g lower x))) ( map-Σ ( λ t → fiber h (pr1 t)) - ( map-fiber-vertical-map-cone f g c (vertical-map-cone f g c x)) + ( map-fiber-vertical-map-cone f g + ( lower) + ( vertical-map-cone f g lower x)) ( λ t → map-fiber-vertical-map-cone - ( horizontal-map-cone f g c) h d (pr1 t))) + ( horizontal-map-cone f g lower) h upper (pr1 t))) ( map-fiber-vertical-map-cone f ( g ∘ h) - ( pasting-vertical-cone f g h c d) - ( vertical-map-cone f g c x)) - ( preserves-pasting-vertical-map-fiber-vertical-map-cone f g h c d - ( vertical-map-cone f g c x)) + ( pasting-vertical-cone f g h lower upper) + ( vertical-map-cone f g lower x)) + ( preserves-pasting-vertical-map-fiber-vertical-map-cone f g h + ( lower) + ( upper) + ( vertical-map-cone f g lower x)) ( is-equiv-map-inv-compute-fiber-comp - ( vertical-map-cone f g c) - ( vertical-map-cone (horizontal-map-cone f g c) h d) - ( vertical-map-cone f g c x)) + ( vertical-map-cone f g lower) + ( vertical-map-cone (horizontal-map-cone f g lower) h upper) + ( vertical-map-cone f g lower x)) ( is-equiv-map-inv-compute-fiber-comp g h - ( f (vertical-map-cone f g c x))) + ( f (vertical-map-cone f g lower x))) ( is-fiberwise-equiv-map-fiber-vertical-map-cone-is-pullback f ( g ∘ h) - ( pasting-vertical-cone f g h c d) - ( pb-dc) - ( vertical-map-cone f g c x))) + ( pasting-vertical-cone f g h lower upper) + ( pb-rect) + ( vertical-map-cone f g lower x))) ( x , refl)) abstract is-pullback-rectangle-is-pullback-top-square : - is-pullback f g c → - is-pullback (horizontal-map-cone f g c) h d → - is-pullback f (g ∘ h) (pasting-vertical-cone f g h c d) - is-pullback-rectangle-is-pullback-top-square pb-c pb-d = + is-pullback f g lower → + is-pullback (horizontal-map-cone f g lower) h upper → + is-pullback f (g ∘ h) (pasting-vertical-cone f g h lower upper) + is-pullback-rectangle-is-pullback-top-square pb-lower pb-upper = is-pullback-is-fiberwise-equiv-map-fiber-vertical-map-cone ( f) ( g ∘ h) - ( pasting-vertical-cone f g h c d) + ( pasting-vertical-cone f g h lower upper) ( λ x → is-equiv-bottom-is-equiv-top-square ( map-inv-compute-fiber-comp - ( vertical-map-cone f g c) - ( vertical-map-cone (horizontal-map-cone f g c) h d) + ( vertical-map-cone f g lower) + ( vertical-map-cone (horizontal-map-cone f g lower) h upper) ( x)) ( map-inv-compute-fiber-comp g h (f x)) ( map-Σ ( λ t → fiber h (pr1 t)) - ( map-fiber-vertical-map-cone f g c x) + ( map-fiber-vertical-map-cone f g lower x) ( λ t → map-fiber-vertical-map-cone - ( horizontal-map-cone f g c) + ( horizontal-map-cone f g lower) ( h) - ( d) + ( upper) ( pr1 t))) ( map-fiber-vertical-map-cone ( f) ( g ∘ h) - ( pasting-vertical-cone f g h c d) + ( pasting-vertical-cone f g h lower upper) ( x)) ( preserves-pasting-vertical-map-fiber-vertical-map-cone ( f) ( g) ( h) - ( c) - ( d) + ( lower) + ( upper) ( x)) ( is-equiv-map-inv-compute-fiber-comp - ( vertical-map-cone f g c) - ( vertical-map-cone (horizontal-map-cone f g c) h d) + ( vertical-map-cone f g lower) + ( vertical-map-cone (horizontal-map-cone f g lower) h upper) ( x)) ( is-equiv-map-inv-compute-fiber-comp g h (f x)) ( is-equiv-map-Σ @@ -736,18 +744,238 @@ module _ ( is-fiberwise-equiv-map-fiber-vertical-map-cone-is-pullback ( f) ( g) - ( c) - ( pb-c) + ( lower) + ( pb-lower) ( x)) ( λ t → is-fiberwise-equiv-map-fiber-vertical-map-cone-is-pullback - ( horizontal-map-cone f g c) + ( horizontal-map-cone f g lower) ( h) - ( d) - ( pb-d) + ( upper) + ( pb-upper) ( pr1 t)))) ``` +### Triangles of pullback squares + +Given a triangle of squares where the back right square is a pullback, + +```text + • + ∧ | \ + / | \ + / | ∨ + • --------> • + | | | + | ∨ | + | • | + | ∧ \ | + | / \ | + ∨ / ∨ ∨ + • --------> • +``` + +then the back left square is a pullback if and only if the front square is. + +```agda +module _ + {l1 l2 l3 l4 l5 l6 : Level} + {A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4} {Y : UU l5} {Z : UU l6} + (i : X → Y) (j : Y → Z) (h : C → Z) (k : X → Z) + (back-right : cone j h B) + (back-left : cone i (vertical-map-cone j h back-right) A) + (front : cone k h A) + (K : j ∘ i ~ k) + (H : + htpy-parallel-cone + ( K) + ( refl-htpy' h) + ( pasting-horizontal-cone i j h back-right back-left) + ( front)) + where + + abstract + is-pullback-left-square-horizontal-triangle : + is-pullback j h back-right → + is-pullback i (vertical-map-cone j h back-right) back-left → + is-pullback k h front + is-pullback-left-square-horizontal-triangle pb-back-right pb-back-left = + is-pullback-htpy' + ( K) + ( refl-htpy' h) + ( pasting-horizontal-cone i j h back-right back-left) + ( H) + ( is-pullback-rectangle-is-pullback-left-square i j h + ( back-right) + ( back-left) + ( pb-back-right) + ( pb-back-left)) + + abstract + is-pullback-front-square-horizontal-triangle : + is-pullback j h back-right → + is-pullback k h front → + is-pullback i (vertical-map-cone j h back-right) back-left + is-pullback-front-square-horizontal-triangle pb-back-right pb-front = + is-pullback-left-square-is-pullback-rectangle i j h back-right back-left + ( pb-back-right) + ( is-pullback-htpy K (refl-htpy' h) front H pb-front) + +module _ + {l1 l2 l3 l4 l5 l6 : Level} + {A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4} {Y : UU l5} {Z : UU l6} + (i : X → Y) (j : Y → Z) (h : C → Z) (k : X → Z) + (back-right : cone j h B) + (back-left : cone i (vertical-map-cone j h back-right) A) + (front : cone k h A) + (K : k ~ j ∘ i) + (H : + htpy-parallel-cone + ( K) + ( refl-htpy' h) + ( front) + ( pasting-horizontal-cone i j h back-right back-left)) + where + + abstract + is-pullback-left-square-horizontal-triangle' : + is-pullback j h back-right → + is-pullback i (vertical-map-cone j h back-right) back-left → + is-pullback k h front + is-pullback-left-square-horizontal-triangle' pb-back-right pb-back-left = + is-pullback-htpy + ( K) + ( refl-htpy' h) + ( pasting-horizontal-cone i j h back-right back-left) + ( H) + ( is-pullback-rectangle-is-pullback-left-square i j h + ( back-right) + ( back-left) + ( pb-back-right) + ( pb-back-left)) + + abstract + is-pullback-front-square-horizontal-triangle' : + is-pullback j h back-right → + is-pullback k h front → + is-pullback i (vertical-map-cone j h back-right) back-left + is-pullback-front-square-horizontal-triangle' pb-back-right pb-front = + is-pullback-left-square-is-pullback-rectangle i j h + ( back-right) + ( back-left) + ( pb-back-right) + ( is-pullback-htpy' K (refl-htpy' h) front H pb-front) +``` + +We can also glue along horizontal maps. + +Given a triangle of squares where the right square is a pullback, + +```text + αX + • -----------> • + \ ⟍ \ ⟍ + \ ↘ \ ↘ + \ • ------- \ --> • + \ / ⌟ \ / + ∨ ∨ ∨ ∨ + • ------------> • +``` + +then the left square is a pullback if and only if the top square is. + +```agda +module _ + {l1 l2 l3 l4 l5 l6 : Level} + {A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4} {Y : UU l5} {Z : UU l6} + (f : C → Z) (g : Y → Z) (h : X → Y) (k : X → Z) + (right : cone f g B) (top : cone (horizontal-map-cone f g right) h A) + (left : cone f k A) + (K : g ∘ h ~ k) + (H : + htpy-parallel-cone + ( refl-htpy' f) + ( K) + ( pasting-vertical-cone f g h right top) + ( left)) + where + + abstract + is-pullback-left-square-vertical-triangle : + is-pullback f g right → + is-pullback (horizontal-map-cone f g right) h top → + is-pullback f k left + is-pullback-left-square-vertical-triangle pb-right pb-top = + is-pullback-htpy' + ( refl-htpy' f) + ( K) + ( pasting-vertical-cone f g h right top) + ( H) + ( is-pullback-rectangle-is-pullback-top-square f g h right top + ( pb-right) + ( pb-top)) + + abstract + is-pullback-top-square-vertical-triangle : + is-pullback f g right → + is-pullback f k left → + is-pullback (horizontal-map-cone f g right) h top + is-pullback-top-square-vertical-triangle pb-right pb-left = + is-pullback-top-square-is-pullback-rectangle f g h right top + ( pb-right) + ( is-pullback-htpy + ( refl-htpy' f) + ( K) + ( left) + ( H) + ( pb-left)) + +module _ + {l1 l2 l3 l4 l5 l6 : Level} + {A : UU l1} {B : UU l2} {C : UU l3} {X : UU l4} {Y : UU l5} {Z : UU l6} + (f : C → Z) (g : Y → Z) (h : X → Y) (k : X → Z) + (right : cone f g B) (top : cone (horizontal-map-cone f g right) h A) + (left : cone f k A) + (K : k ~ g ∘ h) + (H : + htpy-parallel-cone + ( refl-htpy' f) + ( K) + ( left) + ( pasting-vertical-cone f g h right top)) + where + + abstract + is-pullback-left-square-vertical-triangle' : + is-pullback f g right → + is-pullback (horizontal-map-cone f g right) h top → + is-pullback f k left + is-pullback-left-square-vertical-triangle' pb-right pb-top = + is-pullback-htpy + ( refl-htpy' f) + ( K) + ( pasting-vertical-cone f g h right top) + ( H) + ( is-pullback-rectangle-is-pullback-top-square f g h right top + ( pb-right) + ( pb-top)) + + abstract + is-pullback-top-square-vertical-triangle' : + is-pullback f g right → + is-pullback f k left → + is-pullback (horizontal-map-cone f g right) h top + is-pullback-top-square-vertical-triangle' pb-right pb-left = + is-pullback-top-square-is-pullback-rectangle f g h right top + ( pb-right) + ( is-pullback-htpy' + ( refl-htpy' f) + ( K) + ( left) + ( H) + ( pb-left)) +``` + ### Pullbacks are associative Consider two cospans with a shared vertex `B`: From 5b4c5bfeb616e7b27e1671ba8301bf77abde7545 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Mon, 15 Sep 2025 14:54:51 +0200 Subject: [PATCH 19/41] edits --- src/foundation-core/sections.lagda.md | 2 +- .../cartesian-morphisms-arrows.lagda.md | 21 +++++++++++++++++++ ...morphisms-polynomial-endofunctors.lagda.md | 2 +- ...ormations-polynomial-endofunctors.lagda.md | 8 +++++++ 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/foundation-core/sections.lagda.md b/src/foundation-core/sections.lagda.md index fbf0044e3d..fdcf282625 100644 --- a/src/foundation-core/sections.lagda.md +++ b/src/foundation-core/sections.lagda.md @@ -97,7 +97,7 @@ module _ is-section-map-section-comp : is-section (g ∘ h) map-section-comp is-section-map-section-comp = - ( g ·l (is-section-map-section h t ·r map-section g s)) ∙h + ( g ·l is-section-map-section h t ·r map-section g s) ∙h ( is-section-map-section g s) section-comp : section (g ∘ h) diff --git a/src/foundation/cartesian-morphisms-arrows.lagda.md b/src/foundation/cartesian-morphisms-arrows.lagda.md index 58ea9ebfbb..e47f256ea1 100644 --- a/src/foundation/cartesian-morphisms-arrows.lagda.md +++ b/src/foundation/cartesian-morphisms-arrows.lagda.md @@ -253,6 +253,27 @@ module _ is-cartesian-transpose-cartesian-hom-arrow) ``` +### If the transpose is cartesian then so is the original + +```agda +module _ + {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3} {Y : UU l4} + (f : A → B) (g : X → Y) (α : hom-arrow f g) + where + + is-cartesian-is-cartesian-transpose-cartesian-hom-arrow : + is-cartesian-hom-arrow + ( map-domain-hom-arrow f g α) + ( map-codomain-hom-arrow f g α) + ( transpose-hom-arrow f g α) → + is-cartesian-hom-arrow f g α + is-cartesian-is-cartesian-transpose-cartesian-hom-arrow = + is-pullback-swap-cone' + ( map-codomain-hom-arrow f g α) + ( g) + ( cone-hom-arrow f g α) +``` + ### If the target of a cartesian morphism is an equivalence then so is the source ```agda diff --git a/src/trees/morphisms-polynomial-endofunctors.lagda.md b/src/trees/morphisms-polynomial-endofunctors.lagda.md index c415810061..6ea8706dfc 100644 --- a/src/trees/morphisms-polynomial-endofunctors.lagda.md +++ b/src/trees/morphisms-polynomial-endofunctors.lagda.md @@ -353,7 +353,7 @@ module _ ( ap (λ q → x ∘ tr 𝑄₁ q) (inv-inv p))))) ``` -### Comparison betwen morphisms and natural transformations +### Comparison between morphisms and natural transformations ```agda module _ diff --git a/src/trees/natural-transformations-polynomial-endofunctors.lagda.md b/src/trees/natural-transformations-polynomial-endofunctors.lagda.md index 72b9e168f2..0830fcab48 100644 --- a/src/trees/natural-transformations-polynomial-endofunctors.lagda.md +++ b/src/trees/natural-transformations-polynomial-endofunctors.lagda.md @@ -130,6 +130,14 @@ module _ hom-arrow-natural-transformation-polynomial-endofunctor = ( α₀ , α₀ , α₁ f) + transpose-hom-arrow-natural-transformation-polynomial-endofunctor : + hom-arrow (α₀ {X}) (α₀ {Y}) + transpose-hom-arrow-natural-transformation-polynomial-endofunctor = + transpose-hom-arrow + ( map-polynomial-endofunctor 𝑃 f) + ( map-polynomial-endofunctor 𝑄 f) + ( hom-arrow-natural-transformation-polynomial-endofunctor) + cone-natural-transformation-polynomial-endofunctor : cone α₀ (map-polynomial-endofunctor 𝑄 f) (type-polynomial-endofunctor 𝑃 X) cone-natural-transformation-polynomial-endofunctor = From 6d60ca976286af23b463907f928b3dd024487d2f Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Mon, 15 Sep 2025 14:55:55 +0200 Subject: [PATCH 20/41] add reference for equivalence between cartesian morphisms and cartesian natural transformations --- references.bib | 14 ++++++++++++++ ...sian-morphisms-polynomial-endofunctors.lagda.md | 13 +++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/references.bib b/references.bib index da0e6f65ee..2bda1c4a2a 100644 --- a/references.bib +++ b/references.bib @@ -520,6 +520,20 @@ @article{GK12 issn = {1469-8064}, } +@article{HGK22, + title = {∞-Operads as Analytic Monads}, + author = {Gepner, David and Haugseng, Rune and Kock, Joachim}, + year = 2021, + month = {04}, + journal = {International Mathematics Research Notices}, + volume = 2022, + number = 16, + pages = {12516--12624}, + doi = {10.1093/imrn/rnaa332}, + issn = {1073-7928}, + eprint = {https://academic.oup.com/imrn/article-pdf/2022/16/12516/45280093/rnaa332.pdf}, +} + @book{Johnstone02, title = {Sketches of an Elephant a Topos Theory Compendium}, author = {Johnstone, Peter T}, diff --git a/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md index a33bd8b4df..61d0a18ff4 100644 --- a/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md +++ b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md @@ -344,7 +344,7 @@ module _ ( inv-tr (λ c → positions-polynomial-endofunctor 𝑄 c → X) p x)) ``` -### Cartesian morphisms are cartesian natural transformations +### The associated natural transformation of a cartesian morphism is cartesian ```agda module _ @@ -380,7 +380,7 @@ module _ ( is-equiv-id)) ``` -### Cartesian natural transformations define cartesian morphisms +### The associated morphism of a cartesian natural transformation is cartesian ```agda module _ @@ -419,3 +419,12 @@ module _ ``` > TODO + +### Equivalence between cartesian morphisms and cartesian natural transformations + +This is proved in a slightly different setting as part of Lemma 2.3.3 in +{{#cite GHK22}}. + +## References + +{{#bibliography}} From 42e5612761a607fe4403f3593fd4bfd201c84cf0 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Mon, 15 Sep 2025 23:27:32 +0200 Subject: [PATCH 21/41] uniqueness of lifts cartesian morphisms of arrows --- .../cartesian-morphisms-arrows.lagda.md | 117 +++++++++++++++++- src/foundation/homotopies.lagda.md | 2 +- ...ormations-polynomial-endofunctors.lagda.md | 2 +- 3 files changed, 113 insertions(+), 8 deletions(-) diff --git a/src/foundation/cartesian-morphisms-arrows.lagda.md b/src/foundation/cartesian-morphisms-arrows.lagda.md index e47f256ea1..809a00b83c 100644 --- a/src/foundation/cartesian-morphisms-arrows.lagda.md +++ b/src/foundation/cartesian-morphisms-arrows.lagda.md @@ -15,9 +15,14 @@ open import foundation.coproducts-pullbacks open import foundation.dependent-pair-types open import foundation.dependent-products-pullbacks open import foundation.dependent-sums-pullbacks +open import foundation.transport-along-identifications open import foundation.diagonal-maps-cartesian-products-of-types open import foundation.equivalences +open import foundation.function-extensionality open import foundation.fibers-of-maps +open import foundation.contractible-types +open import foundation.torsorial-type-families +open import foundation.homotopies open import foundation.function-types open import foundation.functoriality-cartesian-product-types open import foundation.functoriality-coproduct-types @@ -718,7 +723,7 @@ module _ ( is-cartesian-coproduct-cartesian-hom-arrow)) ``` -### Cartesian morphisms of arrows are preserved under exponentiation +### Cartesian morphisms of arrows are preserved under postcomposition exponentiation ```agda module _ @@ -777,9 +782,9 @@ is cartesian if and only if either of the folded morphisms Δ Δ ``` -is. +is cartesian. -It remains to formalize the right-hand version. +> It remains to formalize the right-hand version. ```agda module _ @@ -906,7 +911,7 @@ if `α` is. **Proof.** The unique existence of `γ` and the homotopy follows from the pullback property of `β`. The rest is a reiteration of the 3-for-2 property of -cartesian morphisms. +cartesian morphisms. ∎ We begin by constructing the commuting triangle of morphisms of arrows: @@ -1043,6 +1048,103 @@ module _ ( inv-coherence-triangle-hom-arrow-lift-map-codomain-cartesian-hom-arrow) ``` +This lift is unique. + + + +```agda +module _ + {l1 l2 l3 l4 l5 l6 : Level} + {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} + (f : A → A') (g : B → B') (h : C → C') + (β : cartesian-hom-arrow g h) + (α : hom-arrow f h) + (i : A' → B') + (H : + coherence-triangle-maps' + ( map-codomain-hom-arrow f h α) + ( map-codomain-cartesian-hom-arrow g h β) + ( i)) + where + + abstract + uniqueness-lift-map-codomain-cartesian-hom-arrow : + is-torsorial + ( λ (j : A → B) → + Σ ( coherence-hom-arrow f g j i) + ( λ J → + Σ ( coherence-triangle-maps' + ( map-domain-hom-arrow f h α) + ( map-domain-cartesian-hom-arrow g h β) + ( j)) + ( λ K → + coherence-htpy-hom-arrow f h + ( comp-hom-arrow f g h + ( hom-arrow-cartesian-hom-arrow g h β) + ( j , i , J)) + ( α) + ( K) + ( H)))) + uniqueness-lift-map-codomain-cartesian-hom-arrow = + is-contr-equiv _ + ( equiv-tot + ( λ j → + equiv-Σ _ + ( equiv-inv-htpy (i ∘ f) (g ∘ j)) + ( λ J → + equiv-tot + ( λ K → + equivalence-reasoning + ( ( map-codomain-cartesian-hom-arrow g h β ·l J) ∙h + ( coh-cartesian-hom-arrow g h β ·r j) ∙h + ( h ·l K) ~ + ( H ·r f) ∙h + ( coh-hom-arrow f h α)) + ≃ ( ( map-codomain-cartesian-hom-arrow g h β ·l J) ∙h + ( ( coh-cartesian-hom-arrow g h β ·r j) ∙h + ( h ·l K)) ~ + ( H ·r f) ∙h + ( coh-hom-arrow f h α)) + by + equiv-tr + ( λ Q → Q ~ ( H ·r f) ∙h ( coh-hom-arrow f h α)) + ( eq-htpy + ( assoc-htpy + ( map-codomain-cartesian-hom-arrow g h β ·l J) + ( coh-cartesian-hom-arrow g h β ·r j) + ( h ·l K))) + ≃ ( ( coh-cartesian-hom-arrow g h β ·r j) ∙h (h ·l K) ~ + ( inv-htpy + ( map-codomain-cartesian-hom-arrow g h β ·l J)) ∙h + ( ( H ·r f) ∙h (coh-hom-arrow f h α))) + by + equiv-left-transpose-htpy-concat + ( map-codomain-cartesian-hom-arrow g h β ·l J) + ( ( coh-cartesian-hom-arrow g h β ·r j) ∙h (h ·l K)) + ( ( H ·r f) ∙h (coh-hom-arrow f h α)) + ≃ ( ( coh-cartesian-hom-arrow g h β ·r j) ∙h (h ·l K) ~ + ( ( map-codomain-cartesian-hom-arrow g h β) ·l + ( inv-htpy J)) ∙h + ( ( H ·r f) ∙h (coh-hom-arrow f h α))) + by + equiv-tr + ( λ Q → + (coh-cartesian-hom-arrow g h β ·r j) ∙h (h ·l K) ~ + Q ∙h ((H ·r f) ∙h (coh-hom-arrow f h α))) + ( inv + ( eq-htpy + ( left-whisker-inv-htpy + ( map-codomain-cartesian-hom-arrow g h β) + ( J)))))))) + ( uniqueness-universal-property-pullback + ( map-codomain-cartesian-hom-arrow g h β) + ( h) + ( cone-cartesian-hom-arrow g h β) + ( universal-property-cartesian-hom-arrow g h β) + ( A) + ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow f g h β α i H)) +``` + Now, if `α` was cartesian to begin with, the lift is also. ```agda @@ -1070,8 +1172,11 @@ module _ ( H)) is-cartesian-cartesian-hom-arrow-lift-map-codomain-cartesian-hom-arrow = is-cartesian-top-cartesian-hom-arrow-triangle' f g h - ( hom-arrow-lift-map-codomain-cartesian-hom-arrow - ( f) g h β (hom-arrow-cartesian-hom-arrow f h α) i H) + ( hom-arrow-lift-map-codomain-cartesian-hom-arrow f g h + ( β) + ( hom-arrow-cartesian-hom-arrow f h α) + ( i) + ( H)) ( α) ( β) ( inv-coherence-triangle-hom-arrow-lift-map-codomain-cartesian-hom-arrow diff --git a/src/foundation/homotopies.lagda.md b/src/foundation/homotopies.lagda.md index 54f138533e..88a2ba84ea 100644 --- a/src/foundation/homotopies.lagda.md +++ b/src/foundation/homotopies.lagda.md @@ -225,7 +225,7 @@ module _ is-equiv-map-Π-is-fiberwise-equiv ( λ x → is-equiv-left-transpose-eq-concat (H x) (K x) (L x)) - equiv-left-transpose-htpy-concat : ((H ∙h K) ~ L) ≃ (K ~ ((inv-htpy H) ∙h L)) + equiv-left-transpose-htpy-concat : (H ∙h K ~ L) ≃ (K ~ (inv-htpy H ∙h L)) pr1 equiv-left-transpose-htpy-concat = left-transpose-htpy-concat H K L pr2 equiv-left-transpose-htpy-concat = is-equiv-left-transpose-htpy-concat diff --git a/src/trees/natural-transformations-polynomial-endofunctors.lagda.md b/src/trees/natural-transformations-polynomial-endofunctors.lagda.md index 0830fcab48..f2ddd62628 100644 --- a/src/trees/natural-transformations-polynomial-endofunctors.lagda.md +++ b/src/trees/natural-transformations-polynomial-endofunctors.lagda.md @@ -82,7 +82,7 @@ coherence-natural-transformation-polynomial-endofunctor {l = l} 𝑃 𝑄 α₀ ( α₀) ( map-polynomial-endofunctor 𝑃 f) ( map-polynomial-endofunctor 𝑄 f) - ( α₀) + ( α₀) natural-transformation-polynomial-endofunctor : {l1 l2 l3 l4 : Level} (l : Level) → From fb0dab724fcc6dafe98f09a14e09b414019be1f5 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Mon, 15 Sep 2025 23:27:38 +0200 Subject: [PATCH 22/41] a comment --- src/trees/morphisms-polynomial-endofunctors.lagda.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/trees/morphisms-polynomial-endofunctors.lagda.md b/src/trees/morphisms-polynomial-endofunctors.lagda.md index 6ea8706dfc..56c62529c1 100644 --- a/src/trees/morphisms-polynomial-endofunctors.lagda.md +++ b/src/trees/morphisms-polynomial-endofunctors.lagda.md @@ -382,8 +382,12 @@ module _ ( a , id)) ``` -To show these notions are equivalent, we need to show the following equality: +**Comment.** If we were to show these notions are equivalent, we would have +needed natural transformations to satisfy the following equality: $$ - α₁ (f ∘ x) (a , id) = ap (𝑄 f) (α₁ x (a , id)) ∙ α₁ f (a , x). + α₁ (f ∘ x) (a , id) = ap (𝑄 f) (α₁ x (a , id)) ∙ α₁ f (a , x), $$ + +which is an unfolding of the condition that the naturality square of a composite +map is given by pasting of squares. From 55e0caaad4eab418b51ca4e255cc13435d34de9c Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Tue, 16 Sep 2025 00:11:06 +0200 Subject: [PATCH 23/41] lifts of morphisms of arrows --- src/foundation.lagda.md | 1 + .../lifts-morphisms-arrows.lagda.md | 93 +++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 src/foundation/lifts-morphisms-arrows.lagda.md diff --git a/src/foundation.lagda.md b/src/foundation.lagda.md index f0f52a7493..f23ecc41cf 100644 --- a/src/foundation.lagda.md +++ b/src/foundation.lagda.md @@ -290,6 +290,7 @@ open import foundation.large-locale-of-subtypes public open import foundation.law-of-excluded-middle public open import foundation.lawveres-fixed-point-theorem public open import foundation.lesser-limited-principle-of-omniscience public +open import foundation.lifts-morphisms-arrows public open import foundation.lifts-types public open import foundation.limited-principle-of-omniscience public open import foundation.locale-of-propositions public diff --git a/src/foundation/lifts-morphisms-arrows.lagda.md b/src/foundation/lifts-morphisms-arrows.lagda.md new file mode 100644 index 0000000000..18feb7e14c --- /dev/null +++ b/src/foundation/lifts-morphisms-arrows.lagda.md @@ -0,0 +1,93 @@ +# Lifts of morphisms of arrows + +```agda +module foundation.lifts-morphisms-arrows where +``` + +
Imports + +```agda +open import foundation.commuting-triangles-of-morphisms-arrows +open import foundation.dependent-pair-types +open import foundation.morphisms-arrows +open import foundation.homotopies-morphisms-arrows +open import foundation.universe-levels +open import foundation.commuting-triangles-of-maps +``` + +
+ +## Idea + +Given two [morphism of arrows](foundation.morphisms-arrows.md) `α : f ⇒ h` and +`β : g ⇒ h`, then a +{{#concept "lift" Disambiguation="morphisms of arrows" Agda=lift-hom-arrow}} of +`α` along `β` is a morphism of arrows `γ : f ⇒ g` such that the triangle +`β ∘ γ ~ α` commutes. + +## Definition + +```agda +lift-hom-arrow : + {l1 l2 l3 l4 l5 l6 : Level} + {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} + (f : A → A') (g : B → B') (h : C → C') + (α : hom-arrow f h) (β : hom-arrow g h) → + UU (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6) +lift-hom-arrow f g h α β = + Σ (hom-arrow f g) (coherence-triangle-hom-arrow f g h α β) + +module _ + {l1 l2 l3 l4 l5 l6 : Level} + {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} + (f : A → A') (g : B → B') (h : C → C') + (α : hom-arrow f h) (β : hom-arrow g h) + (γ : lift-hom-arrow f g h α β) + where + + hom-arrow-lift-hom-arrow : hom-arrow f g + hom-arrow-lift-hom-arrow = pr1 γ + + coherence-triangle-lift-hom-arrow : + coherence-triangle-hom-arrow f g h α β hom-arrow-lift-hom-arrow + coherence-triangle-lift-hom-arrow = pr2 γ + + map-domain-lift-hom-arrow : A → B + map-domain-lift-hom-arrow = + map-domain-hom-arrow f g hom-arrow-lift-hom-arrow + + map-codomain-lift-hom-arrow : A' → B' + map-codomain-lift-hom-arrow = + map-codomain-hom-arrow f g hom-arrow-lift-hom-arrow + + coh-hom-arrow-lift-hom-arrow : + coherence-hom-arrow f g + map-domain-lift-hom-arrow + map-codomain-lift-hom-arrow + coh-hom-arrow-lift-hom-arrow = + coh-hom-arrow f g hom-arrow-lift-hom-arrow + + coh-domain-lift-hom-arrow : + coherence-triangle-maps + ( map-domain-hom-arrow f h α) + ( map-domain-hom-arrow g h β) + ( map-domain-lift-hom-arrow) + coh-domain-lift-hom-arrow = + pr1 coherence-triangle-lift-hom-arrow + + coh-codomain-lift-hom-arrow : + coherence-triangle-maps + ( map-codomain-hom-arrow f h α) + ( map-codomain-hom-arrow g h β) + ( map-codomain-lift-hom-arrow) + coh-codomain-lift-hom-arrow = + pr1 (pr2 coherence-triangle-lift-hom-arrow) + + coh-lift-hom-arrow : + coherence-htpy-hom-arrow f h α + ( comp-hom-arrow f g h β hom-arrow-lift-hom-arrow) + ( coh-domain-lift-hom-arrow) + ( coh-codomain-lift-hom-arrow) + coh-lift-hom-arrow = + pr2 (pr2 coherence-triangle-lift-hom-arrow) +``` From 881c9119c7318b09272e58e024590434bf52826d Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Tue, 16 Sep 2025 01:33:39 +0200 Subject: [PATCH 24/41] wip universal property cartesian morphisms --- references.bib | 28 +- src/foundation-core/pullbacks.lagda.md | 12 +- src/foundation.lagda.md | 1 + .../cartesian-morphisms-arrows.lagda.md | 325 +--------- .../lifts-morphisms-arrows.lagda.md | 4 +- src/foundation/subuniverses.lagda.md | 3 +- ...operty-cartesian-morphisms-arrows.lagda.md | 611 ++++++++++++++++++ ...ormations-polynomial-endofunctors.lagda.md | 120 ++++ 8 files changed, 767 insertions(+), 337 deletions(-) create mode 100644 src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md diff --git a/references.bib b/references.bib index 2bda1c4a2a..a906360dac 100644 --- a/references.bib +++ b/references.bib @@ -506,6 +506,20 @@ @online{GGMS24 keywords = {Computer Science - Logic in Computer Science,Mathematics - Logic}, } +@article{GHK22, + title = {∞-Operads as Analytic Monads}, + author = {Gepner, David and Haugseng, Rune and Kock, Joachim}, + year = 2021, + month = {04}, + journal = {International Mathematics Research Notices}, + volume = 2022, + number = 16, + pages = {12516--12624}, + doi = {10.1093/imrn/rnaa332}, + issn = {1073-7928}, + eprint = {https://academic.oup.com/imrn/article-pdf/2022/16/12516/45280093/rnaa332.pdf}, +} + @article{GK12, title = {Polynomial functors and polynomial monads}, author = {GAMBINO, NICOLA and KOCK, JOACHIM}, @@ -520,20 +534,6 @@ @article{GK12 issn = {1469-8064}, } -@article{HGK22, - title = {∞-Operads as Analytic Monads}, - author = {Gepner, David and Haugseng, Rune and Kock, Joachim}, - year = 2021, - month = {04}, - journal = {International Mathematics Research Notices}, - volume = 2022, - number = 16, - pages = {12516--12624}, - doi = {10.1093/imrn/rnaa332}, - issn = {1073-7928}, - eprint = {https://academic.oup.com/imrn/article-pdf/2022/16/12516/45280093/rnaa332.pdf}, -} - @book{Johnstone02, title = {Sketches of an Elephant a Topos Theory Compendium}, author = {Johnstone, Peter T}, diff --git a/src/foundation-core/pullbacks.lagda.md b/src/foundation-core/pullbacks.lagda.md index 60c3346407..78f9f1379c 100644 --- a/src/foundation-core/pullbacks.lagda.md +++ b/src/foundation-core/pullbacks.lagda.md @@ -548,7 +548,11 @@ module _ ( map-fiber-vertical-map-cone ( j ∘ i) h (pasting-horizontal-cone i j h right left) x) ( map-fiber-vertical-map-cone j h right (i x)) - ( map-fiber-vertical-map-cone i (vertical-map-cone j h right) left x) + ( map-fiber-vertical-map-cone + ( i) + ( vertical-map-cone j h right) + ( left) + ( x)) ( preserves-pasting-horizontal-map-fiber-vertical-map-cone ( i) ( j) @@ -583,7 +587,11 @@ module _ ( map-fiber-vertical-map-cone ( j ∘ i) h (pasting-horizontal-cone i j h right left) x) ( map-fiber-vertical-map-cone j h right (i x)) - ( map-fiber-vertical-map-cone i (vertical-map-cone j h right) left x) + ( map-fiber-vertical-map-cone + ( i) + ( vertical-map-cone j h right) + ( left) + ( x)) ( preserves-pasting-horizontal-map-fiber-vertical-map-cone ( i) ( j) diff --git a/src/foundation.lagda.md b/src/foundation.lagda.md index f23ecc41cf..6da8339e48 100644 --- a/src/foundation.lagda.md +++ b/src/foundation.lagda.md @@ -489,6 +489,7 @@ open import foundation.univalence public open import foundation.univalence-implies-function-extensionality public open import foundation.univalent-type-families public open import foundation.universal-property-booleans public +open import foundation.universal-property-cartesian-morphisms-arrows public open import foundation.universal-property-cartesian-product-types public open import foundation.universal-property-contractible-types public open import foundation.universal-property-coproduct-types public diff --git a/src/foundation/cartesian-morphisms-arrows.lagda.md b/src/foundation/cartesian-morphisms-arrows.lagda.md index 809a00b83c..288eadafba 100644 --- a/src/foundation/cartesian-morphisms-arrows.lagda.md +++ b/src/foundation/cartesian-morphisms-arrows.lagda.md @@ -11,23 +11,21 @@ open import foundation.action-on-identifications-functions open import foundation.commuting-triangles-of-maps open import foundation.commuting-triangles-of-morphisms-arrows open import foundation.cones-over-cospan-diagrams +open import foundation.contractible-types open import foundation.coproducts-pullbacks open import foundation.dependent-pair-types open import foundation.dependent-products-pullbacks open import foundation.dependent-sums-pullbacks -open import foundation.transport-along-identifications open import foundation.diagonal-maps-cartesian-products-of-types open import foundation.equivalences -open import foundation.function-extensionality open import foundation.fibers-of-maps -open import foundation.contractible-types -open import foundation.torsorial-type-families -open import foundation.homotopies +open import foundation.function-extensionality open import foundation.function-types open import foundation.functoriality-cartesian-product-types open import foundation.functoriality-coproduct-types open import foundation.functoriality-dependent-pair-types open import foundation.functoriality-fibers-of-maps +open import foundation.homotopies open import foundation.homotopies-morphisms-arrows open import foundation.identity-types open import foundation.morphisms-arrows @@ -36,12 +34,13 @@ open import foundation.postcomposition-pullbacks open import foundation.products-pullbacks open import foundation.pullbacks open import foundation.standard-pullbacks +open import foundation.torsorial-type-families +open import foundation.transport-along-identifications open import foundation.unit-type open import foundation.universe-levels open import foundation.whiskering-homotopies-composition open import foundation-core.commuting-squares-of-maps -open import foundation-core.homotopies open import foundation-core.propositions open import foundation-core.universal-property-pullbacks ``` @@ -135,12 +134,12 @@ module _ cone-cartesian-hom-arrow = cone-hom-arrow f g hom-arrow-cartesian-hom-arrow - universal-property-cartesian-hom-arrow : + up-pullback-cartesian-hom-arrow : universal-property-pullback ( map-codomain-cartesian-hom-arrow) ( g) ( cone-cartesian-hom-arrow) - universal-property-cartesian-hom-arrow = + up-pullback-cartesian-hom-arrow = universal-property-pullback-is-pullback ( map-codomain-cartesian-hom-arrow) ( g) @@ -880,316 +879,6 @@ module _ ( is-cartesian-cartesian-hom-arrow f g α) ``` -### Lifting cartesian morphisms along lifts of the codomain - -Suppose given a cospan diagram of arrows - -```text - A ------> C <------ B - | | ⌞ | - f | α h β | g - ∨ ∨ ∨ - A' -----> C' <----- B' -``` - -where `β` is cartesian. Moreover, suppose we have a map `i : A' → B'` from the -codomain of the source of `α` to the codomain of the source of `β` such that the -triangle - -```text - i - A' ---> B' - \ / - \ / - ∨ ∨ - C' -``` - -commutes. Then there is a unique morphism of arrows `γ : f → g` with a homotopy -`β ~ α ∘ γ` extending the triangle, and this morphism is cartesian if and only -if `α` is. - -**Proof.** The unique existence of `γ` and the homotopy follows from the -pullback property of `β`. The rest is a reiteration of the 3-for-2 property of -cartesian morphisms. ∎ - -We begin by constructing the commuting triangle of morphisms of arrows: - -```agda -module _ - {l1 l2 l3 l4 l5 l6 : Level} - {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} - (f : A → A') (g : B → B') (h : C → C') - (β : cartesian-hom-arrow g h) - (α : hom-arrow f h) - (i : A' → B') - (H : - coherence-triangle-maps' - ( map-codomain-hom-arrow f h α) - ( map-codomain-cartesian-hom-arrow g h β) - ( i)) - where - - cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow : - cone (map-codomain-cartesian-hom-arrow g h β) h A - cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow = - ( i ∘ f , map-domain-hom-arrow f h α , H ·r f ∙h coh-hom-arrow f h α) - - map-domain-hom-arrow-lift-map-codomain-cartesian-hom-arrow : A → B - map-domain-hom-arrow-lift-map-codomain-cartesian-hom-arrow = - gap-is-pullback - ( map-codomain-cartesian-hom-arrow g h β) - ( h) - ( cone-cartesian-hom-arrow g h β) - ( is-cartesian-cartesian-hom-arrow g h β) - ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow) - - hom-arrow-lift-map-codomain-cartesian-hom-arrow : hom-arrow f g - pr1 hom-arrow-lift-map-codomain-cartesian-hom-arrow = - map-domain-hom-arrow-lift-map-codomain-cartesian-hom-arrow - pr1 (pr2 hom-arrow-lift-map-codomain-cartesian-hom-arrow) = i - pr2 (pr2 hom-arrow-lift-map-codomain-cartesian-hom-arrow) = - inv-htpy - ( htpy-vertical-map-gap-is-pullback - ( map-codomain-cartesian-hom-arrow g h β) - ( h) - ( cone-cartesian-hom-arrow g h β) - ( is-cartesian-cartesian-hom-arrow g h β) - ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow)) - - abstract - inv-coherence-triangle-hom-arrow-lift-map-codomain-cartesian-hom-arrow : - coherence-triangle-hom-arrow' f g h - ( α) - ( hom-arrow-cartesian-hom-arrow g h β) - ( hom-arrow-lift-map-codomain-cartesian-hom-arrow) - inv-coherence-triangle-hom-arrow-lift-map-codomain-cartesian-hom-arrow = - ( htpy-horizontal-map-gap-is-pullback - ( map-codomain-cartesian-hom-arrow g h β) - ( h) - ( cone-cartesian-hom-arrow g h β) - ( is-cartesian-cartesian-hom-arrow g h β) - ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow)) , - ( H) , - ( ( ap-concat-htpy' - ( ( h) ·l - ( htpy-horizontal-map-gap-is-pullback - ( map-codomain-cartesian-hom-arrow g h β) - ( h) - ( cone-cartesian-hom-arrow g h β) - ( pr2 β) - ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow))) - ( ap-concat-htpy' - ( coh-cartesian-hom-arrow g h β ·r - map-domain-hom-arrow-lift-map-codomain-cartesian-hom-arrow) - ( left-whisker-inv-htpy - ( map-codomain-cartesian-hom-arrow g h β) - ( htpy-vertical-map-gap-is-pullback - ( map-codomain-cartesian-hom-arrow g h β) - ( h) - ( cone-cartesian-hom-arrow g h β) - ( pr2 β) - ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow))))) ∙h - ( assoc-htpy - ( inv-htpy - ( ( map-codomain-cartesian-hom-arrow g h β) ·l - ( htpy-vertical-map-gap-is-pullback - ( map-codomain-cartesian-hom-arrow g h β) - ( h) - ( cone-cartesian-hom-arrow g h β) - ( pr2 β) - ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow)))) - ( coh-cartesian-hom-arrow g h β ·r - map-domain-hom-arrow-lift-map-codomain-cartesian-hom-arrow) - ( ( h) ·l - ( htpy-horizontal-map-gap-is-pullback - ( map-codomain-cartesian-hom-arrow g h β) - ( h) - ( cone-cartesian-hom-arrow g h β) - ( pr2 β) - ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow)))) ∙h - ( inv-htpy-left-transpose-htpy-concat - ( ( map-codomain-cartesian-hom-arrow g h β) ·l - ( htpy-vertical-map-gap-is-pullback - ( map-codomain-cartesian-hom-arrow g h β) - ( h) - ( cone-cartesian-hom-arrow g h β) - ( pr2 β) - ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow))) - ( H ·r f ∙h coh-hom-arrow f h α) - ( ( coh-cartesian-hom-arrow g h β ·r - map-domain-hom-arrow-lift-map-codomain-cartesian-hom-arrow) ∙h - ( h) ·l - ( htpy-horizontal-map-gap-is-pullback - ( map-codomain-cartesian-hom-arrow g h β) - ( h) - ( cone-cartesian-hom-arrow g h β) - ( is-cartesian-cartesian-hom-arrow g h β) - ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow))) - ( inv-htpy - ( coh-htpy-cone-gap-is-pullback - ( map-codomain-cartesian-hom-arrow g h β) - ( h) - ( cone-cartesian-hom-arrow g h β) - ( is-cartesian-cartesian-hom-arrow g h β) - ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow))))) - - coherence-triangle-hom-arrow-lift-map-codomain-cartesian-hom-arrow : - coherence-triangle-hom-arrow f g h - ( α) - ( hom-arrow-cartesian-hom-arrow g h β) - ( hom-arrow-lift-map-codomain-cartesian-hom-arrow) - coherence-triangle-hom-arrow-lift-map-codomain-cartesian-hom-arrow = - inv-htpy-hom-arrow f h - ( comp-hom-arrow f g h - ( hom-arrow-cartesian-hom-arrow g h β) - ( hom-arrow-lift-map-codomain-cartesian-hom-arrow)) - ( α) - ( inv-coherence-triangle-hom-arrow-lift-map-codomain-cartesian-hom-arrow) -``` - -This lift is unique. - - - -```agda -module _ - {l1 l2 l3 l4 l5 l6 : Level} - {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} - (f : A → A') (g : B → B') (h : C → C') - (β : cartesian-hom-arrow g h) - (α : hom-arrow f h) - (i : A' → B') - (H : - coherence-triangle-maps' - ( map-codomain-hom-arrow f h α) - ( map-codomain-cartesian-hom-arrow g h β) - ( i)) - where - - abstract - uniqueness-lift-map-codomain-cartesian-hom-arrow : - is-torsorial - ( λ (j : A → B) → - Σ ( coherence-hom-arrow f g j i) - ( λ J → - Σ ( coherence-triangle-maps' - ( map-domain-hom-arrow f h α) - ( map-domain-cartesian-hom-arrow g h β) - ( j)) - ( λ K → - coherence-htpy-hom-arrow f h - ( comp-hom-arrow f g h - ( hom-arrow-cartesian-hom-arrow g h β) - ( j , i , J)) - ( α) - ( K) - ( H)))) - uniqueness-lift-map-codomain-cartesian-hom-arrow = - is-contr-equiv _ - ( equiv-tot - ( λ j → - equiv-Σ _ - ( equiv-inv-htpy (i ∘ f) (g ∘ j)) - ( λ J → - equiv-tot - ( λ K → - equivalence-reasoning - ( ( map-codomain-cartesian-hom-arrow g h β ·l J) ∙h - ( coh-cartesian-hom-arrow g h β ·r j) ∙h - ( h ·l K) ~ - ( H ·r f) ∙h - ( coh-hom-arrow f h α)) - ≃ ( ( map-codomain-cartesian-hom-arrow g h β ·l J) ∙h - ( ( coh-cartesian-hom-arrow g h β ·r j) ∙h - ( h ·l K)) ~ - ( H ·r f) ∙h - ( coh-hom-arrow f h α)) - by - equiv-tr - ( λ Q → Q ~ ( H ·r f) ∙h ( coh-hom-arrow f h α)) - ( eq-htpy - ( assoc-htpy - ( map-codomain-cartesian-hom-arrow g h β ·l J) - ( coh-cartesian-hom-arrow g h β ·r j) - ( h ·l K))) - ≃ ( ( coh-cartesian-hom-arrow g h β ·r j) ∙h (h ·l K) ~ - ( inv-htpy - ( map-codomain-cartesian-hom-arrow g h β ·l J)) ∙h - ( ( H ·r f) ∙h (coh-hom-arrow f h α))) - by - equiv-left-transpose-htpy-concat - ( map-codomain-cartesian-hom-arrow g h β ·l J) - ( ( coh-cartesian-hom-arrow g h β ·r j) ∙h (h ·l K)) - ( ( H ·r f) ∙h (coh-hom-arrow f h α)) - ≃ ( ( coh-cartesian-hom-arrow g h β ·r j) ∙h (h ·l K) ~ - ( ( map-codomain-cartesian-hom-arrow g h β) ·l - ( inv-htpy J)) ∙h - ( ( H ·r f) ∙h (coh-hom-arrow f h α))) - by - equiv-tr - ( λ Q → - (coh-cartesian-hom-arrow g h β ·r j) ∙h (h ·l K) ~ - Q ∙h ((H ·r f) ∙h (coh-hom-arrow f h α))) - ( inv - ( eq-htpy - ( left-whisker-inv-htpy - ( map-codomain-cartesian-hom-arrow g h β) - ( J)))))))) - ( uniqueness-universal-property-pullback - ( map-codomain-cartesian-hom-arrow g h β) - ( h) - ( cone-cartesian-hom-arrow g h β) - ( universal-property-cartesian-hom-arrow g h β) - ( A) - ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow f g h β α i H)) -``` - -Now, if `α` was cartesian to begin with, the lift is also. - -```agda -module _ - {l1 l2 l3 l4 l5 l6 : Level} - {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} - (f : A → A') (g : B → B') (h : C → C') - (β : cartesian-hom-arrow g h) - (α : cartesian-hom-arrow f h) - (i : A' → B') - (H : - coherence-triangle-maps' - ( map-codomain-cartesian-hom-arrow f h α) - ( map-codomain-cartesian-hom-arrow g h β) - ( i)) - where - - abstract - is-cartesian-cartesian-hom-arrow-lift-map-codomain-cartesian-hom-arrow : - is-cartesian-hom-arrow f g - ( hom-arrow-lift-map-codomain-cartesian-hom-arrow f g h - ( β) - ( hom-arrow-cartesian-hom-arrow f h α) - ( i) - ( H)) - is-cartesian-cartesian-hom-arrow-lift-map-codomain-cartesian-hom-arrow = - is-cartesian-top-cartesian-hom-arrow-triangle' f g h - ( hom-arrow-lift-map-codomain-cartesian-hom-arrow f g h - ( β) - ( hom-arrow-cartesian-hom-arrow f h α) - ( i) - ( H)) - ( α) - ( β) - ( inv-coherence-triangle-hom-arrow-lift-map-codomain-cartesian-hom-arrow - ( f) g h β (hom-arrow-cartesian-hom-arrow f h α) i H) - - cartesian-hom-arrow-lift-map-codomain-cartesian-hom-arrow : - cartesian-hom-arrow f g - cartesian-hom-arrow-lift-map-codomain-cartesian-hom-arrow = - ( hom-arrow-lift-map-codomain-cartesian-hom-arrow - ( f) g h β (hom-arrow-cartesian-hom-arrow f h α) i H) , - ( is-cartesian-cartesian-hom-arrow-lift-map-codomain-cartesian-hom-arrow) -``` - ## See also - [Cocartesian morphisms of arrows](synthetic-homotopy-theory.cocartesian-morphisms-arrows.md) diff --git a/src/foundation/lifts-morphisms-arrows.lagda.md b/src/foundation/lifts-morphisms-arrows.lagda.md index 18feb7e14c..aa2f4f318a 100644 --- a/src/foundation/lifts-morphisms-arrows.lagda.md +++ b/src/foundation/lifts-morphisms-arrows.lagda.md @@ -7,12 +7,12 @@ module foundation.lifts-morphisms-arrows where
Imports ```agda +open import foundation.commuting-triangles-of-maps open import foundation.commuting-triangles-of-morphisms-arrows open import foundation.dependent-pair-types -open import foundation.morphisms-arrows open import foundation.homotopies-morphisms-arrows +open import foundation.morphisms-arrows open import foundation.universe-levels -open import foundation.commuting-triangles-of-maps ```
diff --git a/src/foundation/subuniverses.lagda.md b/src/foundation/subuniverses.lagda.md index 2a19ec8bfd..b655d7cafc 100644 --- a/src/foundation/subuniverses.lagda.md +++ b/src/foundation/subuniverses.lagda.md @@ -90,7 +90,8 @@ module _ Σ (type-subuniverse P) (λ Y → inclusion-subuniverse P Y ≃ X) is-proof-irrelevant-is-essentially-in-subuniverse : - {l3 : Level} (X : UU l3) → is-proof-irrelevant (is-essentially-in-subuniverse X) + {l3 : Level} (X : UU l3) → + is-proof-irrelevant (is-essentially-in-subuniverse X) is-proof-irrelevant-is-essentially-in-subuniverse X ((X' , p) , e) = is-torsorial-Eq-subtype ( is-contr-equiv' diff --git a/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md b/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md new file mode 100644 index 0000000000..d379555370 --- /dev/null +++ b/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md @@ -0,0 +1,611 @@ +# The universal property of cartesian morphisms of arrows + +```agda +module foundation.universal-property-cartesian-morphisms-arrows where +``` + +
Imports + +```agda +open import foundation.action-on-identifications-functions +open import foundation.cartesian-morphisms-arrows +open import foundation.commuting-triangles-of-maps +open import foundation.commuting-triangles-of-morphisms-arrows +open import foundation.cones-over-cospan-diagrams +open import foundation.contractible-types +open import foundation.coproducts-pullbacks +open import foundation.dependent-pair-types +open import foundation.dependent-products-pullbacks +open import foundation.dependent-sums-pullbacks +open import foundation.diagonal-maps-cartesian-products-of-types +open import foundation.equivalences +open import foundation.fibers-of-maps +open import foundation.function-extensionality +open import foundation.function-types +open import foundation.functoriality-cartesian-product-types +open import foundation.functoriality-coproduct-types +open import foundation.functoriality-dependent-pair-types +open import foundation.functoriality-fibers-of-maps +open import foundation.homotopies +open import foundation.homotopies-morphisms-arrows +open import foundation.identity-types +open import foundation.lifts-morphisms-arrows +open import foundation.morphisms-arrows +open import foundation.postcomposition-functions +open import foundation.postcomposition-pullbacks +open import foundation.products-pullbacks +open import foundation.pullbacks +open import foundation.standard-pullbacks +open import foundation.torsorial-type-families +open import foundation.transport-along-identifications +open import foundation.unit-type +open import foundation.universe-levels +open import foundation.whiskering-homotopies-composition + +open import foundation-core.commuting-squares-of-maps +open import foundation-core.propositions +open import foundation-core.universal-property-pullbacks + +open import orthogonal-factorization-systems.lifts-maps +``` + +
+ +## Idea + +A [morphism of arrows](foundation.morphisms-arrows.md) `β : g ⇒ h`, + +```text + β₀ + B ------> C + | | + g | H | h + ∨ ∨ + B' -----> C', + β₁ +``` + +is said to satisfy the +{{#concept "universal property" Disambiguation="cartesian morphisms of arrows"}} +of cartesian morphisms of arrows if the natural map that assigns to every +extension diagram of the form + +```text + B + ∧ | \ + / | \ + / g ∨ + A --------> C + | | | + | ∨ H | + f | B' | h + | ∧ \β₁ | + | / \ | + ∨ / ∨ ∨ + A' -------> C' +``` + +the underlying data + +```text + A --------> C + | | + | H | + f | B' | h + | ∧ \β₁ | + | i/ \ | + ∨ / ∨ ∨ + A' -------> C' +``` + +is an equivalence. + +## Definitions + +```agda +lift-codomain-lift-hom-arrow : + {l1 l2 l3 l4 l5 l6 : Level} + {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} + (f : A → A') (g : B → B') (h : C → C') + (α : hom-arrow f h) (β : hom-arrow g h) → + lift-hom-arrow f g h α β → + lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α) +lift-codomain-lift-hom-arrow f g h α β γ = + ( map-codomain-lift-hom-arrow f g h α β γ , + coh-codomain-lift-hom-arrow f g h α β γ) +``` + +### The universal property of cartesian morphisms of arrows + +```agda +universal-property-cartesian-hom-arrow-Level : + (l1 l2 : Level) {l3 l4 l5 l6 : Level} + {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} + (g : B → B') (h : C → C') (β : hom-arrow g h) → + UU (lsuc l1 ⊔ lsuc l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6) +universal-property-cartesian-hom-arrow-Level l1 l2 g h β = + {A : UU l1} {A' : UU l2} (f : A → A') (α : hom-arrow f h) → + is-equiv (lift-codomain-lift-hom-arrow f g h α β) + +universal-property-cartesian-hom-arrow : + {l3 l4 l5 l6 : Level} + {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} + (g : B → B') (h : C → C') (β : hom-arrow g h) → + UUω +universal-property-cartesian-hom-arrow g h β = + {l1 l2 : Level} → universal-property-cartesian-hom-arrow-Level l1 l2 g h β +``` + +## Properties + +### Computing the fibers of `lift-codomain-lift-hom-arrow` + +```agda +module _ + {l1 l2 l3 l4 l5 l6 : Level} + {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} + (f : A → A') (g : B → B') (h : C → C') + (α : hom-arrow f h) (β : hom-arrow g h) + where + + family-fiber-lift-codomain-lift-hom-arrow : + lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α) → + (A → B) → UU (l1 ⊔ l4 ⊔ l5 ⊔ l6) + family-fiber-lift-codomain-lift-hom-arrow (i , I) j = + Σ (coherence-hom-arrow f g j i) + ( λ H → + Σ ( coherence-triangle-maps + ( map-domain-hom-arrow f h α) + ( map-domain-hom-arrow g h β) + ( j)) + ( λ J → + coherence-htpy-hom-arrow f h α + ( comp-hom-arrow f g h β (j , i , H)) + ( J) + ( I))) + + fiber-lift-codomain-lift-hom-arrow : + lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α) → + UU (l1 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6) + fiber-lift-codomain-lift-hom-arrow i = + Σ (A → B) (family-fiber-lift-codomain-lift-hom-arrow i) +``` + +> The explicit equivalence remains to be written out. + +### Uniqueness of lifts of cartesian morphisms + +Given a cartesian morphism of arrows, then lifts are unique. + + + +```agda +module _ + {l1 l2 l3 l4 l5 l6 : Level} + {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} + (f : A → A') (g : B → B') (h : C → C') + (α : hom-arrow f h) (β : hom-arrow g h) + ((i , I) : lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α)) + where + + abstract + equiv-htpy-cone-family-fiber-lift-codomain-lift-hom-arrow : + (j : A → B) → + family-fiber-lift-codomain-lift-hom-arrow f g h α β (i , I) j ≃ + htpy-cone (map-codomain-hom-arrow g h β) h + ( g ∘ j , + map-domain-hom-arrow g h β ∘ j , + coh-hom-arrow g h β ·r j) + ( i ∘ f , + map-domain-hom-arrow f h α , + inv-htpy I ·r f ∙h coh-hom-arrow f h α) + equiv-htpy-cone-family-fiber-lift-codomain-lift-hom-arrow j = + equiv-Σ _ + ( equiv-inv-htpy (i ∘ f) (g ∘ j)) + ( λ H → + equiv-Σ _ + ( equiv-inv-htpy (pr1 α) (pr1 β ∘ j)) + ( λ J → + equivalence-reasoning + ( ( coh-hom-arrow f h α ∙h h ·l J) ~ + ( I ·r f) ∙h + ( ( map-codomain-hom-arrow g h β ·l H) ∙h + ( coh-hom-arrow g h β ·r j))) + ≃ ( ( I ·r f) ∙h + ( ( map-codomain-hom-arrow g h β ·l H) ∙h + ( coh-hom-arrow g h β ·r j)) ~ + ( coh-hom-arrow f h α ∙h h ·l J)) + by equiv-inv-htpy _ _ + ≃ ( ( map-codomain-hom-arrow g h β ·l H) ∙h + ( coh-hom-arrow g h β ·r j) ~ + ( inv-htpy I ·r f) ∙h (coh-hom-arrow f h α ∙h h ·l J)) + by + equiv-left-transpose-htpy-concat + ( I ·r f) + ( ( map-codomain-hom-arrow g h β ·l H) ∙h + ( coh-hom-arrow g h β ·r j)) + ( coh-hom-arrow f h α ∙h h ·l J) + ≃ ( ( coh-hom-arrow g h β ·r j) ~ + ( inv-htpy (map-codomain-hom-arrow g h β ·l H)) ∙h + ( inv-htpy I ·r f ∙h (coh-hom-arrow f h α ∙h h ·l J))) + by + equiv-left-transpose-htpy-concat + ( map-codomain-hom-arrow g h β ·l H) + ( coh-hom-arrow g h β ·r j) + ( inv-htpy I ·r f ∙h (coh-hom-arrow f h α ∙h h ·l J)) + ≃ ( ( coh-hom-arrow g h β ·r j) ~ + ( map-codomain-hom-arrow g h β ·l (inv-htpy H)) ∙h + ( inv-htpy I ·r f ∙h (coh-hom-arrow f h α ∙h h ·l J))) + by + equiv-tr + ( λ Q → + coh-hom-arrow g h β ·r j ~ + Q ∙h (inv-htpy I ·r f ∙h (coh-hom-arrow f h α ∙h h ·l J))) + ( inv + ( eq-htpy + ( left-whisker-inv-htpy + ( map-codomain-hom-arrow g h β) H))) + ≃ ( ( coh-hom-arrow g h β ·r j) ~ + ( ( map-codomain-hom-arrow g h β ·l (inv-htpy H)) ∙h + ( inv-htpy I ·r f ∙h (coh-hom-arrow f h α))) ∙h + ( h ·l J)) + by + equiv-tr + ( coh-hom-arrow g h β ·r j ~_) + ( ( ap + ( map-codomain-hom-arrow g h β ·l (inv-htpy H) ∙h_) + ( eq-htpy + ( inv-htpy-assoc-htpy + ( inv-htpy I ·r f) + ( coh-hom-arrow f h α) + ( h ·l J)))) ∙ + ( eq-htpy + ( inv-htpy-assoc-htpy + ( map-codomain-hom-arrow g h β ·l (inv-htpy H)) + ( inv-htpy I ·r f ∙h (coh-hom-arrow f h α)) + ( h ·l J)))) + ≃ ( ( coh-hom-arrow g h β ·r j) ∙h (inv-htpy (h ·l J)) ~ + ( map-codomain-hom-arrow g h β ·l (inv-htpy H)) ∙h + ( (inv-htpy I ·r f) ∙h (coh-hom-arrow f h α))) + by + equiv-right-transpose-htpy-concat' + ( coh-hom-arrow g h β ·r j) + ( ( map-codomain-hom-arrow g h β ·l (inv-htpy H)) ∙h + ( inv-htpy I ·r f ∙h (coh-hom-arrow f h α))) + ( h ·l J) + ≃ ( ( coh-hom-arrow g h β ·r j) ∙h (h ·l inv-htpy J) ~ + ( map-codomain-hom-arrow g h β ·l inv-htpy H) ∙h + ( ( inv-htpy I ·r f) ∙h (coh-hom-arrow f h α))) + by + equiv-tr + ( λ Q → + ( coh-hom-arrow g h β ·r j) ∙h Q ~ + ( map-codomain-hom-arrow g h β ·l inv-htpy H) ∙h + ( ( inv-htpy I ·r f) ∙h (coh-hom-arrow f h α))) + ( inv (eq-htpy (left-whisker-inv-htpy h J))))) + + abstract + uniqueness-lift-map-codomain-is-cartesian-hom-arrow : + is-cartesian-hom-arrow g h β → + is-torsorial (family-fiber-lift-codomain-lift-hom-arrow f g h α β (i , I)) + uniqueness-lift-map-codomain-is-cartesian-hom-arrow H = + is-contr-equiv _ + ( equiv-tot equiv-htpy-cone-family-fiber-lift-codomain-lift-hom-arrow) + ( uniqueness-universal-property-pullback + ( map-codomain-hom-arrow g h β) + ( h) + ( cone-hom-arrow g h β) + ( up-pullback-cartesian-hom-arrow g h (β , H)) + ( A) + ( _)) +``` + + + +> What follows is another computation of the same. Should be deleted. + +```agda +module _ + {l1 l2 l3 l4 l5 l6 : Level} + {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} + (f : A → A') (g : B → B') (h : C → C') + (β : cartesian-hom-arrow g h) + (α : hom-arrow f h) + (i : A' → B') + (H : + coherence-triangle-maps' + ( map-codomain-hom-arrow f h α) + ( map-codomain-cartesian-hom-arrow g h β) + ( i)) + where + + abstract + uniqueness-lift-map-codomain-cartesian-hom-arrow' : + is-torsorial + ( λ (j : A → B) → + Σ ( coherence-hom-arrow f g j i) + ( λ J → + Σ ( coherence-triangle-maps' + ( map-domain-hom-arrow f h α) + ( map-domain-cartesian-hom-arrow g h β) + ( j)) + ( λ K → + coherence-htpy-hom-arrow f h + ( comp-hom-arrow f g h + ( hom-arrow-cartesian-hom-arrow g h β) + ( j , i , J)) + ( α) + ( K) + ( H)))) + uniqueness-lift-map-codomain-cartesian-hom-arrow' = + is-contr-equiv ((Σ (A → B) λ j → htpy-cone (map-codomain-cartesian-hom-arrow g h β) h ((λ z → g (j z)) , (λ z → pr1 (pr1 β) (j z)) , (λ x → pr2 (pr2 (pr1 β)) (j x))) ((λ z → i (f z)) , pr1 α , H ·r f ∙h coh-hom-arrow f h α))) + ( equiv-tot + ( λ j → + equiv-Σ _ + ( equiv-inv-htpy (i ∘ f) (g ∘ j)) + ( λ J → + equiv-tot + ( λ K → + equivalence-reasoning + ( ( map-codomain-cartesian-hom-arrow g h β ·l J) ∙h + ( coh-cartesian-hom-arrow g h β ·r j) ∙h + ( h ·l K) ~ + ( H ·r f) ∙h + ( coh-hom-arrow f h α)) + ≃ ( ( map-codomain-cartesian-hom-arrow g h β ·l J) ∙h + ( ( coh-cartesian-hom-arrow g h β ·r j) ∙h + ( h ·l K)) ~ + ( H ·r f) ∙h + ( coh-hom-arrow f h α)) + by + equiv-tr + ( λ Q → Q ~ ( H ·r f) ∙h ( coh-hom-arrow f h α)) + ( eq-htpy + ( assoc-htpy + ( map-codomain-cartesian-hom-arrow g h β ·l J) + ( coh-cartesian-hom-arrow g h β ·r j) + ( h ·l K))) + ≃ ( ( coh-cartesian-hom-arrow g h β ·r j) ∙h (h ·l K) ~ + ( inv-htpy + ( map-codomain-cartesian-hom-arrow g h β ·l J)) ∙h + ( ( H ·r f) ∙h (coh-hom-arrow f h α))) + by + equiv-left-transpose-htpy-concat + ( map-codomain-cartesian-hom-arrow g h β ·l J) + ( ( coh-cartesian-hom-arrow g h β ·r j) ∙h (h ·l K)) + ( ( H ·r f) ∙h (coh-hom-arrow f h α)) + ≃ ( ( coh-cartesian-hom-arrow g h β ·r j) ∙h (h ·l K) ~ + ( ( map-codomain-cartesian-hom-arrow g h β) ·l + ( inv-htpy J)) ∙h + ( ( H ·r f) ∙h (coh-hom-arrow f h α))) + by + equiv-tr + ( λ Q → + (coh-cartesian-hom-arrow g h β ·r j) ∙h (h ·l K) ~ + Q ∙h ((H ·r f) ∙h (coh-hom-arrow f h α))) + ( inv + ( eq-htpy + ( left-whisker-inv-htpy + ( map-codomain-cartesian-hom-arrow g h β) + ( J)))))))) + ( uniqueness-universal-property-pullback + ( map-codomain-cartesian-hom-arrow g h β) + ( h) + ( cone-cartesian-hom-arrow g h β) + ( up-pullback-cartesian-hom-arrow g h β) + ( A) + ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow f g h β α i H)) +``` + +### Lifting cartesian morphisms along lifts of the codomain + +Suppose given a cospan diagram of arrows + +```text + A ------> C <------ B + | | ⌞ | + f | α h β | g + ∨ ∨ ∨ + A' -----> C' <----- B' +``` + +where `β` is cartesian. Moreover, suppose we have a map `i : A' → B'` from the +codomain of the source of `α` to the codomain of the source of `β` such that the +triangle + +```text + i + A' ---> B' + \ / + \ / + ∨ ∨ + C' +``` + +commutes. Then there is a unique morphism of arrows `γ : f → g` with a homotopy +`β ~ α ∘ γ` extending the triangle, and this morphism is cartesian if and only +if `α` is. + +**Proof.** The unique existence of `γ` and the homotopy follows from the +pullback property of `β`. The rest is a reiteration of the 3-for-2 property of +cartesian morphisms. ∎ + +We begin by constructing the commuting triangle of morphisms of arrows: + +```agda +module _ + {l1 l2 l3 l4 l5 l6 : Level} + {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} + (f : A → A') (g : B → B') (h : C → C') + (β : cartesian-hom-arrow g h) + (α : hom-arrow f h) + (i : A' → B') + (H : + coherence-triangle-maps' + ( map-codomain-hom-arrow f h α) + ( map-codomain-cartesian-hom-arrow g h β) + ( i)) + where + + cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow : + cone (map-codomain-cartesian-hom-arrow g h β) h A + cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow = + ( i ∘ f , map-domain-hom-arrow f h α , H ·r f ∙h coh-hom-arrow f h α) + + map-domain-hom-arrow-lift-map-codomain-cartesian-hom-arrow : A → B + map-domain-hom-arrow-lift-map-codomain-cartesian-hom-arrow = + gap-is-pullback + ( map-codomain-cartesian-hom-arrow g h β) + ( h) + ( cone-cartesian-hom-arrow g h β) + ( is-cartesian-cartesian-hom-arrow g h β) + ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow) + + hom-arrow-lift-map-codomain-cartesian-hom-arrow : hom-arrow f g + pr1 hom-arrow-lift-map-codomain-cartesian-hom-arrow = + map-domain-hom-arrow-lift-map-codomain-cartesian-hom-arrow + pr1 (pr2 hom-arrow-lift-map-codomain-cartesian-hom-arrow) = i + pr2 (pr2 hom-arrow-lift-map-codomain-cartesian-hom-arrow) = + inv-htpy + ( htpy-vertical-map-gap-is-pullback + ( map-codomain-cartesian-hom-arrow g h β) + ( h) + ( cone-cartesian-hom-arrow g h β) + ( is-cartesian-cartesian-hom-arrow g h β) + ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow)) + + abstract + inv-coherence-triangle-hom-arrow-lift-map-codomain-cartesian-hom-arrow : + coherence-triangle-hom-arrow' f g h + ( α) + ( hom-arrow-cartesian-hom-arrow g h β) + ( hom-arrow-lift-map-codomain-cartesian-hom-arrow) + inv-coherence-triangle-hom-arrow-lift-map-codomain-cartesian-hom-arrow = + ( htpy-horizontal-map-gap-is-pullback + ( map-codomain-cartesian-hom-arrow g h β) + ( h) + ( cone-cartesian-hom-arrow g h β) + ( is-cartesian-cartesian-hom-arrow g h β) + ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow)) , + ( H) , + ( ( ap-concat-htpy' + ( ( h) ·l + ( htpy-horizontal-map-gap-is-pullback + ( map-codomain-cartesian-hom-arrow g h β) + ( h) + ( cone-cartesian-hom-arrow g h β) + ( pr2 β) + ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow))) + ( ap-concat-htpy' + ( coh-cartesian-hom-arrow g h β ·r + map-domain-hom-arrow-lift-map-codomain-cartesian-hom-arrow) + ( left-whisker-inv-htpy + ( map-codomain-cartesian-hom-arrow g h β) + ( htpy-vertical-map-gap-is-pullback + ( map-codomain-cartesian-hom-arrow g h β) + ( h) + ( cone-cartesian-hom-arrow g h β) + ( pr2 β) + ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow))))) ∙h + ( assoc-htpy + ( inv-htpy + ( ( map-codomain-cartesian-hom-arrow g h β) ·l + ( htpy-vertical-map-gap-is-pullback + ( map-codomain-cartesian-hom-arrow g h β) + ( h) + ( cone-cartesian-hom-arrow g h β) + ( pr2 β) + ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow)))) + ( coh-cartesian-hom-arrow g h β ·r + map-domain-hom-arrow-lift-map-codomain-cartesian-hom-arrow) + ( ( h) ·l + ( htpy-horizontal-map-gap-is-pullback + ( map-codomain-cartesian-hom-arrow g h β) + ( h) + ( cone-cartesian-hom-arrow g h β) + ( pr2 β) + ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow)))) ∙h + ( inv-htpy-left-transpose-htpy-concat + ( ( map-codomain-cartesian-hom-arrow g h β) ·l + ( htpy-vertical-map-gap-is-pullback + ( map-codomain-cartesian-hom-arrow g h β) + ( h) + ( cone-cartesian-hom-arrow g h β) + ( pr2 β) + ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow))) + ( H ·r f ∙h coh-hom-arrow f h α) + ( ( coh-cartesian-hom-arrow g h β ·r + map-domain-hom-arrow-lift-map-codomain-cartesian-hom-arrow) ∙h + ( h) ·l + ( htpy-horizontal-map-gap-is-pullback + ( map-codomain-cartesian-hom-arrow g h β) + ( h) + ( cone-cartesian-hom-arrow g h β) + ( is-cartesian-cartesian-hom-arrow g h β) + ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow))) + ( inv-htpy + ( coh-htpy-cone-gap-is-pullback + ( map-codomain-cartesian-hom-arrow g h β) + ( h) + ( cone-cartesian-hom-arrow g h β) + ( is-cartesian-cartesian-hom-arrow g h β) + ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow))))) + + coherence-triangle-hom-arrow-lift-map-codomain-cartesian-hom-arrow : + coherence-triangle-hom-arrow f g h + ( α) + ( hom-arrow-cartesian-hom-arrow g h β) + ( hom-arrow-lift-map-codomain-cartesian-hom-arrow) + coherence-triangle-hom-arrow-lift-map-codomain-cartesian-hom-arrow = + inv-htpy-hom-arrow f h + ( comp-hom-arrow f g h + ( hom-arrow-cartesian-hom-arrow g h β) + ( hom-arrow-lift-map-codomain-cartesian-hom-arrow)) + ( α) + ( inv-coherence-triangle-hom-arrow-lift-map-codomain-cartesian-hom-arrow) +``` + +Now, if `α` was cartesian to begin with, the lift is also. + +```agda +module _ + {l1 l2 l3 l4 l5 l6 : Level} + {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} + (f : A → A') (g : B → B') (h : C → C') + (β : cartesian-hom-arrow g h) + (α : cartesian-hom-arrow f h) + (i : A' → B') + (H : + coherence-triangle-maps' + ( map-codomain-cartesian-hom-arrow f h α) + ( map-codomain-cartesian-hom-arrow g h β) + ( i)) + where + + abstract + is-cartesian-cartesian-hom-arrow-lift-map-codomain-cartesian-hom-arrow : + is-cartesian-hom-arrow f g + ( hom-arrow-lift-map-codomain-cartesian-hom-arrow f g h + ( β) + ( hom-arrow-cartesian-hom-arrow f h α) + ( i) + ( H)) + is-cartesian-cartesian-hom-arrow-lift-map-codomain-cartesian-hom-arrow = + is-cartesian-top-cartesian-hom-arrow-triangle' f g h + ( hom-arrow-lift-map-codomain-cartesian-hom-arrow f g h + ( β) + ( hom-arrow-cartesian-hom-arrow f h α) + ( i) + ( H)) + ( α) + ( β) + ( inv-coherence-triangle-hom-arrow-lift-map-codomain-cartesian-hom-arrow + ( f) g h β (hom-arrow-cartesian-hom-arrow f h α) i H) + + cartesian-hom-arrow-lift-map-codomain-cartesian-hom-arrow : + cartesian-hom-arrow f g + cartesian-hom-arrow-lift-map-codomain-cartesian-hom-arrow = + ( hom-arrow-lift-map-codomain-cartesian-hom-arrow + ( f) g h β (hom-arrow-cartesian-hom-arrow f h α) i H) , + ( is-cartesian-cartesian-hom-arrow-lift-map-codomain-cartesian-hom-arrow) +``` diff --git a/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md index 3d1e32d549..2302731798 100644 --- a/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md +++ b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md @@ -29,9 +29,11 @@ open import foundation.morphisms-arrows open import foundation.precomposition-functions open import foundation.propositions open import foundation.pullbacks +open import foundation.raising-universe-levels open import foundation.sections open import foundation.structure-identity-principle open import foundation.transport-along-identifications +open import foundation.unit-type open import foundation.universe-levels open import foundation.whiskering-homotopies-composition @@ -158,6 +160,45 @@ module _ is-cartesian-cartesian-natural-transformation-polynomial-endofunctor = pr2 α ``` +### The criterion of being cartesian at terminal maps + +```agda +module _ + {l1 l2 l3 l4 l : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α : natural-transformation-polynomial-endofunctor l 𝑃 𝑄) + where + + is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor : + UU (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ lsuc l) + is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor = + {X : UU l} → + is-cartesian-hom-arrow + ( map-polynomial-endofunctor 𝑃 (raise-terminal-map X)) + ( map-polynomial-endofunctor 𝑄 (raise-terminal-map X)) + ( hom-arrow-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α + ( raise-terminal-map X)) + + is-prop-is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor : + is-prop + is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor + is-prop-is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor = + is-prop-implicit-Π + ( λ X → + is-prop-is-cartesian-hom-arrow + ( map-polynomial-endofunctor 𝑃 (raise-terminal-map X)) + ( map-polynomial-endofunctor 𝑄 (raise-terminal-map X)) + ( hom-arrow-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α + ( raise-terminal-map X))) + + is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor-Prop : + Prop (l1 ⊔ l2 ⊔ l3 ⊔ l4 ⊔ lsuc l) + is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor-Prop = + ( is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor , + is-prop-is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor) +``` + ### The associated family of cartesian morphisms of arrows ```agda @@ -236,3 +277,82 @@ module _ ( comp-natural-transformation-polynomial-endofunctor 𝑃 𝑄 𝑅 β' α' , is-cartesian-comp-cartesian-natural-transformation-polynomial-endofunctor) ``` + +### A natural transformation is cartesian if and only if it is cartesian at terminal maps + +**Proof.** One direction is trivial. For the other direction, given a natural +transformation of polynomial endofunctors $α : 𝑃 ⇒ 𝑄$ and an arbitrary function +$f : X → Y$, we have a morphism of arrows in the slice above $α_{*}$: + +```text + αX + 𝑃X -----------> 𝑄X → + \ ⌟ → 𝑃Y ---- \ ----> 𝑄Y + \ / ⌟ αY \ / + \ / \ / + ∨ ∨ ∨ ∨ + 𝑃* -----------> 𝑄* + α* +``` + +and so by the right-cancellation property of cartesian squares the naturality +square at $f$ is cartesian. ∎ + +```agda +module _ + {l1 l2 l3 l4 l : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α : natural-transformation-polynomial-endofunctor l 𝑃 𝑄) + (let α₀ = type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α) + where + + is-cartesian-at-terminal-map-is-cartesian-natural-transformation-polynomial-endofunctor : + is-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α → + is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor + 𝑃 𝑄 α + is-cartesian-at-terminal-map-is-cartesian-natural-transformation-polynomial-endofunctor + H {X} = + H (raise-terminal-map X) + + abstract + is-cartesian-is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor : + is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor + 𝑃 𝑄 α → + is-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α + is-cartesian-is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor + H {X} {Y} f = + is-pullback-top-square-vertical-triangle + α₀ + ( map-polynomial-endofunctor 𝑄 (raise-terminal-map Y)) + ( map-polynomial-endofunctor 𝑄 f) + ( map-polynomial-endofunctor 𝑄 (raise-terminal-map X)) + ( cone-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α + ( raise-terminal-map Y)) + ( cone-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α + ( f)) + ( cone-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α + ( raise-terminal-map X)) + ( refl-htpy) + ( refl-htpy , + refl-htpy , + ( λ (a , h) → + equational-reasoning + pr2 α (raise-terminal-map Y) (a , f ∘ h) ∙ ap (tot (λ x₁ f₁ a → map-raise star)) (pr2 α f (a , h)) ∙ refl + = + pr2 α (raise-terminal-map Y) (a , f ∘ h) ∙ + ap (λ z → pair (pr1 z) (λ z₁ → map-raise star)) (pr2 α f (a , h)) + by right-unit + = {! !} by {! !} + = pr2 α (raise-terminal-map X) (a , h) by {! !})) -- these are two equalities in the type (Σ 𝑄₀ , 1), so they only need to be equal on first components. + ( H {Y}) + ( H {X}) +``` + + + +This is mentioned as Remark 2.1.4 in {{#cite GHK22}}. + +## References + +{{#bibliography}} From 702071c05145e6f035c4e909c270b5ded003b5b3 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Tue, 16 Sep 2025 01:37:32 +0200 Subject: [PATCH 25/41] some parentheses --- src/foundation/homotopies.lagda.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/foundation/homotopies.lagda.md b/src/foundation/homotopies.lagda.md index 88a2ba84ea..c61913e927 100644 --- a/src/foundation/homotopies.lagda.md +++ b/src/foundation/homotopies.lagda.md @@ -225,7 +225,7 @@ module _ is-equiv-map-Π-is-fiberwise-equiv ( λ x → is-equiv-left-transpose-eq-concat (H x) (K x) (L x)) - equiv-left-transpose-htpy-concat : (H ∙h K ~ L) ≃ (K ~ (inv-htpy H ∙h L)) + equiv-left-transpose-htpy-concat : (H ∙h K ~ L) ≃ (K ~ inv-htpy H ∙h L) pr1 equiv-left-transpose-htpy-concat = left-transpose-htpy-concat H K L pr2 equiv-left-transpose-htpy-concat = is-equiv-left-transpose-htpy-concat @@ -235,7 +235,7 @@ module _ is-equiv-map-Π-is-fiberwise-equiv ( λ x → is-equiv-right-transpose-eq-concat (H x) (K x) (L x)) - equiv-right-transpose-htpy-concat : ((H ∙h K) ~ L) ≃ (H ~ (L ∙h (inv-htpy K))) + equiv-right-transpose-htpy-concat : (H ∙h K ~ L) ≃ (H ~ L ∙h inv-htpy K) pr1 equiv-right-transpose-htpy-concat = right-transpose-htpy-concat H K L pr2 equiv-right-transpose-htpy-concat = is-equiv-right-transpose-htpy-concat From f31bed5b9607e5db4f66e4c7d4b2887c9bddd1f7 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Tue, 16 Sep 2025 11:59:12 +0200 Subject: [PATCH 26/41] save some space --- ...operty-cartesian-morphisms-arrows.lagda.md | 197 ++++++++---------- 1 file changed, 82 insertions(+), 115 deletions(-) diff --git a/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md b/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md index d379555370..fdf97ae8bf 100644 --- a/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md +++ b/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md @@ -148,11 +148,11 @@ module _ (α : hom-arrow f h) (β : hom-arrow g h) where - family-fiber-lift-codomain-lift-hom-arrow : + is-lift-hom-arrow-of-lift-codomain-hom-arrow : lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α) → (A → B) → UU (l1 ⊔ l4 ⊔ l5 ⊔ l6) - family-fiber-lift-codomain-lift-hom-arrow (i , I) j = - Σ (coherence-hom-arrow f g j i) + is-lift-hom-arrow-of-lift-codomain-hom-arrow (i , I) j = + Σ ( coherence-hom-arrow f g j i) ( λ H → Σ ( coherence-triangle-maps ( map-domain-hom-arrow f h α) @@ -163,21 +163,14 @@ module _ ( comp-hom-arrow f g h β (j , i , H)) ( J) ( I))) - - fiber-lift-codomain-lift-hom-arrow : - lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α) → - UU (l1 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6) - fiber-lift-codomain-lift-hom-arrow i = - Σ (A → B) (family-fiber-lift-codomain-lift-hom-arrow i) ``` > The explicit equivalence remains to be written out. ### Uniqueness of lifts of cartesian morphisms -Given a cartesian morphism of arrows, then lifts are unique. - - +Given a cartesian morphism of arrows, then lifts along lifts in the codomain are +unique. ```agda module _ @@ -185,122 +178,96 @@ module _ {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} (f : A → A') (g : B → B') (h : C → C') (α : hom-arrow f h) (β : hom-arrow g h) + (let β₁ = map-codomain-hom-arrow g h β) + (let Hβ = coh-hom-arrow g h β) + (let Hα = coh-hom-arrow f h α) ((i , I) : lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α)) where - abstract - equiv-htpy-cone-family-fiber-lift-codomain-lift-hom-arrow : - (j : A → B) → - family-fiber-lift-codomain-lift-hom-arrow f g h α β (i , I) j ≃ - htpy-cone (map-codomain-hom-arrow g h β) h - ( g ∘ j , - map-domain-hom-arrow g h β ∘ j , - coh-hom-arrow g h β ·r j) - ( i ∘ f , - map-domain-hom-arrow f h α , - inv-htpy I ·r f ∙h coh-hom-arrow f h α) - equiv-htpy-cone-family-fiber-lift-codomain-lift-hom-arrow j = - equiv-Σ _ - ( equiv-inv-htpy (i ∘ f) (g ∘ j)) - ( λ H → - equiv-Σ _ - ( equiv-inv-htpy (pr1 α) (pr1 β ∘ j)) - ( λ J → - equivalence-reasoning - ( ( coh-hom-arrow f h α ∙h h ·l J) ~ - ( I ·r f) ∙h - ( ( map-codomain-hom-arrow g h β ·l H) ∙h - ( coh-hom-arrow g h β ·r j))) - ≃ ( ( I ·r f) ∙h - ( ( map-codomain-hom-arrow g h β ·l H) ∙h - ( coh-hom-arrow g h β ·r j)) ~ - ( coh-hom-arrow f h α ∙h h ·l J)) - by equiv-inv-htpy _ _ - ≃ ( ( map-codomain-hom-arrow g h β ·l H) ∙h - ( coh-hom-arrow g h β ·r j) ~ - ( inv-htpy I ·r f) ∙h (coh-hom-arrow f h α ∙h h ·l J)) - by - equiv-left-transpose-htpy-concat - ( I ·r f) - ( ( map-codomain-hom-arrow g h β ·l H) ∙h - ( coh-hom-arrow g h β ·r j)) - ( coh-hom-arrow f h α ∙h h ·l J) - ≃ ( ( coh-hom-arrow g h β ·r j) ~ - ( inv-htpy (map-codomain-hom-arrow g h β ·l H)) ∙h - ( inv-htpy I ·r f ∙h (coh-hom-arrow f h α ∙h h ·l J))) - by - equiv-left-transpose-htpy-concat - ( map-codomain-hom-arrow g h β ·l H) - ( coh-hom-arrow g h β ·r j) - ( inv-htpy I ·r f ∙h (coh-hom-arrow f h α ∙h h ·l J)) - ≃ ( ( coh-hom-arrow g h β ·r j) ~ - ( map-codomain-hom-arrow g h β ·l (inv-htpy H)) ∙h - ( inv-htpy I ·r f ∙h (coh-hom-arrow f h α ∙h h ·l J))) - by - equiv-tr - ( λ Q → - coh-hom-arrow g h β ·r j ~ - Q ∙h (inv-htpy I ·r f ∙h (coh-hom-arrow f h α ∙h h ·l J))) - ( inv - ( eq-htpy - ( left-whisker-inv-htpy - ( map-codomain-hom-arrow g h β) H))) - ≃ ( ( coh-hom-arrow g h β ·r j) ~ - ( ( map-codomain-hom-arrow g h β ·l (inv-htpy H)) ∙h - ( inv-htpy I ·r f ∙h (coh-hom-arrow f h α))) ∙h - ( h ·l J)) - by - equiv-tr - ( coh-hom-arrow g h β ·r j ~_) - ( ( ap - ( map-codomain-hom-arrow g h β ·l (inv-htpy H) ∙h_) - ( eq-htpy - ( inv-htpy-assoc-htpy - ( inv-htpy I ·r f) - ( coh-hom-arrow f h α) - ( h ·l J)))) ∙ + equiv-htpy-cone-is-lift-hom-arrow-of-lift-codomain-hom-arrow : + (j : A → B) → + is-lift-hom-arrow-of-lift-codomain-hom-arrow f g h α β (i , I) j ≃ + htpy-cone β₁ h + ( g ∘ j , map-domain-hom-arrow g h β ∘ j , Hβ ·r j) + ( i ∘ f , map-domain-hom-arrow f h α , inv-htpy I ·r f ∙h Hα) + equiv-htpy-cone-is-lift-hom-arrow-of-lift-codomain-hom-arrow j = + equiv-Σ _ + ( equiv-inv-htpy (i ∘ f) (g ∘ j)) + ( λ H → + equiv-Σ _ + ( equiv-inv-htpy + ( map-domain-hom-arrow f h α) + ( map-domain-hom-arrow g h β ∘ j)) + ( λ J → + equivalence-reasoning + ( Hα ∙h h ·l J ~ I ·r f ∙h (β₁ ·l H ∙h Hβ ·r j)) + ≃ ( I ·r f ∙h (β₁ ·l H ∙h Hβ ·r j) ~ Hα ∙h h ·l J) + by equiv-inv-htpy (Hα ∙h h ·l J) (I ·r f ∙h (β₁ ·l H ∙h Hβ ·r j)) + ≃ ( β₁ ·l H ∙h Hβ ·r j ~ inv-htpy I ·r f ∙h (Hα ∙h h ·l J)) + by + equiv-left-transpose-htpy-concat + ( I ·r f) + ( β₁ ·l H ∙h Hβ ·r j) + ( Hα ∙h h ·l J) + ≃ ( Hβ ·r j ~ + inv-htpy (β₁ ·l H) ∙h (inv-htpy I ·r f ∙h (Hα ∙h h ·l J))) + by + equiv-left-transpose-htpy-concat + ( β₁ ·l H) + ( Hβ ·r j) + ( inv-htpy I ·r f ∙h (Hα ∙h h ·l J)) + ≃ ( Hβ ·r j ~ + β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h (Hα ∙h h ·l J))) + by + equiv-tr + ( λ Q → Hβ ·r j ~ Q ∙h (inv-htpy I ·r f ∙h (Hα ∙h h ·l J))) + ( inv (eq-htpy (left-whisker-inv-htpy β₁ H))) + ≃ ( Hβ ·r j ~ + ( β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) ∙h h ·l J) + by + equiv-tr + ( Hβ ·r j ~_) + ( ( ap + ( β₁ ·l (inv-htpy H) ∙h_) ( eq-htpy - ( inv-htpy-assoc-htpy - ( map-codomain-hom-arrow g h β ·l (inv-htpy H)) - ( inv-htpy I ·r f ∙h (coh-hom-arrow f h α)) - ( h ·l J)))) - ≃ ( ( coh-hom-arrow g h β ·r j) ∙h (inv-htpy (h ·l J)) ~ - ( map-codomain-hom-arrow g h β ·l (inv-htpy H)) ∙h - ( (inv-htpy I ·r f) ∙h (coh-hom-arrow f h α))) - by - equiv-right-transpose-htpy-concat' - ( coh-hom-arrow g h β ·r j) - ( ( map-codomain-hom-arrow g h β ·l (inv-htpy H)) ∙h - ( inv-htpy I ·r f ∙h (coh-hom-arrow f h α))) - ( h ·l J) - ≃ ( ( coh-hom-arrow g h β ·r j) ∙h (h ·l inv-htpy J) ~ - ( map-codomain-hom-arrow g h β ·l inv-htpy H) ∙h - ( ( inv-htpy I ·r f) ∙h (coh-hom-arrow f h α))) - by - equiv-tr - ( λ Q → - ( coh-hom-arrow g h β ·r j) ∙h Q ~ - ( map-codomain-hom-arrow g h β ·l inv-htpy H) ∙h - ( ( inv-htpy I ·r f) ∙h (coh-hom-arrow f h α))) - ( inv (eq-htpy (left-whisker-inv-htpy h J))))) + ( inv-htpy-assoc-htpy (inv-htpy I ·r f) Hα (h ·l J)))) ∙ + ( eq-htpy + ( inv-htpy-assoc-htpy + ( β₁ ·l (inv-htpy H)) + ( inv-htpy I ·r f ∙h Hα) + ( h ·l J)))) + ≃ ( Hβ ·r j ∙h inv-htpy (h ·l J) ~ + β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) + by + equiv-right-transpose-htpy-concat' + ( Hβ ·r j) + ( β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) + ( h ·l J) + ≃ ( Hβ ·r j ∙h h ·l inv-htpy J ~ + β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) + by + equiv-tr + ( λ Q → + Hβ ·r j ∙h Q ~ β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) + ( inv (eq-htpy (left-whisker-inv-htpy h J))))) abstract uniqueness-lift-map-codomain-is-cartesian-hom-arrow : is-cartesian-hom-arrow g h β → - is-torsorial (family-fiber-lift-codomain-lift-hom-arrow f g h α β (i , I)) + is-torsorial + ( is-lift-hom-arrow-of-lift-codomain-hom-arrow f g h α β (i , I)) uniqueness-lift-map-codomain-is-cartesian-hom-arrow H = is-contr-equiv _ - ( equiv-tot equiv-htpy-cone-family-fiber-lift-codomain-lift-hom-arrow) - ( uniqueness-universal-property-pullback - ( map-codomain-hom-arrow g h β) - ( h) + ( equiv-tot + ( equiv-htpy-cone-is-lift-hom-arrow-of-lift-codomain-hom-arrow)) + ( uniqueness-universal-property-pullback β₁ h ( cone-hom-arrow g h β) ( up-pullback-cartesian-hom-arrow g h (β , H)) ( A) - ( _)) + ( i ∘ f , map-domain-hom-arrow f h α , inv-htpy I ·r f ∙h Hα)) ``` - + > What follows is another computation of the same. Should be deleted. @@ -338,7 +305,7 @@ module _ ( K) ( H)))) uniqueness-lift-map-codomain-cartesian-hom-arrow' = - is-contr-equiv ((Σ (A → B) λ j → htpy-cone (map-codomain-cartesian-hom-arrow g h β) h ((λ z → g (j z)) , (λ z → pr1 (pr1 β) (j z)) , (λ x → pr2 (pr2 (pr1 β)) (j x))) ((λ z → i (f z)) , pr1 α , H ·r f ∙h coh-hom-arrow f h α))) + is-contr-equiv _ ( equiv-tot ( λ j → equiv-Σ _ @@ -394,7 +361,7 @@ module _ ( cone-cartesian-hom-arrow g h β) ( up-pullback-cartesian-hom-arrow g h β) ( A) - ( cone-hom-arrow-lift-map-codomain-cartesian-hom-arrow f g h β α i H)) + ( i ∘ f , pr1 α , H ·r f ∙h coh-hom-arrow f h α)) ``` ### Lifting cartesian morphisms along lifts of the codomain From 8138263004a7fdcd599a80ad713c0f741110ab62 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Tue, 16 Sep 2025 13:56:49 +0200 Subject: [PATCH 27/41] `compute-fiber-lift-codomain-lift-hom-arrow` --- ...e-arithmetic-dependent-pair-types.lagda.md | 2 +- ...operty-cartesian-morphisms-arrows.lagda.md | 84 ++++++++++++++++++- 2 files changed, 83 insertions(+), 3 deletions(-) diff --git a/src/foundation/type-arithmetic-dependent-pair-types.lagda.md b/src/foundation/type-arithmetic-dependent-pair-types.lagda.md index 022b2dc3a8..b4440ce31d 100644 --- a/src/foundation/type-arithmetic-dependent-pair-types.lagda.md +++ b/src/foundation/type-arithmetic-dependent-pair-types.lagda.md @@ -308,7 +308,7 @@ module _ interchange-Σ-Σ-Σ : Σ A (λ x → Σ (B x) (λ y → Σ (C x) (D x y))) ≃ - Σ A (λ x → Σ (C x) (λ z → Σ (B x) λ y → D x y z)) + Σ A (λ x → Σ (C x) (λ z → Σ (B x) (λ y → D x y z))) interchange-Σ-Σ-Σ = associative-Σ' A C (λ x z → Σ (B x) λ y → D x y z) ∘e interchange-Σ-Σ ∘e diff --git a/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md b/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md index fdf97ae8bf..29f7575d70 100644 --- a/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md +++ b/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md @@ -15,10 +15,12 @@ open import foundation.cones-over-cospan-diagrams open import foundation.contractible-types open import foundation.coproducts-pullbacks open import foundation.dependent-pair-types +open import foundation.type-arithmetic-dependent-pair-types open import foundation.dependent-products-pullbacks open import foundation.dependent-sums-pullbacks open import foundation.diagonal-maps-cartesian-products-of-types open import foundation.equivalences +open import foundation.homotopy-induction open import foundation.fibers-of-maps open import foundation.function-extensionality open import foundation.function-types @@ -146,6 +148,7 @@ module _ {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} (f : A → A') (g : B → B') (h : C → C') (α : hom-arrow f h) (β : hom-arrow g h) + ( let β₁ = map-codomain-hom-arrow g h β) where is-lift-hom-arrow-of-lift-codomain-hom-arrow : @@ -163,9 +166,86 @@ module _ ( comp-hom-arrow f g h β (j , i , H)) ( J) ( I))) -``` -> The explicit equivalence remains to be written out. + lift-hom-arrow-of-lift-codomain-hom-arrow : + lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α) → + UU (l1 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6) + lift-hom-arrow-of-lift-codomain-hom-arrow i = + Σ (A → B) (is-lift-hom-arrow-of-lift-codomain-hom-arrow i) + + compute-fiber-lift-codomain-lift-hom-arrow : + (δ : lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α)) → + fiber (lift-codomain-lift-hom-arrow f g h α β) δ ≃ + lift-hom-arrow-of-lift-codomain-hom-arrow δ + compute-fiber-lift-codomain-lift-hom-arrow (δ , Hδ) = + equivalence-reasoning + Σ ( lift-hom-arrow f g h α β) + ( λ γ → lift-codomain-lift-hom-arrow f g h α β γ = (δ , Hδ)) + ≃ Σ ( lift-hom-arrow f g h α β) + ( λ γ → + Σ ( map-codomain-lift-hom-arrow f g h α β γ ~ δ) + ( λ Hi → coh-codomain-lift-hom-arrow f g h α β γ ∙h β₁ ·l Hi ~ Hδ)) + by + equiv-tot + ( λ γ → + extensionality-lift + ( map-codomain-hom-arrow g h β) + ( map-codomain-hom-arrow f h α) + ( lift-codomain-lift-hom-arrow f g h α β γ) + ( δ , Hδ)) + ≃ Σ ( Σ (A' → B') (_~ δ)) + ( λ (i , Hi) → + Σ ( Σ ( coherence-triangle-maps + ( map-codomain-hom-arrow f h α) + ( map-codomain-hom-arrow g h β) + ( i)) + ( λ I → I ∙h β₁ ·l Hi ~ Hδ)) + ( λ (I , HI) → lift-hom-arrow-of-lift-codomain-hom-arrow (i , I))) + by reassociate + ≃ Σ ( Σ ( coherence-triangle-maps + ( map-codomain-hom-arrow f h α) + ( map-codomain-hom-arrow g h β) + ( δ)) + ( λ I → I ∙h β₁ ·l refl-htpy ~ Hδ)) + ( λ (I , HI) → lift-hom-arrow-of-lift-codomain-hom-arrow (δ , I)) + by left-unit-law-Σ-is-contr (is-torsorial-htpy' δ) (δ , refl-htpy) + ≃ Σ ( Σ ( coherence-triangle-maps + ( map-codomain-hom-arrow f h α) + ( map-codomain-hom-arrow g h β) + ( δ)) + ( _~ Hδ)) + ( λ (I , HI) → lift-hom-arrow-of-lift-codomain-hom-arrow (δ , I)) + by + equiv-Σ-equiv-base + ( λ (I , HI) → lift-hom-arrow-of-lift-codomain-hom-arrow (δ , I)) + ( equiv-tot (λ I → equiv-concat-htpy inv-htpy-right-unit-htpy Hδ)) + ≃ lift-hom-arrow-of-lift-codomain-hom-arrow (δ , Hδ) + by left-unit-law-Σ-is-contr (is-torsorial-htpy' Hδ) (Hδ , refl-htpy) + where + reassociate : + Σ ( lift-hom-arrow f g h α β) + ( λ γ → + Σ ( map-codomain-lift-hom-arrow f g h α β γ ~ δ) + ( λ Hi → + coh-codomain-lift-hom-arrow f g h α β γ ∙h β₁ ·l Hi ~ Hδ)) ≃ + Σ ( Σ (A' → B') (_~ δ)) + ( λ (i , Hi) → + Σ ( Σ ( coherence-triangle-maps + ( map-codomain-hom-arrow f h α) + ( map-codomain-hom-arrow g h β) + ( i)) + ( λ I → I ∙h β₁ ·l Hi ~ Hδ)) + ( λ (I , HI) → + lift-hom-arrow-of-lift-codomain-hom-arrow (i , I))) + reassociate = + ( ( λ (((γ₀ , γ₁ , Hγ) , (Γ₀ , Γ₁ , HΓ)) , (Hi , HI)) → + ( (γ₁ , Hi) , (Γ₁ , HI) , γ₀ , Hγ , Γ₀ , HΓ)) , + ( is-equiv-is-invertible + ( λ ((γ₁ , Hi) , (Γ₁ , HI) , γ₀ , Hγ , Γ₀ , HΓ) → + ((γ₀ , γ₁ , Hγ) , (Γ₀ , Γ₁ , HΓ)) , (Hi , HI)) + ( refl-htpy) + ( refl-htpy))) +``` ### Uniqueness of lifts of cartesian morphisms From f8a2df68b84981b498188e63914ec48b637f9e9a Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Tue, 16 Sep 2025 15:36:25 +0200 Subject: [PATCH 28/41] equivalence between up-cartesian, having unique lifts, and cartesianness --- .../universal-property-pullbacks.lagda.md | 12 + .../lifts-morphisms-arrows.lagda.md | 227 +++++++++ ...operty-cartesian-morphisms-arrows.lagda.md | 460 +++++------------- 3 files changed, 371 insertions(+), 328 deletions(-) diff --git a/src/foundation-core/universal-property-pullbacks.lagda.md b/src/foundation-core/universal-property-pullbacks.lagda.md index 8ec97f1f27..298af3f46c 100644 --- a/src/foundation-core/universal-property-pullbacks.lagda.md +++ b/src/foundation-core/universal-property-pullbacks.lagda.md @@ -219,6 +219,18 @@ module _ ( Σ (C' → C) (λ h → cone-map f g c h = c')) ( equiv-tot (λ h → extensionality-cone f g (cone-map f g c h) c')) ( is-contr-map-is-equiv (up C') c') + + abstract + universal-property-pullback-uniqueness : + ( {l5 : Level} (C' : UU l5) (c' : cone f g C') → + is-contr (Σ (C' → C) (λ h → htpy-cone f g (cone-map f g c h) c'))) → + universal-property-pullback f g c + universal-property-pullback-uniqueness H C' = + is-equiv-is-contr-map + ( λ c' → + is-contr-equiv _ + ( equiv-tot (λ h → extensionality-cone f g (cone-map f g c h) c')) + ( H C' c')) ``` ## Table of files about pullbacks diff --git a/src/foundation/lifts-morphisms-arrows.lagda.md b/src/foundation/lifts-morphisms-arrows.lagda.md index aa2f4f318a..ac8487736a 100644 --- a/src/foundation/lifts-morphisms-arrows.lagda.md +++ b/src/foundation/lifts-morphisms-arrows.lagda.md @@ -7,12 +7,27 @@ module foundation.lifts-morphisms-arrows where
Imports ```agda +open import foundation.action-on-identifications-functions open import foundation.commuting-triangles-of-maps open import foundation.commuting-triangles-of-morphisms-arrows +open import foundation.cones-over-cospan-diagrams open import foundation.dependent-pair-types +open import foundation.equivalences +open import foundation.fibers-of-maps +open import foundation.function-extensionality +open import foundation.function-types +open import foundation.functoriality-dependent-pair-types +open import foundation.homotopies open import foundation.homotopies-morphisms-arrows +open import foundation.homotopy-induction +open import foundation.identity-types open import foundation.morphisms-arrows +open import foundation.transport-along-identifications +open import foundation.type-arithmetic-dependent-pair-types open import foundation.universe-levels +open import foundation.whiskering-homotopies-composition + +open import orthogonal-factorization-systems.lifts-maps ```
@@ -90,4 +105,216 @@ module _ ( coh-codomain-lift-hom-arrow) coh-lift-hom-arrow = pr2 (pr2 coherence-triangle-lift-hom-arrow) + + lift-codomain-lift-hom-arrow : + lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α) + lift-codomain-lift-hom-arrow = + ( map-codomain-lift-hom-arrow , coh-codomain-lift-hom-arrow) +``` + +### The type of lifts extending a lift of the codomain + +```agda +module _ + {l1 l2 l3 l4 l5 l6 : Level} + {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} + (f : A → A') (g : B → B') (h : C → C') + (α : hom-arrow f h) (β : hom-arrow g h) + ( let β₁ = map-codomain-hom-arrow g h β) + where + + is-lift-hom-arrow-of-lift-codomain-hom-arrow : + lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α) → + (A → B) → UU (l1 ⊔ l4 ⊔ l5 ⊔ l6) + is-lift-hom-arrow-of-lift-codomain-hom-arrow (i , I) j = + Σ ( coherence-hom-arrow f g j i) + ( λ H → + Σ ( coherence-triangle-maps + ( map-domain-hom-arrow f h α) + ( map-domain-hom-arrow g h β) + ( j)) + ( λ J → + coherence-htpy-hom-arrow f h α + ( comp-hom-arrow f g h β (j , i , H)) + ( J) + ( I))) + + lift-hom-arrow-of-lift-codomain-hom-arrow : + lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α) → + UU (l1 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6) + lift-hom-arrow-of-lift-codomain-hom-arrow i = + Σ (A → B) (is-lift-hom-arrow-of-lift-codomain-hom-arrow i) +``` + +## Properties + +### Computing the fibers of `lift-codomain-lift-hom-arrow` + +```agda +module _ + {l1 l2 l3 l4 l5 l6 : Level} + {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} + (f : A → A') (g : B → B') (h : C → C') + (α : hom-arrow f h) (β : hom-arrow g h) + ( let β₁ = map-codomain-hom-arrow g h β) + where + + compute-fiber-lift-codomain-lift-hom-arrow : + (δ : lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α)) → + fiber (lift-codomain-lift-hom-arrow f g h α β) δ ≃ + lift-hom-arrow-of-lift-codomain-hom-arrow f g h α β δ + compute-fiber-lift-codomain-lift-hom-arrow (δ , Hδ) = + equivalence-reasoning + Σ ( lift-hom-arrow f g h α β) + ( λ γ → lift-codomain-lift-hom-arrow f g h α β γ = (δ , Hδ)) + ≃ Σ ( lift-hom-arrow f g h α β) + ( λ γ → + Σ ( map-codomain-lift-hom-arrow f g h α β γ ~ δ) + ( λ Hi → coh-codomain-lift-hom-arrow f g h α β γ ∙h β₁ ·l Hi ~ Hδ)) + by + equiv-tot + ( λ γ → + extensionality-lift + ( map-codomain-hom-arrow g h β) + ( map-codomain-hom-arrow f h α) + ( lift-codomain-lift-hom-arrow f g h α β γ) + ( δ , Hδ)) + ≃ Σ ( Σ (A' → B') (_~ δ)) + ( λ (i , Hi) → + Σ ( Σ ( coherence-triangle-maps + ( map-codomain-hom-arrow f h α) + ( map-codomain-hom-arrow g h β) + ( i)) + ( λ I → I ∙h β₁ ·l Hi ~ Hδ)) + ( λ (I , HI) → + lift-hom-arrow-of-lift-codomain-hom-arrow f g h α β (i , I))) + by reassociate + ≃ Σ ( Σ ( coherence-triangle-maps + ( map-codomain-hom-arrow f h α) + ( map-codomain-hom-arrow g h β) + ( δ)) + ( λ I → I ∙h β₁ ·l refl-htpy ~ Hδ)) + ( λ (I , HI) → + lift-hom-arrow-of-lift-codomain-hom-arrow f g h α β (δ , I)) + by left-unit-law-Σ-is-contr (is-torsorial-htpy' δ) (δ , refl-htpy) + ≃ Σ ( Σ ( coherence-triangle-maps + ( map-codomain-hom-arrow f h α) + ( map-codomain-hom-arrow g h β) + ( δ)) + ( _~ Hδ)) + ( λ (I , HI) → + lift-hom-arrow-of-lift-codomain-hom-arrow f g h α β (δ , I)) + by + equiv-Σ-equiv-base + ( λ (I , HI) → + lift-hom-arrow-of-lift-codomain-hom-arrow f g h α β (δ , I)) + ( equiv-tot (λ I → equiv-concat-htpy inv-htpy-right-unit-htpy Hδ)) + ≃ lift-hom-arrow-of-lift-codomain-hom-arrow f g h α β (δ , Hδ) + by left-unit-law-Σ-is-contr (is-torsorial-htpy' Hδ) (Hδ , refl-htpy) + where + reassociate : + Σ ( lift-hom-arrow f g h α β) + ( λ γ → + Σ ( map-codomain-lift-hom-arrow f g h α β γ ~ δ) + ( λ Hi → + coh-codomain-lift-hom-arrow f g h α β γ ∙h β₁ ·l Hi ~ Hδ)) ≃ + Σ ( Σ (A' → B') (_~ δ)) + ( λ (i , Hi) → + Σ ( Σ ( coherence-triangle-maps + ( map-codomain-hom-arrow f h α) + ( map-codomain-hom-arrow g h β) + ( i)) + ( λ I → I ∙h β₁ ·l Hi ~ Hδ)) + ( λ (I , HI) → + lift-hom-arrow-of-lift-codomain-hom-arrow f g h α β (i , I))) + reassociate = + ( ( λ (((γ₀ , γ₁ , Hγ) , (Γ₀ , Γ₁ , HΓ)) , (Hi , HI)) → + ( (γ₁ , Hi) , (Γ₁ , HI) , γ₀ , Hγ , Γ₀ , HΓ)) , + ( is-equiv-is-invertible + ( λ ((γ₁ , Hi) , (Γ₁ , HI) , γ₀ , Hγ , Γ₀ , HΓ) → + ((γ₀ , γ₁ , Hγ) , (Γ₀ , Γ₁ , HΓ)) , (Hi , HI)) + ( refl-htpy) + ( refl-htpy))) +``` + +### Computing the "is lift" predicate in terms of homotopies of cones + +```agda +module _ + {l1 l2 l3 l4 l5 l6 : Level} + {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} + (f : A → A') (g : B → B') (h : C → C') + (α : hom-arrow f h) (β : hom-arrow g h) + (let β₁ = map-codomain-hom-arrow g h β) + (let Hβ = coh-hom-arrow g h β) + (let Hα = coh-hom-arrow f h α) + ((i , I) : lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α)) + where + + equiv-htpy-cone-is-lift-hom-arrow-of-lift-codomain-hom-arrow : + (j : A → B) → + is-lift-hom-arrow-of-lift-codomain-hom-arrow f g h α β (i , I) j ≃ + htpy-cone β₁ h + ( g ∘ j , map-domain-hom-arrow g h β ∘ j , Hβ ·r j) + ( i ∘ f , map-domain-hom-arrow f h α , inv-htpy I ·r f ∙h Hα) + equiv-htpy-cone-is-lift-hom-arrow-of-lift-codomain-hom-arrow j = + equiv-Σ _ + ( equiv-inv-htpy (i ∘ f) (g ∘ j)) + ( λ H → + equiv-Σ _ + ( equiv-inv-htpy + ( map-domain-hom-arrow f h α) + ( map-domain-hom-arrow g h β ∘ j)) + ( λ J → + equivalence-reasoning + ( Hα ∙h h ·l J ~ I ·r f ∙h (β₁ ·l H ∙h Hβ ·r j)) + ≃ ( I ·r f ∙h (β₁ ·l H ∙h Hβ ·r j) ~ Hα ∙h h ·l J) + by equiv-inv-htpy (Hα ∙h h ·l J) (I ·r f ∙h (β₁ ·l H ∙h Hβ ·r j)) + ≃ ( β₁ ·l H ∙h Hβ ·r j ~ inv-htpy I ·r f ∙h (Hα ∙h h ·l J)) + by + equiv-left-transpose-htpy-concat + ( I ·r f) + ( β₁ ·l H ∙h Hβ ·r j) + ( Hα ∙h h ·l J) + ≃ ( Hβ ·r j ~ + inv-htpy (β₁ ·l H) ∙h (inv-htpy I ·r f ∙h (Hα ∙h h ·l J))) + by + equiv-left-transpose-htpy-concat + ( β₁ ·l H) + ( Hβ ·r j) + ( inv-htpy I ·r f ∙h (Hα ∙h h ·l J)) + ≃ ( Hβ ·r j ~ + β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h (Hα ∙h h ·l J))) + by + equiv-tr + ( λ Q → Hβ ·r j ~ Q ∙h (inv-htpy I ·r f ∙h (Hα ∙h h ·l J))) + ( inv (eq-htpy (left-whisker-inv-htpy β₁ H))) + ≃ ( Hβ ·r j ~ + ( β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) ∙h h ·l J) + by + equiv-tr + ( Hβ ·r j ~_) + ( ( ap + ( β₁ ·l (inv-htpy H) ∙h_) + ( eq-htpy + ( inv-htpy-assoc-htpy (inv-htpy I ·r f) Hα (h ·l J)))) ∙ + ( eq-htpy + ( inv-htpy-assoc-htpy + ( β₁ ·l (inv-htpy H)) + ( inv-htpy I ·r f ∙h Hα) + ( h ·l J)))) + ≃ ( Hβ ·r j ∙h inv-htpy (h ·l J) ~ + β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) + by + equiv-right-transpose-htpy-concat' + ( Hβ ·r j) + ( β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) + ( h ·l J) + ≃ ( Hβ ·r j ∙h h ·l inv-htpy J ~ + β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) + by + equiv-tr + ( λ Q → + Hβ ·r j ∙h Q ~ β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) + ( inv (eq-htpy (left-whisker-inv-htpy h J))))) ``` diff --git a/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md b/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md index 29f7575d70..cec7d05f1c 100644 --- a/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md +++ b/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md @@ -12,15 +12,14 @@ open import foundation.cartesian-morphisms-arrows open import foundation.commuting-triangles-of-maps open import foundation.commuting-triangles-of-morphisms-arrows open import foundation.cones-over-cospan-diagrams +open import foundation.contractible-maps open import foundation.contractible-types open import foundation.coproducts-pullbacks open import foundation.dependent-pair-types -open import foundation.type-arithmetic-dependent-pair-types open import foundation.dependent-products-pullbacks open import foundation.dependent-sums-pullbacks open import foundation.diagonal-maps-cartesian-products-of-types open import foundation.equivalences -open import foundation.homotopy-induction open import foundation.fibers-of-maps open import foundation.function-extensionality open import foundation.function-types @@ -30,6 +29,7 @@ open import foundation.functoriality-dependent-pair-types open import foundation.functoriality-fibers-of-maps open import foundation.homotopies open import foundation.homotopies-morphisms-arrows +open import foundation.homotopy-induction open import foundation.identity-types open import foundation.lifts-morphisms-arrows open import foundation.morphisms-arrows @@ -40,6 +40,7 @@ open import foundation.pullbacks open import foundation.standard-pullbacks open import foundation.torsorial-type-families open import foundation.transport-along-identifications +open import foundation.type-arithmetic-dependent-pair-types open import foundation.unit-type open import foundation.universe-levels open import foundation.whiskering-homotopies-composition @@ -55,22 +56,12 @@ open import orthogonal-factorization-systems.lifts-maps ## Idea -A [morphism of arrows](foundation.morphisms-arrows.md) `β : g ⇒ h`, - -```text - β₀ - B ------> C - | | - g | H | h - ∨ ∨ - B' -----> C', - β₁ -``` - -is said to satisfy the +A [morphism of arrows](foundation.morphisms-arrows.md) `β : g ⇒ h`, is said to +satisfy the {{#concept "universal property" Disambiguation="cartesian morphisms of arrows"}} -of cartesian morphisms of arrows if the natural map that assigns to every -extension diagram of the form +of cartesian morphisms of arrows if the natural map that assigns to, given +another morphism of arrows `α : f ⇒ h`, and a +[lifting diagram](foundation.lifts-morphisms-arrows.md) of the form ```text B @@ -81,371 +72,184 @@ extension diagram of the form | | | | ∨ H | f | B' | h - | ∧ \β₁ | + | ∧ \ | | / \ | ∨ / ∨ ∨ - A' -------> C' + A' -------> C', ``` -the underlying data +the underlying [lift](orthogonal-factorization-systems.lifts-maps.md) on the +codomain ```text - A --------> C - | | - | H | - f | B' | h - | ∧ \β₁ | - | i/ \ | - ∨ / ∨ ∨ + B' + ∧ \ + i / \ β₁ + / ∨ A' -------> C' + α₁ ``` -is an equivalence. +is an [equivalence](foundation-core.equivalences.md). ## Definitions -```agda -lift-codomain-lift-hom-arrow : - {l1 l2 l3 l4 l5 l6 : Level} - {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} - (f : A → A') (g : B → B') (h : C → C') - (α : hom-arrow f h) (β : hom-arrow g h) → - lift-hom-arrow f g h α β → - lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α) -lift-codomain-lift-hom-arrow f g h α β γ = - ( map-codomain-lift-hom-arrow f g h α β γ , - coh-codomain-lift-hom-arrow f g h α β γ) -``` - ### The universal property of cartesian morphisms of arrows ```agda -universal-property-cartesian-hom-arrow-Level : - (l1 l2 : Level) {l3 l4 l5 l6 : Level} +module _ + {l3 l4 l5 l6 : Level} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} - (g : B → B') (h : C → C') (β : hom-arrow g h) → - UU (lsuc l1 ⊔ lsuc l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6) -universal-property-cartesian-hom-arrow-Level l1 l2 g h β = - {A : UU l1} {A' : UU l2} (f : A → A') (α : hom-arrow f h) → - is-equiv (lift-codomain-lift-hom-arrow f g h α β) + (g : B → B') (h : C → C') (β : hom-arrow g h) + where + + universal-property-cartesian-hom-arrow-Level : + (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6) + universal-property-cartesian-hom-arrow-Level l1 l2 = + {A : UU l1} {A' : UU l2} (f : A → A') (α : hom-arrow f h) → + is-equiv (lift-codomain-lift-hom-arrow f g h α β) + + universal-property-cartesian-hom-arrow : UUω + universal-property-cartesian-hom-arrow = + {l1 l2 : Level} → universal-property-cartesian-hom-arrow-Level l1 l2 +``` -universal-property-cartesian-hom-arrow : +### The property of having unique lifts of lifts of the codomain + +```agda +module _ {l3 l4 l5 l6 : Level} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} - (g : B → B') (h : C → C') (β : hom-arrow g h) → - UUω -universal-property-cartesian-hom-arrow g h β = - {l1 l2 : Level} → universal-property-cartesian-hom-arrow-Level l1 l2 g h β + (g : B → B') (h : C → C') (β : hom-arrow g h) + where + + has-unique-lifts-hom-arrow-Level : + (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6) + has-unique-lifts-hom-arrow-Level l1 l2 = + {A : UU l1} {A' : UU l2} (f : A → A') (α : hom-arrow f h) → + (δ : lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α)) → + is-contr (lift-hom-arrow-of-lift-codomain-hom-arrow f g h α β δ) + + has-unique-lifts-hom-arrow : UUω + has-unique-lifts-hom-arrow = + {l1 l2 : Level} → has-unique-lifts-hom-arrow-Level l1 l2 ``` ## Properties -### Computing the fibers of `lift-codomain-lift-hom-arrow` +### A morphism of arrows satisfies the universal property of cartesian morphisms if and only if it has unique lifts ```agda module _ - {l1 l2 l3 l4 l5 l6 : Level} - {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} - (f : A → A') (g : B → B') (h : C → C') - (α : hom-arrow f h) (β : hom-arrow g h) - ( let β₁ = map-codomain-hom-arrow g h β) + {l3 l4 l5 l6 : Level} + {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} + (g : B → B') (h : C → C') (β : hom-arrow g h) where - is-lift-hom-arrow-of-lift-codomain-hom-arrow : - lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α) → - (A → B) → UU (l1 ⊔ l4 ⊔ l5 ⊔ l6) - is-lift-hom-arrow-of-lift-codomain-hom-arrow (i , I) j = - Σ ( coherence-hom-arrow f g j i) - ( λ H → - Σ ( coherence-triangle-maps - ( map-domain-hom-arrow f h α) - ( map-domain-hom-arrow g h β) - ( j)) - ( λ J → - coherence-htpy-hom-arrow f h α - ( comp-hom-arrow f g h β (j , i , H)) - ( J) - ( I))) - - lift-hom-arrow-of-lift-codomain-hom-arrow : - lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α) → - UU (l1 ⊔ l3 ⊔ l4 ⊔ l5 ⊔ l6) - lift-hom-arrow-of-lift-codomain-hom-arrow i = - Σ (A → B) (is-lift-hom-arrow-of-lift-codomain-hom-arrow i) - - compute-fiber-lift-codomain-lift-hom-arrow : - (δ : lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α)) → - fiber (lift-codomain-lift-hom-arrow f g h α β) δ ≃ - lift-hom-arrow-of-lift-codomain-hom-arrow δ - compute-fiber-lift-codomain-lift-hom-arrow (δ , Hδ) = - equivalence-reasoning - Σ ( lift-hom-arrow f g h α β) - ( λ γ → lift-codomain-lift-hom-arrow f g h α β γ = (δ , Hδ)) - ≃ Σ ( lift-hom-arrow f g h α β) - ( λ γ → - Σ ( map-codomain-lift-hom-arrow f g h α β γ ~ δ) - ( λ Hi → coh-codomain-lift-hom-arrow f g h α β γ ∙h β₁ ·l Hi ~ Hδ)) - by - equiv-tot - ( λ γ → - extensionality-lift - ( map-codomain-hom-arrow g h β) - ( map-codomain-hom-arrow f h α) - ( lift-codomain-lift-hom-arrow f g h α β γ) - ( δ , Hδ)) - ≃ Σ ( Σ (A' → B') (_~ δ)) - ( λ (i , Hi) → - Σ ( Σ ( coherence-triangle-maps - ( map-codomain-hom-arrow f h α) - ( map-codomain-hom-arrow g h β) - ( i)) - ( λ I → I ∙h β₁ ·l Hi ~ Hδ)) - ( λ (I , HI) → lift-hom-arrow-of-lift-codomain-hom-arrow (i , I))) - by reassociate - ≃ Σ ( Σ ( coherence-triangle-maps - ( map-codomain-hom-arrow f h α) - ( map-codomain-hom-arrow g h β) - ( δ)) - ( λ I → I ∙h β₁ ·l refl-htpy ~ Hδ)) - ( λ (I , HI) → lift-hom-arrow-of-lift-codomain-hom-arrow (δ , I)) - by left-unit-law-Σ-is-contr (is-torsorial-htpy' δ) (δ , refl-htpy) - ≃ Σ ( Σ ( coherence-triangle-maps - ( map-codomain-hom-arrow f h α) - ( map-codomain-hom-arrow g h β) - ( δ)) - ( _~ Hδ)) - ( λ (I , HI) → lift-hom-arrow-of-lift-codomain-hom-arrow (δ , I)) - by - equiv-Σ-equiv-base - ( λ (I , HI) → lift-hom-arrow-of-lift-codomain-hom-arrow (δ , I)) - ( equiv-tot (λ I → equiv-concat-htpy inv-htpy-right-unit-htpy Hδ)) - ≃ lift-hom-arrow-of-lift-codomain-hom-arrow (δ , Hδ) - by left-unit-law-Σ-is-contr (is-torsorial-htpy' Hδ) (Hδ , refl-htpy) - where - reassociate : - Σ ( lift-hom-arrow f g h α β) - ( λ γ → - Σ ( map-codomain-lift-hom-arrow f g h α β γ ~ δ) - ( λ Hi → - coh-codomain-lift-hom-arrow f g h α β γ ∙h β₁ ·l Hi ~ Hδ)) ≃ - Σ ( Σ (A' → B') (_~ δ)) - ( λ (i , Hi) → - Σ ( Σ ( coherence-triangle-maps - ( map-codomain-hom-arrow f h α) - ( map-codomain-hom-arrow g h β) - ( i)) - ( λ I → I ∙h β₁ ·l Hi ~ Hδ)) - ( λ (I , HI) → - lift-hom-arrow-of-lift-codomain-hom-arrow (i , I))) - reassociate = - ( ( λ (((γ₀ , γ₁ , Hγ) , (Γ₀ , Γ₁ , HΓ)) , (Hi , HI)) → - ( (γ₁ , Hi) , (Γ₁ , HI) , γ₀ , Hγ , Γ₀ , HΓ)) , - ( is-equiv-is-invertible - ( λ ((γ₁ , Hi) , (Γ₁ , HI) , γ₀ , Hγ , Γ₀ , HΓ) → - ((γ₀ , γ₁ , Hγ) , (Γ₀ , Γ₁ , HΓ)) , (Hi , HI)) - ( refl-htpy) - ( refl-htpy))) -``` + abstract + has-unique-lifts-up-cartesian-hom-arrow : + universal-property-cartesian-hom-arrow g h β → + has-unique-lifts-hom-arrow g h β + has-unique-lifts-up-cartesian-hom-arrow up-β f α δ = + is-contr-equiv' _ + ( compute-fiber-lift-codomain-lift-hom-arrow f g h α β δ) + ( is-contr-map-is-equiv (up-β f α) δ) -### Uniqueness of lifts of cartesian morphisms + abstract + up-cartesian-has-unique-lifts-hom-arrow : + has-unique-lifts-hom-arrow g h β → + universal-property-cartesian-hom-arrow g h β + up-cartesian-has-unique-lifts-hom-arrow L f α = + is-equiv-is-contr-map + ( λ δ → + is-contr-equiv _ + ( compute-fiber-lift-codomain-lift-hom-arrow f g h α β δ) + ( L f α δ)) +``` -Given a cartesian morphism of arrows, then lifts along lifts in the codomain are -unique. +### A morphism of arrows has unique lifts if and only if it is cartesian ```agda module _ - {l1 l2 l3 l4 l5 l6 : Level} - {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} - (f : A → A') (g : B → B') (h : C → C') - (α : hom-arrow f h) (β : hom-arrow g h) - (let β₁ = map-codomain-hom-arrow g h β) - (let Hβ = coh-hom-arrow g h β) - (let Hα = coh-hom-arrow f h α) - ((i , I) : lift (map-codomain-hom-arrow g h β) (map-codomain-hom-arrow f h α)) + {l3 l4 l5 l6 : Level} + {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} + (g : B → B') (h : C → C') (β : hom-arrow g h) where - equiv-htpy-cone-is-lift-hom-arrow-of-lift-codomain-hom-arrow : - (j : A → B) → - is-lift-hom-arrow-of-lift-codomain-hom-arrow f g h α β (i , I) j ≃ - htpy-cone β₁ h - ( g ∘ j , map-domain-hom-arrow g h β ∘ j , Hβ ·r j) - ( i ∘ f , map-domain-hom-arrow f h α , inv-htpy I ·r f ∙h Hα) - equiv-htpy-cone-is-lift-hom-arrow-of-lift-codomain-hom-arrow j = - equiv-Σ _ - ( equiv-inv-htpy (i ∘ f) (g ∘ j)) - ( λ H → - equiv-Σ _ - ( equiv-inv-htpy - ( map-domain-hom-arrow f h α) - ( map-domain-hom-arrow g h β ∘ j)) - ( λ J → - equivalence-reasoning - ( Hα ∙h h ·l J ~ I ·r f ∙h (β₁ ·l H ∙h Hβ ·r j)) - ≃ ( I ·r f ∙h (β₁ ·l H ∙h Hβ ·r j) ~ Hα ∙h h ·l J) - by equiv-inv-htpy (Hα ∙h h ·l J) (I ·r f ∙h (β₁ ·l H ∙h Hβ ·r j)) - ≃ ( β₁ ·l H ∙h Hβ ·r j ~ inv-htpy I ·r f ∙h (Hα ∙h h ·l J)) - by - equiv-left-transpose-htpy-concat - ( I ·r f) - ( β₁ ·l H ∙h Hβ ·r j) - ( Hα ∙h h ·l J) - ≃ ( Hβ ·r j ~ - inv-htpy (β₁ ·l H) ∙h (inv-htpy I ·r f ∙h (Hα ∙h h ·l J))) - by - equiv-left-transpose-htpy-concat - ( β₁ ·l H) - ( Hβ ·r j) - ( inv-htpy I ·r f ∙h (Hα ∙h h ·l J)) - ≃ ( Hβ ·r j ~ - β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h (Hα ∙h h ·l J))) - by - equiv-tr - ( λ Q → Hβ ·r j ~ Q ∙h (inv-htpy I ·r f ∙h (Hα ∙h h ·l J))) - ( inv (eq-htpy (left-whisker-inv-htpy β₁ H))) - ≃ ( Hβ ·r j ~ - ( β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) ∙h h ·l J) - by - equiv-tr - ( Hβ ·r j ~_) - ( ( ap - ( β₁ ·l (inv-htpy H) ∙h_) - ( eq-htpy - ( inv-htpy-assoc-htpy (inv-htpy I ·r f) Hα (h ·l J)))) ∙ - ( eq-htpy - ( inv-htpy-assoc-htpy - ( β₁ ·l (inv-htpy H)) - ( inv-htpy I ·r f ∙h Hα) - ( h ·l J)))) - ≃ ( Hβ ·r j ∙h inv-htpy (h ·l J) ~ - β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) - by - equiv-right-transpose-htpy-concat' - ( Hβ ·r j) - ( β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) - ( h ·l J) - ≃ ( Hβ ·r j ∙h h ·l inv-htpy J ~ - β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) - by - equiv-tr - ( λ Q → - Hβ ·r j ∙h Q ~ β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) - ( inv (eq-htpy (left-whisker-inv-htpy h J))))) - abstract - uniqueness-lift-map-codomain-is-cartesian-hom-arrow : + has-unique-lifts-is-cartesian-hom-arrow : is-cartesian-hom-arrow g h β → - is-torsorial - ( is-lift-hom-arrow-of-lift-codomain-hom-arrow f g h α β (i , I)) - uniqueness-lift-map-codomain-is-cartesian-hom-arrow H = + has-unique-lifts-hom-arrow g h β + has-unique-lifts-is-cartesian-hom-arrow H {A = A} f α (i , I) = is-contr-equiv _ ( equiv-tot - ( equiv-htpy-cone-is-lift-hom-arrow-of-lift-codomain-hom-arrow)) - ( uniqueness-universal-property-pullback β₁ h + ( equiv-htpy-cone-is-lift-hom-arrow-of-lift-codomain-hom-arrow + f g h α β (i , I))) + ( uniqueness-universal-property-pullback (map-codomain-hom-arrow g h β) h ( cone-hom-arrow g h β) ( up-pullback-cartesian-hom-arrow g h (β , H)) ( A) - ( i ∘ f , map-domain-hom-arrow f h α , inv-htpy I ·r f ∙h Hα)) -``` + ( i ∘ f , + map-domain-hom-arrow f h α , + inv-htpy I ·r f ∙h coh-hom-arrow f h α)) - + abstract + is-cartesian-has-unique-lifts-hom-arrow : + has-unique-lifts-hom-arrow g h β → + is-cartesian-hom-arrow g h β + is-cartesian-has-unique-lifts-hom-arrow H = + is-pullback-universal-property-pullback + ( map-codomain-hom-arrow g h β) + ( h) + ( cone-hom-arrow g h β) + ( universal-property-pullback-uniqueness + ( map-codomain-hom-arrow g h β) + ( h) + ( cone-hom-arrow g h β) + ( λ A (f , i , I) → + ( is-contr-equiv' _ + ( equiv-tot + ( equiv-htpy-cone-is-lift-hom-arrow-of-lift-codomain-hom-arrow + ( f) + ( g) + ( h) + ( i , map-codomain-hom-arrow g h β , I) + ( β) + ( id , refl-htpy))) + ( H f (i , map-codomain-hom-arrow g h β , I) (id , refl-htpy))))) +``` -> What follows is another computation of the same. Should be deleted. +### A morphism of arrows satisfies the universal property of cartesian morphisms if and only if it is cartesian ```agda module _ - {l1 l2 l3 l4 l5 l6 : Level} - {A : UU l1} {A' : UU l2} {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} - (f : A → A') (g : B → B') (h : C → C') - (β : cartesian-hom-arrow g h) - (α : hom-arrow f h) - (i : A' → B') - (H : - coherence-triangle-maps' - ( map-codomain-hom-arrow f h α) - ( map-codomain-cartesian-hom-arrow g h β) - ( i)) + {l3 l4 l5 l6 : Level} + {B : UU l3} {B' : UU l4} {C : UU l5} {C' : UU l6} + (g : B → B') (h : C → C') (β : hom-arrow g h) where abstract - uniqueness-lift-map-codomain-cartesian-hom-arrow' : - is-torsorial - ( λ (j : A → B) → - Σ ( coherence-hom-arrow f g j i) - ( λ J → - Σ ( coherence-triangle-maps' - ( map-domain-hom-arrow f h α) - ( map-domain-cartesian-hom-arrow g h β) - ( j)) - ( λ K → - coherence-htpy-hom-arrow f h - ( comp-hom-arrow f g h - ( hom-arrow-cartesian-hom-arrow g h β) - ( j , i , J)) - ( α) - ( K) - ( H)))) - uniqueness-lift-map-codomain-cartesian-hom-arrow' = - is-contr-equiv _ - ( equiv-tot - ( λ j → - equiv-Σ _ - ( equiv-inv-htpy (i ∘ f) (g ∘ j)) - ( λ J → - equiv-tot - ( λ K → - equivalence-reasoning - ( ( map-codomain-cartesian-hom-arrow g h β ·l J) ∙h - ( coh-cartesian-hom-arrow g h β ·r j) ∙h - ( h ·l K) ~ - ( H ·r f) ∙h - ( coh-hom-arrow f h α)) - ≃ ( ( map-codomain-cartesian-hom-arrow g h β ·l J) ∙h - ( ( coh-cartesian-hom-arrow g h β ·r j) ∙h - ( h ·l K)) ~ - ( H ·r f) ∙h - ( coh-hom-arrow f h α)) - by - equiv-tr - ( λ Q → Q ~ ( H ·r f) ∙h ( coh-hom-arrow f h α)) - ( eq-htpy - ( assoc-htpy - ( map-codomain-cartesian-hom-arrow g h β ·l J) - ( coh-cartesian-hom-arrow g h β ·r j) - ( h ·l K))) - ≃ ( ( coh-cartesian-hom-arrow g h β ·r j) ∙h (h ·l K) ~ - ( inv-htpy - ( map-codomain-cartesian-hom-arrow g h β ·l J)) ∙h - ( ( H ·r f) ∙h (coh-hom-arrow f h α))) - by - equiv-left-transpose-htpy-concat - ( map-codomain-cartesian-hom-arrow g h β ·l J) - ( ( coh-cartesian-hom-arrow g h β ·r j) ∙h (h ·l K)) - ( ( H ·r f) ∙h (coh-hom-arrow f h α)) - ≃ ( ( coh-cartesian-hom-arrow g h β ·r j) ∙h (h ·l K) ~ - ( ( map-codomain-cartesian-hom-arrow g h β) ·l - ( inv-htpy J)) ∙h - ( ( H ·r f) ∙h (coh-hom-arrow f h α))) - by - equiv-tr - ( λ Q → - (coh-cartesian-hom-arrow g h β ·r j) ∙h (h ·l K) ~ - Q ∙h ((H ·r f) ∙h (coh-hom-arrow f h α))) - ( inv - ( eq-htpy - ( left-whisker-inv-htpy - ( map-codomain-cartesian-hom-arrow g h β) - ( J)))))))) - ( uniqueness-universal-property-pullback - ( map-codomain-cartesian-hom-arrow g h β) - ( h) - ( cone-cartesian-hom-arrow g h β) - ( up-pullback-cartesian-hom-arrow g h β) - ( A) - ( i ∘ f , pr1 α , H ·r f ∙h coh-hom-arrow f h α)) + up-cartesian-is-cartesian-hom-arrow : + is-cartesian-hom-arrow g h β → + universal-property-cartesian-hom-arrow g h β + up-cartesian-is-cartesian-hom-arrow H = + up-cartesian-has-unique-lifts-hom-arrow g h β + ( has-unique-lifts-is-cartesian-hom-arrow g h β H) + + abstract + is-cartesian-up-cartesian-hom-arrow : + universal-property-cartesian-hom-arrow g h β → + is-cartesian-hom-arrow g h β + is-cartesian-up-cartesian-hom-arrow H = + is-cartesian-has-unique-lifts-hom-arrow g h β + ( has-unique-lifts-up-cartesian-hom-arrow g h β H) ``` ### Lifting cartesian morphisms along lifts of the codomain +> The following computation is obsoleted by the formalizations above, but are +> preserved for potential instructive value. + Suppose given a cospan diagram of arrows ```text From daeb23c484dde92fe8ad16b9be146192256657c8 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Tue, 16 Sep 2025 15:49:30 +0200 Subject: [PATCH 29/41] remove cringe `equiv-tr`s --- .../lifts-morphisms-arrows.lagda.md | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/src/foundation/lifts-morphisms-arrows.lagda.md b/src/foundation/lifts-morphisms-arrows.lagda.md index ac8487736a..372add806c 100644 --- a/src/foundation/lifts-morphisms-arrows.lagda.md +++ b/src/foundation/lifts-morphisms-arrows.lagda.md @@ -26,6 +26,7 @@ open import foundation.transport-along-identifications open import foundation.type-arithmetic-dependent-pair-types open import foundation.universe-levels open import foundation.whiskering-homotopies-composition +open import foundation.whiskering-homotopies-concatenation open import orthogonal-factorization-systems.lifts-maps ``` @@ -283,26 +284,21 @@ module _ ( β₁ ·l H) ( Hβ ·r j) ( inv-htpy I ·r f ∙h (Hα ∙h h ·l J)) - ≃ ( Hβ ·r j ~ - β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h (Hα ∙h h ·l J))) - by - equiv-tr - ( λ Q → Hβ ·r j ~ Q ∙h (inv-htpy I ·r f ∙h (Hα ∙h h ·l J))) - ( inv (eq-htpy (left-whisker-inv-htpy β₁ H))) ≃ ( Hβ ·r j ~ ( β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) ∙h h ·l J) by - equiv-tr - ( Hβ ·r j ~_) - ( ( ap - ( β₁ ·l (inv-htpy H) ∙h_) - ( eq-htpy - ( inv-htpy-assoc-htpy (inv-htpy I ·r f) Hα (h ·l J)))) ∙ - ( eq-htpy - ( inv-htpy-assoc-htpy - ( β₁ ·l (inv-htpy H)) - ( inv-htpy I ·r f ∙h Hα) - ( h ·l J)))) + equiv-concat-htpy' + ( Hβ ·r j) + ( ( right-whisker-concat-htpy + ( inv-htpy (left-whisker-inv-htpy β₁ H)) + ( inv-htpy I ·r f ∙h (Hα ∙h h ·l J))) ∙h + ( left-whisker-concat-htpy + ( β₁ ·l (inv-htpy H)) + ( inv-htpy-assoc-htpy (inv-htpy I ·r f) Hα (h ·l J))) ∙h + ( inv-htpy-assoc-htpy + ( β₁ ·l (inv-htpy H)) + ( inv-htpy I ·r f ∙h Hα) + ( h ·l J))) ≃ ( Hβ ·r j ∙h inv-htpy (h ·l J) ~ β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) by @@ -313,8 +309,9 @@ module _ ≃ ( Hβ ·r j ∙h h ·l inv-htpy J ~ β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) by - equiv-tr - ( λ Q → - Hβ ·r j ∙h Q ~ β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)) - ( inv (eq-htpy (left-whisker-inv-htpy h J))))) + equiv-concat-htpy + ( left-whisker-concat-htpy + ( Hβ ·r j) + ( left-whisker-inv-htpy h J)) + ( β₁ ·l inv-htpy H ∙h (inv-htpy I ·r f ∙h Hα)))) ``` From 8c7faaeadc78e10162a8041915b2940ec9014777 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Tue, 16 Sep 2025 15:52:04 +0200 Subject: [PATCH 30/41] edits --- .../universal-property-cartesian-morphisms-arrows.lagda.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md b/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md index cec7d05f1c..3c9301ddd8 100644 --- a/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md +++ b/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md @@ -245,7 +245,7 @@ module _ ( has-unique-lifts-up-cartesian-hom-arrow g h β H) ``` -### Lifting cartesian morphisms along lifts of the codomain +### Explicit construction of lifts along cartesian morphisms > The following computation is obsoleted by the formalizations above, but are > preserved for potential instructive value. @@ -281,7 +281,7 @@ if `α` is. pullback property of `β`. The rest is a reiteration of the 3-for-2 property of cartesian morphisms. ∎ -We begin by constructing the commuting triangle of morphisms of arrows: +We construct the commuting triangle of morphisms of arrows: ```agda module _ @@ -416,7 +416,7 @@ module _ ( inv-coherence-triangle-hom-arrow-lift-map-codomain-cartesian-hom-arrow) ``` -Now, if `α` was cartesian to begin with, the lift is also. +If `α` was cartesian to begin with, the lift is also. ```agda module _ From c96f223ef2a433ec495319069a7fd09d721e140b Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Tue, 16 Sep 2025 17:00:15 +0200 Subject: [PATCH 31/41] delete some stuff --- .../cartesian-morphisms-arrows.lagda.md | 5 +- ...ormations-polynomial-endofunctors.lagda.md | 56 +------------------ 2 files changed, 6 insertions(+), 55 deletions(-) diff --git a/src/foundation/cartesian-morphisms-arrows.lagda.md b/src/foundation/cartesian-morphisms-arrows.lagda.md index 288eadafba..98047147de 100644 --- a/src/foundation/cartesian-morphisms-arrows.lagda.md +++ b/src/foundation/cartesian-morphisms-arrows.lagda.md @@ -265,13 +265,13 @@ module _ (f : A → B) (g : X → Y) (α : hom-arrow f g) where - is-cartesian-is-cartesian-transpose-cartesian-hom-arrow : + is-cartesian-is-cartesian-transpose-hom-arrow : is-cartesian-hom-arrow ( map-domain-hom-arrow f g α) ( map-codomain-hom-arrow f g α) ( transpose-hom-arrow f g α) → is-cartesian-hom-arrow f g α - is-cartesian-is-cartesian-transpose-cartesian-hom-arrow = + is-cartesian-is-cartesian-transpose-hom-arrow = is-pullback-swap-cone' ( map-codomain-hom-arrow f g α) ( g) @@ -881,6 +881,7 @@ module _ ## See also +- [The universal property of cartesian morphisms of arrows](foundation.universal-property-cartesian-morphisms-arrows.md) - [Cocartesian morphisms of arrows](synthetic-homotopy-theory.cocartesian-morphisms-arrows.md) for the dual. - [Diagonals of morphisms of arrows](foundation.diagonals-of-morphisms-arrows.md) diff --git a/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md index 2302731798..3d6f1b34c8 100644 --- a/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md +++ b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md @@ -11,12 +11,15 @@ open import foundation.action-on-identifications-binary-functions open import foundation.action-on-identifications-functions open import foundation.binary-homotopies open import foundation.cartesian-morphisms-arrows +open import foundation.homotopies-morphisms-arrows open import foundation.commuting-squares-of-homotopies open import foundation.commuting-squares-of-maps open import foundation.cones-over-cospan-diagrams open import foundation.contractible-types +open import foundation.lifts-morphisms-arrows open import foundation.dependent-pair-types open import foundation.equality-dependent-function-types +open import foundation.universal-property-cartesian-morphisms-arrows open import foundation.equivalences open import foundation.function-types open import foundation.functoriality-dependent-pair-types @@ -298,59 +301,6 @@ $f : X → Y$, we have a morphism of arrows in the slice above $α_{*}$: and so by the right-cancellation property of cartesian squares the naturality square at $f$ is cartesian. ∎ -```agda -module _ - {l1 l2 l3 l4 l : Level} - (𝑃 : polynomial-endofunctor l1 l2) - (𝑄 : polynomial-endofunctor l3 l4) - (α : natural-transformation-polynomial-endofunctor l 𝑃 𝑄) - (let α₀ = type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α) - where - - is-cartesian-at-terminal-map-is-cartesian-natural-transformation-polynomial-endofunctor : - is-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α → - is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor - 𝑃 𝑄 α - is-cartesian-at-terminal-map-is-cartesian-natural-transformation-polynomial-endofunctor - H {X} = - H (raise-terminal-map X) - - abstract - is-cartesian-is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor : - is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor - 𝑃 𝑄 α → - is-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α - is-cartesian-is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor - H {X} {Y} f = - is-pullback-top-square-vertical-triangle - α₀ - ( map-polynomial-endofunctor 𝑄 (raise-terminal-map Y)) - ( map-polynomial-endofunctor 𝑄 f) - ( map-polynomial-endofunctor 𝑄 (raise-terminal-map X)) - ( cone-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α - ( raise-terminal-map Y)) - ( cone-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α - ( f)) - ( cone-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α - ( raise-terminal-map X)) - ( refl-htpy) - ( refl-htpy , - refl-htpy , - ( λ (a , h) → - equational-reasoning - pr2 α (raise-terminal-map Y) (a , f ∘ h) ∙ ap (tot (λ x₁ f₁ a → map-raise star)) (pr2 α f (a , h)) ∙ refl - = - pr2 α (raise-terminal-map Y) (a , f ∘ h) ∙ - ap (λ z → pair (pr1 z) (λ z₁ → map-raise star)) (pr2 α f (a , h)) - by right-unit - = {! !} by {! !} - = pr2 α (raise-terminal-map X) (a , h) by {! !})) -- these are two equalities in the type (Σ 𝑄₀ , 1), so they only need to be equal on first components. - ( H {Y}) - ( H {X}) -``` - - - This is mentioned as Remark 2.1.4 in {{#cite GHK22}}. ## References From 0b1130da27f2cea7110b46731ef68f72d4dea440 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Tue, 16 Sep 2025 17:01:24 +0200 Subject: [PATCH 32/41] singluar `shape` and `position` --- ...morphisms-polynomial-endofunctors.lagda.md | 66 +++++++++---------- ...morphisms-polynomial-endofunctors.lagda.md | 38 +++++------ src/trees/polynomial-endofunctors.lagda.md | 22 +++---- ...univalent-polynomial-endofunctors.lagda.md | 4 +- 4 files changed, 65 insertions(+), 65 deletions(-) diff --git a/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md index 61d0a18ff4..6e7652ad50 100644 --- a/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md +++ b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md @@ -82,7 +82,7 @@ module _ is-cartesian-hom-polynomial-endofunctor : UU (l1 ⊔ l2 ⊔ l4) is-cartesian-hom-polynomial-endofunctor = - (a : shapes-polynomial-endofunctor 𝑃) → + (a : shape-polynomial-endofunctor 𝑃) → is-equiv (positions-hom-polynomial-endofunctor 𝑃 𝑄 α a) is-prop-is-cartesian-hom-polynomial-endofunctor : @@ -114,10 +114,10 @@ make-cartesian-hom-polynomial-endofunctor : {l1 l2 l3 l4 : Level} (𝑃 : polynomial-endofunctor l1 l2) (𝑄 : polynomial-endofunctor l3 l4) - (α₀ : shapes-polynomial-endofunctor 𝑃 → shapes-polynomial-endofunctor 𝑄) → - ( (a : shapes-polynomial-endofunctor 𝑃) → - positions-polynomial-endofunctor 𝑄 (α₀ a) ≃ - positions-polynomial-endofunctor 𝑃 a) → + (α₀ : shape-polynomial-endofunctor 𝑃 → shape-polynomial-endofunctor 𝑄) → + ( (a : shape-polynomial-endofunctor 𝑃) → + position-polynomial-endofunctor 𝑄 (α₀ a) ≃ + position-polynomial-endofunctor 𝑃 a) → cartesian-hom-polynomial-endofunctor 𝑃 𝑄 make-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α₀ α₁ = ( ( α₀ , map-equiv ∘ α₁) , is-equiv-map-equiv ∘ α₁) @@ -133,18 +133,18 @@ module _ hom-cartesian-hom-polynomial-endofunctor = pr1 α shapes-cartesian-hom-polynomial-endofunctor : - shapes-polynomial-endofunctor 𝑃 → shapes-polynomial-endofunctor 𝑄 + shape-polynomial-endofunctor 𝑃 → shape-polynomial-endofunctor 𝑄 shapes-cartesian-hom-polynomial-endofunctor = shapes-hom-polynomial-endofunctor 𝑃 𝑄 hom-cartesian-hom-polynomial-endofunctor positions-cartesian-hom-polynomial-endofunctor : - (a : shapes-polynomial-endofunctor 𝑃) → - positions-polynomial-endofunctor 𝑄 + (a : shape-polynomial-endofunctor 𝑃) → + position-polynomial-endofunctor 𝑄 ( shapes-hom-polynomial-endofunctor 𝑃 𝑄 ( hom-cartesian-hom-polynomial-endofunctor) ( a)) → - positions-polynomial-endofunctor 𝑃 a + position-polynomial-endofunctor 𝑃 a positions-cartesian-hom-polynomial-endofunctor = positions-hom-polynomial-endofunctor 𝑃 𝑄 hom-cartesian-hom-polynomial-endofunctor @@ -162,12 +162,12 @@ module _ is-cartesian-cartesian-hom-polynomial-endofunctor = pr2 α equiv-positions-cartesian-hom-polynomial-endofunctor : - (a : shapes-polynomial-endofunctor 𝑃) → - positions-polynomial-endofunctor 𝑄 + (a : shape-polynomial-endofunctor 𝑃) → + position-polynomial-endofunctor 𝑄 ( shapes-hom-polynomial-endofunctor 𝑃 𝑄 ( hom-cartesian-hom-polynomial-endofunctor) ( a)) ≃ - positions-polynomial-endofunctor 𝑃 a + position-polynomial-endofunctor 𝑃 a equiv-positions-cartesian-hom-polynomial-endofunctor a = ( positions-cartesian-hom-polynomial-endofunctor a , is-cartesian-cartesian-hom-polynomial-endofunctor a) @@ -247,11 +247,11 @@ module _ cartesian-hom-polynomial-endofunctor' : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) cartesian-hom-polynomial-endofunctor' = - Σ ( shapes-polynomial-endofunctor 𝑃 → shapes-polynomial-endofunctor 𝑄) + Σ ( shape-polynomial-endofunctor 𝑃 → shape-polynomial-endofunctor 𝑄) ( λ α₀ → - ((a : shapes-polynomial-endofunctor 𝑃) → - positions-polynomial-endofunctor 𝑄 (α₀ a) ≃ - positions-polynomial-endofunctor 𝑃 a)) + ((a : shape-polynomial-endofunctor 𝑃) → + position-polynomial-endofunctor 𝑄 (α₀ a) ≃ + position-polynomial-endofunctor 𝑃 a)) reassociate-type-cartesian-hom-polynomial-endofunctor : cartesian-hom-polynomial-endofunctor 𝑃 𝑄 ≃ @@ -274,9 +274,9 @@ module _ is-trunc-succ-cartesian-hom-polynomial-endofunctor' : (k : 𝕋) → - is-trunc (succ-𝕋 k) (shapes-polynomial-endofunctor 𝑄) → - ( (c : shapes-polynomial-endofunctor 𝑄) → - is-trunc (succ-𝕋 k) (positions-polynomial-endofunctor 𝑄 c)) → + is-trunc (succ-𝕋 k) (shape-polynomial-endofunctor 𝑄) → + ( (c : shape-polynomial-endofunctor 𝑄) → + is-trunc (succ-𝕋 k) (position-polynomial-endofunctor 𝑄 c)) → is-trunc (succ-𝕋 k) (cartesian-hom-polynomial-endofunctor' 𝑃 𝑄) is-trunc-succ-cartesian-hom-polynomial-endofunctor' k hQ hQ' = is-trunc-Σ @@ -288,9 +288,9 @@ module _ is-trunc-succ-cartesian-hom-polynomial-endofunctor : (k : 𝕋) → - is-trunc (succ-𝕋 k) (shapes-polynomial-endofunctor 𝑄) → - ( (c : shapes-polynomial-endofunctor 𝑄) → - is-trunc (succ-𝕋 k) (positions-polynomial-endofunctor 𝑄 c)) → + is-trunc (succ-𝕋 k) (shape-polynomial-endofunctor 𝑄) → + ( (c : shape-polynomial-endofunctor 𝑄) → + is-trunc (succ-𝕋 k) (position-polynomial-endofunctor 𝑄 c)) → is-trunc (succ-𝕋 k) (cartesian-hom-polynomial-endofunctor 𝑃 𝑄) is-trunc-succ-cartesian-hom-polynomial-endofunctor k hQ hQ' = is-trunc-equiv @@ -314,8 +314,8 @@ module _ where compute-fiber-type-cartesian-hom-polynomial-endofunctor : - (c : shapes-polynomial-endofunctor 𝑄) - (x : positions-polynomial-endofunctor 𝑄 c → X) → + (c : shape-polynomial-endofunctor 𝑄) + (x : position-polynomial-endofunctor 𝑄 c → X) → fiber (type-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α {X = X}) (c , x) ≃ fiber α₀ c compute-fiber-type-cartesian-hom-polynomial-endofunctor c x = @@ -325,10 +325,10 @@ module _ ( λ (a , p) → fiber ( precomp (α₁ a) X) - ( inv-tr (λ c → positions-polynomial-endofunctor 𝑄 c → X) p x)) + ( inv-tr (λ c → position-polynomial-endofunctor 𝑄 c → X) p x)) by compute-fiber-map-Σ - ( λ c → positions-polynomial-endofunctor 𝑄 c → X) + ( λ c → position-polynomial-endofunctor 𝑄 c → X) ( α₀) ( λ a → precomp (α₁ a) X) ( c , x) @@ -341,7 +341,7 @@ module _ ( α₁ a) ( is-cartesian-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α a) ( X)) - ( inv-tr (λ c → positions-polynomial-endofunctor 𝑄 c → X) p x)) + ( inv-tr (λ c → position-polynomial-endofunctor 𝑄 c → X) p x)) ``` ### The associated natural transformation of a cartesian morphism is cartesian @@ -388,23 +388,23 @@ module _ (𝑃 : polynomial-endofunctor l1 l2) (𝑄 : polynomial-endofunctor l3 l4) (α : cartesian-natural-transformation-polynomial-endofunctor l2 𝑃 𝑄) - (let 𝑃₀ = shapes-polynomial-endofunctor 𝑃) - (let 𝑃₁ = positions-polynomial-endofunctor 𝑃) + (let 𝑃₀ = shape-polynomial-endofunctor 𝑃) + (let 𝑃₁ = position-polynomial-endofunctor 𝑃) (let α₀ = type-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α) where shapes-cartesian-natural-transformation-polynomial-endofunctor : - shapes-polynomial-endofunctor 𝑃 → shapes-polynomial-endofunctor 𝑄 + shape-polynomial-endofunctor 𝑃 → shape-polynomial-endofunctor 𝑄 shapes-cartesian-natural-transformation-polynomial-endofunctor = shapes-natural-transformation-polynomial-endofunctor 𝑃 𝑄 ( natural-transformation-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α) positions-cartesian-natural-transformation-polynomial-endofunctor : - (a : shapes-polynomial-endofunctor 𝑃) → - positions-polynomial-endofunctor 𝑄 + (a : shape-polynomial-endofunctor 𝑃) → + position-polynomial-endofunctor 𝑄 ( shapes-cartesian-natural-transformation-polynomial-endofunctor a) → - positions-polynomial-endofunctor 𝑃 a + position-polynomial-endofunctor 𝑃 a positions-cartesian-natural-transformation-polynomial-endofunctor = positions-natural-transformation-polynomial-endofunctor 𝑃 𝑄 ( natural-transformation-cartesian-natural-transformation-polynomial-endofunctor diff --git a/src/trees/morphisms-polynomial-endofunctors.lagda.md b/src/trees/morphisms-polynomial-endofunctors.lagda.md index 56c62529c1..98242f0b78 100644 --- a/src/trees/morphisms-polynomial-endofunctors.lagda.md +++ b/src/trees/morphisms-polynomial-endofunctors.lagda.md @@ -73,13 +73,13 @@ module _ where shapes-hom-polynomial-endofunctor : - shapes-polynomial-endofunctor 𝑃 → shapes-polynomial-endofunctor 𝑄 + shape-polynomial-endofunctor 𝑃 → shape-polynomial-endofunctor 𝑄 shapes-hom-polynomial-endofunctor = pr1 α positions-hom-polynomial-endofunctor : - (a : shapes-polynomial-endofunctor 𝑃) → - positions-polynomial-endofunctor 𝑄 (shapes-hom-polynomial-endofunctor a) → - positions-polynomial-endofunctor 𝑃 a + (a : shape-polynomial-endofunctor 𝑃) → + position-polynomial-endofunctor 𝑄 (shapes-hom-polynomial-endofunctor a) → + position-polynomial-endofunctor 𝑃 a positions-hom-polynomial-endofunctor = pr2 α type-hom-polynomial-endofunctor : @@ -88,7 +88,7 @@ module _ type-polynomial-endofunctor 𝑄 X type-hom-polynomial-endofunctor {X = X} = map-Σ - ( λ c → positions-polynomial-endofunctor 𝑄 c → X) + ( λ c → position-polynomial-endofunctor 𝑄 c → X) ( shapes-hom-polynomial-endofunctor) ( λ a → precomp (positions-hom-polynomial-endofunctor a) X) ``` @@ -135,13 +135,13 @@ module _ Σ ( shapes-hom-polynomial-endofunctor 𝑃 𝑄 α ~ shapes-hom-polynomial-endofunctor 𝑃 𝑄 β) ( λ H → - (a : shapes-polynomial-endofunctor 𝑃) + (a : shape-polynomial-endofunctor 𝑃) (d : - positions-polynomial-endofunctor 𝑄 + position-polynomial-endofunctor 𝑄 ( shapes-hom-polynomial-endofunctor 𝑃 𝑄 α a)) → positions-hom-polynomial-endofunctor 𝑃 𝑄 α a d = positions-hom-polynomial-endofunctor 𝑃 𝑄 β a - ( tr (positions-polynomial-endofunctor 𝑄) (H a) d)) + ( tr (position-polynomial-endofunctor 𝑄) (H a) d)) refl-htpy-hom-polynomial-endofunctor : (α : hom-polynomial-endofunctor 𝑃 𝑄) → htpy-hom-polynomial-endofunctor α α @@ -199,9 +199,9 @@ module _ is-trunc-hom-polynomial-endofunctor : (k : 𝕋) → - is-trunc k (shapes-polynomial-endofunctor 𝑄) → - ( (a : shapes-polynomial-endofunctor 𝑃) → - is-trunc k (positions-polynomial-endofunctor 𝑃 a)) → + is-trunc k (shape-polynomial-endofunctor 𝑄) → + ( (a : shape-polynomial-endofunctor 𝑃) → + is-trunc k (position-polynomial-endofunctor 𝑃 a)) → is-trunc k (hom-polynomial-endofunctor 𝑃 𝑄) is-trunc-hom-polynomial-endofunctor k hQ hP = is-trunc-Σ @@ -266,15 +266,15 @@ module _ where shapes-natural-transformation-polynomial-endofunctor : - shapes-polynomial-endofunctor 𝑃 → shapes-polynomial-endofunctor 𝑄 + shape-polynomial-endofunctor 𝑃 → shape-polynomial-endofunctor 𝑄 shapes-natural-transformation-polynomial-endofunctor a = pr1 (type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α (a , id)) positions-natural-transformation-polynomial-endofunctor : - (a : shapes-polynomial-endofunctor 𝑃) → - positions-polynomial-endofunctor 𝑄 + (a : shape-polynomial-endofunctor 𝑃) → + position-polynomial-endofunctor 𝑄 ( shapes-natural-transformation-polynomial-endofunctor a) → - positions-polynomial-endofunctor 𝑃 a + position-polynomial-endofunctor 𝑃 a positions-natural-transformation-polynomial-endofunctor a = pr2 (type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α (a , id)) @@ -293,9 +293,9 @@ module _ (𝑃 : polynomial-endofunctor l1 l2) (𝑄 : polynomial-endofunctor l3 l4) (α@(α₀ , α₁) : hom-polynomial-endofunctor 𝑃 𝑄) - (let 𝑃₁ = positions-polynomial-endofunctor 𝑃) - (let 𝑄₀ = shapes-polynomial-endofunctor 𝑄) - (let 𝑄₁ = positions-polynomial-endofunctor 𝑄) + (let 𝑃₁ = position-polynomial-endofunctor 𝑃) + (let 𝑄₀ = shape-polynomial-endofunctor 𝑄) + (let 𝑄₁ = position-polynomial-endofunctor 𝑄) {X : UU l5} where @@ -320,7 +320,7 @@ module _ ( inv-tr (λ c' → pr2 𝑄 c' → X) p x)) by compute-fiber-map-Σ - ( λ c → positions-polynomial-endofunctor 𝑄 c → X) + ( λ c → position-polynomial-endofunctor 𝑄 c → X) ( α₀) ( λ a → precomp (α₁ a) X) ( c , x) diff --git a/src/trees/polynomial-endofunctors.lagda.md b/src/trees/polynomial-endofunctors.lagda.md index 044cec1a61..de31ed9f8e 100644 --- a/src/trees/polynomial-endofunctors.lagda.md +++ b/src/trees/polynomial-endofunctors.lagda.md @@ -57,11 +57,11 @@ module _ {l1 l2 : Level} (𝑃 : polynomial-endofunctor l1 l2) where - shapes-polynomial-endofunctor : UU l1 - shapes-polynomial-endofunctor = pr1 𝑃 + shape-polynomial-endofunctor : UU l1 + shape-polynomial-endofunctor = pr1 𝑃 - positions-polynomial-endofunctor : shapes-polynomial-endofunctor → UU l2 - positions-polynomial-endofunctor = pr2 𝑃 + position-polynomial-endofunctor : shape-polynomial-endofunctor → UU l2 + position-polynomial-endofunctor = pr2 𝑃 make-polynomial-endofunctor : {l1 l2 : Level} {A : UU l1} → (A → UU l2) → polynomial-endofunctor l1 l2 @@ -206,20 +206,20 @@ module _ where compute-fiber-map-polynomial-endofunctor : - (a : shapes-polynomial-endofunctor 𝑃) - (y : positions-polynomial-endofunctor 𝑃 a → Y) → + (a : shape-polynomial-endofunctor 𝑃) + (y : position-polynomial-endofunctor 𝑃 a → Y) → fiber (map-polynomial-endofunctor 𝑃 f) (a , y) ≃ - ( (b : positions-polynomial-endofunctor 𝑃 a) → fiber f (y b)) + ( (b : position-polynomial-endofunctor 𝑃 a) → fiber f (y b)) compute-fiber-map-polynomial-endofunctor a y = equivalence-reasoning fiber (map-polynomial-endofunctor 𝑃 f) (a , y) - ≃ fiber (postcomp (positions-polynomial-endofunctor 𝑃 a) f) y + ≃ fiber (postcomp (position-polynomial-endofunctor 𝑃 a) f) y by compute-fiber-tot - ( λ a → postcomp (positions-polynomial-endofunctor 𝑃 a) f) + ( λ a → postcomp (position-polynomial-endofunctor 𝑃 a) f) ( a , y) - ≃ ((b : positions-polynomial-endofunctor 𝑃 a) → fiber f (y b)) - by inv-compute-Π-fiber-postcomp (positions-polynomial-endofunctor 𝑃 a) f y + ≃ ((b : position-polynomial-endofunctor 𝑃 a) → fiber f (y b)) + by inv-compute-Π-fiber-postcomp (position-polynomial-endofunctor 𝑃 a) f y ``` ## See also diff --git a/src/trees/univalent-polynomial-endofunctors.lagda.md b/src/trees/univalent-polynomial-endofunctors.lagda.md index aac0e4c1d4..62a9e61f01 100644 --- a/src/trees/univalent-polynomial-endofunctors.lagda.md +++ b/src/trees/univalent-polynomial-endofunctors.lagda.md @@ -90,13 +90,13 @@ module _ shapes-univalent-polynomial-endofunctor : UU l1 shapes-univalent-polynomial-endofunctor = - shapes-polynomial-endofunctor + shape-polynomial-endofunctor polynomial-endofunctor-univalent-polynomial-endofunctor positions-univalent-polynomial-endofunctor : shapes-univalent-polynomial-endofunctor → UU l2 positions-univalent-polynomial-endofunctor = - positions-polynomial-endofunctor + position-polynomial-endofunctor polynomial-endofunctor-univalent-polynomial-endofunctor is-univalent-univalent-polynomial-endofunctor : From 1c9f007657c1740cd366b5e2e47e463f3e405a69 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Tue, 16 Sep 2025 22:40:17 +0200 Subject: [PATCH 33/41] casing --- references.bib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/references.bib b/references.bib index a906360dac..8eb952ef03 100644 --- a/references.bib +++ b/references.bib @@ -522,7 +522,7 @@ @article{GHK22 @article{GK12, title = {Polynomial functors and polynomial monads}, - author = {GAMBINO, NICOLA and KOCK, JOACHIM}, + author = {Gambino, Nicola and Kock, Joachim}, year = 2012, month = sep, journal = {Mathematical Proceedings of the Cambridge Philosophical Society}, From 19ef9008e8b2a6b7210f58b14f5dbf59c15e2ff7 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 19 Sep 2025 07:48:07 +0200 Subject: [PATCH 34/41] random edits --- .../double-negation-images.lagda.md | 8 ++--- src/foundation/noninjective-maps.lagda.md | 34 +++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/foundation/double-negation-images.lagda.md b/src/foundation/double-negation-images.lagda.md index 7fdda611c5..c74046f3c0 100644 --- a/src/foundation/double-negation-images.lagda.md +++ b/src/foundation/double-negation-images.lagda.md @@ -61,7 +61,7 @@ such that `l` is double negation dense, i.e., its [fibers](foundation-core.fibers-of-maps.md) are [nonempty](foundation.double-negation.md), and `r` is a double negation stable embedding, i.e., its fibers are [propositions](foundation-core.propositions.md) -and satisfy the property that if they are nonempty then they are inhabited. +that satisfy the property that if they are nonempty then they are inhabited. This factorization is unique in the sense that any other commuting triangle @@ -79,9 +79,9 @@ modality, which is shown in [`foundation.double-negation-modality`](foundation.double-negation-modality.md). The double negation image factorization is in one sense an approximation to the -[image factorization](foundation.images.md) which satisfies a restricted -universal property that only applies to -[negative statements](foundation-core.negation.md) and does not rely on the +[image factorization](foundation.images.md) that satisfies a restricted +universal property which only applies to +[negative statements](foundation-core.negation.md), and does not rely on the existence of [propositional truncations](foundation.propositional-truncations.md). On the other hand, the double negation image inclusion `r` satisfies the additional diff --git a/src/foundation/noninjective-maps.lagda.md b/src/foundation/noninjective-maps.lagda.md index b5a08aeb11..dc8672eef6 100644 --- a/src/foundation/noninjective-maps.lagda.md +++ b/src/foundation/noninjective-maps.lagda.md @@ -41,23 +41,6 @@ if there [exists](foundation.existential-quantification.md) a ## Definitions -### Not injective maps - -```agda -module _ - {l1 l2 : Level} {A : UU l1} {B : UU l2} - where - - is-not-injective : (A → B) → UU (l1 ⊔ l2) - is-not-injective f = ¬ (is-injective f) - - is-prop-is-not-injective : {f : A → B} → is-prop (is-not-injective f) - is-prop-is-not-injective = is-prop-neg - - is-not-injective-Prop : (A → B) → Prop (l1 ⊔ l2) - is-not-injective-Prop f = (is-not-injective f , is-prop-is-not-injective) -``` - ### Noninjective maps ```agda @@ -92,6 +75,23 @@ module _ is-noninjective-map-noninjective-map = pr2 f ``` +### Not injective maps + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where + + is-not-injective : (A → B) → UU (l1 ⊔ l2) + is-not-injective f = ¬ (is-injective f) + + is-prop-is-not-injective : {f : A → B} → is-prop (is-not-injective f) + is-prop-is-not-injective = is-prop-neg + + is-not-injective-Prop : (A → B) → Prop (l1 ⊔ l2) + is-not-injective-Prop f = (is-not-injective f , is-prop-is-not-injective) +``` + ## Properties ### Noninjective maps are not injective From e03d7f73150271306b656b0d5cb33ea3ad5a8862 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 19 Sep 2025 07:48:49 +0200 Subject: [PATCH 35/41] fix `WDID` in `left-modules-rings` --- src/linear-algebra/left-modules-rings.lagda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linear-algebra/left-modules-rings.lagda.md b/src/linear-algebra/left-modules-rings.lagda.md index 35ae1ca391..5b1b5daf21 100644 --- a/src/linear-algebra/left-modules-rings.lagda.md +++ b/src/linear-algebra/left-modules-rings.lagda.md @@ -36,7 +36,7 @@ open import ring-theory.rings ## Idea A -{{#concept "left module" WD="left module" WDID="Q120721996" Agda=left-module-Ring}} +{{#concept "left module" WD="left module" WDID=Q120721996 Agda=left-module-Ring}} `M` over a [ring](ring-theory.rings.md) `R` consists of an [abelian group](group-theory.abelian-groups.md) `M` equipped with an action `R → M → M` such that From 055567e000b40ead863cad43a03d674fa3b6319e Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Fri, 19 Sep 2025 17:59:34 +0200 Subject: [PATCH 36/41] edits --- ...ormations-polynomial-endofunctors.lagda.md | 6 +++--- ...morphisms-polynomial-endofunctors.lagda.md | 20 +++++++++++++++---- ...univalent-polynomial-endofunctors.lagda.md | 5 +++-- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md index 3d6f1b34c8..d5f00d7ba0 100644 --- a/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md +++ b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md @@ -11,23 +11,22 @@ open import foundation.action-on-identifications-binary-functions open import foundation.action-on-identifications-functions open import foundation.binary-homotopies open import foundation.cartesian-morphisms-arrows -open import foundation.homotopies-morphisms-arrows open import foundation.commuting-squares-of-homotopies open import foundation.commuting-squares-of-maps open import foundation.cones-over-cospan-diagrams open import foundation.contractible-types -open import foundation.lifts-morphisms-arrows open import foundation.dependent-pair-types open import foundation.equality-dependent-function-types -open import foundation.universal-property-cartesian-morphisms-arrows open import foundation.equivalences open import foundation.function-types open import foundation.functoriality-dependent-pair-types open import foundation.fundamental-theorem-of-identity-types open import foundation.homotopies +open import foundation.homotopies-morphisms-arrows open import foundation.homotopy-induction open import foundation.identity-types open import foundation.implicit-function-types +open import foundation.lifts-morphisms-arrows open import foundation.morphisms-arrows open import foundation.precomposition-functions open import foundation.propositions @@ -37,6 +36,7 @@ open import foundation.sections open import foundation.structure-identity-principle open import foundation.transport-along-identifications open import foundation.unit-type +open import foundation.universal-property-cartesian-morphisms-arrows open import foundation.universe-levels open import foundation.whiskering-homotopies-composition diff --git a/src/trees/morphisms-polynomial-endofunctors.lagda.md b/src/trees/morphisms-polynomial-endofunctors.lagda.md index 98242f0b78..e9245a5b00 100644 --- a/src/trees/morphisms-polynomial-endofunctors.lagda.md +++ b/src/trees/morphisms-polynomial-endofunctors.lagda.md @@ -27,6 +27,7 @@ open import foundation.identity-types open import foundation.implicit-function-types open import foundation.morphisms-arrows open import foundation.precomposition-functions +open import foundation.retracts-of-types open import foundation.sections open import foundation.structure-identity-principle open import foundation.transport-along-identifications @@ -355,6 +356,9 @@ module _ ### Comparison between morphisms and natural transformations +Morphisms of polynomial endofunctors form a retract of natural transformations, +and this map is a section on shapes. + ```agda module _ {l1 l2 l3 l4 : Level} @@ -380,14 +384,22 @@ module _ inv ( naturality-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α x ( a , id)) + + retract-hom-natural-transformation-polynomial-endofunctor : + ( hom-polynomial-endofunctor 𝑃 𝑄) retract-of + ( natural-transformation-polynomial-endofunctor l2 𝑃 𝑄) + retract-hom-natural-transformation-polynomial-endofunctor = + ( λ f → natural-transformation-hom-polynomial-endofunctor 𝑃 𝑄 f {l2}) , + ( hom-natural-transformation-polynomial-endofunctor 𝑃 𝑄) , + ( is-retraction-hom-natural-transformation-polynomial-endofunctor) ``` -**Comment.** If we were to show these notions are equivalent, we would have -needed natural transformations to satisfy the following equality: +**Comment.** If these notions were to be equivalent we would have needed natural +transformations to satisfy the following equality: $$ α₁ (f ∘ x) (a , id) = ap (𝑄 f) (α₁ x (a , id)) ∙ α₁ f (a , x), $$ -which is an unfolding of the condition that the naturality square of a composite -map is given by pasting of squares. +which is an instance of the unfolded condition that the naturality square of a +composite map is given by pasting of squares. diff --git a/src/trees/univalent-polynomial-endofunctors.lagda.md b/src/trees/univalent-polynomial-endofunctors.lagda.md index 62a9e61f01..85e0a9b494 100644 --- a/src/trees/univalent-polynomial-endofunctors.lagda.md +++ b/src/trees/univalent-polynomial-endofunctors.lagda.md @@ -246,8 +246,9 @@ module _ coh-refl-eq-Eq-type-univalent-polynomial-endofunctor : (x : type-univalent-polynomial-endofunctor 𝑃 X) → - ( eq-Eq-type-univalent-polynomial-endofunctor x x - ( refl-Eq-type-univalent-polynomial-endofunctor x)) = refl + eq-Eq-type-univalent-polynomial-endofunctor x x + ( refl-Eq-type-univalent-polynomial-endofunctor x) = + refl coh-refl-eq-Eq-type-univalent-polynomial-endofunctor x = is-retraction-eq-Eq-type-univalent-polynomial-endofunctor x x refl ``` From 537a135d414be0c46877d95f3b0e5898604431b3 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 20 Sep 2025 15:19:22 +0200 Subject: [PATCH 37/41] A natural transformation into a polynomial endofunctor with a set of shapes is cartesian if and only if it is cartesian at terminal maps --- ...ormations-polynomial-endofunctors.lagda.md | 44 +++++++++++++++++-- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md index d5f00d7ba0..36353ab2da 100644 --- a/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md +++ b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md @@ -14,6 +14,7 @@ open import foundation.cartesian-morphisms-arrows open import foundation.commuting-squares-of-homotopies open import foundation.commuting-squares-of-maps open import foundation.cones-over-cospan-diagrams +open import foundation.sets open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.equality-dependent-function-types @@ -281,11 +282,12 @@ module _ is-cartesian-comp-cartesian-natural-transformation-polynomial-endofunctor) ``` -### A natural transformation is cartesian if and only if it is cartesian at terminal maps +### A natural transformation into a polynomial endofunctor with a set of shapes is cartesian if and only if it is cartesian at terminal maps **Proof.** One direction is trivial. For the other direction, given a natural transformation of polynomial endofunctors $α : 𝑃 ⇒ 𝑄$ and an arbitrary function -$f : X → Y$, we have a morphism of arrows in the slice above $α_{*}$: +$f : X → Y$, since the type of shapes of $𝑄$ is a set, the following prism +commutes and we have a morphism of arrows in the slice above $α_{*}$: ```text αX @@ -301,7 +303,43 @@ $f : X → Y$, we have a morphism of arrows in the slice above $α_{*}$: and so by the right-cancellation property of cartesian squares the naturality square at $f$ is cartesian. ∎ -This is mentioned as Remark 2.1.4 in {{#cite GHK22}}. +This holds more generally for coherent natural transformations between arbitrary +polynomial functors, as mentioned in Remark 2.1.4 in {{#cite GHK22}}. + +```agda +module _ + {l1 l2 l3 l4 l : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α : natural-transformation-polynomial-endofunctor l 𝑃 𝑄) + where + + is-cartesian-is-cartesian-at-terminal-map-natural-transformation-is-set-shape-polynomial-endofunctor : + is-set (shape-polynomial-endofunctor 𝑄) → + is-cartesian-at-terminal-map-natural-transformation-polynomial-endofunctor + 𝑃 𝑄 α → + is-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α + is-cartesian-is-cartesian-at-terminal-map-natural-transformation-is-set-shape-polynomial-endofunctor + H𝑄 Hα {X} {Y} f = + is-pullback-top-square-vertical-triangle + (type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α) + (map-polynomial-endofunctor 𝑄 (raise-terminal-map Y)) + (map-polynomial-endofunctor 𝑄 f) + (map-polynomial-endofunctor 𝑄 (raise-terminal-map X)) + ( cone-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α + ( raise-terminal-map Y)) + ( cone-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α f) + ( cone-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α + ( raise-terminal-map X)) + ( refl-htpy) + ( refl-htpy , + refl-htpy , + λ x → + eq-is-prop + ( is-set-Σ H𝑄 (λ _ → is-set-function-type is-set-raise-unit) _ _)) + ( Hα {Y}) + ( Hα {X}) +``` ## References From 55e796e6aad02a9d18a550270c804b69573416cb Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 20 Sep 2025 15:36:33 +0200 Subject: [PATCH 38/41] fix another naming --- ...morphisms-polynomial-endofunctors.lagda.md | 44 +++++++++---------- ...morphisms-polynomial-endofunctors.lagda.md | 44 +++++++++---------- ...univalent-polynomial-endofunctors.lagda.md | 26 +++++------ 3 files changed, 57 insertions(+), 57 deletions(-) diff --git a/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md index 6e7652ad50..7899057662 100644 --- a/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md +++ b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md @@ -83,14 +83,14 @@ module _ is-cartesian-hom-polynomial-endofunctor : UU (l1 ⊔ l2 ⊔ l4) is-cartesian-hom-polynomial-endofunctor = (a : shape-polynomial-endofunctor 𝑃) → - is-equiv (positions-hom-polynomial-endofunctor 𝑃 𝑄 α a) + is-equiv (position-hom-polynomial-endofunctor 𝑃 𝑄 α a) is-prop-is-cartesian-hom-polynomial-endofunctor : is-prop is-cartesian-hom-polynomial-endofunctor is-prop-is-cartesian-hom-polynomial-endofunctor = is-prop-Π ( λ a → - is-property-is-equiv (positions-hom-polynomial-endofunctor 𝑃 𝑄 α a)) + is-property-is-equiv (position-hom-polynomial-endofunctor 𝑃 𝑄 α a)) is-cartesian-hom-polynomial-endofunctor-Prop : Prop (l1 ⊔ l2 ⊔ l4) is-cartesian-hom-polynomial-endofunctor-Prop = @@ -132,21 +132,21 @@ module _ hom-cartesian-hom-polynomial-endofunctor : hom-polynomial-endofunctor 𝑃 𝑄 hom-cartesian-hom-polynomial-endofunctor = pr1 α - shapes-cartesian-hom-polynomial-endofunctor : + shape-cartesian-hom-polynomial-endofunctor : shape-polynomial-endofunctor 𝑃 → shape-polynomial-endofunctor 𝑄 - shapes-cartesian-hom-polynomial-endofunctor = - shapes-hom-polynomial-endofunctor 𝑃 𝑄 + shape-cartesian-hom-polynomial-endofunctor = + shape-hom-polynomial-endofunctor 𝑃 𝑄 hom-cartesian-hom-polynomial-endofunctor - positions-cartesian-hom-polynomial-endofunctor : + position-cartesian-hom-polynomial-endofunctor : (a : shape-polynomial-endofunctor 𝑃) → position-polynomial-endofunctor 𝑄 - ( shapes-hom-polynomial-endofunctor 𝑃 𝑄 + ( shape-hom-polynomial-endofunctor 𝑃 𝑄 ( hom-cartesian-hom-polynomial-endofunctor) ( a)) → position-polynomial-endofunctor 𝑃 a - positions-cartesian-hom-polynomial-endofunctor = - positions-hom-polynomial-endofunctor 𝑃 𝑄 + position-cartesian-hom-polynomial-endofunctor = + position-hom-polynomial-endofunctor 𝑃 𝑄 hom-cartesian-hom-polynomial-endofunctor type-cartesian-hom-polynomial-endofunctor : @@ -161,15 +161,15 @@ module _ hom-cartesian-hom-polynomial-endofunctor is-cartesian-cartesian-hom-polynomial-endofunctor = pr2 α - equiv-positions-cartesian-hom-polynomial-endofunctor : + equiv-position-cartesian-hom-polynomial-endofunctor : (a : shape-polynomial-endofunctor 𝑃) → position-polynomial-endofunctor 𝑄 - ( shapes-hom-polynomial-endofunctor 𝑃 𝑄 + ( shape-hom-polynomial-endofunctor 𝑃 𝑄 ( hom-cartesian-hom-polynomial-endofunctor) ( a)) ≃ position-polynomial-endofunctor 𝑃 a - equiv-positions-cartesian-hom-polynomial-endofunctor a = - ( positions-cartesian-hom-polynomial-endofunctor a , + equiv-position-cartesian-hom-polynomial-endofunctor a = + ( position-cartesian-hom-polynomial-endofunctor a , is-cartesian-cartesian-hom-polynomial-endofunctor a) naturality-cartesian-hom-polynomial-endofunctor : @@ -308,8 +308,8 @@ module _ (𝑃 : polynomial-endofunctor l1 l2) (𝑄 : polynomial-endofunctor l3 l4) (α : cartesian-hom-polynomial-endofunctor 𝑃 𝑄) - (let α₀ = shapes-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α) - (let α₁ = positions-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α) + (let α₀ = shape-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α) + (let α₁ = position-cartesian-hom-polynomial-endofunctor 𝑃 𝑄 α) {X : UU l5} where @@ -393,20 +393,20 @@ module _ (let α₀ = type-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α) where - shapes-cartesian-natural-transformation-polynomial-endofunctor : + shape-cartesian-natural-transformation-polynomial-endofunctor : shape-polynomial-endofunctor 𝑃 → shape-polynomial-endofunctor 𝑄 - shapes-cartesian-natural-transformation-polynomial-endofunctor = - shapes-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + shape-cartesian-natural-transformation-polynomial-endofunctor = + shape-natural-transformation-polynomial-endofunctor 𝑃 𝑄 ( natural-transformation-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α) - positions-cartesian-natural-transformation-polynomial-endofunctor : + position-cartesian-natural-transformation-polynomial-endofunctor : (a : shape-polynomial-endofunctor 𝑃) → position-polynomial-endofunctor 𝑄 - ( shapes-cartesian-natural-transformation-polynomial-endofunctor a) → + ( shape-cartesian-natural-transformation-polynomial-endofunctor a) → position-polynomial-endofunctor 𝑃 a - positions-cartesian-natural-transformation-polynomial-endofunctor = - positions-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + position-cartesian-natural-transformation-polynomial-endofunctor = + position-natural-transformation-polynomial-endofunctor 𝑃 𝑄 ( natural-transformation-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α) diff --git a/src/trees/morphisms-polynomial-endofunctors.lagda.md b/src/trees/morphisms-polynomial-endofunctors.lagda.md index e9245a5b00..a02d3c8b15 100644 --- a/src/trees/morphisms-polynomial-endofunctors.lagda.md +++ b/src/trees/morphisms-polynomial-endofunctors.lagda.md @@ -73,15 +73,15 @@ module _ (α : hom-polynomial-endofunctor 𝑃 𝑄) where - shapes-hom-polynomial-endofunctor : + shape-hom-polynomial-endofunctor : shape-polynomial-endofunctor 𝑃 → shape-polynomial-endofunctor 𝑄 - shapes-hom-polynomial-endofunctor = pr1 α + shape-hom-polynomial-endofunctor = pr1 α - positions-hom-polynomial-endofunctor : + position-hom-polynomial-endofunctor : (a : shape-polynomial-endofunctor 𝑃) → - position-polynomial-endofunctor 𝑄 (shapes-hom-polynomial-endofunctor a) → + position-polynomial-endofunctor 𝑄 (shape-hom-polynomial-endofunctor a) → position-polynomial-endofunctor 𝑃 a - positions-hom-polynomial-endofunctor = pr2 α + position-hom-polynomial-endofunctor = pr2 α type-hom-polynomial-endofunctor : {l3 : Level} {X : UU l3} → @@ -90,8 +90,8 @@ module _ type-hom-polynomial-endofunctor {X = X} = map-Σ ( λ c → position-polynomial-endofunctor 𝑄 c → X) - ( shapes-hom-polynomial-endofunctor) - ( λ a → precomp (positions-hom-polynomial-endofunctor a) X) + ( shape-hom-polynomial-endofunctor) + ( λ a → precomp (position-hom-polynomial-endofunctor a) X) ``` ### The identity morphism @@ -133,15 +133,15 @@ module _ htpy-hom-polynomial-endofunctor : (α β : hom-polynomial-endofunctor 𝑃 𝑄) → UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) htpy-hom-polynomial-endofunctor α β = - Σ ( shapes-hom-polynomial-endofunctor 𝑃 𝑄 α ~ - shapes-hom-polynomial-endofunctor 𝑃 𝑄 β) + Σ ( shape-hom-polynomial-endofunctor 𝑃 𝑄 α ~ + shape-hom-polynomial-endofunctor 𝑃 𝑄 β) ( λ H → (a : shape-polynomial-endofunctor 𝑃) (d : position-polynomial-endofunctor 𝑄 - ( shapes-hom-polynomial-endofunctor 𝑃 𝑄 α a)) → - positions-hom-polynomial-endofunctor 𝑃 𝑄 α a d = - positions-hom-polynomial-endofunctor 𝑃 𝑄 β a + ( shape-hom-polynomial-endofunctor 𝑃 𝑄 α a)) → + position-hom-polynomial-endofunctor 𝑃 𝑄 α a d = + position-hom-polynomial-endofunctor 𝑃 𝑄 β a ( tr (position-polynomial-endofunctor 𝑄) (H a) d)) refl-htpy-hom-polynomial-endofunctor : @@ -159,9 +159,9 @@ module _ is-torsorial (htpy-hom-polynomial-endofunctor α) is-torsorial-htpy-hom-polynomial-endofunctor α = is-torsorial-Eq-structure - ( is-torsorial-htpy (shapes-hom-polynomial-endofunctor 𝑃 𝑄 α)) - ( shapes-hom-polynomial-endofunctor 𝑃 𝑄 α , refl-htpy) - ( is-torsorial-binary-htpy (positions-hom-polynomial-endofunctor 𝑃 𝑄 α)) + ( is-torsorial-htpy (shape-hom-polynomial-endofunctor 𝑃 𝑄 α)) + ( shape-hom-polynomial-endofunctor 𝑃 𝑄 α , refl-htpy) + ( is-torsorial-binary-htpy (position-hom-polynomial-endofunctor 𝑃 𝑄 α)) is-equiv-htpy-eq-hom-polynomial-endofunctor : (α β : hom-polynomial-endofunctor 𝑃 𝑄) → @@ -266,24 +266,24 @@ module _ (α : natural-transformation-polynomial-endofunctor l2 𝑃 𝑄) where - shapes-natural-transformation-polynomial-endofunctor : + shape-natural-transformation-polynomial-endofunctor : shape-polynomial-endofunctor 𝑃 → shape-polynomial-endofunctor 𝑄 - shapes-natural-transformation-polynomial-endofunctor a = + shape-natural-transformation-polynomial-endofunctor a = pr1 (type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α (a , id)) - positions-natural-transformation-polynomial-endofunctor : + position-natural-transformation-polynomial-endofunctor : (a : shape-polynomial-endofunctor 𝑃) → position-polynomial-endofunctor 𝑄 - ( shapes-natural-transformation-polynomial-endofunctor a) → + ( shape-natural-transformation-polynomial-endofunctor a) → position-polynomial-endofunctor 𝑃 a - positions-natural-transformation-polynomial-endofunctor a = + position-natural-transformation-polynomial-endofunctor a = pr2 (type-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α (a , id)) hom-natural-transformation-polynomial-endofunctor : hom-polynomial-endofunctor 𝑃 𝑄 hom-natural-transformation-polynomial-endofunctor = - ( shapes-natural-transformation-polynomial-endofunctor , - positions-natural-transformation-polynomial-endofunctor) + ( shape-natural-transformation-polynomial-endofunctor , + position-natural-transformation-polynomial-endofunctor) ``` ### Computing the fibers of the induced natural transformation diff --git a/src/trees/univalent-polynomial-endofunctors.lagda.md b/src/trees/univalent-polynomial-endofunctors.lagda.md index 85e0a9b494..1a59902f1f 100644 --- a/src/trees/univalent-polynomial-endofunctors.lagda.md +++ b/src/trees/univalent-polynomial-endofunctors.lagda.md @@ -88,14 +88,14 @@ module _ polynomial-endofunctor l1 l2 polynomial-endofunctor-univalent-polynomial-endofunctor = pr1 𝑃 - shapes-univalent-polynomial-endofunctor : UU l1 - shapes-univalent-polynomial-endofunctor = + shape-univalent-polynomial-endofunctor : UU l1 + shape-univalent-polynomial-endofunctor = shape-polynomial-endofunctor polynomial-endofunctor-univalent-polynomial-endofunctor - positions-univalent-polynomial-endofunctor : - shapes-univalent-polynomial-endofunctor → UU l2 - positions-univalent-polynomial-endofunctor = + position-univalent-polynomial-endofunctor : + shape-univalent-polynomial-endofunctor → UU l2 + position-univalent-polynomial-endofunctor = position-polynomial-endofunctor polynomial-endofunctor-univalent-polynomial-endofunctor @@ -105,16 +105,16 @@ module _ is-univalent-univalent-polynomial-endofunctor = pr2 𝑃 univalent-family-univalent-polynomial-endofunctor : - univalent-family l2 shapes-univalent-polynomial-endofunctor + univalent-family l2 shape-univalent-polynomial-endofunctor univalent-family-univalent-polynomial-endofunctor = - ( positions-univalent-polynomial-endofunctor , + ( position-univalent-polynomial-endofunctor , is-univalent-univalent-polynomial-endofunctor) equiv-equiv-tr-univalent-polynomial-endofunctor : - {x y : shapes-univalent-polynomial-endofunctor} → + {x y : shape-univalent-polynomial-endofunctor} → ( x = y) ≃ - ( positions-univalent-polynomial-endofunctor x ≃ - positions-univalent-polynomial-endofunctor y) + ( position-univalent-polynomial-endofunctor x ≃ + position-univalent-polynomial-endofunctor y) equiv-equiv-tr-univalent-polynomial-endofunctor = equiv-equiv-tr-univalent-family univalent-family-univalent-polynomial-endofunctor @@ -185,8 +185,8 @@ module _ Eq-type-univalent-polynomial-endofunctor : (x y : type-univalent-polynomial-endofunctor 𝑃 X) → UU (l2 ⊔ l3) Eq-type-univalent-polynomial-endofunctor x y = - Σ ( positions-univalent-polynomial-endofunctor 𝑃 (pr1 x) ≃ - positions-univalent-polynomial-endofunctor 𝑃 (pr1 y)) + Σ ( position-univalent-polynomial-endofunctor 𝑃 (pr1 x) ≃ + position-univalent-polynomial-endofunctor 𝑃 (pr1 y)) ( λ e → coherence-triangle-maps (pr2 x) (pr2 y) (map-equiv e)) refl-Eq-type-univalent-polynomial-endofunctor : @@ -207,7 +207,7 @@ module _ is-torsorial-Eq-type-univalent-polynomial-endofunctor (x , α) = is-torsorial-Eq-structure ( is-contr-equiv' - ( Σ (shapes-univalent-polynomial-endofunctor 𝑃) (x =_)) + ( Σ (shape-univalent-polynomial-endofunctor 𝑃) (x =_)) ( equiv-tot ( λ y → equiv-equiv-tr-univalent-polynomial-endofunctor 𝑃 {x} {y})) ( is-torsorial-Id x)) From ed04aa0fecbddc4fa7e05a8d8e98a21f5943da3d Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 20 Sep 2025 15:49:05 +0200 Subject: [PATCH 39/41] pre-commit --- .../universal-property-cartesian-morphisms-arrows.lagda.md | 4 +++- ...n-natural-transformations-polynomial-endofunctors.lagda.md | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md b/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md index 3c9301ddd8..fa6b534186 100644 --- a/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md +++ b/src/foundation/universal-property-cartesian-morphisms-arrows.lagda.md @@ -185,7 +185,9 @@ module _ ( equiv-tot ( equiv-htpy-cone-is-lift-hom-arrow-of-lift-codomain-hom-arrow f g h α β (i , I))) - ( uniqueness-universal-property-pullback (map-codomain-hom-arrow g h β) h + ( uniqueness-universal-property-pullback + ( map-codomain-hom-arrow g h β) + ( h) ( cone-hom-arrow g h β) ( up-pullback-cartesian-hom-arrow g h (β , H)) ( A) diff --git a/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md index 36353ab2da..626c2305fe 100644 --- a/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md +++ b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md @@ -14,7 +14,6 @@ open import foundation.cartesian-morphisms-arrows open import foundation.commuting-squares-of-homotopies open import foundation.commuting-squares-of-maps open import foundation.cones-over-cospan-diagrams -open import foundation.sets open import foundation.contractible-types open import foundation.dependent-pair-types open import foundation.equality-dependent-function-types @@ -34,6 +33,7 @@ open import foundation.propositions open import foundation.pullbacks open import foundation.raising-universe-levels open import foundation.sections +open import foundation.sets open import foundation.structure-identity-principle open import foundation.transport-along-identifications open import foundation.unit-type From d0bfc8ce9c4d08333490b824cf610127f754c5f6 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 20 Sep 2025 16:45:23 +0200 Subject: [PATCH 40/41] edits --- .../univalent-type-families.lagda.md | 2 +- ...morphisms-polynomial-endofunctors.lagda.md | 42 +------------------ ...ormations-polynomial-endofunctors.lagda.md | 39 +++++++++++++++++ ...morphisms-polynomial-endofunctors.lagda.md | 4 ++ 4 files changed, 46 insertions(+), 41 deletions(-) diff --git a/src/foundation/univalent-type-families.lagda.md b/src/foundation/univalent-type-families.lagda.md index 1d11324a68..3ffe7fdd2e 100644 --- a/src/foundation/univalent-type-families.lagda.md +++ b/src/foundation/univalent-type-families.lagda.md @@ -262,7 +262,7 @@ module _ (type-family-univalent-family ℬ a , a , id-equiv) map-inv-equiv-type-subuniverse-univalent-family : - type-subuniverse (subuniverse-univalent-family ℬ l2) → A + type-subuniverse (subuniverse-univalent-family ℬ l2) → A map-inv-equiv-type-subuniverse-univalent-family (X , a , e) = a is-retraction-map-inv-equiv-type-subuniverse-univalent-family : diff --git a/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md index 7899057662..5777560a84 100644 --- a/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md +++ b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md @@ -11,6 +11,8 @@ open import foundation.action-on-identifications-functions open import foundation.binary-homotopies open import foundation.commuting-squares-of-homotopies open import foundation.commuting-squares-of-maps +open import foundation.raising-universe-levels +open import foundation.unit-type open import foundation.cones-over-cospan-diagrams open import foundation.contractible-maps open import foundation.contractible-types @@ -380,46 +382,6 @@ module _ ( is-equiv-id)) ``` -### The associated morphism of a cartesian natural transformation is cartesian - -```agda -module _ - {l1 l2 l3 l4 : Level} - (𝑃 : polynomial-endofunctor l1 l2) - (𝑄 : polynomial-endofunctor l3 l4) - (α : cartesian-natural-transformation-polynomial-endofunctor l2 𝑃 𝑄) - (let 𝑃₀ = shape-polynomial-endofunctor 𝑃) - (let 𝑃₁ = position-polynomial-endofunctor 𝑃) - (let α₀ = type-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α) - where - - shape-cartesian-natural-transformation-polynomial-endofunctor : - shape-polynomial-endofunctor 𝑃 → shape-polynomial-endofunctor 𝑄 - shape-cartesian-natural-transformation-polynomial-endofunctor = - shape-natural-transformation-polynomial-endofunctor 𝑃 𝑄 - ( natural-transformation-cartesian-natural-transformation-polynomial-endofunctor - 𝑃 𝑄 α) - - position-cartesian-natural-transformation-polynomial-endofunctor : - (a : shape-polynomial-endofunctor 𝑃) → - position-polynomial-endofunctor 𝑄 - ( shape-cartesian-natural-transformation-polynomial-endofunctor a) → - position-polynomial-endofunctor 𝑃 a - position-cartesian-natural-transformation-polynomial-endofunctor = - position-natural-transformation-polynomial-endofunctor 𝑃 𝑄 - ( natural-transformation-cartesian-natural-transformation-polynomial-endofunctor - 𝑃 𝑄 α) - - hom-cartesian-natural-transformation-polynomial-endofunctor : - hom-polynomial-endofunctor 𝑃 𝑄 - hom-cartesian-natural-transformation-polynomial-endofunctor = - hom-natural-transformation-polynomial-endofunctor 𝑃 𝑄 - ( natural-transformation-cartesian-natural-transformation-polynomial-endofunctor - 𝑃 𝑄 α) -``` - -> TODO - ### Equivalence between cartesian morphisms and cartesian natural transformations This is proved in a slightly different setting as part of Lemma 2.3.3 in diff --git a/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md index 626c2305fe..988cdf7ae3 100644 --- a/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md +++ b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md @@ -47,6 +47,7 @@ open import foundation-core.torsorial-type-families open import trees.natural-transformations-polynomial-endofunctors open import trees.polynomial-endofunctors +open import trees.morphisms-polynomial-endofunctors ``` @@ -238,6 +239,44 @@ module _ ( hom-arrow-cartesian-natural-transformation-polynomial-endofunctor f , H f) ``` +### The associated morphism of polynomial endofunctors + +```agda +module _ + {l1 l2 l3 l4 : Level} + (𝑃 : polynomial-endofunctor l1 l2) + (𝑄 : polynomial-endofunctor l3 l4) + (α : cartesian-natural-transformation-polynomial-endofunctor l2 𝑃 𝑄) + (let 𝑃₀ = shape-polynomial-endofunctor 𝑃) + (let 𝑃₁ = position-polynomial-endofunctor 𝑃) + (let α₀ = type-cartesian-natural-transformation-polynomial-endofunctor 𝑃 𝑄 α) + where + + shape-cartesian-natural-transformation-polynomial-endofunctor : + shape-polynomial-endofunctor 𝑃 → shape-polynomial-endofunctor 𝑄 + shape-cartesian-natural-transformation-polynomial-endofunctor = + shape-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( natural-transformation-cartesian-natural-transformation-polynomial-endofunctor + 𝑃 𝑄 α) + + position-cartesian-natural-transformation-polynomial-endofunctor : + (a : shape-polynomial-endofunctor 𝑃) → + position-polynomial-endofunctor 𝑄 + ( shape-cartesian-natural-transformation-polynomial-endofunctor a) → + position-polynomial-endofunctor 𝑃 a + position-cartesian-natural-transformation-polynomial-endofunctor = + position-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( natural-transformation-cartesian-natural-transformation-polynomial-endofunctor + 𝑃 𝑄 α) + + hom-cartesian-natural-transformation-polynomial-endofunctor : + hom-polynomial-endofunctor 𝑃 𝑄 + hom-cartesian-natural-transformation-polynomial-endofunctor = + hom-natural-transformation-polynomial-endofunctor 𝑃 𝑄 + ( natural-transformation-cartesian-natural-transformation-polynomial-endofunctor + 𝑃 𝑄 α) +``` + ### The identity cartesian natural transformation ```agda diff --git a/src/trees/morphisms-polynomial-endofunctors.lagda.md b/src/trees/morphisms-polynomial-endofunctors.lagda.md index a02d3c8b15..9e3ff069f3 100644 --- a/src/trees/morphisms-polynomial-endofunctors.lagda.md +++ b/src/trees/morphisms-polynomial-endofunctors.lagda.md @@ -258,6 +258,10 @@ module _ ### Natural transformations define morphisms +Given a natural transformation `α : 𝑃 ⇒ 𝑄` then we have an associated morphism +given on shapes by `a ↦ pr1 (α₀ {𝑃₁ a} (a , id)) : 𝑃₀ → 𝑄₀` and on positions by +`a ↦ pr2 (α₀ {𝑃₁ a} (a , id)) : (a : 𝑃₀) → 𝑄₁ _ → 𝑃₁ a`. + ```agda module _ {l1 l2 l3 l4 : Level} From 101235666c495747666f92b304a202cd0d8a6af3 Mon Sep 17 00:00:00 2001 From: Fredrik Bakke Date: Sat, 20 Sep 2025 16:45:32 +0200 Subject: [PATCH 41/41] edits --- .../cartesian-morphisms-polynomial-endofunctors.lagda.md | 4 ++-- ...n-natural-transformations-polynomial-endofunctors.lagda.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md index 5777560a84..b6f1ed0338 100644 --- a/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md +++ b/src/trees/cartesian-morphisms-polynomial-endofunctors.lagda.md @@ -11,8 +11,6 @@ open import foundation.action-on-identifications-functions open import foundation.binary-homotopies open import foundation.commuting-squares-of-homotopies open import foundation.commuting-squares-of-maps -open import foundation.raising-universe-levels -open import foundation.unit-type open import foundation.cones-over-cospan-diagrams open import foundation.contractible-maps open import foundation.contractible-types @@ -34,6 +32,7 @@ open import foundation.morphisms-arrows open import foundation.precomposition-functions open import foundation.propositions open import foundation.pullbacks +open import foundation.raising-universe-levels open import foundation.sections open import foundation.structure-identity-principle open import foundation.subtypes @@ -42,6 +41,7 @@ open import foundation.truncated-types open import foundation.truncation-levels open import foundation.type-arithmetic-dependent-pair-types open import foundation.type-theoretic-principle-of-choice +open import foundation.unit-type open import foundation.universal-property-equivalences open import foundation.universe-levels open import foundation.whiskering-homotopies-composition diff --git a/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md index 988cdf7ae3..f679d5d5f7 100644 --- a/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md +++ b/src/trees/cartesian-natural-transformations-polynomial-endofunctors.lagda.md @@ -45,9 +45,9 @@ open import foundation-core.equality-dependent-pair-types open import foundation-core.retractions open import foundation-core.torsorial-type-families +open import trees.morphisms-polynomial-endofunctors open import trees.natural-transformations-polynomial-endofunctors open import trees.polynomial-endofunctors -open import trees.morphisms-polynomial-endofunctors ```