| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Proarrow.Limit.Equalizer
Description
type depends on the given arrows, so it is hidden behind an existential) and factorEqualizer for
the universal property.
Synopsis
- class CategoryOf k => HasEqualizers k where
- thinEqualize :: forall {k} (a :: k) (b :: k) r. Thin k => (a ~> b) -> (a ~> b) -> (forall (e :: k). (e ~> a) -> r) -> r
- pullbackDefault :: forall {k} (o :: k) (a :: k) (b :: k) r. (HasEqualizers k, HasProducts k) => (a ~> o) -> (b ~> o) -> (forall (p :: k). (p ~> a) -> (p ~> b) -> r) -> r
- factorPullbackDefault :: forall {k} (a :: k) (b :: k) (p :: k) (q :: k). (HasEqualizers k, HasProducts k) => (p ~> a) -> (p ~> b) -> (q ~> a) -> (q ~> b) -> q ~> p
- kernel :: forall k (a :: k) (b :: k) r. (HasEqualizers k, HasZeroObject k) => (a ~> b) -> (forall (e :: k). (e ~> a) -> r) -> r
Documentation
class CategoryOf k => HasEqualizers k where Source Github #
Equalizers are an inherently dependently typed concept: The type of the base 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
equalize :: forall (a :: k) (b :: k) r. (a ~> b) -> (a ~> b) -> (forall (e :: k). (e ~> a) -> r) -> r Source Github #
factorEqualizer :: forall (e :: k) (x :: k) (e' :: k). (e ~> x) -> (e' ~> x) -> e' ~> e Source Github #
factorEqualizer incl h requires incl to be mono and h's image to lie within incl's
image; incl is typically (though not necessarily) the equalizer arrow produced by equalize.
Instances
| HasEqualizers BOOL Source Github # |
|
| HasEqualizers COST Source Github # |
|
| HasEqualizers FINHASK Source Github # |
|
Defined in Proarrow.Category.Instance.FinHask | |
| HasEqualizers FINSET Source Github # |
|
Defined in Proarrow.Category.Instance.FinSet | |
| HasEqualizers () Source Github # | |
| Indexed k => HasEqualizers (CODISCRETE k) Source Github # | |
Defined in Proarrow.Category.Instance.Discrete Methods equalize :: forall (a :: CODISCRETE k) (b :: CODISCRETE k) r. (a ~> b) -> (a ~> b) -> (forall (e :: CODISCRETE k). (e ~> a) -> r) -> r Source Github # factorEqualizer :: forall (e :: CODISCRETE k) (x :: CODISCRETE k) (e' :: CODISCRETE k). (e ~> x) -> (e' ~> x) -> e' ~> e Source Github # | |
| Indexed k => HasEqualizers (DISCRETE k) Source Github # | |
Defined in Proarrow.Category.Instance.Discrete | |
| (Fractional a, Eq a) => HasEqualizers (MatK a) Source Github # | The equalizer of two linear maps
|
Defined in Proarrow.Category.Instance.Mat | |
| HasCoequalizers k => HasEqualizers (OPPOSITE k) Source Github # | |
Defined in Proarrow.Colimit.Coequalizer | |
| HasEqualizers (ORDINAL n) Source Github # |
|
Defined in Proarrow.Category.Instance.Ordinal | |
| HasEqualizers k => HasEqualizers (PROD k) Source Github # | Equalizers are unchanged by making the tensor the product. |
| (Enumerable j, Enumerable k) => HasEqualizers (FINITARY j k) Source Github # | Equalizers of finitary profunctors between finite categories: at each pair of objects, keep the indices on which the two natural transformations agree, and reify the table. |
Defined in Proarrow.Category.Enriched.Finitary.Topos | |
| (HasEqualizers j, HasEqualizers k) => HasEqualizers (COPRODUCT j k) Source Github # | Morphisms of |
Defined in Proarrow.Category.Instance.Coproduct | |
| (HasEqualizers k1, HasEqualizers k2) => HasEqualizers (k1, k2) Source Github # | |
Defined in Proarrow.Limit.Equalizer | |
| (Site t k, Enumerable j, Enumerable k) => HasEqualizers (SHEAVES t j k) Source Github # | Equalizers as in |
Defined in Proarrow.Category.Enriched.Finitary.Sheaf | |
thinEqualize :: forall {k} (a :: k) (b :: k) r. Thin k => (a ~> b) -> (a ~> b) -> (forall (e :: k). (e ~> a) -> r) -> r Source Github #
In a thin category, arrows don't carry information, so equalizers are just identities.
pullbackDefault :: forall {k} (o :: k) (a :: k) (b :: k) r. (HasEqualizers k, HasProducts k) => (a ~> o) -> (b ~> o) -> (forall (p :: k). (p ~> a) -> (p ~> b) -> r) -> r Source Github #
Standalone helper (not a class method) usable as the default implementation of
pullback wherever (HasEqualizers k, HasProducts k) happen to hold.
Not every HasPullbacks instance needs it or is required to have it.
factorPullbackDefault :: forall {k} (a :: k) (b :: k) (p :: k) (q :: k). (HasEqualizers k, HasProducts k) => (p ~> a) -> (p ~> b) -> (q ~> a) -> (q ~> b) -> q ~> p Source Github #
Given a pullback's own legs p1, p2 and a compatible cone k1, k2 on some q (with
f . k1 == g . k2 for whichever cospan p1, p2 are a pullback of), produces the unique
q ~> p through which the cone factors. Standalone helper (not a class method), usable as the
default implementation of factorPullback wherever
(HasEqualizers k, HasProducts k) happen to hold, like pullbackDefault itself.
kernel :: forall k (a :: k) (b :: k) r. (HasEqualizers k, HasZeroObject k) => (a ~> b) -> (forall (e :: k). (e ~> a) -> r) -> r Source Github #