Other Agda modules in this section (27)
- CoconeCalculus.CoconeBridgeReversal
- CoconeCalculus.CoconeCoreExtensions
- CoconeCalculus.CoconeCoreLifting
- CoconeCalculus.CoconePostAssociativity
- CoconeCalculus.CoconeRestrictionLifting
- CoconeCalculus.CoconeRestrictionPostcomposition
- CoconeCalculus.CoconeRestrictionUniversality
- CoconeCalculus.CoconeSpanRestriction
- CoconeCalculus.CoconeSquareRestriction
- CoconeCalculus.RealizationCoconeComparison
- EmptyCore
- EmptySubcategory
- FundamentalGroupoids
- GeometricRealization
- GeometricRealizationCriteria
- GroupoidCriterion
- IsomorphismSubcategoryCore
- ObjectwiseNaturalIsomorphisms
- RealizationGroupoidCriterion
- RealizationOfGroupoids
- RealizationOfInterval
- RealizationPushouts
- RecognitionCalculus.ConstantFullSubcategory
- RecognitionCalculus.GroupoidRealizationInterval
- RecognitionCalculus.InvertingFromGroupoids
- RecognitionCalculus.InvertingInterval
- RecognitionCalculus.RealizationComparisons
Complete compiler-highlighted source. Follow a symbol to its declaration.
# Interchanging the diagram variables Double currying and symmetry of products interchange the two diagram variables. The comparison with constant diagrams is retained explicitly: being constant in the first variable becomes postcomposition with the constant-diagram functor in the second presentation. ```agda {-# OPTIONS --safe --without-K #-} 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 module SCT.VolumeI.Chapter03.Section04.CoconeCalculus.DiagramInterchange {c m a : Level} (π― : Theory c m a) (M : Mapping.MappingAnimae π―) (β± : Categories.FunctorCategories π― M) where open import SCT.VolumeI.Chapter02.Section01.EvaluationCalculus.EndpointEvaluation π― M β± open import SCT.VolumeI.Chapter01.Section07.EvaluationCalculus.IsomorphismLifting π― M β± using (funIsoReflect; funIsoReflect-Ξ²) open import SCT.VolumeI.Chapter01.Section04.Points π― M using (oneProduct-in) open import SCT.VolumeI.Chapter01.Section07.ExponentialLaw π― M β± using (module ExponentialLaw) open import SCT.VolumeI.Chapter02.Section04.ConstantDiagrams.ConstantExponential π― M β± using (module Constant) module Interchange (T C D : CAT) where module First = ExponentialLaw T C D using (forward; forward-isEquiv) module Second = ExponentialLaw C T D using (forward; backward; forward-backward; backward-forward) module Constants = Constant T C D using (comparison) middle = funPre {D = D} (swap {C} {T}) β First.forward exchange : MAP (Fun T (Fun C D)) (Fun C (Fun T D)) exchange = Second.backward β middle backward-isEquiv : IsEquiv Second.backward backward-isEquiv = record { inverse = Second.forward ; sectionIso = Second.forward-backward β»ΒΉ ; retractionIso = Second.backward-forward β»ΒΉ } abstract exchange-isEquiv : IsEquiv exchange exchange-isEquiv = equiv-compose middle Second.backward (equiv-compose First.forward (funPre swap) First.forward-isEquiv (funPre-isEquiv swap (swap-isEquiv C T))) backward-isEquiv exchange-constant : (exchange β constantDiagram T (Fun C D)) =β funPost (constantDiagram T D) exchange-constant = comp-unitΛ‘ (funPost (constantDiagram T D)) β ((Second.backward-forward β· funPost (constantDiagram T D)) β ((comp-assoc (funPost (constantDiagram T D)) Second.forward Second.backward) β»ΒΉ β ((Second.backward β Constants.comparison) β ((Second.backward β comp-assoc (constantDiagram T (Fun C D)) First.forward (funPre swap)) β comp-assoc (constantDiagram T (Fun C D)) middle Second.backward)))) ``` Naming a postcomposed functor agrees with postcomposition of its name. This comparison is used when passing between transformations and their functors into the arrow category. `post-nameFun-image` records the specified uncurried identification, for later calculations with relative triangles. ```agda nameFun-cong : {C D : CAT} {f g : MAP C D} β f =β g β nameFun f =β nameFun g nameFun-cong Ξ± = funCurry-cong (Ξ± β· prβ) post-nameFun-uncurried : {B C D : CAT} (g : MAP C D) (f : MAP B C) β funUncurry (funPost g β nameFun f) =β funUncurry (nameFun (g β f)) post-nameFun-uncurried g f = (funCurry-Ξ² ((g β f) β prβ)) β»ΒΉ β ((comp-assoc prβ f g) β»ΒΉ β ((g β funCurry-Ξ² (f β prβ)) β funPost-uncurry g (nameFun f))) post-nameFun : {B C D : CAT} (g : MAP C D) (f : MAP B C) β (funPost g β nameFun f) =β nameFun (g β f) post-nameFun g f = funIsoReflect _ _ (post-nameFun-uncurried g f) post-nameFun-image : {B C D : CAT} (g : MAP C D) (f : MAP B C) β funUncurryIso (post-nameFun g f) =β post-nameFun-uncurried g f post-nameFun-image g f = funIsoReflect-Ξ² _ _ (post-nameFun-uncurried g f) decodeFun-cong : {C D : CAT} {f g : Obj-abs (Fun C D)} β f =β g β decodeFun f =β decodeFun g decodeFun-cong {C} Ξ± = funUncurry-cong Ξ± β· oneProduct-in C decodeFun-post : {B C D : CAT} (g : MAP C D) (f : Obj-abs (Fun B C)) β decodeFun (funPost g β f) =β (g β decodeFun f) decodeFun-post {B} g f = comp-assoc (oneProduct-in B) (funUncurry f) g β (funPost-uncurry g f β· oneProduct-in B) ```