Other Agda modules in this section (188)

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

# The retained image of a restriction compositor at an object

Evaluate the chosen `preComp` identification and cancel its retained beta
comparison. This gives the exact remaining product-and-evaluation path.
`RestrictionEndpointComposition` normalizes that path into two successive
`evaluate-pre` comparisons while retaining the vertex associator.

```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

module SCT.VolumeI.Chapter02.Section02.EvaluationCalculus.Restriction.RestrictionCompositorEvaluation
  {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
open import SCT.VolumeI.Chapter01.Section04.Uncurrying 𝒯 M using (productMap-pair)
open import SCT.VolumeI.Chapter01.Section08.FunctorCategoryCalculus.FunctorSquares 𝒯 M β„± P
open import SCT.VolumeI.Chapter01.Section02.Isomorphisms
  vocabulary terminal products productLaws composition vertical whiskering using (cancel-inverse)

private
  abstract
    close-naturality : {X Y : CAT} {aβ‚€ a₁ bβ‚€ b₁ cβ‚€ dβ‚€ : MAP X Y}
      (prefix : cβ‚€ =₁ dβ‚€) (beta : b₁ =₁ cβ‚€)
      (before : aβ‚€ =₁ bβ‚€) (after : a₁ =₁ b₁)
      (input : aβ‚€ =₁ a₁) (image : bβ‚€ =₁ b₁) (result : bβ‚€ =₁ cβ‚€) β†’
      (after βˆ™ input) =β‚‚ (image βˆ™ before) β†’ (beta βˆ™ image) =β‚‚ result β†’
      ((prefix βˆ™ (beta βˆ™ after)) βˆ™ input) =β‚‚ (prefix βˆ™ (result βˆ™ before))
    close-naturality prefix beta before after input image result square computation =
      isoComp-cong (idIso prefix)
        (isoComp-cong computation (idIso before) βˆ™
        ((isoComp-assoc-at beta image before) ⁻¹ βˆ™
        (isoComp-cong (idIso beta) square βˆ™ isoComp-assoc-at beta after input))) βˆ™
        isoComp-assoc-at prefix (beta βˆ™ after) input

module AtObject {A B D C : CAT} (f : MAP A B) (g : MAP B D) (x : Obj-abs A) where
  X = Fun D C
  i = insert {X = X} x
  F = productMap (id X) f
  G = productMap (id X) g
  GF = productMap (id X) (g ∘ f)
  ΞΊ = preComp {E = C} f g
  beta = funPre-β {D = C} (g ∘ f)
  product-comparison = productMap-cong (comp-unitΛ‘ (id X)) (idIso (g ∘ f)) βˆ™
    productMap-comp (id X) (id X) f g
  leading = (funEval ◁ product-comparison) βˆ™
    (comp-assoc F G funEval βˆ™
      ((funPre-Ξ² g β–· F) βˆ™ funPre-uncurry f (funPre g)))
  insertion = pair-cong (comp-unitΛ‘ (id X)) ((comp-assoc (terminate X) x (g ∘ f)) ⁻¹) βˆ™
    productMap-pair (id X) (g ∘ f) (id X) (const x)
  prefix = (funEval ◁ insertion) βˆ™ comp-assoc i GF funEval

  abstract
    retained-image : (beta βˆ™ funUncurryIso ΞΊ) =β‚‚ leading
    retained-image = cancel-inverse beta leading βˆ™
      isoComp-cong (idIso beta) (preComp-Ξ² f g)

    restricted-image : ((beta β–· i) βˆ™ (funUncurryIso ΞΊ β–· i)) =β‚‚ (leading β–· i)
    restricted-image = (preWhisker i ◁ retained-image) βˆ™
      (preWhisker-isoComp-at beta (funUncurryIso κ) i) ⁻¹

    comparison : (evaluate-pre {C = C} (g ∘ f) x βˆ™ (evaluate x ◁ ΞΊ)) =β‚‚
      (prefix βˆ™ ((leading β–· i) βˆ™ evaluate-uncurry x (funPre f ∘ funPre g)))
    comparison = close-naturality prefix (beta β–· i)
      (evaluate-uncurry x (funPre f ∘ funPre g)) (evaluate-uncurry x (funPre (g ∘ f)))
      (evaluate x ◁ ΞΊ) (funUncurryIso ΞΊ β–· i) (leading β–· i)
      (Evaluation.natural x ΞΊ) restricted-image βˆ™
      isoComp-cong
        ((isoComp-assoc-at (funEval ◁ insertion) (comp-assoc i GF funEval)
          ((beta β–· i) βˆ™ evaluate-uncurry x (funPre (g ∘ f)))) ⁻¹)
        (idIso (evaluate x ◁ ΞΊ))
```