Other Agda modules in this section (135)

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

# Normalizing a matching along a retraction

A matching into the image of a section can be adjusted to have any
prescribed image under its retraction. The adjustment retains both legs
and supplies the equation for its image. No embedding or uniqueness of
matching identifications is assumed in this calculation.

```agda
{-# OPTIONS --safe --without-K #-}
open import Agda.Primitive using (Level)
open import SCT.VolumeI.Chapter01.Theory using (Theory)

module SCT.VolumeI.Chapter01.Section06.ConeCalculus.SplitRetractionMatching
  {c m a : Level} (𝒯 : Theory c m a) where

open import SCT.VolumeI.Chapter01.Section04.Setup 𝒯
open import SCT.VolumeI.Chapter01.Section06.ConeCalculus.ComparisonSquares 𝒯
  using (post-square)
open import SCT.VolumeI.Chapter01.Section06.Coordinates.ProjectionRestriction 𝒯
  using (restricted-normalization)
open import SCT.VolumeI.Chapter01.Section04.SquareCalculus.ProjectionSquares 𝒯
  using (post-inverse)
open import SCT.VolumeI.Chapter01.Section03.ProductCalculus.PairingNaturality
  vocabulary terminal products productLaws composition vertical whiskering
  using (substitution-square-projection; project-composite; pre-square-projection)
open import SCT.VolumeI.Chapter01.Section03.ProductCalculus.IteratedPairing
  vocabulary terminal products productLaws composition vertical whiskering pentagonTriangle
  using (transport-pre; transport-pre-assoc)
open import SCT.VolumeI.Chapter01.Section03.ProductCalculus.ProductFunctorUnits
  vocabulary terminal products productLaws composition vertical whiskering pentagonTriangle
  using (left-unitor-comp)
open import SCT.VolumeI.Chapter01.Section03.IdentificationCalculus.Structural
  vocabulary terminal products productLaws composition whiskering
  using (postWhisker-id-at)

module WithRetraction {A B : CAT} (i : MAP A B) (r : MAP B A)
  (ρ : (r ∘ i) =₁ id A) where

  frame : {Ξ“ : CAT} (v : MAP Ξ“ A) β†’ (r ∘ (i ∘ v)) =₁ v
  frame v = comp-unitΛ‘ v βˆ™ ((ρ β–· v) βˆ™ (comp-assoc v i r) ⁻¹)

  abstract
    precompose-image : {Ξ“ : CAT} {G H : MAP Ξ“ B} {v : MAP Ξ“ A}
      (Ο‰ : H =₁ (i ∘ v)) (Ξ΄ : G =₁ H) (p : (r ∘ G) =₁ v) β†’
      (frame v βˆ™ (r ◁ Ο‰)) =β‚‚ (p βˆ™ (r ◁ Ξ΄) ⁻¹) β†’
      (frame v βˆ™ (r ◁ (Ο‰ βˆ™ Ξ΄))) =β‚‚ p
    precompose-image {v = v} Ο‰ Ξ΄ p image = isoComp-unitΚ³-at p βˆ™
      (isoComp-cong (idIso p) (isoComp-inverseΛ‘-at (r ◁ Ξ΄)) βˆ™
      (isoComp-assoc-at p ((r ◁ Ξ΄) ⁻¹) (r ◁ Ξ΄) βˆ™
      (isoComp-cong image (idIso (r ◁ Ξ΄)) βˆ™ project-composite r Ο‰ Ξ΄ (frame v))))

    frame-natural : {Ξ“ : CAT} {v w : MAP Ξ“ A} (Ο‡ : v =₁ w) β†’
      (frame w βˆ™ (r ◁ (i ◁ Ο‡))) =β‚‚ (Ο‡ βˆ™ frame v)
    frame-natural {v = v} {w} Ο‡ = paste-squares
      ((ρ β–· v) βˆ™ (comp-assoc v i r) ⁻¹)
      ((ρ β–· w) βˆ™ (comp-assoc w i r) ⁻¹)
      (comp-unitΛ‘ v) (comp-unitΛ‘ w)
      (r ◁ (i ◁ Ο‡)) (id A ◁ Ο‡) Ο‡
      (substitution-square-projection r i (id A) ρ Ο‡)
      (postWhisker-id-at Ο‡)

    frame-restrict : {Ξ“ Ξ” : CAT} (v : MAP Ξ“ A) (t : MAP Ξ” Ξ“) β†’
      (frame (v ∘ t) βˆ™ (r ◁ comp-assoc t v i)) =β‚‚
      transport-pre r (i ∘ v) (frame v) t
    frame-restrict v t =
      isoComp-cong ((preWhisker-isoComp-at (comp-unitˑ v) (transport-pre r i ρ v) t) ⁻¹)
        (idIso outer) βˆ™
      (isoComp-cong (isoComp-cong (left-unitor-comp t v) (idIso inner)) (idIso outer) βˆ™
      (isoComp-cong ((isoComp-assoc-at unit assoc inner) ⁻¹) (idIso outer) βˆ™
      ((isoComp-assoc-at unit (assoc βˆ™ inner) outer) ⁻¹ βˆ™
      (isoComp-cong (idIso unit) ((transport-pre-assoc r i (id A) ρ v t) ⁻¹) βˆ™
        isoComp-assoc-at unit (transport-pre r i ρ (v ∘ t)) (r ◁ comp-assoc t v i)))))
      where
      unit : (id A ∘ (v ∘ t)) =₁ (v ∘ t)
      unit = comp-unitˑ (v ∘ t)
      assoc : ((id A ∘ v) ∘ t) =₁ (id A ∘ (v ∘ t))
      assoc = comp-assoc t v (id A)
      outer : (r ∘ ((i ∘ v) ∘ t)) =₁ ((r ∘ (i ∘ v)) ∘ t)
      outer = (comp-assoc t (i ∘ v) r) ⁻¹
      inner : ((r ∘ (i ∘ v)) ∘ t) =₁ ((id A ∘ v) ∘ t)
      inner = transport-pre r i ρ v β–· t

    image-restrict : {Ξ“ Ξ” : CAT} {H : MAP Ξ“ B} {v : MAP Ξ“ A}
      (Ο‰ : H =₁ (i ∘ v)) (p : (r ∘ H) =₁ v) (t : MAP Ξ” Ξ“) β†’
      (frame v βˆ™ (r ◁ Ο‰)) =β‚‚ p β†’
      (frame (v ∘ t) βˆ™ (r ◁ (comp-assoc t v i βˆ™ (Ο‰ β–· t)))) =β‚‚
      transport-pre r H p t
    image-restrict {H = H} {v} Ο‰ p t image =
      isoComp-unitΛ‘-at (transport-pre r H p t) βˆ™
      (isoComp-cong (preWhisker-idIso v t) (idIso (transport-pre r H p t)) βˆ™
      (pre-square-projection r Ο‰ (idIso v) p (frame v) t
        ((isoComp-unitΛ‘-at p) ⁻¹ βˆ™ image) βˆ™
      (isoComp-cong (frame-restrict v t) (idIso (r ◁ (Ο‰ β–· t))) βˆ™
        project-composite r (comp-assoc t v i) (Ο‰ β–· t) (frame (v ∘ t)))))

    image-nested-restrict : {Ξ“ Ξ” X : CAT} (F : MAP X B) (h : MAP Ξ“ X)
      {v : MAP Ξ“ A} (Ο‰ : (F ∘ h) =₁ (i ∘ v))
      (p : (r ∘ (F ∘ h)) =₁ v) (t : MAP Ξ” Ξ“) β†’
      (frame v βˆ™ (r ◁ Ο‰)) =β‚‚ p β†’
      (frame (v ∘ t) βˆ™
        (r ◁ (comp-assoc t v i βˆ™ ((Ο‰ β–· t) βˆ™ (comp-assoc t h F) ⁻¹)))) =β‚‚
      restricted-normalization r F h p t
    image-nested-restrict F h {v} Ο‰ p t image =
      isoComp-cong (idIso (transport-pre r (F ∘ h) p t)) (post-inverse r (comp-assoc t h F)) βˆ™
      (isoComp-cong (image-restrict Ο‰ p t image) (idIso (r ◁ (comp-assoc t h F) ⁻¹)) βˆ™
      (project-composite r (comp-assoc t v i βˆ™ (Ο‰ β–· t))
        ((comp-assoc t h F) ⁻¹) (frame (v ∘ t)) βˆ™
      isoComp-cong (idIso (frame (v ∘ t)))
        (postWhisker r ◁ (isoComp-assoc-at (comp-assoc t v i) (Ο‰ β–· t)
          ((comp-assoc t h F) ⁻¹)) ⁻¹)))

    image-two-step-restrict : {Ξ“ Ξ” X Y : CAT} (F : MAP Y B)
      (n : MAP X Y) (k : MAP Ξ“ X) {v : MAP Ξ“ A}
      (Ο‰ : (F ∘ (n ∘ k)) =₁ (i ∘ v))
      (p : (r ∘ (F ∘ (n ∘ k))) =₁ v) (t : MAP Ξ” Ξ“) β†’
      (frame v βˆ™ (r ◁ Ο‰)) =β‚‚ p β†’
      (frame (v ∘ t) βˆ™
        (r ◁ (comp-assoc t v i βˆ™ restricted-normalization F n k Ο‰ t))) =β‚‚
      (restricted-normalization r F (n ∘ k) p t βˆ™
        (r ◁ (F ◁ comp-assoc t k n)) ⁻¹)
    image-two-step-restrict F n k {v} Ο‰ p t image =
      isoComp-cong (idIso (restricted-normalization r F (n ∘ k) p t))
        (post-inverse r (F ◁ comp-assoc t k n)) βˆ™
      (isoComp-cong (image-nested-restrict F (n ∘ k) Ο‰ p t image)
        (idIso (r ◁ (F ◁ comp-assoc t k n) ⁻¹)) βˆ™
      (project-composite r
        (comp-assoc t v i βˆ™ transport-pre F (n ∘ k) Ο‰ t)
        ((F ◁ comp-assoc t k n) ⁻¹) (frame (v ∘ t)) βˆ™
      isoComp-cong (idIso (frame (v ∘ t)))
        (postWhisker r ◁ (isoComp-assoc-at (comp-assoc t v i)
          (transport-pre F (n ∘ k) Ο‰ t) ((F ◁ comp-assoc t k n) ⁻¹)) ⁻¹)))

    retract-square : {Ξ“ : CAT} {h k : MAP Ξ“ B} {v w : MAP Ξ“ A}
      (Ο‰L : h =₁ (i ∘ v)) (Ο‰R : k =₁ (i ∘ w))
      (Ο„ : h =₁ k) (Ξ΄ : v =₁ w)
      (p : (r ∘ h) =₁ v) (q : (r ∘ k) =₁ w) β†’
      (Ο‰R βˆ™ Ο„) =β‚‚ ((i ◁ Ξ΄) βˆ™ Ο‰L) β†’
      (frame v βˆ™ (r ◁ Ο‰L)) =β‚‚ p β†’ (frame w βˆ™ (r ◁ Ο‰R)) =β‚‚ q β†’
      (q βˆ™ (r ◁ Ο„)) =β‚‚ (Ξ΄ βˆ™ p)
    retract-square {v = v} {w} Ο‰L Ο‰R Ο„ Ξ΄ p q square imageL imageR =
      isoComp-cong (idIso Ξ΄) imageL βˆ™
      (paste-squares (r ◁ Ο‰L) (r ◁ Ο‰R) (frame v) (frame w)
        (r ◁ Ο„) (r ◁ (i ◁ Ξ΄)) Ξ΄
        (post-square r Ο‰L Ο‰R Ο„ (i ◁ Ξ΄) square) (frame-natural Ξ΄) βˆ™
        isoComp-cong (imageR ⁻¹) (idIso (r ◁ Ο„)))

  module Normalize {Ξ“ : CAT} {H : MAP Ξ“ B} {v : MAP Ξ“ A}
    (Ο‰ : H =₁ (i ∘ v)) (p : (r ∘ H) =₁ v) where

    image : (r ∘ H) =₁ v
    image = frame v βˆ™ (r ◁ Ο‰)

    correction : v =₁ v
    correction = p βˆ™ image ⁻¹

    matching : H =₁ (i ∘ v)
    matching = (i ◁ correction) βˆ™ Ο‰

    abstract
      image-law : (frame v βˆ™ (r ◁ matching)) =β‚‚ p
      image-law = isoComp-unitΚ³-at p βˆ™
        (isoComp-cong (idIso p) (isoComp-inverseΛ‘-at image) βˆ™
        (isoComp-assoc-at p (image ⁻¹) image βˆ™
        (isoComp-assoc-at correction (frame v) (r ◁ Ο‰) βˆ™
        (isoComp-cong (frame-natural correction) (idIso (r ◁ Ο‰)) βˆ™
          project-composite r (i ◁ correction) Ο‰ (frame v)))))
```