Other Agda modules in this section (135)

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

# Restricting normalized projection witnesses

These calculations compare a projection normalization restricted twice with
the normalization at the composite parameter. The associator calculation
uses the already proved pentagon; the identity case uses its unit consequence.

```agda
{-# OPTIONS --safe --without-K #-}
open import Agda.Primitive using (Level)
open import SCT.VolumeI.Chapter01.Theory using (Theory)
import SCT.VolumeI.Chapter01.Section04.Setup as Setup
import SCT.VolumeI.Chapter01.Section03.ProductCalculus.PairingNaturality as PN
import SCT.VolumeI.Chapter01.Section03.ProductCalculus.IteratedPairing as Iterated
import SCT.VolumeI.Chapter01.Section03.ProductCalculus.ProductFunctorUnits as ProductUnits

module SCT.VolumeI.Chapter01.Section06.Coordinates.ProjectionRestriction
  {c m a : Level} (š’Æ : Theory c m a) where

open Setup š’Æ
open PN vocabulary terminal products productLaws composition vertical whiskering
  using (move-square; cancel-right; cancel-left; pre-square-projection)
open Iterated vocabulary terminal products productLaws composition vertical whiskering pentagonTriangle
  using (transport-pre; transport-pre-assoc; pentagon-whiskered)
open ProductUnits vocabulary terminal products productLaws composition vertical whiskering pentagonTriangle
  using (left-unitor-comp)
open import SCT.VolumeI.Chapter01.Section04.Substitution.CoherenceTransport š’Æ
  using (pentagon-left-corner; changeEndpoints-to-square; square-to-changeEndpoints)
open import SCT.VolumeI.Chapter01.Section04.SquareCalculus.ProjectionSquares š’Æ using (post-inverse)
open import SCT.VolumeI.Chapter01.Section06.Cones š’Æ

restricted-normalization : {R T X Y Z : CAT} (Ļ€ : MAP Y Z) (H : MAP X Y)
  (x : MAP T X) {y : MAP T Z} (n : (Ļ€ ∘ (H ∘ x)) =₁ y) (r : MAP R T)
  → (Ļ€ ∘ (H ∘ (x ∘ r))) =₁ (y ∘ r)
restricted-normalization Ļ€ H x n r = transport-pre Ļ€ (H ∘ x) n r āˆ™ (Ļ€ ◁ comp-assoc r x H) ⁻¹

opaque
  normalization-pre : {R T X Y Z : CAT} (Ļ€ : MAP Y Z) (H : MAP X Y) (k : MAP X Z)
    (β : (Ļ€ ∘ H) =₁ k) (x : MAP T X) (r : MAP R T)
    {y : MAP T Z} (n : (k ∘ x) =₁ y)
    → (restricted-normalization Ļ€ H x (n āˆ™ transport-pre Ļ€ H β x) r) =ā‚‚
        (((n ā–· r) āˆ™ (comp-assoc r x k) ⁻¹) āˆ™ transport-pre Ļ€ H β (x ∘ r))
  normalization-pre Ļ€ H k β x r n =
    (isoComp-assoc-at (n ā–· r) (A ⁻¹) next) ⁻¹ āˆ™
    (isoComp-cong (idIso (n ā–· r)) core āˆ™
    (isoComp-assoc-at (n ā–· r) (old āˆ™ corner) (edge ⁻¹) āˆ™
    (isoComp-cong (isoComp-assoc-at (n ā–· r) old corner) (idIso (edge ⁻¹)) āˆ™
      isoComp-cong (isoComp-cong (preWhisker-isoComp-at n (transport-pre Ļ€ H β x) r) (idIso corner)) (idIso (edge ⁻¹)))))
    where
    A : ((k ∘ x) ∘ r) =₁ (k ∘ (x ∘ r))
    A = comp-assoc r x k
    old : ((Ļ€ ∘ (H ∘ x)) ∘ r) =₁ ((k ∘ x) ∘ r)
    old = transport-pre Ļ€ H β x ā–· r
    next : (Ļ€ ∘ (H ∘ (x ∘ r))) =₁ (k ∘ (x ∘ r))
    next = transport-pre Ļ€ H β (x ∘ r)
    corner : (Ļ€ ∘ ((H ∘ x) ∘ r)) =₁ ((Ļ€ ∘ (H ∘ x)) ∘ r)
    corner = (comp-assoc r (H ∘ x) Ļ€) ⁻¹
    edge : (Ļ€ ∘ ((H ∘ x) ∘ r)) =₁ (Ļ€ ∘ (H ∘ (x ∘ r)))
    edge = Ļ€ ◁ comp-assoc r x H
    core : ((old āˆ™ corner) āˆ™ edge ⁻¹) =ā‚‚ (A ⁻¹ āˆ™ next)
    core = (move-square A (old āˆ™ corner) next edge
      (transport-pre-assoc Ļ€ H k β x r āˆ™ (isoComp-assoc-at A old corner) ⁻¹)) ⁻¹

  associator-corner : {R T X Y Z : CAT} (r : MAP R T) (u : MAP T X) (Ļ€ : MAP X Y) (f : MAP Y Z)
    → ((comp-assoc u Ļ€ f ā–· r) āˆ™ (comp-assoc r u (f ∘ Ļ€)) ⁻¹) =ā‚‚
        (((comp-assoc r (Ļ€ ∘ u) f) ⁻¹ āˆ™ (f ◁ (comp-assoc r u Ļ€) ⁻¹)) āˆ™ comp-assoc (u ∘ r) Ļ€ f)
  associator-corner r u π f =
    isoComp-cong (isoComp-cong (idIso ((comp-assoc r (Ļ€ ∘ u) f) ⁻¹)) ((post-inverse f (comp-assoc r u Ļ€)) ⁻¹))
      (idIso (comp-assoc (u ∘ r) Ļ€ f)) āˆ™
    ((isoComp-assoc-at ((comp-assoc r (Ļ€ ∘ u) f) ⁻¹) ((f ◁ comp-assoc r u Ļ€) ⁻¹) (comp-assoc (u ∘ r) Ļ€ f)) ⁻¹ āˆ™
      (pentagon-left-corner (comp-assoc (u ∘ r) Ļ€ f) (comp-assoc r u (f ∘ Ļ€))
        (f ◁ comp-assoc r u Ļ€) (comp-assoc r (Ļ€ ∘ u) f) (comp-assoc u Ļ€ f ā–· r)
        (pentagon-whiskered r u Ļ€ f)) ⁻¹)

  unit-corner : {R T E : CAT} (r : MAP R T) (v : MAP T E)
    → ((comp-unitĖ” v ā–· r) āˆ™ (comp-assoc r v (id E)) ⁻¹) =ā‚‚ (comp-unitĖ” (v ∘ r))
  unit-corner r v = cancel-right (comp-assoc r v (id _)) (comp-unitĖ” (v ∘ r)) āˆ™
    isoComp-cong ((left-unitor-comp r v) ⁻¹) (idIso ((comp-assoc r v (id _)) ⁻¹))

  composite-normalization-pre : {R T X Y Z W : CAT}
    (Ļ€ : MAP Y Z) (H : MAP X Y) (q : MAP X W) (f : MAP W Z)
    (β : (Ļ€ ∘ H) =₁ (f ∘ q)) (u : MAP T X) (r : MAP R T)
    → (restricted-normalization Ļ€ H u (comp-assoc u q f āˆ™ transport-pre Ļ€ H β u) r) =ā‚‚
      (((comp-assoc r (q ∘ u) f) ⁻¹ āˆ™ (f ◁ (comp-assoc r u q) ⁻¹)) āˆ™
        (comp-assoc (u ∘ r) q f āˆ™ transport-pre Ļ€ H β (u ∘ r)))
  composite-normalization-pre Ļ€ H q f β u r =
    isoComp-assoc-at ((comp-assoc r (q ∘ u) f) ⁻¹ āˆ™ (f ◁ (comp-assoc r u q) ⁻¹))
      (comp-assoc (u ∘ r) q f) (transport-pre Ļ€ H β (u ∘ r)) āˆ™
    (isoComp-cong (associator-corner r u q f) (idIso (transport-pre Ļ€ H β (u ∘ r))) āˆ™
      normalization-pre Ļ€ H (f ∘ q) β u r (comp-assoc u q f))

  identity-normalization-pre : {R T Y Z : CAT}
    (Ļ€ : MAP Y Z) (H : MAP Z Y) (β : (Ļ€ ∘ H) =₁ (id Z)) (v : MAP T Z) (r : MAP R T)
    → (restricted-normalization Ļ€ H v (comp-unitĖ” v āˆ™ transport-pre Ļ€ H β v) r) =ā‚‚
        (comp-unitĖ” (v ∘ r) āˆ™ transport-pre Ļ€ H β (v ∘ r))
  identity-normalization-pre Ļ€ H β v r =
    isoComp-cong (unit-corner r v) (idIso (transport-pre Ļ€ H β (v ∘ r))) āˆ™
      normalization-pre Ļ€ H (id _) β v r (comp-unitĖ” v)

  project-transport : {X Y Z : CAT} (Ļ€ : MAP Y Z) {u u′ v v′ : MAP X Y}
    (L : u =₁ u′) (R : v =₁ v′) (σ : u =₁ v)
    → (Ļ€ ◁ (R āˆ™ (σ āˆ™ L ⁻¹))) =ā‚‚ ((Ļ€ ◁ R) āˆ™ ((Ļ€ ◁ σ) āˆ™ (Ļ€ ◁ L) ⁻¹))
  project-transport Ļ€ L R σ = isoComp-cong (idIso (Ļ€ ◁ R))
      (isoComp-cong (idIso (Ļ€ ◁ σ)) (post-inverse Ļ€ L) āˆ™ postWhisker-isoComp-at Ļ€ σ (L ⁻¹)) āˆ™
    postWhisker-isoComp-at Ļ€ R (σ āˆ™ L ⁻¹)

  extend-square : {X Y : CAT} {u u′ v v′ x y : MAP X Y}
    (L : u =₁ u′) (R : v =₁ v′) (σ : u =₁ v)
    (l : u =₁ x) (r : v =₁ y) (Ī“ : x =₁ y)
    → (r āˆ™ σ) =ā‚‚ (Ī“ āˆ™ l)
    → ((r āˆ™ R ⁻¹) āˆ™ (R āˆ™ (σ āˆ™ L ⁻¹))) =ā‚‚ (Ī“ āˆ™ (l āˆ™ L ⁻¹))
  extend-square L R σ l r Ī“ square = isoComp-assoc-at Ī“ l (L ⁻¹) āˆ™
    (isoComp-cong square (idIso (L ⁻¹)) āˆ™
    ((isoComp-assoc-at r σ (L ⁻¹)) ⁻¹ āˆ™
    (isoComp-cong (idIso r) (cancel-left R (σ āˆ™ L ⁻¹)) āˆ™
      isoComp-assoc-at r (R ⁻¹) (R āˆ™ (σ āˆ™ L ⁻¹)))))

  coordinate-pre : {C D E Z S T : CAT} {F : MAP C E} {G : MAP D E}
    (Ļ€ : MAP E Z) (t : Cone F G T) (r : MAP S T)
    {x y : MAP T Z} (l : (Ļ€ ∘ (F ∘ Cone.left t)) =₁ x)
    (q : (Ļ€ ∘ (G ∘ Cone.right t)) =₁ y)
    {x′ : MAP S Z} (l′ : (Ļ€ ∘ (F ∘ (Cone.left t ∘ r))) =₁ x′)
    (q′ : (Ļ€ ∘ (G ∘ (Cone.right t ∘ r))) =₁ (y ∘ r))
    (D′ : x′ =₁ (x ∘ r))
    → (restricted-normalization Ļ€ F (Cone.left t) l r) =ā‚‚ (D′ āˆ™ l′)
    → (restricted-normalization Ļ€ G (Cone.right t) q r) =ā‚‚ q′
    → (q′ āˆ™ ((Ļ€ ◁ Cone.match (conePre r t)) āˆ™ l′ ⁻¹)) =ā‚‚
        (((q āˆ™ ((Ļ€ ◁ Cone.match t) āˆ™ l ⁻¹)) ā–· r) āˆ™ D′)
  coordinate-pre {F = F} {G} Ļ€ t r {x} {y} l q l′ q′ D′ left right =
    square-to-changeEndpoints l′ q′ (Ļ€ ◁ Cone.match (conePre r t)) (Ī“ āˆ™ D′)
      ((isoComp-assoc-at Ī“ D′ l′) ⁻¹ āˆ™
      (isoComp-cong (idIso Ī“) left āˆ™
      (extend-square (Ļ€ ◁ L) (Ļ€ ◁ R) (Ļ€ ◁ (Cone.match t ā–· r))
        (transport-pre Ļ€ (F ∘ Cone.left t) l r) (transport-pre Ļ€ (G ∘ Cone.right t) q r) Ī“
        (pre-square-projection π (Cone.match t) edge l q r
          (changeEndpoints-to-square l q (Ļ€ ◁ Cone.match t) edge (idIso edge))) āˆ™
      (isoComp-cong (idIso (restricted-normalization Ļ€ G (Cone.right t) q r)) (project-transport Ļ€ L R (Cone.match t ā–· r)) āˆ™
        isoComp-cong (right ⁻¹) (idIso (Ļ€ ◁ Cone.match (conePre r t)))))))
    where
    edge : x =₁ y
    edge = q āˆ™ ((Ļ€ ◁ Cone.match t) āˆ™ l ⁻¹)
    Ī“ : (x ∘ r) =₁ (y ∘ r)
    Ī“ = edge ā–· r
    L : ((F ∘ Cone.left t) ∘ r) =₁ (F ∘ (Cone.left t ∘ r))
    L = comp-assoc r (Cone.left t) F
    R : ((G ∘ Cone.right t) ∘ r) =₁ (G ∘ (Cone.right t ∘ r))
    R = comp-assoc r (Cone.right t) G
```