Other Agda modules in this section (28)
- Equivalences
- Everything
- IdentificationCalculus.CoordinateComparisons
- IdentificationCalculus.CoordinateNaturality
- IdentificationCalculus.FamilyNaturality
- IdentificationCalculus.FramedSubstitution
- IdentificationCalculus.FunctorCoherence
- IdentificationCalculus.Inverses
- IdentificationCalculus.Parameterized
- IdentificationCalculus.Structural
- IdentificationCalculus.VerticalComposition
- ProductCalculus.BinaryFunctorCalculus
- ProductCalculus.ChosenPairing
- ProductCalculus.ChosenPairingFunctoriality
- ProductCalculus.FamilyPairing
- ProductCalculus.FamilyProductFunctor
- ProductCalculus.NestedSymmetry
- ProductCalculus.PairingAssembly
- ProductCalculus.PairingCoherence
- ProductCalculus.PairingInterface
- ProductCalculus.PairingNaturality
- ProductCalculus.PairingUnits
- ProductCalculus.ProductFunctorCoherence
- ProductCalculus.ProductFunctorUnits
- ProductCalculus.ProductPairing
- ProductConstructions
- Retracts
- Whiskering
Complete compiler-highlighted source. Follow a symbol to its declaration.
Explanation (AI-generated): Pairing and precomposition
Corresponding book passages
# Pairing and iterated precomposition The comparison concerns the already chosen `pair-pre`, with the primitive external associator retained on both the product and its two components. The argument is now parameterized by the chosen pairing comparisons and all their projection laws. The adapter retains the original choices. The main proof still compares the two explicit pastings by projecting them; it never opens the construction of a pairing comparison through the product inverse. ```agda {-# OPTIONS --safe --without-K #-} open import Agda.Primitive using (Level) open import SCT.VolumeI.Chapter01.Section01.Vocabulary import SCT.VolumeI.Chapter01.Section01.Terminal as Terminal import SCT.VolumeI.Chapter01.Section01.Products as Products import SCT.VolumeI.Chapter01.Section02.Coherence as Coherence import SCT.VolumeI.Chapter01.Section02.Specialization as Specialization import SCT.VolumeI.Chapter01.Section02.Isomorphisms as Isomorphisms import SCT.VolumeI.Chapter01.Section03.ProductCalculus.PairingCoherence as PairingCoherence import SCT.VolumeI.Chapter01.Section03.Whiskering as WhiskeringEquivalences import SCT.VolumeI.Chapter01.Section03.ProductCalculus.PairingNaturality as PairingNaturality import SCT.VolumeI.Chapter01.Section03.ProductCalculus.PairingInterface as Interface import SCT.VolumeI.Chapter01.Section03.ProductCalculus.ChosenPairing as ChosenPairing import SCT.VolumeI.Chapter01.Section03.IdentificationCalculus.FunctorCoherence as FunctorCoherence module SCT.VolumeI.Chapter01.Section03.ProductCalculus.IteratedPairing {c m a : Level} (V : Vocabulary c m a) (T : Terminal.TerminalStructure V) (P : Products.ProductData V) (PL : Products.ProductLaws V P) (S : Coherence.CompositionStructure V T P) (VC : Coherence.VerticalCoherence V T P S) (W : Coherence.WhiskeringCoherence V T P S) (PT : Coherence.PentagonTriangleCoherence V T P S) where open Vocabulary V open Operations V open Products.ProductData P open Coherence.CompositionStructure S open Coherence.Composition V T P S open Coherence.WhiskeringCoherence W open Coherence.PentagonTriangleCoherence PT open Specialization V T P PL S hiding (pair-cong; pair-pre) open Specialization.Units V T P PL S VC open Specialization.Whiskering V T P PL S W open PairingCoherence V T P PL S VC W using (equiv-reflect) open WhiskeringEquivalences V T P PL S VC W using (leftMultiply; rightMultiply; leftMultiply-isEquiv; rightMultiply-isEquiv; left-evaluate; right-evaluate) open Isomorphisms V T P PL S VC W using (reassociateFour; cancel-inverse) open PairingNaturality V T P PL S VC W using (move-square; project-composite; pre-square-projection) open FunctorCoherence V T P PL S VC W PT public using (hcomp-idOuter; hcomp-idInner; pentagon-whiskered; leftMultiply-at; rightMultiply-at; cancel-left; cancel-right; pre-assoc-at; mixed-at; pre-inverse-at; inverse-tail; solve-pentagon; transport-pre; transport-pre-assoc) module Calculation (O : Interface.PairingOperations V T P S) (L : Interface.PairingLaws V T P S O) where open Interface.PairingOperations O open Interface.PairingLaws L module Boundaries {Q R X C D : CAT} (f : MAP X C) (g : MAP X D) (Ο : MAP R X) (Ο : MAP Q R) where source : MAP Q (C Γ D) source = (pair f g β Ο) β Ο target : MAP Q (C Γ D) target = pair (f β (Ο β Ο)) (g β (Ο β Ο)) together : source =β target together = pair-pre f g (Ο β Ο) β comp-assoc Ο Ο (pair f g) successively : source =β target successively = pair-cong (comp-assoc Ο Ο f) (comp-assoc Ο Ο g) β (pair-pre (f β Ο) (g β Ο) Ο β (pair-pre f g Ο β· Ο)) project-successively : {Z : CAT} (Ο : MAP (C Γ D) Z) (z : MAP X Z) (bβ : (Ο β pair f g) =β z) (bβ : (Ο β pair (f β Ο) (g β Ο)) =β (z β Ο)) (bβ : (Ο β pair ((f β Ο) β Ο) ((g β Ο) β Ο)) =β ((z β Ο) β Ο)) (bβ : (Ο β target) =β (z β (Ο β Ο))) β (bβ β (Ο β pair-pre f g Ο)) =β (transport-pre Ο (pair f g) bβ Ο) β (bβ β (Ο β pair-pre (f β Ο) (g β Ο) Ο)) =β (transport-pre Ο (pair (f β Ο) (g β Ο)) bβ Ο) β (bβ β (Ο β pair-cong (comp-assoc Ο Ο f) (comp-assoc Ο Ο g))) =β (comp-assoc Ο Ο z β bβ) β (bβ β (Ο β successively)) =β (transport-pre Ο (pair f g) bβ (Ο β Ο) β (Ο β comp-assoc Ο Ο (pair f g))) project-successively Ο z bβ bβ bβ bβ first second last = let before = pair-pre f g Ο after = pair-pre (f β Ο) (g β Ο) Ο top = pair-cong (comp-assoc Ο Ο f) (comp-assoc Ο Ο g) inner = after β (before β· Ο) transported = transport-pre Ο (pair f g) bβ Ο moved = pre-square-projection Ο before (idIso (z β Ο)) transported bβ Ο ((isoComp-unitΛ‘-at transported) β»ΒΉ β first) remove-id = isoComp-unitΛ‘-at (transport-pre Ο (pair f g β Ο) transported Ο) β isoComp-cong (preWhisker-idIso (z β Ο) Ο) (idIso _) inner-normal = remove-id β (moved β (isoComp-cong second (idIso (Ο β (before β· Ο))) β project-composite Ο after (before β· Ο) bβ)) outer-normal = isoComp-cong (idIso (comp-assoc Ο Ο z)) inner-normal β (isoComp-assoc-at (comp-assoc Ο Ο z) bβ (Ο β inner) β (isoComp-cong last (idIso (Ο β inner)) β project-composite Ο top inner bβ)) in transport-pre-assoc Ο (pair f g) z bβ Ο Ο β ((isoComp-assoc-at (comp-assoc Ο Ο z) (transported β· Ο) ((comp-assoc Ο (pair f g β Ο) Ο) β»ΒΉ)) β»ΒΉ β outer-normal) project-together : {Z : CAT} (Ο : MAP (C Γ D) Z) (z : MAP X Z) (bβ : (Ο β pair f g) =β z) (bβ : (Ο β target) =β (z β (Ο β Ο))) β (bβ β (Ο β pair-pre f g (Ο β Ο))) =β (transport-pre Ο (pair f g) bβ (Ο β Ο)) β (bβ β (Ο β together)) =β (transport-pre Ο (pair f g) bβ (Ο β Ο) β (Ο β comp-assoc Ο Ο (pair f g))) project-together Ο z bβ bβ triangle = isoComp-cong triangle (idIso _) β project-composite Ο (pair-pre f g (Ο β Ο)) (comp-assoc Ο Ο (pair f g)) bβ compatibility : together =β successively compatibility = pair-iso-extensionality (cancel-left (pair-Ξ²β (f β (Ο β Ο)) (g β (Ο β Ο))) ((project-successively prβ f (pair-Ξ²β f g) (pair-Ξ²β (f β Ο) (g β Ο)) (pair-Ξ²β ((f β Ο) β Ο) ((g β Ο) β Ο)) (pair-Ξ²β (f β (Ο β Ο)) (g β (Ο β Ο))) (pair-pre-triangleβ f g Ο) (pair-pre-triangleβ (f β Ο) (g β Ο) Ο) (pair-cong-triangleβ (comp-assoc Ο Ο f) (comp-assoc Ο Ο g))) β»ΒΉ β project-together prβ f (pair-Ξ²β f g) (pair-Ξ²β (f β (Ο β Ο)) (g β (Ο β Ο))) (pair-pre-triangleβ f g (Ο β Ο)))) (cancel-left (pair-Ξ²β (f β (Ο β Ο)) (g β (Ο β Ο))) ((project-successively prβ g (pair-Ξ²β f g) (pair-Ξ²β (f β Ο) (g β Ο)) (pair-Ξ²β ((f β Ο) β Ο) ((g β Ο) β Ο)) (pair-Ξ²β (f β (Ο β Ο)) (g β (Ο β Ο))) (pair-pre-triangleβ f g Ο) (pair-pre-triangleβ (f β Ο) (g β Ο) Ο) (pair-cong-triangleβ (comp-assoc Ο Ο f) (comp-assoc Ο Ο g))) β»ΒΉ β project-together prβ g (pair-Ξ²β f g) (pair-Ξ²β (f β (Ο β Ο)) (g β (Ο β Ο))) (pair-pre-triangleβ f g (Ο β Ο)))) pair-pre-iterated : {Q R X C D : CAT} (f : MAP X C) (g : MAP X D) (Ο : MAP R X) (Ο : MAP Q R) β (Boundaries.together f g Ο Ο) =β (Boundaries.successively f g Ο Ο) pair-pre-iterated = Boundaries.compatibility ``` The same argument applies to the specified pairing comparisons. The following boundary diagram and theorem retain the concrete notation of the construction. ```agda private module Chosen = ChosenPairing V T P PL S VC W using (operations; laws) module Realized = Calculation Chosen.operations Chosen.laws open Specialization V T P PL S using (pair-cong; pair-pre) module Boundaries {Q R X C D : CAT} (f : MAP X C) (g : MAP X D) (Ο : MAP R X) (Ο : MAP Q R) where source : MAP Q (C Γ D) source = (pair f g β Ο) β Ο target : MAP Q (C Γ D) target = pair (f β (Ο β Ο)) (g β (Ο β Ο)) together : source =β target together = pair-pre f g (Ο β Ο) β comp-assoc Ο Ο (pair f g) successively : source =β target successively = pair-cong (comp-assoc Ο Ο f) (comp-assoc Ο Ο g) β (pair-pre (f β Ο) (g β Ο) Ο β (pair-pre f g Ο β· Ο)) open Realized.Boundaries f g Ο Ο public using (project-successively; project-together) compatibility : together =β successively compatibility = Realized.Boundaries.compatibility f g Ο Ο pair-pre-iterated : {Q R X C D : CAT} (f : MAP X C) (g : MAP X D) (Ο : MAP R X) (Ο : MAP Q R) β (Boundaries.together f g Ο Ο) =β (Boundaries.successively f g Ο Ο) pair-pre-iterated = Boundaries.compatibility ```