Other Agda modules in this section (34)
- Equivalences
- Factorizations
- Identifications.EndpointTransport
- Identifications.FunctorCoherence
- Identifications.IdentificationSquares
- Identifications.Inverses
- Identifications.OverBase
- Identifications.ProjectedFactorization
- Identifications.RestrictionDiagrams
- Identifications.RetractionCoherence
- Identifications.SectionEvaluation
- Identifications.TriangleCoherence
- Identifications.Triangles
- ProductConstructions
- Products.BinaryFunctors
- Products.Equivalences
- Products.FirstFactorSubstitution
- Products.PairedVertexFrames
- Products.Pairing
- Products.PairingOverBase
- Products.PairingRestriction
- Products.PairingSquares
- Products.ProductFunctor
- Products.ProductFunctorCoherence
- Products.ProductPairing
- Products.ProductPairingComposition
- Products.ProductPairingIdentity
- Products.ProductRestriction
- Products.TripleEvaluationOuterImage
- RetractLoops
- Retracts
- Squares
- Supporting
- WhiskeringEquivalence
Chapter 1, rebuild2, checked 14 October 2026 Β· source revision b982f5a.
Corresponding book passages
# Categories and functors over a base A category over `S` carries its structural functor to `S`. A functor over the base carries a specified triangle, oriented as in the existing factorization convention: target projection after the functor equals the source projection. These records specify data; they do not postulate a category of relative categories or any new coherence laws. The file develops identity, composition and inversion over a base, change of base by postcomposition, the square of a functor over a base map, uniqueness and mutual functors over a base, equivalences over a base, and the dual data under a base. Factorizations and extensions are views of these records, in Factorizations. ```agda {-# OPTIONS --without-K #-} module SCT.VolumeI.Chapter01.Section03.RelativeFunctors where open import SCT.VolumeI.Chapter01.Section01.Vocabulary open import SCT.VolumeI.Chapter01.Section02.Coherence using (comp-unitΛ‘; comp-unitΚ³; comp-assoc; module Composition) open import SCT.VolumeI.Chapter01.Section03.Squares open import SCT.VolumeI.Chapter01.Section03.Equivalences using (ReflectsIdentifications; equiv-compose; equiv-inverse) open Operations open Composition module _ {Ξ : Context} where record CategoryOverBase (S : CAT Ξ) : Set (c β m) where constructor category-over field category : CAT Ξ map : MAP category S record FunctorOverBase {S : CAT Ξ} (X Y : CategoryOverBase S) : Set m where constructor functor-over field functor : MAP (CategoryOverBase.category X) (CategoryOverBase.category Y) cell : (CategoryOverBase.map Y β functor) =β CategoryOverBase.map X id-over : {S : CAT Ξ} (X : CategoryOverBase S) β FunctorOverBase X X id-over X = functor-over (id (CategoryOverBase.category X)) (comp-unitΚ³ (CategoryOverBase.map X)) comp-over : {S : CAT Ξ} {X Y Z : CategoryOverBase S} β FunctorOverBase Y Z β FunctorOverBase X Y β FunctorOverBase X Z comp-over {Z = Z} G F = functor-over (functor G β functor F) (cell F β ((cell G β· functor F) β (comp-assoc (functor F) (functor G) (CategoryOverBase.map Z)) β»ΒΉ)) where open FunctorOverBase inverse-over : {S : CAT Ξ} {X Y : CategoryOverBase S} (F : FunctorOverBase X Y) β IsEquiv (FunctorOverBase.functor F) β FunctorOverBase Y X inverse-over {Y = Y} F e = functor-over (IsEquiv.inverse e) (comp-unitΚ³ q β ((q β (IsEquiv.right-inverse-law e) β»ΒΉ) β (comp-assoc (IsEquiv.inverse e) (FunctorOverBase.functor F) q β ((FunctorOverBase.cell F) β»ΒΉ β· IsEquiv.inverse e)))) where q = CategoryOverBase.map Y ``` ## Changing the base by postcomposition `postcompose-base` leaves the category unchanged. A functor over a map `k : S β T` is an ordinary functor over `T` from this postcomposed object. The order of objects is always source, then target. For an identity base map, the structural projection contains `id β p`; it is related to `p` by the unitor, not by definitional equality. ```agda postcompose-base : {S T : CAT Ξ} β MAP S T β CategoryOverBase S β CategoryOverBase T postcompose-base k X = category-over (CategoryOverBase.category X) (k β CategoryOverBase.map X) FunctorOverMap : {S T : CAT Ξ} (k : MAP S T) β CategoryOverBase S β CategoryOverBase T β Set m FunctorOverMap k X Y = FunctorOverBase (postcompose-base k X) Y comp-over-map : {S T : CAT Ξ} (k : MAP S T) {X Y : CategoryOverBase S} {Z : CategoryOverBase T} β FunctorOverMap k Y Z β FunctorOverBase X Y β FunctorOverMap k X Z comp-over-map k {Y = Y} {Z} G F = functor-over (functor G β functor F) ((k β cell F) β (comp-assoc (functor F) (CategoryOverBase.map Y) k β ((cell G β· functor F) β (comp-assoc (functor F) (functor G) (CategoryOverBase.map Z)) β»ΒΉ))) where open FunctorOverBase ``` ## A square over a map of bases A functor over a map of bases already carries the required specified cell. The adapter reorganizes the boundary as a square between the functor and the base map, reversing that cell using the chosen inversion. ```agda over-map-square : {S T : CAT Ξ} {k : MAP S T} {X : CategoryOverBase S} {Y : CategoryOverBase T} (F : FunctorOverMap k X Y) β Square (FunctorOverBase.functor F) k over-map-square {X = X} {Y} F = square (CategoryOverBase.map X) (CategoryOverBase.map Y) ((FunctorOverBase.cell F) β»ΒΉ) ``` ## Uniqueness and mutual functors over a base `ReflectsIdentifications` from Equivalences keeps its testing source explicit. Two functors over the base are compared using reflection by the target projection at the source category. The conclusion identifies the underlying functors only; no compatibility with the two cells is claimed. For functors over the base in both directions, reflection at both categories identifies the two composites with identities, so either functor is an equivalence with the other as chosen inverse. ```agda functor-over-unique : {S : CAT Ξ} {X Y : CategoryOverBase S} β ReflectsIdentifications (CategoryOverBase.map Y) (CategoryOverBase.category X) β (F G : FunctorOverBase X Y) β FunctorOverBase.functor F =β FunctorOverBase.functor G functor-over-unique reflect F G = reflect _ _ ((cell G) β»ΒΉ β cell F) where open FunctorOverBase mutual-over-isEquiv : {S : CAT Ξ} {X Y : CategoryOverBase S} β ReflectsIdentifications (CategoryOverBase.map X) (CategoryOverBase.category X) β ReflectsIdentifications (CategoryOverBase.map Y) (CategoryOverBase.category Y) β (F : FunctorOverBase X Y) (G : FunctorOverBase Y X) β IsEquiv (FunctorOverBase.functor F) mutual-over-isEquiv {X = X} {Y} reflect-X reflect-Y F G = record { inverse = FunctorOverBase.functor G ; left-inverse-law = (functor-over-unique reflect-X (comp-over G F) (id-over X)) β»ΒΉ ; right-inverse-law = (functor-over-unique reflect-Y (comp-over F G) (id-over Y)) β»ΒΉ } ``` ## Equivalences over a base `EquivalenceOver X Y` is a functor over the base from `X` to `Y` whose underlying functor is an equivalence. Objects are listed source first. The specified cell is kept; inverse laws over the base are not additional fields. Composition, inversion and composition along a map of bases act on the functor over the base and on the equivalence separately. ```agda record EquivalenceOver {S : CAT Ξ} (X Y : CategoryOverBase S) : Set m where constructor equivalence-over field functor-over-base : FunctorOverBase X Y isEquiv : IsEquiv (FunctorOverBase.functor functor-over-base) comp-equivalence-over : {S : CAT Ξ} {X Y Z : CategoryOverBase S} β EquivalenceOver Y Z β EquivalenceOver X Y β EquivalenceOver X Z comp-equivalence-over G F = equivalence-over (comp-over (functor-over-base G) (functor-over-base F)) (equiv-compose (FunctorOverBase.functor (functor-over-base F)) (FunctorOverBase.functor (functor-over-base G)) (isEquiv F) (isEquiv G)) where open EquivalenceOver inverse-equivalence-over : {S : CAT Ξ} {X Y : CategoryOverBase S} β EquivalenceOver X Y β EquivalenceOver Y X inverse-equivalence-over F = equivalence-over (inverse-over (functor-over-base F) (isEquiv F)) (equiv-inverse (isEquiv F)) where open EquivalenceOver ``` Composition along a map of bases uses the same calculation as `comp-over-map`. The base map `k` need not be an equivalence; only the two underlying functors are required to be equivalences. ```agda comp-equivalence-over-map : {S T : CAT Ξ} (k : MAP S T) {X Y : CategoryOverBase S} {Z : CategoryOverBase T} β EquivalenceOver (postcompose-base k Y) Z β EquivalenceOver X Y β EquivalenceOver (postcompose-base k X) Z comp-equivalence-over-map k G F = equivalence-over (comp-over-map k (functor-over-base G) (functor-over-base F)) (equiv-compose (FunctorOverBase.functor (functor-over-base F)) (FunctorOverBase.functor (functor-over-base G)) (isEquiv F) (isEquiv G)) where open EquivalenceOver ``` ## Categories and functors under a base The dual data carry a structural functor out of `S`. Here the cell has the agreed orientation `Y.map = functor β X.map`. Thus the old extension triangle is recovered by inversion. No general duality mechanism is needed. ```agda record CategoryUnderBase (S : CAT Ξ) : Set (c β m) where constructor category-under field category : CAT Ξ map : MAP S category record FunctorUnderBase {S : CAT Ξ} (X Y : CategoryUnderBase S) : Set m where constructor functor-under field functor : MAP (CategoryUnderBase.category X) (CategoryUnderBase.category Y) cell : CategoryUnderBase.map Y =β (functor β CategoryUnderBase.map X) id-under : {S : CAT Ξ} (X : CategoryUnderBase S) β FunctorUnderBase X X id-under X = functor-under (id (CategoryUnderBase.category X)) ((comp-unitΛ‘ (CategoryUnderBase.map X)) β»ΒΉ) comp-under : {S : CAT Ξ} {X Y Z : CategoryUnderBase S} β FunctorUnderBase Y Z β FunctorUnderBase X Y β FunctorUnderBase X Z comp-under {X = X} G F = functor-under (functor G β functor F) ((comp-assoc (CategoryUnderBase.map X) (functor F) (functor G)) β»ΒΉ β ((functor G β cell F) β cell G)) where open FunctorUnderBase ``` Uniqueness under the base uses reflection by precomposition with the structural functor of the source, again at one explicit testing category: `PrecompositionReflects l D` concerns functors from the target of `l` to `D`. It identifies the underlying functors only. Mutual functors under the base are then equivalences, as over the base. ```agda PrecompositionReflects : {C T : CAT Ξ} β MAP C T β CAT Ξ β Set m PrecompositionReflects {T = T} l D = (u v : MAP T D) β (u β l) =β (v β l) β u =β v functor-under-unique : {S : CAT Ξ} {X Y : CategoryUnderBase S} β PrecompositionReflects (CategoryUnderBase.map X) (CategoryUnderBase.category Y) β (F G : FunctorUnderBase X Y) β FunctorUnderBase.functor F =β FunctorUnderBase.functor G functor-under-unique reflect F G = reflect _ _ (cell G β (cell F) β»ΒΉ) where open FunctorUnderBase mutual-under-isEquiv : {S : CAT Ξ} {X Y : CategoryUnderBase S} β PrecompositionReflects (CategoryUnderBase.map X) (CategoryUnderBase.category X) β PrecompositionReflects (CategoryUnderBase.map Y) (CategoryUnderBase.category Y) β (F : FunctorUnderBase X Y) (G : FunctorUnderBase Y X) β IsEquiv (FunctorUnderBase.functor F) mutual-under-isEquiv {X = X} {Y} reflect-X reflect-Y F G = record { inverse = FunctorUnderBase.functor G ; left-inverse-law = (functor-under-unique reflect-X (comp-under G F) (id-under X)) β»ΒΉ ; right-inverse-law = (functor-under-unique reflect-Y (comp-under F G) (id-under Y)) β»ΒΉ } ```