Other Agda modules in this section (47)

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

Corresponding book passages
# The two maps from the square to the walking triangle

The maps of `cons:Commutative_Squares_Auxiliary2` come from gluing.
Their four restrictions retain the chosen common-edge matching through
`glue-Ξ²`. The coordinate formulas of `lem:Commutative_Squares_Auxiliary3`
then follow by recognizing their horizontal boundary values.

```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
import SCT.VolumeI.Chapter02.Section01.CommutativeSquareAxiom as Squares

module SCT.VolumeI.Chapter02.Section01.SquareCalculus.SquareRetractions
  {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)
  (Q : Squares.CommutativeSquareAxiom 𝒯 M β„± P I E) where

open import SCT.VolumeI.Chapter02.Section01.SquareGluing 𝒯 M β„± P I E Q public
open import SCT.VolumeI.Chapter02.Section01.SquareCalculus.LatticeUniqueness 𝒯 M β„± P I E

collapse-matching : (s : MAP [2] [1]) β†’ (s ∘ d₁) =₁ (id [1]) β†’
  (id [2] ∘ d₁) =₁ ((d₁ ∘ s) ∘ d₁)
collapse-matching s Ξ΅ = (comp-assoc d₁ s d₁) ⁻¹ βˆ™
  ((d₁ ◁ Ξ΅ ⁻¹) βˆ™ ((comp-unitΚ³ d₁) ⁻¹ βˆ™ comp-unitΛ‘ d₁))

lower-cocone upper-cocone : Cocone d₁ d₁ [2]
lower-cocone = record
  { left = id [2] ; right = d₁ ∘ sβ‚€ ; match = collapse-matching sβ‚€ sβ‚€-d₁ }
upper-cocone = record
  { left = d₁ ∘ s₁ ; right = id [2] ; match = (collapse-matching s₁ s₁-d₁) ⁻¹ }

pβ‚€ pβ‚‚ : MAP ([1] Γ— [1]) [2]
pβ‚€ = glue lower-cocone
pβ‚‚ = glue upper-cocone

pβ‚€-jβ‚€ : (pβ‚€ ∘ jβ‚€) =₁ (id [2])
pβ‚€-jβ‚€ = glue-left lower-cocone
pβ‚€-j₁ : (pβ‚€ ∘ j₁) =₁ (d₁ ∘ sβ‚€)
pβ‚€-j₁ = glue-right lower-cocone
pβ‚‚-jβ‚€ : (pβ‚‚ ∘ jβ‚€) =₁ (d₁ ∘ s₁)
pβ‚‚-jβ‚€ = glue-left upper-cocone
pβ‚‚-j₁ : (pβ‚‚ ∘ j₁) =₁ (id [2])
pβ‚‚-j₁ = glue-right upper-cocone

coordinate-bottom : (F : MAP [2] [1]) (t : Cocone d₁ d₁ [2]) β†’
  ((F ∘ glue t) ∘ insert zero) =₁ ((F ∘ Cocone.right t) ∘ dβ‚‚)
coordinate-bottom F t = (comp-assoc dβ‚‚ (Cocone.right t) F) ⁻¹ βˆ™
  ((F ◁ glue-bottom t) βˆ™ comp-assoc (insert zero) (glue t) F)

coordinate-top : (F : MAP [2] [1]) (t : Cocone d₁ d₁ [2]) β†’
  ((F ∘ glue t) ∘ insert one) =₁ ((F ∘ Cocone.left t) ∘ dβ‚€)
coordinate-top F t = (comp-assoc dβ‚€ (Cocone.left t) F) ⁻¹ βˆ™
  ((F ◁ glue-top t) βˆ™ comp-assoc (insert one) (glue t) F)

collapse-coordinate : (s : MAP [2] [1]) β†’ (s ∘ d₁) =₁ (id [1]) β†’
  (t : MAP [2] [1]) β†’ (s ∘ (d₁ ∘ t)) =₁ t
collapse-coordinate s Ξ΅ t = comp-unitΛ‘ t βˆ™ ((Ξ΅ β–· t) βˆ™ (comp-assoc t d₁ s) ⁻¹)

sβ‚€-pβ‚€ : (sβ‚€ ∘ pβ‚€) =₁ min
sβ‚€-pβ‚€ = recognize-min _
  (sβ‚€-dβ‚‚ βˆ™ ((collapse-coordinate sβ‚€ sβ‚€-d₁ sβ‚€ β–· dβ‚‚) βˆ™ coordinate-bottom sβ‚€ lower-cocone))
  (sβ‚€-dβ‚€ βˆ™ ((comp-unitΚ³ sβ‚€ β–· dβ‚€) βˆ™ coordinate-top sβ‚€ lower-cocone))

s₁-pβ‚€ : (s₁ ∘ pβ‚€) =₁ prβ‚‚
s₁-pβ‚€ = recognize-second-projection _
  (sβ‚€-dβ‚‚ βˆ™ ((collapse-coordinate s₁ s₁-d₁ sβ‚€ β–· dβ‚‚) βˆ™ coordinate-bottom s₁ lower-cocone))
  (s₁-dβ‚€ βˆ™ ((comp-unitΚ³ s₁ β–· dβ‚€) βˆ™ coordinate-top s₁ lower-cocone))

sβ‚€-pβ‚‚ : (sβ‚€ ∘ pβ‚‚) =₁ prβ‚‚
sβ‚€-pβ‚‚ = recognize-second-projection _
  (sβ‚€-dβ‚‚ βˆ™ ((comp-unitΚ³ sβ‚€ β–· dβ‚‚) βˆ™ coordinate-bottom sβ‚€ upper-cocone))
  (s₁-dβ‚€ βˆ™ ((collapse-coordinate sβ‚€ sβ‚€-d₁ s₁ β–· dβ‚€) βˆ™ coordinate-top sβ‚€ upper-cocone))

s₁-pβ‚‚ : (s₁ ∘ pβ‚‚) =₁ max
s₁-pβ‚‚ = recognize-max _
  (s₁-dβ‚‚ βˆ™ ((comp-unitΚ³ s₁ β–· dβ‚‚) βˆ™ coordinate-bottom s₁ upper-cocone))
  (s₁-dβ‚€ βˆ™ ((collapse-coordinate s₁ s₁-d₁ s₁ β–· dβ‚€) βˆ™ coordinate-top s₁ upper-cocone))

jβ‚€-pβ‚€ : (jβ‚€ ∘ pβ‚€) =₁ (pair min prβ‚‚)
jβ‚€-pβ‚€ = pair-cong sβ‚€-pβ‚€ s₁-pβ‚€ βˆ™ pair-pre sβ‚€ s₁ pβ‚€
j₁-pβ‚€ : (j₁ ∘ pβ‚€) =₁ (pair prβ‚‚ min)
j₁-pβ‚€ = pair-cong s₁-pβ‚€ sβ‚€-pβ‚€ βˆ™ pair-pre s₁ sβ‚€ pβ‚€
jβ‚€-pβ‚‚ : (jβ‚€ ∘ pβ‚‚) =₁ (pair prβ‚‚ max)
jβ‚€-pβ‚‚ = pair-cong sβ‚€-pβ‚‚ s₁-pβ‚‚ βˆ™ pair-pre sβ‚€ s₁ pβ‚‚
j₁-pβ‚‚ : (j₁ ∘ pβ‚‚) =₁ (pair max prβ‚‚)
j₁-pβ‚‚ = pair-cong s₁-pβ‚‚ sβ‚€-pβ‚‚ βˆ™ pair-pre s₁ sβ‚€ pβ‚‚
```