proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Profunctor.Instance.Sieve

Description

Sieves: a Sieve a b is a set of pairs (g :: c ~> a, h :: b ~> d), given as a predicate, that is closed under composing on the outside: if (g, h) is in, so is (g . l, r . h) for any l and r. With b ignored this is the textbook sieve on a, a set of arrows into a closed under precomposition.

The constructor does not check this closure. toIndex of Finitary (failing with "not a sieve") and withSubobject check it. Others presuppose it, e.g. coveringCover judges a sieve by a cover's legs, so on a non-sieve the two kinds of function disagree. A hand-built Sieve must be closed.

Sieves are the subobjects of the representable at a/b, so they are the truth values of a category of profunctors: Proarrow.Category.Enriched.Finitary.Topos makes them the HasSubobjectClassifier of the finitary ones.

Synopsis

Documentation

data Sieve (a :: k) (b :: j) where Source Github #

Constructors

Sieve :: forall {k} {j} (a :: k) (b :: j). (Ob a, Ob b) => (forall (c :: k) (d :: j). (c ~> a) -> (b ~> d) -> Bool) -> Sieve a b 

Instances

Instances details
(FiniteCat j, FiniteCat k) => Finitary (Sieve :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Enriched.Finitary.Topos

Methods

size :: forall (a :: k) (b :: j). (Ob a, Ob b) => Natural Source Github #

toIndex :: forall (a :: k) (b :: j). (Ob a, Ob b) => Sieve a b -> Natural Source Github #

fromIndex :: forall (a :: k) (b :: j). (Ob a, Ob b) => Natural -> Sieve a b Source Github #

elements :: forall (a :: k) (b :: j). (Ob a, Ob b) => [Sieve a b] Source Github #

(CategoryOf j, CategoryOf k) => Profunctor (Sieve :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Sieve

Methods

dimap :: forall (c :: k) (a :: k) (b :: j) (d :: j). (c ~> a) -> (b ~> d) -> Sieve a b -> Sieve c d Source Github #

lmap :: forall (c :: k) (a :: k) (b :: j). (c ~> a) -> Sieve a b -> Sieve c b Source Github #

rmap :: forall (b :: j) (d :: j) (a :: k). (b ~> d) -> Sieve a b -> Sieve a d Source Github #

(\\) :: forall (a :: k) (b :: j) r. ((Ob a, Ob b) => r) -> Sieve a b -> r Source Github #

maximalSieve :: forall {j} {k} (a :: k) (b :: j). (CategoryOf j, CategoryOf k, Ob a, Ob b) => Sieve a b Source Github #

The sieve that contains every arrow. Sieve is the object of truth values of a category of profunctors, and this is its value yes, so it is the true of their subobject classifier. A sieve is called dense for a coverage when its closure is this one (see closure).

sieveMeet :: forall {k} {j} (a :: k) (b :: j). Sieve a b -> Sieve a b -> Sieve a b Source Github #

The sieve of arrows in both: the and of the truth values the two stand for. This is and at the classifier of Proarrow.Category.Enriched.Finitary.Topos, computed directly instead of as an arrow. Being closed under composition is pointwise, so the meet of two sieves is again one. Plus is computed on the meet of all the dense sieves at a pair of objects.