| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Proarrow.Colimit.Coequalizer
Contents
Description
depends on the given arrows, so it is hidden behind an existential) and factorCoequalizer for the
universal property.
Synopsis
- class CategoryOf k => HasCoequalizers k where
- coequalize :: forall (a :: k) (b :: k) r. (a ~> b) -> (a ~> b) -> (forall (c :: k). (b ~> c) -> r) -> r
- factorCoequalizer :: forall (c :: k) (x :: k) (c' :: k). (x ~> c) -> (x ~> c') -> c ~> c'
- thinCoequalize :: forall {k} (a :: k) (b :: k) r. Thin k => (a ~> b) -> (a ~> b) -> (forall (c :: k). (b ~> c) -> r) -> r
- pushoutDefault :: forall {k} (o :: k) (a :: k) (b :: k) r. (HasCoequalizers k, HasCoproducts k) => (o ~> a) -> (o ~> b) -> (forall (p :: k). (a ~> p) -> (b ~> p) -> r) -> r
- factorPushoutDefault :: forall {k} (a :: k) (b :: k) (p :: k) (q :: k). (HasCoequalizers k, HasCoproducts k) => (a ~> p) -> (b ~> p) -> (a ~> q) -> (b ~> q) -> p ~> q
- cokernel :: forall k (a :: k) (b :: k) r. (HasCoequalizers k, HasZeroObject k) => (a ~> b) -> (forall (c :: k). (b ~> c) -> r) -> r
Documentation
class CategoryOf k => HasCoequalizers k where Source Github #
Coequalizers are an inherently dependently typed concept: The type of the apex object depends on the values of the given arrows. But at runtime we can still calculate the arrow and the type, which we hide behind an existential.
Methods
coequalize :: forall (a :: k) (b :: k) r. (a ~> b) -> (a ~> b) -> (forall (c :: k). (b ~> c) -> r) -> r Source Github #
factorCoequalizer :: forall (c :: k) (x :: k) (c' :: k). (x ~> c) -> (x ~> c') -> c ~> c' Source Github #
factorCoequalizer q h requires q to be epi and h to be constant on q's fibers; q is
typically (though not necessarily) the coequalizer arrow produced by coequalize.
Instances
| HasCoequalizers BOOL Source Github # | Dual to the |
| HasCoequalizers COST Source Github # | Dual to the |
| HasCoequalizers FINHASK Source Github # | |
Defined in Proarrow.Category.Instance.FinHask | |
| HasCoequalizers FINSET Source Github # | |
Defined in Proarrow.Category.Instance.FinSet | |
| HasCoequalizers () Source Github # | |
Defined in Proarrow.Colimit.Coequalizer | |
| Indexed k => HasCoequalizers (CODISCRETE k) Source Github # | |
Defined in Proarrow.Category.Instance.Discrete Methods coequalize :: forall (a :: CODISCRETE k) (b :: CODISCRETE k) r. (a ~> b) -> (a ~> b) -> (forall (c :: CODISCRETE k). (b ~> c) -> r) -> r Source Github # factorCoequalizer :: forall (c :: CODISCRETE k) (x :: CODISCRETE k) (c' :: CODISCRETE k). (x ~> c) -> (x ~> c') -> c ~> c' Source Github # | |
| Indexed k => HasCoequalizers (DISCRETE k) Source Github # | |
Defined in Proarrow.Category.Instance.Discrete | |
| (Fractional a, Eq a) => HasCoequalizers (MatK a) Source Github # | The coequalizer of
|
Defined in Proarrow.Category.Instance.Mat | |
| HasEqualizers k => HasCoequalizers (OPPOSITE k) Source Github # | |
Defined in Proarrow.Colimit.Coequalizer | |
| HasCoequalizers (ORDINAL n) Source Github # | Dual to the |
Defined in Proarrow.Category.Instance.Ordinal | |
| HasCoequalizers k => HasCoequalizers (PROD k) Source Github # | Coequalizers are unchanged by making the tensor the product. |
Defined in Proarrow.Colimit.Coequalizer | |
| (Enumerable j, Enumerable k) => HasCoequalizers (FINITARY j k) Source Github # | Coequalizers: at each pair of objects, partition the indices by the equivalence relation the two natural transformations generate, and reify the table. Naturality makes the partition a congruence, so the quotient is again a profunctor. |
Defined in Proarrow.Category.Enriched.Finitary.Topos | |
| (HasCoequalizers j, HasCoequalizers k) => HasCoequalizers (COPRODUCT j k) Source Github # | Dual to the |
Defined in Proarrow.Category.Instance.Coproduct Methods coequalize :: forall (a :: COPRODUCT j k) (b :: COPRODUCT j k) r. (a ~> b) -> (a ~> b) -> (forall (c :: COPRODUCT j k). (b ~> c) -> r) -> r Source Github # factorCoequalizer :: forall (c :: COPRODUCT j k) (x :: COPRODUCT j k) (c' :: COPRODUCT j k). (x ~> c) -> (x ~> c') -> c ~> c' Source Github # | |
| (HasCoequalizers k1, HasCoequalizers k2) => HasCoequalizers (k1, k2) Source Github # | |
Defined in Proarrow.Colimit.Coequalizer | |
| (HasFiniteCovers t k, FiniteCat j, FiniteCat k) => HasCoequalizers (SHEAVES t j k) Source Github # | The quotient a coequalizer takes is |
Defined in Proarrow.Category.Enriched.Finitary.Sheaf Methods coequalize :: forall (a :: SHEAVES t j k) (b :: SHEAVES t j k) r. (a ~> b) -> (a ~> b) -> (forall (c :: SHEAVES t j k). (b ~> c) -> r) -> r Source Github # factorCoequalizer :: forall (c :: SHEAVES t j k) (x :: SHEAVES t j k) (c' :: SHEAVES t j k). (x ~> c) -> (x ~> c') -> c ~> c' Source Github # | |
thinCoequalize :: forall {k} (a :: k) (b :: k) r. Thin k => (a ~> b) -> (a ~> b) -> (forall (c :: k). (b ~> c) -> r) -> r Source Github #
In a thin category, arrows don't carry information, so coequalizers are just coproducts.
pushoutDefault :: forall {k} (o :: k) (a :: k) (b :: k) r. (HasCoequalizers k, HasCoproducts k) => (o ~> a) -> (o ~> b) -> (forall (p :: k). (a ~> p) -> (b ~> p) -> r) -> r Source Github #
Standalone helper (not a class method) usable as the default implementation of
pushout wherever (HasCoequalizers k, HasCoproducts k) happen to hold.
Not every HasPushouts instance needs it or is required to have it.
factorPushoutDefault :: forall {k} (a :: k) (b :: k) (p :: k) (q :: k). (HasCoequalizers k, HasCoproducts k) => (a ~> p) -> (b ~> p) -> (a ~> q) -> (b ~> q) -> p ~> q Source Github #
Given a pushout's own legs p1, p2 and a compatible cocone k1, k2 out of some q (with
k1 . f == k2 . g for whichever cospan p1, p2 are a pushout of), produces the unique p ~> q
through which the cocone factors. Standalone helper (not a class method), usable as the
default implementation of factorPushout, dual to
factorPullbackDefault.
cokernel :: forall k (a :: k) (b :: k) r. (HasCoequalizers k, HasZeroObject k) => (a ~> b) -> (forall (c :: k). (b ~> c) -> r) -> r Source Github #
Orphan instances
| HasCoequalizers k => HasEqualizers (OPPOSITE k) Source Github # | |