Other Agda modules in this chapter (87)
- RelativeCategories.BaseChange.BaseChange
- RelativeCategories.BaseChange.BaseChangeComparisonFamilies
- RelativeCategories.BaseChange.BaseChangeHigherIdentifications
- RelativeCategories.BaseChange.BasePostcomposition
- RelativeCategories.BaseChange.Identifications
- RelativeCategories.BaseChange.NativeProductBaseChange
- RelativeCategories.BaseChange.PulledFamilies
- RelativeCategories.BaseChange.SourceChange
- RelativeCategories.BaseChange.StructureChange
- RelativeCategories.Composition.EvaluatedPrecomposition
- RelativeCategories.Composition.Postcomposition
- RelativeCategories.Composition.PostcompositionEquivalences
- RelativeCategories.Composition.PostcompositionLaws
- RelativeCategories.Composition.PostcompositionReflection
- RelativeCategories.Composition.PrecompositionCompatibility
- RelativeCategories.ConeCalculus.ConeAction
- RelativeCategories.ConeCalculus.ConePasting
- RelativeCategories.ConeCalculus.ConeUncurrying
- RelativeCategories.ConeCalculus.EvaluatedRelativeCones
- RelativeCategories.ConeCalculus.NativePullbackTargets
- RelativeCategories.ConeCalculus.ProductTriangleCones
- RelativeCategories.ConeCalculus.PullbackRelativeComparisons
- RelativeCategories.ConeCalculus.PullbackTargets
- RelativeCategories.ConeCalculus.PullbackTriangles
- RelativeCategories.ConeCalculus.RelativeIntervalCones
- RelativeCategories.ConeCalculus.RestrictedConeLifts
- RelativeCategories.CoproductCalculus.CoproductDescent
- RelativeCategories.CoproductCalculus.CoproductFamilies
- RelativeCategories.CoproductCalculus.CoproductMapping
- RelativeCategories.Coproducts
- RelativeCategories.DecodedMorphisms
- RelativeCategories.DiagramMorphisms
- RelativeCategories.Equivalences
- RelativeCategories.Evaluation.BaseIdentityTriangles
- RelativeCategories.Evaluation.Evaluation
- RelativeCategories.Evaluation.EvaluationRestriction
- RelativeCategories.Evaluation.EvaluationUnitCoherence
- RelativeCategories.Evaluation.PointComputations
- RelativeCategories.Evaluation.PointReductionCoherence
- RelativeCategories.Evaluation.ProductDependentEvaluation
- RelativeCategories.Evaluation.ProductUncurryingTriangles
- RelativeCategories.Evaluation.RestrictionEquivalences
- RelativeCategories.Evaluation.TriangleTransport
- RelativeCategories.Evaluation.UncurriedBaseTriangles
- RelativeCategories.Evaluation.UncurriedTriangles
- RelativeCategories.Evaluation.UncurryingComposition
- RelativeCategories.Evaluation.UncurryingRestriction
- RelativeCategories.Evaluation.UncurryingSubstitution
- RelativeCategories.Families.AbsolutePointFamilies
- RelativeCategories.Families.ArgumentFamilies
- RelativeCategories.Families.DecodedFamilies
- RelativeCategories.Families.Families
- RelativeCategories.Families.FamilyReflection
- RelativeCategories.Families.IdentificationFamilies
- RelativeCategories.Families.IntervalParameters
- RelativeCategories.Families.NativePointFamilies
- RelativeCategories.Functors
- RelativeCategories.IdentificationCalculus.ComparisonAlgebra
- RelativeCategories.IdentificationCalculus.ComparisonEncoding
- RelativeCategories.IdentificationCalculus.ComparisonLifting
- RelativeCategories.IdentificationCalculus.ComparisonRestriction
- RelativeCategories.IdentificationCalculus.ConstantNameChange
- RelativeCategories.IdentificationCalculus.ConstantNameNaturality
- RelativeCategories.IdentificationCalculus.ConstantNameRestriction
- RelativeCategories.IdentificationCalculus.ConstantNameUnit
- RelativeCategories.IdentificationCalculus.EquivalenceReflectionComputation
- RelativeCategories.IdentificationCalculus.FixedBoundaryComparisons
- RelativeCategories.IdentificationCalculus.HigherEncoding
- RelativeCategories.IdentificationCalculus.NamedPointEvaluation
- RelativeCategories.IdentificationCalculus.NamingCoherence
- RelativeCategories.IdentificationCalculus.NamingComparisons
- RelativeCategories.IdentificationCalculus.NamingIdentifications
- RelativeCategories.IdentificationCalculus.NamingLaws
- RelativeCategories.IdentificationCalculus.PostNamingCoherence
- RelativeCategories.Identifications
- RelativeCategories.MorphismDiagramRecovery
- RelativeCategories.MorphismDiagrams
- RelativeCategories.MorphismPostcomposition
- RelativeCategories.MorphismRetargeting
- RelativeCategories.MorphismTriangles
- RelativeCategories.MorphismWhiskering
- RelativeCategories.Morphisms
- RelativeCategories.NamedMorphisms
- RelativeCategories.Products
- RelativeCategories.PullbackMorphismLifting
- RelativeCategories.PullbackMorphisms
- RelativeCategories.TerminalBase
Complete compiler-highlighted source. Follow a symbol to its declaration.
# Uncurrying triangles and their families Uncurrying a functor over a functor category also uncurries its specified base triangle. For a family, reassociate the parameter product and remove its projection from the base. The comparison operation retains the compatibility of triangles, so this construction applies to whole families, including their identifications. ```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 Pullbacks import SCT.VolumeI.Chapter01.Section03.ProductCalculus.PairingNaturality as PN module SCT.VolumeI.Chapter03.RelativeCategories.Evaluation.Uncurrying {c m a : Level} (𝒯 : Theory c m a) (M : Mapping.MappingAnimae 𝒯) (ℱ : Categories.FunctorCategories 𝒯 M) (P : Pullbacks.PullbackStructure 𝒯) where open import SCT.VolumeI.Chapter01.Section07.Setup 𝒯 M ℱ open import SCT.VolumeI.Chapter01.Section07.EvaluationCalculus.IsomorphismLifting 𝒯 M ℱ open import SCT.VolumeI.Chapter01.Section07.EvaluationCalculus.MappingCompatibility 𝒯 M ℱ using (funPost-uncurry-natural) open import SCT.VolumeI.Chapter01.Section07.PullbackCalculus.ConeUncurrying 𝒯 M ℱ using (paste-iso-squares) open import SCT.VolumeI.Chapter03.RelativeCategories.Functors 𝒯 M ℱ P open import SCT.VolumeI.Chapter03.RelativeCategories.Identifications 𝒯 M ℱ P open import SCT.VolumeI.Chapter03.RelativeCategories.Evaluation.RestrictionEquivalences 𝒯 M ℱ P using (module Restriction) open PN vocabulary terminal products productLaws composition vertical whiskering using (move-square; cancel-left; cancel-right) module Triangle {K S C B : CAT} (r : MAP C B) (f : MAP K (Fun S B)) where value : FunctorOver f (funPost r) → FunctorOver (funUncurry f) r value v = record { lift = funUncurry (FunctorLift.lift v) ; comparison = funUncurryIso (FunctorLift.comparison v) ∙ (funPost-uncurry r (FunctorLift.lift v)) ⁻¹ } module Identification {v w : FunctorOver f (funPost r)} (Φ : FunctorOverIso v w) where h = FunctorLift.lift v k = FunctorLift.lift w α = FunctorOverIso.underlying Φ θ = FunctorLift.comparison v ψ = FunctorLift.comparison w b₀ = funPost-uncurry r h b₁ = funPost-uncurry r k first = r ◁ funUncurryIso α second = funUncurryIso (funPost r ◁ α) final = idIso (funUncurry f) abstract matching : (funUncurryIso ψ ∙ second) =₂ (final ∙ funUncurryIso θ) matching = (isoComp-unitˡ-at (funUncurryIso θ)) ⁻¹ ∙ ((funUncurry-isoMap _ _ ◁ FunctorOverIso.compatible Φ) ∙ (funUncurryIso-comp ψ (funPost r ◁ α)) ⁻¹) comparison : FunctorOverIso (value v) (value w) comparison = record { underlying = funUncurryIso α ; compatible = isoComp-unitˡ-at (FunctorLift.comparison (value v)) ∙ paste-iso-squares (b₀ ⁻¹) (b₁ ⁻¹) (funUncurryIso θ) (funUncurryIso ψ) first second final (move-square b₁ second first b₀ (funPost-uncurry-natural r α)) matching } module Recovery (w : FunctorOver (funUncurry f) r) where h = funCurry (FunctorLift.lift w) β = funCurry-β (FunctorLift.lift w) θ = FunctorLift.comparison w b = funPost-uncurry r h raw = (θ ∙ (r ◁ β)) ∙ b triangle = funIsoReflect (funPost r ∘ h) f raw backward : FunctorOver f (funPost r) backward = record { lift = h ; comparison = triangle } abstract comparison : FunctorOverIso (value backward) w comparison = record { underlying = β ; compatible = (cancel-right b (θ ∙ (r ◁ β)) ∙ isoComp-cong (funIsoReflect-β (funPost r ∘ h) f raw) (idIso (b ⁻¹))) ⁻¹ } abstract comparison-underlying : FunctorOverIso.underlying comparison =₂ β comparison-underlying = idIso β module Reflection {v w : FunctorOver f (funPost r)} (Φ : FunctorOverIso (value v) (value w)) where h = FunctorLift.lift v k = FunctorLift.lift w α = funIsoReflect h k (FunctorOverIso.underlying Φ) b₀ = funPost-uncurry r h b₁ = funPost-uncurry r k θ = funUncurryIso (FunctorLift.comparison v) ψ = funUncurryIso (FunctorLift.comparison w) χ = funUncurryIso (funPost r ◁ α) γ = r ◁ FunctorOverIso.underlying Φ abstract natural : (b₁ ∙ χ) =₂ (γ ∙ b₀) natural = isoComp-cong (postWhisker r ◁ funIsoReflect-β h k (FunctorOverIso.underlying Φ)) (idIso b₀) ∙ funPost-uncurry-natural r α recover : (ψ ∙ χ) =₂ θ recover = isoComp-unitʳ-at θ ∙ (isoComp-cong (idIso θ) (isoComp-inverseˡ-at b₀) ∙ (isoComp-assoc-at θ (b₀ ⁻¹) b₀ ∙ (isoComp-cong (FunctorOverIso.compatible Φ) (idIso b₀) ∙ ((isoComp-assoc-at (ψ ∙ b₁ ⁻¹) γ b₀) ⁻¹ ∙ (isoComp-cong (idIso (ψ ∙ b₁ ⁻¹)) natural ∙ ((isoComp-assoc-at ψ (b₁ ⁻¹) (b₁ ∙ χ)) ⁻¹ ∙ isoComp-cong (idIso ψ) ((cancel-left b₁ χ) ⁻¹))))))) comparison : FunctorOverIso v w comparison = record { underlying = α ; compatible = funReflect-Iso₂ _ _ (recover ∙ funUncurryIso-comp (FunctorLift.comparison w) (funPost r ◁ α)) } abstract left-inverse : (v : FunctorOver f (funPost r)) → FunctorOverIso (Recovery.backward (value v)) v left-inverse v = Reflection.comparison (Recovery.comparison (value v)) module Family {K S C B : CAT} (r : MAP C B) (f : MAP K (Fun S B)) (X : CAT) where u = funUncurry f regroup = Associativity.backward X K S projection = productMap (pr₂ {C = X} {D = K}) (id S) abstract remove-parameter : (projection ∘ regroup) =₁ pr₂ {C = X} {D = K × S} remove-parameter = pair-η pr₂ ∙ (pair-cong (Associativity.backward-second X K S) (Associativity.backward-third X K S ∙ ((comp-unitˡ pr₂) ▷ regroup)) ∙ pair-pre (pr₂ ∘ pr₁) (id S ∘ pr₂) regroup) insertion : FunctorOver (u ∘ pr₂ {C = X}) (funUncurry (f ∘ pr₂ {C = X})) insertion = record { lift = regroup ; comparison = (u ◁ remove-parameter) ∙ (comp-assoc regroup projection u ∙ ((funUncurry-restrict f pr₂) ▷ regroup)) } value : FunctorOver (f ∘ pr₂ {C = X}) (funPost r) → FunctorOver (u ∘ pr₂ {C = X}) r value v = compose-over (Triangle.value r (f ∘ pr₂) v) insertion abstract identification : {v w : FunctorOver (f ∘ pr₂ {C = X}) (funPost r)} → FunctorOverIso v w → FunctorOverIso (value v) (value w) identification Φ = prewhisker-over insertion (Triangle.Identification.comparison r (f ∘ pr₂) Φ) abstract insertion-isEquiv : IsEquiv (FunctorLift.lift insertion) insertion-isEquiv = equiv-inverse (Associativity.forward-isEquiv X K S) module Recovery (w : FunctorOver (u ∘ pr₂ {C = X}) r) where module Lifted = Restriction.Factor (funUncurry (f ∘ pr₂ {C = X})) r insertion insertion-isEquiv w using (value; comparison) module Curried = Triangle.Recovery r (f ∘ pr₂ {C = X}) Lifted.value using (backward; comparison) backward : FunctorOver (f ∘ pr₂ {C = X}) (funPost r) backward = Curried.backward abstract comparison : FunctorOverIso (value backward) w comparison = compose-iso-over Lifted.comparison (prewhisker-over insertion Curried.comparison) abstract reflect : {v w : FunctorOver (f ∘ pr₂ {C = X}) (funPost r)} → FunctorOverIso (value v) (value w) → FunctorOverIso v w reflect {v} {w} Φ = Triangle.Reflection.comparison r (f ∘ pr₂ {C = X}) (Restriction.Reflect.comparison (funUncurry (f ∘ pr₂ {C = X})) r insertion insertion-isEquiv (Triangle.value r (f ∘ pr₂) v) (Triangle.value r (f ∘ pr₂) w) Φ) left-inverse : (v : FunctorOver (f ∘ pr₂ {C = X}) (funPost r)) → FunctorOverIso (Recovery.backward (value v)) v left-inverse v = reflect (Recovery.comparison (value v)) ```