Other Agda modules in this section (188)

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

# Postcomposition of a whole triangle corner

One calculation handles every pair of restricted edges. The edge
comparisons and the identification of their common vertex commute with
postcomposition, so reflection of the transported square retains the
specified matching.

```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.EvaluationCalculus.Postcomposition.PostcompositionCorners
  {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.Section02.EvaluationCalculus.Postcomposition.PostcompositionEndpointCones 𝒯 M β„± I public
import SCT.VolumeI.Chapter02.Section02.EvaluationCalculus.Endpoints.EndpointConeRoutes as Routes
import SCT.VolumeI.Chapter02.Section02.EvaluationCalculus.Restriction.PostcompositionRestrictionEvaluation as Edges
import SCT.VolumeI.Chapter02.Section02.EvaluationCalculus.Postcomposition.PostcompositionObjectEvaluation as Objects
open import SCT.VolumeI.Chapter01.Section06.ConeCalculus.ComparisonSquares 𝒯 using (reflect-transport-square)
open import SCT.VolumeI.Chapter01.Section04.Substitution.CoherenceTransport 𝒯
  using (changeEndpoints; square-to-changeEndpoints)
open import SCT.VolumeI.Chapter01.Section02.Isomorphisms
  vocabulary terminal products productLaws composition vertical whiskering using (cancel-inverse)

module At {Ξ“ B C D : CAT} (F : MAP C D) (u v : Obj-abs [1]) (d k : MAP [1] B)
  (Ξ΄ : (d ∘ u) =₁ (k ∘ v)) (h : MAP Ξ“ (Fun B C)) where
  hF = funPost F ∘ h
  module Before = Routes.At 𝒯 M β„± I u v d k Ξ΄ h
  module After = Routes.At 𝒯 M β„± I u v d k Ξ΄ hF
  module Left = Edges.At 𝒯 M β„± P I E F d h
  module Right = Edges.At 𝒯 M β„± P I E F k h
  output = post-cone F u v Before.family
  Kl = evaluate-post-at u F (funPre d ∘ h)
  Kr = evaluate-post-at v F (funPre k ∘ h)
  L = (F ◁ Before.left-route) βˆ™ Kl
  R = (F ◁ Before.right-route) βˆ™ Kr
  vertex = F ◁ (Before.vertex β–· h)
  α = evaluate-post-at (d ∘ u) F h
  β = evaluate-post-at (k ∘ v) F h
  left-image = evaluate u ◁ Left.edge-comparison
  right-image = evaluate v ◁ Right.edge-comparison
  Ο„ = F ◁ Before.matching

  abstract
    clear-frames : (R βˆ™ Cone.match output) =β‚‚ (vertex βˆ™ L)
    clear-frames = isoComp-assoc-at vertex (F ◁ Before.left-route) Kl βˆ™
      isoComp-cong
        (postWhisker-isoComp-at F (Before.vertex β–· h) Before.left-route βˆ™
          (postWhisker F ◁ Before.clear-frames) βˆ™
          (postWhisker-isoComp-at F Before.right-route Before.matching) ⁻¹) (idIso Kl) βˆ™
      (isoComp-assoc-at (F ◁ Before.right-route) Ο„ Kl) ⁻¹ βˆ™
      isoComp-cong (idIso (F ◁ Before.right-route)) (cancel-inverse Kr (Ο„ βˆ™ Kl)) βˆ™
      isoComp-assoc-at (F ◁ Before.right-route) Kr (Cone.match output)

    normalized : changeEndpoints L R (Cone.match output) =β‚‚ vertex
    normalized = square-to-changeEndpoints L R (Cone.match output) vertex clear-frames

    left-square : (L βˆ™ left-image) =β‚‚ (Ξ± βˆ™ After.left-route)
    left-square = Left.Endpoint.comparison u βˆ™ isoComp-assoc-at (F ◁ Before.left-route) Kl left-image

    right-square : (R βˆ™ right-image) =β‚‚ (Ξ² βˆ™ After.right-route)
    right-square = Right.Endpoint.comparison v βˆ™ isoComp-assoc-at (F ◁ Before.right-route) Kr right-image

    compatible : (Cone.match output βˆ™ left-image) =β‚‚ (right-image βˆ™ After.matching)
    compatible = reflect-transport-square After.left-route L After.right-route R
      After.matching (Cone.match output) left-image right-image Ξ± Ξ² left-square right-square
      (isoComp-cong (idIso Ξ²) (After.normalized ⁻¹) βˆ™
        (Objects.At.comparison 𝒯 M β„± F h Ξ΄) ⁻¹ βˆ™
        isoComp-cong normalized (idIso Ξ±))

  comparison : ConeIso After.family output
  comparison = record
    { leftIso = Left.edge-comparison ; rightIso = Right.edge-comparison
    ; compatible = compatible }

open import SCT.VolumeI.Chapter01.Section06.ConeCalculus.Comparisons 𝒯 using (coneIso-compose; coneIso-adjust)

module FramedComparison {Ξ“ B C D : CAT} (F : MAP C D)
  (u v : Obj-abs [1]) (d k : MAP [1] B) (Ξ΄ : (d ∘ u) =₁ (k ∘ v))
  (h : MAP Ξ“ (Fun B C)) (f g : MAP Ξ“ (Ar C)) {x : MAP Ξ“ C}
  (p : (evaluate u ∘ f) =₁ x) (q : (evaluate v ∘ g) =₁ x)
  (Ξ¦ : ConeIso (Routes.At.family 𝒯 M β„± I u v d k Ξ΄ h) (Framed.original F u v f g p q)) where
  module Corner = At F u v d k Ξ΄ h
  module Frames = Framed F u v f g p q
  left-edge = (funPost F ◁ ConeIso.leftIso Ξ¦) βˆ™ Corner.Left.edge-comparison
  right-edge = (funPost F ◁ ConeIso.rightIso Ξ¦) βˆ™ Corner.Right.edge-comparison
  raw = coneIso-compose Frames.comparison
    (coneIso-compose (post-coneIso F u v Ξ¦) Corner.comparison)

  comparison : ConeIso Corner.After.family Frames.reframed
  comparison = coneIso-adjust raw left-edge right-edge
    (isoComp-unitΛ‘-at left-edge) (isoComp-unitΛ‘-at right-edge)
```