Other Agda modules in this section (24)

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

# Lifting a family at three specified points

If an anima is presented by three points, a family on that anima lifts
through a functor once its restrictions at the three points lift. We
first glue the three restrictions using coproducts, then reflect along
the specified equivalence. No pointwise choice principle is used.

```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.Section05.Coproducts as Coproducts

module SCT.VolumeI.Chapter03.Section01.MappingCalculus.FiniteMappingLifts
  {c m a : Level} (𝒯 : Theory c m a) (M : Mapping.MappingAnimae 𝒯)
  (B : Coproducts.CoproductStructure 𝒯 M) where

open import SCT.VolumeI.Chapter01.Section04.Setup 𝒯
open Mapping.MappingAnimae M
open Coproducts.CoproductStructure B
open import SCT.VolumeI.Chapter01.Section04.Functoriality 𝒯 M
open import SCT.VolumeI.Chapter01.Section05.Copairing 𝒯 M B
  using (copair; copair-β₁; copair-Ξ²β‚‚)
open import SCT.VolumeI.Chapter03.Section01.Lifting.CoproductLifting 𝒯 M B
  using (mapPre-mapPost; lift-coproduct)
open import SCT.VolumeI.Chapter01.Section04.Core 𝒯 M
  using (coreInclusion; core-of-anima; module CoreLift)
open import SCT.VolumeI.Chapter02.Section01.EvaluationCalculus.CoreInclusions 𝒯 M using (coreInclusion-natural)

retarget-lift : {Ξ“ X Y : CAT} {m : MAP X Y} {h k : MAP Ξ“ Y} β†’
  h =₁ k β†’ FunctorLift m h β†’ FunctorLift m k
retarget-lift Ξ± l = record { lift = FunctorLift.lift l ; comparison = Ξ± βˆ™ FunctorLift.comparison l }

restriction-compose : {Ξ“ A B C D : CAT} (f : MAP A B) (g : MAP B C) (h : MAP Ξ“ (Map C D)) β†’
  (mapPre f ∘ (mapPre g ∘ h)) =₁ (mapPre (g ∘ f) ∘ h)
restriction-compose f g h = (mapPre-comp f g β–· h) βˆ™ (comp-assoc h (mapPre g) (mapPre f)) ⁻¹

module AlongEquivalence {Ξ“ K L X Y : CAT} (e : MAP K L) (ee : IsEquiv e)
  (m : MAP X Y) (h : MAP Ξ“ (Map L Y))
  (restricted : FunctorLift (mapPost m) (mapPre e ∘ h)) where
  chosen = equiv-lift (mapPre-isEquiv e ee) (FunctorLift.lift restricted)
  lift = FunctorLift.lift chosen

  comparison : (mapPost m ∘ lift) =₁ h
  comparison = equiv-reflect (mapPre-isEquiv e ee) _ _
    (FunctorLift.comparison restricted βˆ™
      ((mapPost m ◁ FunctorLift.comparison chosen) βˆ™
        (comp-assoc lift (mapPre e) (mapPost m) βˆ™
          ((mapPre-mapPost e m β–· lift) βˆ™ (comp-assoc lift (mapPost m) (mapPre e)) ⁻¹))))

  factorization : FunctorLift (mapPost m) h
  factorization = record { lift = lift ; comparison = comparison }

module ThreePoints {K : CAT} (xβ‚€ x₁ xβ‚‚ : Obj-abs K)
  (points-isEquiv : IsEquiv (copair (copair xβ‚€ x₁) xβ‚‚)) where

  points = copair (copair xβ‚€ x₁) xβ‚‚

  module Lift {Ξ“ X Y : CAT} (m : MAP X Y) (h : MAP Ξ“ (Map K Y))
    (atβ‚€ : FunctorLift (mapPost m) (mapPre xβ‚€ ∘ h))
    (at₁ : FunctorLift (mapPost m) (mapPre x₁ ∘ h))
    (atβ‚‚ : FunctorLift (mapPost m) (mapPre xβ‚‚ ∘ h)) where

    whole = mapPre points ∘ h
    firstTwo = mapPre in₁ ∘ whole

    firstTwo-comparison : firstTwo =₁ (mapPre (copair xβ‚€ x₁) ∘ h)
    firstTwo-comparison = (mapPre-cong (copair-β₁ (copair xβ‚€ x₁) xβ‚‚) β–· h) βˆ™
      restriction-compose in₁ points h

    first-comparison : (mapPre in₁ ∘ firstTwo) =₁ (mapPre xβ‚€ ∘ h)
    first-comparison = (mapPre-cong (copair-β₁ xβ‚€ x₁) β–· h) βˆ™
      (restriction-compose in₁ (copair xβ‚€ x₁) h βˆ™ (mapPre in₁ ◁ firstTwo-comparison))

    second-comparison : (mapPre inβ‚‚ ∘ firstTwo) =₁ (mapPre x₁ ∘ h)
    second-comparison = (mapPre-cong (copair-Ξ²β‚‚ xβ‚€ x₁) β–· h) βˆ™
      (restriction-compose inβ‚‚ (copair xβ‚€ x₁) h βˆ™ (mapPre inβ‚‚ ◁ firstTwo-comparison))

    third-comparison : (mapPre inβ‚‚ ∘ whole) =₁ (mapPre xβ‚‚ ∘ h)
    third-comparison = (mapPre-cong (copair-Ξ²β‚‚ (copair xβ‚€ x₁) xβ‚‚) β–· h) βˆ™
      restriction-compose inβ‚‚ points h

    restricted : FunctorLift (mapPost m) whole
    restricted = lift-coproduct m whole
      (lift-coproduct m firstTwo (retarget-lift (first-comparison ⁻¹) atβ‚€)
        (retarget-lift (second-comparison ⁻¹) at₁))
      (retarget-lift (third-comparison ⁻¹) atβ‚‚)

    factorization : FunctorLift (mapPost m) h
    factorization = AlongEquivalence.factorization points points-isEquiv m h restricted

  lift-three : {Ξ“ X Y : CAT} (m : MAP X Y) (h : MAP Ξ“ (Map K Y)) β†’
    FunctorLift (mapPost m) (mapPre xβ‚€ ∘ h) β†’
    FunctorLift (mapPost m) (mapPre x₁ ∘ h) β†’
    FunctorLift (mapPost m) (mapPre xβ‚‚ ∘ h) β†’ FunctorLift (mapPost m) h
  lift-three = Lift.factorization
```

At an individual point, lifting after the inclusion of the core suffices.
The source is an anima, so the lift itself has a canonical core lift.

```agda
lift-core-family : {Ξ“ X Y : CAT} (Ξ“-an : isAn Ξ“) (Y-an : isAn Y)
  (m : MAP X Y) (h : MAP Ξ“ (Map One Y)) β†’
  FunctorLift m (coreInclusion Y ∘ h) β†’ FunctorLift (mapPost m) h
lift-core-family {Ξ“} {X} {Y} Ξ“-an Y-an m h l = record
  { lift = L.lift
  ; comparison = equiv-reflect (core-of-anima Y Y-an) _ _
      (FunctorLift.comparison l βˆ™
        ((m ◁ L.comparison) βˆ™
          (comp-assoc L.lift (coreInclusion X) m βˆ™
            ((coreInclusion-natural m β–· L.lift) βˆ™
              (comp-assoc L.lift (mapPost m) (coreInclusion Y)) ⁻¹)))) }
  where module L = CoreLift Ξ“-an (FunctorLift.lift l) using (lift; comparison)
```