Other Agda modules in this section (188)

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

# Endpoint evaluation of the constant restriction

The constant restriction is compared with the actual constant family by
its chosen product comparison. The endpoint equation below agrees with
the existing `identity-boundary`, including its parameter projection.

```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.Chapter02.Section02.EvaluationCalculus.Restriction.ConstantRestrictionCoordinates as Coordinates
import SCT.VolumeI.Chapter02.Section02.EvaluationCalculus.Restriction.RestrictionInsertions as Restriction
import SCT.VolumeI.Chapter01.Section04.ProductCalculus.PairSectionEvaluation as PairSection
import SCT.VolumeI.Chapter01.Section04.Substitution.SectionComparisonEvaluation as Section
import SCT.VolumeI.Chapter01.Section03.ProductCalculus.PairingCoherence as Pairing

module SCT.VolumeI.Chapter02.Section02.EvaluationCalculus.Restriction.ConstantRestrictionEvaluation
  {c m a : Level} (𝒯 : Theory c m a) (M : Mapping.MappingAnimae 𝒯)
  (β„± : Categories.FunctorCategories 𝒯 M) where

open import SCT.VolumeI.Chapter02.Section01.EvaluationCalculus.EndpointEvaluation 𝒯 M β„±
open import SCT.VolumeI.Chapter01.Section04.SquareCalculus.SplitProjectionCalculus 𝒯
open Pairing vocabulary terminal products productLaws composition vertical whiskering
  using (pair-cong-comp; pair-cong-Isoβ‚‚)

module Product {A B : CAT} (X : CAT) (x : Obj-abs A) (z : Obj-abs B) where
  module Coords = Coordinates.At 𝒯 M β„± X x z
  open Coords using (Ο€; ρ; i; t; s; b₁; point; constant-comparison)
  j = insert {X = X} z
  K = productMap (id X) (const {P = A} z)
  input = pair-cong (idIso (id X ∘ Ο€)) constant-comparison
  comparison-to-constant = (pair-pre (id X) (const {P = X} z) Ο€) ⁻¹ βˆ™ input
  vertex = pair-cong (idIso (id X)) (point β–· t)
  Ο‡ = Restriction.insertion 𝒯 M β„± X (const {P = A} z) x
  module Insert = Restriction.At 𝒯 M β„± X (const {P = A} z) x
  step = pair-pre (id X ∘ Ο€) (const {P = A} z ∘ ρ) i
  module Compared = PairSection.ComparedInputs 𝒯 Ο€ i b₁ (id X) (const {P = X} z)
    (idIso (id X ∘ Ο€)) constant-comparison

  abstract
    right-normalization : (vertex βˆ™ Ο‡) =β‚‚
      (pair-cong Insert.first Coords.right-second βˆ™ step)
    right-normalization = isoComp-cong
        (pair-cong-Isoβ‚‚ (isoComp-unitΛ‘-at Insert.first) (idIso Coords.right-second) βˆ™
          (pair-cong-comp (idIso (id X)) Insert.first (point β–· t) Insert.second) ⁻¹)
        (idIso step) βˆ™
      ((isoComp-assoc-at vertex (pair-cong Insert.first Insert.second) step) ⁻¹ βˆ™
        isoComp-cong (idIso vertex) Insert.normalization)

    comparison :
      (section-image Ο€ i b₁ j βˆ™ (comparison-to-constant β–· i)) =β‚‚ (vertex βˆ™ Ο‡)
    comparison = right-normalization ⁻¹ βˆ™
      (isoComp-cong (pair-cong-Isoβ‚‚ Coords.first-coordinate Coords.second-coordinate)
        (idIso step) βˆ™ Compared.comparison)

module At {A B C : CAT} (x : Obj-abs A) (z : Obj-abs B) where
  X = Fun B C
  module Products = Product X x z
  module Coords = Coordinates.At 𝒯 M β„± X x z
  e = funEval {C = B} {D = C}
  open Products using (j; K; comparison-to-constant; Ο‡; vertex)
  open Coords using (Ο€; i; b₁; point)

  constant-evaluation : (e ∘ K) =₁ (evaluate {C = C} z ∘ Ο€)
  constant-evaluation = (comp-assoc Ο€ j e) ⁻¹ βˆ™ (e ◁ comparison-to-constant)

  abstract
    comparison :
      (section-image Ο€ i b₁ (evaluate {C = C} z) βˆ™ (constant-evaluation β–· i)) =β‚‚
      (evaluate-cong {C = C} point βˆ™ ((e ◁ Ο‡) βˆ™ comp-assoc i K e))
    comparison = isoComp-assoc-at (e ◁ vertex) (e ◁ Ο‡) (comp-assoc i K e) βˆ™
      (isoComp-cong (postWhisker-isoComp-at e vertex Ο‡ βˆ™
        (postWhisker e ◁ Products.comparison)) (idIso (comp-assoc i K e)) βˆ™
      Section.At.comparison 𝒯 Ο€ i b₁ j K comparison-to-constant e)
```