Other Agda modules in this section (188)

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

# Corner comparisons under a change of diagram shape

Restriction by a face and then by a shape map is compared with restriction
by the specified boundary edge. Evaluation carries this comparison and
its vertex identification. The resulting comparison of whole cones can
then be restricted to an arbitrary family.

```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.Section02.EvaluationCalculus.Restriction.RestrictionEndpointComposition as Composition
import SCT.VolumeI.Chapter02.Section02.EvaluationCalculus.Restriction.RestrictionCornerTransport as Corners
import SCT.VolumeI.Chapter01.Section03.ProductCalculus.PairingNaturality as PN

module SCT.VolumeI.Chapter02.Section02.EvaluationCalculus.Restriction.RestrictionBoundaryCorners
  {c m a : Level} (𝒯 : Theory c m a) (M : Mapping.MappingAnimae 𝒯)
  (β„± : Categories.FunctorCategories 𝒯 M) (P : Laws.PullbackStructure 𝒯) where

open import SCT.VolumeI.Chapter02.Section02.EvaluationCalculus.Restriction.RestrictionEvaluation 𝒯 M β„± P public
open import SCT.VolumeI.Chapter02.Section02.EvaluationCalculus.Endpoints.EndpointCornerFamilies 𝒯 M β„± P using (evaluate-cong-inverse)
open import SCT.VolumeI.Chapter01.Section08.FunctorCategoryCalculus.FunctorSquares 𝒯 M β„± P using (preComp; preCong)
open import SCT.VolumeI.Chapter01.Section02.Isomorphisms
  vocabulary terminal products productLaws composition vertical whiskering using (cancel-inverse)
open import SCT.VolumeI.Chapter01.Section06.ConeCalculus.InverseCalculus 𝒯 using (inverse-composite)
open import SCT.VolumeI.Chapter01.Section06.Cones 𝒯
open import SCT.VolumeI.Chapter01.Section06.ConeCalculus.ConeRestriction 𝒯 using (coneIso-pre; conePre-assoc; coneIso-compose; coneIso-inverse; coneIso-adjust)
open import SCT.VolumeI.Chapter01.Section06.ConeCalculus.ComparisonSquares 𝒯 using (post-square)
open import SCT.VolumeI.Chapter01.Section04.SquareCalculus.ProjectionSquares 𝒯 using (post-inverse)
open PN vocabulary terminal products productLaws composition vertical whiskering using (move-square; cancel-right; cancel-left; cancel-left-reflect)

module Edge {A K B C : CAT} (d : MAP A K) (j : MAP K B)
  (r : MAP A B) (Ξ± : (j ∘ d) =₁ r) (u : Obj-abs A) where
  pc = preComp {E = C} d j
  pg = preCong {E = C} Ξ±
  forward = pg βˆ™ pc
  backward = pc ⁻¹ βˆ™ pg ⁻¹
  ev = evaluate {C = C} u
  va = evaluate-cong {C = C} (comp-assoc u d j)
  vΞ± = evaluate-cong {C = C} (Ξ± β–· u)
  old = evaluate-pre {C = C} (j ∘ d) u
  new = evaluate-pre {C = C} r u
  route = evaluate-pre {C = C} j (d ∘ u) βˆ™
    ((evaluate-pre d u β–· funPre j) βˆ™ (comp-assoc (funPre j) (funPre d) ev) ⁻¹)
  vertex = (Ξ± β–· u) βˆ™ (comp-assoc u d j) ⁻¹

  abstract
    first : (old βˆ™ (ev ◁ pc)) =β‚‚ (va ⁻¹ βˆ™ route)
    first = isoComp-cong (idIso (va ⁻¹)) (Composition.At.comparison 𝒯 M β„± P d j u) βˆ™
      (cancel-left va (old βˆ™ (ev ◁ pc))) ⁻¹

    forward-image : (new βˆ™ (ev ◁ forward)) =β‚‚ (evaluate-cong vertex βˆ™ route)
    forward-image = isoComp-cong
        ((isoComp-cong (idIso vΞ±) (evaluate-cong-inverse (comp-assoc u d j)) βˆ™
          evaluate-cong-comp (Ξ± β–· u) ((comp-assoc u d j) ⁻¹)) ⁻¹) (idIso route) βˆ™
      ((isoComp-assoc-at vΞ± (va ⁻¹) route) ⁻¹ βˆ™
      (isoComp-cong (idIso vΞ±) first βˆ™
      ((isoComp-assoc-at vΞ± old (ev ◁ pc)) βˆ™
      (isoComp-cong (Restriction.natural Ξ± u) (idIso (ev ◁ pc)) βˆ™
      ((isoComp-assoc-at new (ev ◁ pg) (ev ◁ pc)) ⁻¹ βˆ™
        isoComp-cong (idIso new) (postWhisker-isoComp-at ev pg pc))))))

module Corner {A D K B C : CAT} (u : Obj-abs A) (v : Obj-abs D)
  (d : MAP A K) (k : MAP D K) (j : MAP K B)
  (Ξ΄ : (d ∘ u) =₁ (k ∘ v))
  (r : MAP A B) (s : MAP D B)
  (Ξ± : (j ∘ d) =₁ r) (Ξ² : (j ∘ k) =₁ s)
  (Ξ΅ : (r ∘ u) =₁ (s ∘ v))
  (shape : (Ξ΅ βˆ™ Edge.vertex {C = C} d j r Ξ± u) =β‚‚
    (Edge.vertex {C = C} k j s Ξ² v βˆ™ (j ◁ Ξ΄))) where
  module L = Edge {C = C} d j r Ξ± u
  module R = Edge {C = C} k j s Ξ² v
  module Inner = Corners.At 𝒯 M β„± P {C = C} u v d k j Ξ΄
  p = L.new
  q = R.new
  vertex = evaluate-cong {C = C} Ξ΅
  Ο‡ = evaluate-cong {C = C} L.vertex
  ψ = evaluate-cong {C = C} R.vertex
  middle = evaluate-cong {C = C} (j ◁ Ξ΄)
  Ο„ = q ⁻¹ βˆ™ (vertex βˆ™ p)
  outer : Cone (evaluate {C = C} u) (evaluate v) (Fun B C)
  outer = record { left = funPre r ; right = funPre s ; match = Ο„ }

  abstract
    outer-square : (q βˆ™ Ο„) =β‚‚ (vertex βˆ™ p)
    outer-square = cancel-inverse q (vertex βˆ™ p)

    vertex-square : (vertex βˆ™ Ο‡) =β‚‚ (ψ βˆ™ middle)
    vertex-square = evaluate-cong-comp R.vertex (j ◁ Ξ΄) βˆ™
      (evaluate-cong-Isoβ‚‚ shape βˆ™ (evaluate-cong-comp Ξ΅ L.vertex) ⁻¹)

    compatible : (Ο„ βˆ™ (evaluate u ◁ L.forward)) =β‚‚
      ((evaluate v ◁ R.forward) βˆ™ Inner.matching)
    compatible = cancel-left-reflect q
      (isoComp-assoc-at q (evaluate v ◁ R.forward) Inner.matching βˆ™
      (isoComp-cong (R.forward-image ⁻¹) (idIso Inner.matching) βˆ™
      ((isoComp-assoc-at ψ Inner.right-route Inner.matching) ⁻¹ βˆ™
      (isoComp-cong (idIso ψ) (Inner.comparison ⁻¹) βˆ™
      (isoComp-assoc-at ψ middle Inner.left-route βˆ™
      (isoComp-cong vertex-square (idIso Inner.left-route) βˆ™
      ((isoComp-assoc-at vertex Ο‡ Inner.left-route) ⁻¹ βˆ™
      (isoComp-cong (idIso vertex) L.forward-image βˆ™
      (isoComp-assoc-at vertex p (evaluate u ◁ L.forward) βˆ™
      (isoComp-cong outer-square (idIso (evaluate u ◁ L.forward)) βˆ™
        (isoComp-assoc-at q Ο„ (evaluate u ◁ L.forward)) ⁻¹))))))))))

  comparison : ConeIso (conePre (funPre j) Inner.cone) outer
  comparison = record
    { leftIso = L.forward ; rightIso = R.forward ; compatible = compatible }

  module Family {Ξ“ : CAT} (W : MAP Ξ“ (Fun B C)) where
    raw = coneIso-compose (conePre-assoc W (funPre j) Inner.cone)
      (coneIso-inverse (coneIso-pre W comparison))
    left = comp-assoc W (funPre j) (funPre d) βˆ™
      ((L.pc β–· W) ⁻¹ βˆ™ (L.pg β–· W) ⁻¹)
    right = comp-assoc W (funPre j) (funPre k) βˆ™
      ((R.pc β–· W) ⁻¹ βˆ™ (R.pg β–· W) ⁻¹)

    abstract
      left-normal : ConeIso.leftIso raw =β‚‚ left
      left-normal = isoComp-cong (idIso (comp-assoc W (funPre j) (funPre d)))
        (inverse-composite (L.pg β–· W) (L.pc β–· W) βˆ™
          (=-inv ◁ preWhisker-isoComp-at L.pg L.pc W))
      right-normal : ConeIso.rightIso raw =β‚‚ right
      right-normal = isoComp-cong (idIso (comp-assoc W (funPre j) (funPre k)))
        (inverse-composite (R.pg β–· W) (R.pc β–· W) βˆ™
          (=-inv ◁ preWhisker-isoComp-at R.pg R.pc W))

    value : ConeIso (conePre W outer) (conePre (funPre j ∘ W) Inner.cone)
    value = coneIso-adjust raw left right left-normal right-normal
```