Other Agda modules in this section (188)

Complete compiler-highlighted source. Follow a symbol to its declaration.

# Uncurried comparisons after postcomposition

A framed comparison after postcomposition identifies the corresponding
uncurried diagrams. The endpoint equation records the associator between
postcomposition and restriction. Retargeting at either endpoint remains
explicit, so this applies in particular to product projections.

```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
import SCT.VolumeI.Chapter01.Section06.PullbackLaws as Laws
import SCT.VolumeI.Chapter02.Section01.WalkingMorphism as Walking
import SCT.VolumeI.Chapter02.Section01.IntervalEndpoints as Endpoints

module SCT.VolumeI.Chapter02.Section02.MorphismCalculus.UncurriedPostcompositionComparisons
  {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) where

open import SCT.VolumeI.Chapter02.Section01.Morphisms 𝒯 M β„± I public
import SCT.VolumeI.Chapter02.Section02.MorphismCalculus.UncurriedExpressionComparisons as Uncurried
open import SCT.VolumeI.Chapter01.Section04.ProductCalculus.ProductAssociativity 𝒯 M
  using (cancel-inverse-tail)
import SCT.VolumeI.Chapter01.Section03.ProductCalculus.PairingUnits as PU
import SCT.VolumeI.Chapter01.Section03.ProductCalculus.PairingNaturality as PN
open PN vocabulary terminal products productLaws composition vertical whiskering using (cancel-right)
open PU vocabulary terminal products productLaws composition vertical whiskering pentagonTriangle
  using (cancel-right-reflect)

abstract
  post-diagram-frame : {Ξ“ C D : CAT} (F : MAP C D) (z : Obj-abs [1])
    (aβ‚€ : MAP Ξ“ (Ar C)) {h : MAP Ξ“ C} (p : (evaluate z ∘ aβ‚€) =₁ h) β†’
    (post-boundary z F aβ‚€ p βˆ™ (evaluate-uncurry z (funPost F ∘ aβ‚€)) ⁻¹) =β‚‚
      ((F ◁ (p βˆ™ (evaluate-uncurry z aβ‚€) ⁻¹)) βˆ™
        (comp-assoc (insert z) (funUncurry aβ‚€) F βˆ™ (funPost-uncurry F aβ‚€ β–· insert z)))
  post-diagram-frame {Ξ“} {C} {D} F z aβ‚€ {h} p =
    isoComp-cong (idIso front) (cancel-right Q (L βˆ™ v)) βˆ™
    isoComp-cong (idIso front)
      (isoComp-cong ((isoComp-assoc-at L v Q) ⁻¹) (idIso (Q ⁻¹))) βˆ™
    isoComp-assoc-at front (L βˆ™ (v βˆ™ Q)) (Q ⁻¹)
    where
    front : (F ∘ (funUncurry aβ‚€ ∘ insert z)) =₁ (F ∘ h)
    front = F ◁ (p βˆ™ (evaluate-uncurry z aβ‚€) ⁻¹)
    Q : (evaluate z ∘ (funPost F ∘ aβ‚€)) =₁ (funUncurry (funPost F ∘ aβ‚€) ∘ insert z)
    Q = evaluate-uncurry z (funPost F ∘ aβ‚€)
    L : ((F ∘ funUncurry aβ‚€) ∘ insert z) =₁ (F ∘ (funUncurry aβ‚€ ∘ insert z))
    L = comp-assoc (insert z) (funUncurry aβ‚€) F
    v : (funUncurry (funPost F ∘ aβ‚€) ∘ insert z) =₁ ((F ∘ funUncurry aβ‚€) ∘ insert z)
    v = funPost-uncurry F aβ‚€ β–· insert z

module At {Ξ“ C D : CAT} {x y : MAP Ξ“ C} {xβ€² yβ€² : MAP Ξ“ D}
  (F : MAP C D) (Ξ± : MorphismExpression x y) (Ξ² : MorphismExpression xβ€² yβ€²)
  (s : (F ∘ x) =₁ xβ€²) (t : (F ∘ y) =₁ yβ€²)
  (ΞΎ : ExpressionIso (retarget-expression (post-expression F Ξ±) s t) Ξ²) where
  module A = MorphismExpression Ξ±
  module B = MorphismExpression Ξ²
  module U = Uncurried.UncurryComparison 𝒯 M β„± P I E ΞΎ
  H = funUncurry A.arrow
  K = funUncurry B.arrow
  post-comparison = funPost-uncurry F A.arrow
  comparison : (F ∘ H) =₁ K
  comparison = U.underlying βˆ™ post-comparison ⁻¹

  module Endpoint (z : Obj-abs [1]) {h : MAP Ξ“ C} {k : MAP Ξ“ D}
    (p : (evaluate z ∘ A.arrow) =₁ h)
    (q : (evaluate z ∘ B.arrow) =₁ k)
    (r : (F ∘ h) =₁ k)
    (same : (q βˆ™ (evaluate z ◁ ExpressionIso.comparison ΞΎ)) =β‚‚
      (r βˆ™ post-boundary z F A.arrow p)) where
    i = insert {X = Ξ“} z
    frontA = p βˆ™ (evaluate-uncurry z A.arrow) ⁻¹
    frontB = q βˆ™ (evaluate-uncurry z B.arrow) ⁻¹
    Q = evaluate-uncurry z (funPost F ∘ A.arrow)
    L = comp-assoc i H F
    v = post-comparison β–· i
    w = U.underlying β–· i

    abstract
      frame-normal : ((r βˆ™ post-boundary z F A.arrow p) βˆ™ Q ⁻¹) =β‚‚
        (((r βˆ™ (F ◁ frontA)) βˆ™ L) βˆ™ v)
      frame-normal = (isoComp-assoc-at (r βˆ™ (F ◁ frontA)) L v) ⁻¹ βˆ™
        (isoComp-assoc-at r (F ◁ frontA) (L βˆ™ v)) ⁻¹ βˆ™
        isoComp-cong (idIso r) (post-diagram-frame F z A.arrow p) βˆ™
        isoComp-assoc-at r (post-boundary z F A.arrow p) (Q ⁻¹)

      compatible : (frontB βˆ™ (comparison β–· i)) =β‚‚ ((r βˆ™ (F ◁ frontA)) βˆ™ L)
      compatible = cancel-right-reflect v
        (frame-normal βˆ™ U.Endpoint.comparison z (r βˆ™ post-boundary z F A.arrow p) q same βˆ™
          isoComp-cong (idIso frontB)
            ((preWhisker i ◁ cancel-inverse-tail U.underlying post-comparison) βˆ™
              (preWhisker-isoComp-at comparison post-comparison i) ⁻¹) βˆ™
          isoComp-assoc-at frontB (comparison β–· i) v)
```