Other Agda modules in this section (54)

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

# Changing an evaluated separation square

Changing the two object coordinates and identifying the evaluator carries
an evaluated separation square to the changed route. The proof retains
the two chosen coordinate comparisons and the square between them.

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

module SCT.VolumeI.Chapter01.Section07.EvaluationCalculus.EvaluatedSeparationChange
  {c m a : Level} (š’Æ : Theory c m a) where

open import SCT.VolumeI.Chapter01.Section04.Setup š’Æ public
open import SCT.VolumeI.Chapter01.Section06.ConeCalculus.ComparisonSquares š’Æ using (post-square)
import SCT.VolumeI.Chapter01.Section03.ProductCalculus.PairingNaturality as Naturality
import SCT.VolumeI.Chapter01.Section03.IdentificationCalculus.Structural as Structural
open Naturality vocabulary terminal products productLaws composition vertical whiskering using (move-square)
open Structural vocabulary terminal products productLaws composition whiskering using (whisker-mixed-at; postWhisker-comp-at)

module At {A B D E : CAT} (σ : MAP A B) (j z : MAP A A) (k v : MAP B B)
  (Ī“ : j =₁ z) (ε : k =₁ v) (S : (k ∘ σ) =₁ (σ ∘ j)) (ν : (v ∘ σ) =₁ (σ ∘ z))
  (square : (ν āˆ™ (ε ā–· σ)) =ā‚‚ ((σ ◁ Ī“) āˆ™ S)) (d : MAP B E)
  (W : MAP A D) (e : MAP D E) (β : (d ∘ σ) =₁ (e ∘ W))
  {P : MAP A D} (χ : (W ∘ z) =₁ P) where
  prefix = (comp-assoc j σ d) ⁻¹ āˆ™ ((d ◁ S) āˆ™ comp-assoc σ k d)
  changed = (comp-assoc z σ d) ⁻¹ āˆ™ ((d ◁ ν) āˆ™ comp-assoc σ v d)
  n′ = (e ◁ χ) āˆ™ (comp-assoc z W e āˆ™ (β ā–· z))
  n = (e ◁ (χ āˆ™ (W ◁ Ī“))) āˆ™ (comp-assoc j W e āˆ™ (β ā–· j))
  Īž = n′ āˆ™ changed

  abstract
    inner : (((d ◁ ν) āˆ™ comp-assoc σ v d) āˆ™ ((d ◁ ε) ā–· σ)) =ā‚‚
      ((d ◁ (σ ◁ Ī“)) āˆ™ ((d ◁ S) āˆ™ comp-assoc σ k d))
    inner = paste-squares (comp-assoc σ k d) (comp-assoc σ v d) (d ◁ S) (d ◁ ν)
      ((d ◁ ε) ā–· σ) (d ◁ (ε ā–· σ)) (d ◁ (σ ◁ Ī“))
      (whisker-mixed-at ε σ d) (post-square d S ν (ε ā–· σ) (σ ◁ Ī“) square)

    coordinate-change : (changed āˆ™ ((d ◁ ε) ā–· σ)) =ā‚‚ (((d ∘ σ) ◁ Ī“) āˆ™ prefix)
    coordinate-change = paste-squares ((d ◁ S) āˆ™ comp-assoc σ k d) ((d ◁ ν) āˆ™ comp-assoc σ v d)
      ((comp-assoc j σ d) ⁻¹) ((comp-assoc z σ d) ⁻¹)
      ((d ◁ ε) ā–· σ) (d ◁ (σ ◁ Ī“)) ((d ∘ σ) ◁ Ī“) inner
      (move-square (comp-assoc z σ d) ((d ∘ σ) ◁ Ī“) (d ◁ (σ ◁ Ī“)) (comp-assoc j σ d)
        (postWhisker-comp-at Γ σ d))

    evaluation-change : (n′ āˆ™ ((d ∘ σ) ◁ Ī“)) =ā‚‚ n
    evaluation-change = isoComp-cong ((postWhisker-isoComp-at e χ (W ◁ Ī“)) ⁻¹)
        (idIso (comp-assoc j W e āˆ™ (β ā–· j))) āˆ™
      (isoComp-assoc-at (e ◁ χ) (e ◁ (W ◁ Ī“)) (comp-assoc j W e āˆ™ (β ā–· j))) ⁻¹ āˆ™
      isoComp-cong (idIso (e ◁ χ)) (isoComp-assoc-at (e ◁ (W ◁ Ī“)) (comp-assoc j W e) (β ā–· j)) āˆ™
      isoComp-cong (idIso (e ◁ χ)) (isoComp-cong (postWhisker-comp-at Ī“ W e) (idIso (β ā–· j))) āˆ™
      isoComp-cong (idIso (e ◁ χ)) ((isoComp-assoc-at (comp-assoc z W e) ((e ∘ W) ◁ Ī“) (β ā–· j)) ⁻¹) āˆ™
      isoComp-cong (idIso (e ◁ χ)) (isoComp-cong (idIso (comp-assoc z W e)) (interchange-at β Ī“)) āˆ™
      isoComp-cong (idIso (e ◁ χ)) (isoComp-assoc-at (comp-assoc z W e) (β ā–· z) ((d ∘ σ) ◁ Ī“)) āˆ™
      isoComp-assoc-at (e ◁ χ) (comp-assoc z W e āˆ™ (β ā–· z)) ((d ∘ σ) ◁ Ī“)

    combined : (Īž āˆ™ ((d ◁ ε) ā–· σ)) =ā‚‚ (n āˆ™ prefix)
    combined = isoComp-cong evaluation-change (idIso prefix) āˆ™
      (isoComp-assoc-at n′ ((d ∘ σ) ◁ Ī“) prefix) ⁻¹ āˆ™
      isoComp-cong (idIso n′) coordinate-change āˆ™
      isoComp-assoc-at n′ changed ((d ◁ ε) ā–· σ)

    append : {T : MAP B E} (leading : T =₁ (d ∘ k)) →
      (n āˆ™ (prefix āˆ™ (leading ā–· σ))) =ā‚‚ (Īž āˆ™ (((d ◁ ε) āˆ™ leading) ā–· σ))
    append leading = isoComp-cong (idIso Īž) ((preWhisker-isoComp-at (d ◁ ε) leading σ) ⁻¹) āˆ™
      isoComp-assoc-at Īž ((d ◁ ε) ā–· σ) (leading ā–· σ) āˆ™
      isoComp-cong (combined ⁻¹) (idIso (leading ā–· σ)) āˆ™
      (isoComp-assoc-at n prefix (leading ā–· σ)) ⁻¹
```