Other Agda modules in this section (18)
- ElementaryYoneda
- Everything
- HomCalculus.ExpressionCancellation
- HomCalculus.FramedFiberImages
- HomCalculus.HomCoordinates
- HomCalculus.HomFamilyPostcomposition
- HomCalculus.HomFiberPostcomposition
- HomCalculus.HomNormalization
- HomCalculus.HomOperations
- HomCalculus.HomPoints
- HomCalculus.HomPostcomposition
- HomCalculus.HomRestriction
- HomCalculus.PullbackEndpointFrames
- HomCalculus.PullbackFamilies
- HomCalculus.PullbackHomMaps
- HomComposition
- HomCompositionDetection
- HomCompositionEquivalences
Complete compiler-highlighted source. Follow a symbol to its declaration.
# Hom-composition squares of a functor Functorial images preserve composition. Applying this to the universal hom family gives the commutative squares used to define cartesian and cocartesian morphisms. The matching is built from framed comparisons, so its endpoint identifications are retained. ```agda {-# OPTIONS --safe --without-K --lossy-unification #-} open import Agda.Primitive using (Level) open import SCT.VolumeI.Chapter01.Theory using (Theory) import SCT.VolumeI.Chapter01.Section04.MappingAnimae as Mapping import SCT.VolumeI.Chapter01.Section07.FunctorCategories as Categories import SCT.VolumeI.Chapter01.Section06.PullbackLaws as Laws import SCT.VolumeI.Chapter02.Section01.WalkingMorphism as Walking import SCT.VolumeI.Chapter02.Section01.IntervalEndpoints as Endpoints import SCT.VolumeI.Chapter02.Section02.SegalAxiom as Segal module SCT.VolumeI.Chapter02.Section06.HomCalculus.HomCompositionNaturality {c m a : Level} (šÆ : Theory c m a) (M : Mapping.MappingAnimae šÆ) (ā± : Categories.FunctorCategories šÆ M) (P : Laws.PullbackStructure šÆ) (I : Walking.WalkingMorphism šÆ) (E : Endpoints.IntervalEndpoints šÆ M ā± P I) (S : Segal.SegalAxiom šÆ M ā± P I E) where open import SCT.VolumeI.Chapter02.Section06.HomComposition šÆ M ā± P I E S public open import SCT.VolumeI.Chapter02.Section06.HomCalculus.HomPostcomposition šÆ M ā± P I using (hom-image; hom-image-cong; hom-post-β; hom-post-computation) open import SCT.VolumeI.Chapter02.Section02.MorphismCalculus.CompositionIdentifications šÆ M ā± P I E S using (compose-expression-cong) open import SCT.VolumeI.Chapter02.Section02.MorphismCalculus.CompositionSubstitution šÆ M ā± P I E S using (retarget-composition) open import SCT.VolumeI.Chapter02.Section02.MorphismCalculus.PostcompositionPresentations šÆ M ā± P I E S using (post-composition) open import SCT.VolumeI.Chapter01.Section04.Substitution.ConstantSubstitution šÆ M using (constant-image) abstract hom-image-composition : {Ī C D : CAT} (F : MAP C D) {x y z : Obj-abs C} (α : MorphismExpression (const {P = Ī} x) (const y)) (β : MorphismExpression (const {P = Ī} y) (const z)) ā ExpressionIso (hom-image F (compose-expression α β)) (compose-expression (hom-image F α) (hom-image F β)) hom-image-composition {Ī} F {x} {y} {z} α β = expressionIso-inverse (expressionIso-compose (retarget-expressionIso (post-composition F α β) (constant-image Ī F x) (constant-image Ī F z)) (retarget-composition (post-expression F α) (post-expression F β) (constant-image Ī F x) (constant-image Ī F y) (constant-image Ī F z))) private reflect-through-calculation : {Ī C : CAT} {x y : Obj-abs C} (h k : MAP Ī (Hom C x y)) (α : MorphismExpression (const {P = Ī} x) (const y)) ā ExpressionIso (hom-expression h) α ā ExpressionIso (hom-expression k) α ā h =ā k reflect-through-calculation {Ī} {C} {x} {y} h k α left right = hom-reflect {Ī = Ī} {C = C} {x = x} {y = y} {h = h} {k = k} (expressionIso-compose {f = hom-expression h} {g = α} {h = hom-expression k} (expressionIso-inverse right) left) abstract reflect-through : {Ī C : CAT} {x y : Obj-abs C} (h k : MAP Ī (Hom C x y)) (α : MorphismExpression (const {P = Ī} x) (const y)) ā ExpressionIso (hom-expression h) α ā ExpressionIso (hom-expression k) α ā h =ā k reflect-through {Ī} {C} {x} {y} h k α left right = reflect-through-calculation {Ī = Ī} {C = C} {x = x} {y = y} h k α left right reflect-through-computation : {Ī C : CAT} {x y : Obj-abs C} (h k : MAP Ī (Hom C x y)) (α : MorphismExpression (const {P = Ī} x) (const y)) (left : ExpressionIso (hom-expression h) α) (right : ExpressionIso (hom-expression k) α) ā reflect-through h k α left right =ā reflect-through-calculation h k α left right reflect-through-computation h k α left right = idIso _ module Image {C D : CAT} (F : MAP C D) {x y : Obj-abs C} (e : Obj-abs (Hom C x y)) where private module Original = At e using (family; precompose; postcompose) module OriginalComputation = Computation e using (precompose; postcompose) point : Obj-abs (Hom D (F ā x) (F ā y)) point = hom-post F x y ā e private module Mapped = At point using (family; precompose; postcompose; precompose-β; postcompose-β) abstract family-comparison : (Ī : CAT) ā ExpressionIso (hom-image F (Original.family Ī)) (Mapped.family Ī) family-comparison Ī = expressionIso-compose (hom-expression-cong (constant-image Ī (hom-post F x y) e)) (expressionIso-inverse (hom-post-β F x y (const e))) private module Precomposition (z : Obj-abs C) where H : CAT H = Hom C y z result : MorphismExpression (const {P = H} (F ā x)) (const (F ā z)) result = compose-expression (Mapped.family H) (hom-image F (hom-expression (id H))) abstract left : ExpressionIso (hom-expression (hom-post F x z ā Original.precompose z)) result left = expressionIso-compose (compose-expression-cong {f = hom-image F (Original.family H)} {fā² = Mapped.family H} {g = hom-image F (hom-expression (id H))} {gā² = hom-image F (hom-expression (id H))} (family-comparison H) (expressionIso-id (hom-image F (hom-expression (id H))))) (expressionIso-compose (hom-image-composition F (Original.family H) (hom-expression (id H))) (expressionIso-compose (hom-image-cong F (OriginalComputation.precompose z)) (hom-post-β F x z (Original.precompose z)))) right : ExpressionIso (hom-expression (Mapped.precompose (F ā z) ā hom-post F y z)) result right = expressionIso-compose (compose-expression-cong {f = Mapped.family H} {fā² = Mapped.family H} {g = hom-expression (hom-post F y z)} {gā² = hom-image F (hom-expression (id H))} (expressionIso-id (Mapped.family H)) (hom-post-computation F y z)) (Mapped.precompose-β (F ā z) (hom-post F y z)) precompose-calculation : (z : Obj-abs C) ā (hom-post F x z ā Original.precompose z) =ā (Mapped.precompose (F ā z) ā hom-post F y z) precompose-calculation z = reflect-through-calculation {Ī = Hom C y z} {C = D} {x = F ā x} {y = F ā z} (hom-post F x z ā Original.precompose z) (Mapped.precompose (F ā z) ā hom-post F y z) (Precomposition.result z) (Precomposition.left z) (Precomposition.right z) precompose : (z : Obj-abs C) ā (hom-post F x z ā Original.precompose z) =ā (Mapped.precompose (F ā z) ā hom-post F y z) precompose z = reflect-through {Ī = Hom C y z} {C = D} {x = F ā x} {y = F ā z} (hom-post F x z ā Original.precompose z) (Mapped.precompose (F ā z) ā hom-post F y z) (Precomposition.result z) (Precomposition.left z) (Precomposition.right z) precompose-computation : (z : Obj-abs C) ā precompose z =ā precompose-calculation z precompose-computation z = reflect-through-computation {Ī = Hom C y z} {C = D} {x = F ā x} {y = F ā z} (hom-post F x z ā Original.precompose z) (Mapped.precompose (F ā z) ā hom-post F y z) (Precomposition.result z) (Precomposition.left z) (Precomposition.right z) private module Postcomposition (z : Obj-abs C) where H : CAT H = Hom C z x result : MorphismExpression (const {P = H} (F ā z)) (const (F ā y)) result = compose-expression (hom-image F (hom-expression (id H))) (Mapped.family H) abstract left : ExpressionIso (hom-expression (hom-post F z y ā Original.postcompose z)) result left = expressionIso-compose (compose-expression-cong {f = hom-image F (hom-expression (id H))} {fā² = hom-image F (hom-expression (id H))} {g = hom-image F (Original.family H)} {gā² = Mapped.family H} (expressionIso-id (hom-image F (hom-expression (id H)))) (family-comparison H)) (expressionIso-compose (hom-image-composition F (hom-expression (id H)) (Original.family H)) (expressionIso-compose (hom-image-cong F (OriginalComputation.postcompose z)) (hom-post-β F z y (Original.postcompose z)))) right : ExpressionIso (hom-expression (Mapped.postcompose (F ā z) ā hom-post F z x)) result right = expressionIso-compose (compose-expression-cong {f = hom-expression (hom-post F z x)} {fā² = hom-image F (hom-expression (id H))} {g = Mapped.family H} {gā² = Mapped.family H} (hom-post-computation F z x) (expressionIso-id (Mapped.family H))) (Mapped.postcompose-β (F ā z) (hom-post F z x)) postcompose-calculation : (z : Obj-abs C) ā (hom-post F z y ā Original.postcompose z) =ā (Mapped.postcompose (F ā z) ā hom-post F z x) postcompose-calculation z = reflect-through-calculation {Ī = Hom C z x} {C = D} {x = F ā z} {y = F ā y} (hom-post F z y ā Original.postcompose z) (Mapped.postcompose (F ā z) ā hom-post F z x) (Postcomposition.result z) (Postcomposition.left z) (Postcomposition.right z) postcompose : (z : Obj-abs C) ā (hom-post F z y ā Original.postcompose z) =ā (Mapped.postcompose (F ā z) ā hom-post F z x) postcompose z = reflect-through {Ī = Hom C z x} {C = D} {x = F ā z} {y = F ā y} (hom-post F z y ā Original.postcompose z) (Mapped.postcompose (F ā z) ā hom-post F z x) (Postcomposition.result z) (Postcomposition.left z) (Postcomposition.right z) postcompose-computation : (z : Obj-abs C) ā postcompose z =ā postcompose-calculation z postcompose-computation z = reflect-through-computation {Ī = Hom C z x} {C = D} {x = F ā z} {y = F ā y} (hom-post F z y ā Original.postcompose z) (Mapped.postcompose (F ā z) ā hom-post F z x) (Postcomposition.result z) (Postcomposition.left z) (Postcomposition.right z) ```