Other Agda modules in this section (47)

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

# Constant diagrams and composition

The pentagon and unit coherence identify the endpoint comparison for the
constant diagram of a composite with the composite endpoint comparison.
This is the boundary calculation for preservation of identity morphisms.

```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.Chapter02.Section01.WalkingMorphism as Walking

module SCT.VolumeI.Chapter02.Section01.DiagramCalculus.IdentityBoundaries
  {c m a : Level} (𝒯 : Theory c m a) (M : Mapping.MappingAnimae 𝒯)
  (β„± : Categories.FunctorCategories 𝒯 M) (I : Walking.WalkingMorphism 𝒯) where

open import SCT.VolumeI.Chapter02.Section01.Morphisms 𝒯 M β„± I public
import SCT.VolumeI.Chapter01.Section03.IdentificationCalculus.Structural as Structural
import SCT.VolumeI.Chapter01.Section03.ProductCalculus.PairingUnits as PairUnits
import SCT.VolumeI.Chapter01.Section03.ProductCalculus.IteratedPairing as Iterated
import SCT.VolumeI.Chapter01.Section03.ProductCalculus.PairingNaturality as PN
open Structural vocabulary terminal products productLaws composition whiskering
open PairUnits vocabulary terminal products productLaws composition vertical whiskering pentagonTriangle
  using (right-unitor-comp)
open Iterated vocabulary terminal products productLaws composition vertical whiskering pentagonTriangle
  using (pentagon-whiskered)
open import SCT.VolumeI.Chapter01.Section06.ConeCalculus.InverseCalculus 𝒯 using (pre-inverse)
open PN vocabulary terminal products productLaws composition vertical whiskering using (cancel-right)

evaluate-boundary : {Ξ“ W C : CAT} (i : MAP Ξ“ W) (p : MAP W Ξ“) β†’
  (p ∘ i) =₁ (id Ξ“) β†’ (f : MAP Ξ“ C) β†’ ((f ∘ p) ∘ i) =₁ f
evaluate-boundary i p b f = comp-unitΚ³ f βˆ™ ((f ◁ b) βˆ™ comp-assoc i p f)
module EvaluationBoundary {Ξ“ W C D : CAT} (i : MAP Ξ“ W) (p : MAP W Ξ“)
  (b : (p ∘ i) =₁ (id Ξ“)) (F : MAP C D) (f : MAP Ξ“ C) where
  u = comp-unitΚ³ f
  v = f ◁ b
  w = comp-assoc i p f
  t = comp-assoc i (f ∘ p) F
  z = comp-assoc p f F β–· i
  Aβ‚€ = comp-assoc i p (F ∘ f)
  A₁ = comp-assoc (id Ξ“) f F
  Aβ‚‚ = comp-assoc (p ∘ i) f F

  abstract
    prefix : (evaluate-boundary i p b (F ∘ f)) =β‚‚
      ((F ◁ u) βˆ™ ((F ◁ v) βˆ™ (Aβ‚‚ βˆ™ Aβ‚€)))
    prefix = isoComp-cong (idIso (F ◁ u)) (isoComp-assoc-at (F ◁ v) Aβ‚‚ Aβ‚€) βˆ™
      (isoComp-cong (idIso (F ◁ u))
        (isoComp-cong (postWhisker-comp-at b f F) (idIso Aβ‚€)) βˆ™
      (isoComp-cong (idIso (F ◁ u)) ((isoComp-assoc-at A₁ ((F ∘ f) ◁ b) Aβ‚€) ⁻¹) βˆ™
      (isoComp-assoc-at (F ◁ u) A₁ (((F ∘ f) ◁ b) βˆ™ Aβ‚€) βˆ™
        isoComp-cong (right-unitor-comp f F) (idIso (((F ∘ f) ◁ b) βˆ™ Aβ‚€)))))

    forward : (evaluate-boundary i p b (F ∘ f)) =β‚‚ (((F ◁ evaluate-boundary i p b f) βˆ™ t) βˆ™ z)
    forward = (isoComp-assoc-at (F ◁ evaluate-boundary i p b f) t z) ⁻¹ βˆ™
      (isoComp-cong ((postWhisker-isoComp-at F u (v βˆ™ w)) ⁻¹) (idIso (t βˆ™ z)) βˆ™
      (isoComp-cong (isoComp-cong (idIso (F ◁ u)) ((postWhisker-isoComp-at F v w) ⁻¹)) (idIso (t βˆ™ z)) βˆ™
      ((isoComp-assoc-at (F ◁ u) ((F ◁ v) βˆ™ (F ◁ w)) (t βˆ™ z)) ⁻¹ βˆ™
      (isoComp-cong (idIso (F ◁ u)) ((isoComp-assoc-at (F ◁ v) (F ◁ w) (t βˆ™ z)) ⁻¹) βˆ™
      (isoComp-cong (idIso (F ◁ u)) (isoComp-cong (idIso (F ◁ v)) (pentagon-whiskered i p f F)) βˆ™
        prefix)))))

    comparison : (evaluate-boundary i p b (F ∘ f) βˆ™ ((comp-assoc p f F) ⁻¹ β–· i)) =β‚‚
      ((F ◁ evaluate-boundary i p b f) βˆ™ comp-assoc i (f ∘ p) F)
    comparison = cancel-right z ((F ◁ evaluate-boundary i p b f) βˆ™ t) βˆ™
      isoComp-cong forward (pre-inverse (comp-assoc p f F) i)
module Boundary {Ξ“ C D : CAT} (x : Obj-abs [1]) (F : MAP C D) (f : MAP Ξ“ C) =
  EvaluationBoundary (insert x) pr₁ (pair-β₁ (id Ξ“) (const x)) F f
```