| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Proarrow.Category.Sheaf
Description
Sites and sheaves.
A cover of an object a is a family of arrows into a, its legs, that together count as
all of a. The model is the opens of a space: an open is covered by smaller opens whose union
it is. A Site is a category with a choice of covers, called a coverage.
Read an element of p a b as data over a (b is a parameter along for the ride). Restricting
along a leg g :: x , with ~> a, gives data over lmap gx. A family, one element per leg,
is matching when its elements agree wherever two legs overlap: for legs g, g' and any
u :: z , ~> xv :: z with ~> y,
legArrow g . u = legArrow g' . v. lmap u (m g) = lmap v (m g')p is a Sheaf when every matching family is the
restriction of exactly one element at a. That rules out two failures:
- Too many wholes. Two distinct elements at
arestrict to the same family, so agreeing on every leg does not make two things equal, and nothing can be proved by takingaapart. - Too few. A matching family is the restriction of no element at
a, so compatible local data cannot be assembled, and nothing can be built by puttingatogether.
Neither implies the other, and counting the two sides decides neither:
elements at a matching families verdict the representable at FLS, Atomic on BOOL 0 1 too few the constant presheaf, Joins on (BOOL, BOOL) 2 1 too many the collapsing presheaf, Atomic on BOOL 2 2 not injective
Overlap is stated over every commuting square, not over the pullback, so two legs need not
have a pullback object. Sums relies on this: it works over a free category that has none.
The arrows into a that factor through some leg form the sieve the cover generates. Covers are
given by their legs because a list of legs is finite and a sieve usually is not. Sieves are the
truth values of presheaf categories, see Proarrow.Profunctor.Instance.Sieve. When covers are
stable and compose, the coverage generates a Grothendieck topology; Sums shows it need not.
Covers given by generating arrows, and gluing as an operation rather than a condition, follow Arnaud Spiwack's Sheaves in Haskell (Tweag, 2026, https://www.tweag.io/blog/2026-06-18-sheaves-in-haskell/). Added here: the category, the sieves, the classifier and a decision procedure for the sheaf condition, the last three in Proarrow.Category.Enriched.Finitary.Sheaf.
Synopsis
- type Coverage = Type
- class CategoryOf k => Site t k where
- data SomeLeg t k (a :: k) c where
- class Site t k => HasFiniteCovers t k where
- data SomeCover t k (a :: k) where
- data Factors t k (a :: k) c (x :: k) where
- factorThroughCover :: forall t k (a :: k) c (x :: k). (Site t k, LocallyFinite k) => Cover t k a c -> (x ~> a) -> Maybe (Factors t k a c x)
- data PulledBack t k (a :: k) c (b :: k) where
- AlreadyFactors :: forall t k (a :: k) c (b :: k). Factors t k a c b -> PulledBack t k a c b
- PulledBack :: forall t k (b :: k) c' (a :: k) c. Cover t k b c' -> (forall (x :: k). Leg t k b c' x -> Factors t k a c x) -> PulledBack t k a c b
- class Site t k => StableSite t k where
- pullbackCover :: forall (b :: k) (a :: k) c. Ob b => Cover t k a c -> (b ~> a) -> PulledBack t k a c b
- pullbackAlongId :: forall t k (a :: k) c. Site t k => Cover t k a c -> PulledBack t k a c a
- class (Site t k, Profunctor p) => Sheaf t (p :: j +-> k) where
- data Trivial
- glueTrivial :: forall {k1} k2 (a :: k2) c p (b :: k1). Cover Trivial k2 a c -> (forall (x :: k2). Leg Trivial k2 a c x -> p x b) -> p a b
- data Atomic
- data Along (b :: k)
- data Joins
- data Join
- sourceBelow :: forall {k} (x :: k) (y :: k) (a :: k) (b :: k). FiniteCat k => (x ~> a) -> (y ~> b) -> Bool
- legBelow :: forall k (a :: k). FiniteCat k => SomeLeg Joins k a Join -> SomeLeg Joins k a Join -> Bool
- joinOf :: forall {k} (a :: k) r. (HasBinaryCoproducts k, HasInitialObject k, Ob a) => [SomeLeg Joins k a Join] -> (forall (j :: k). (j ~> a) -> r) -> r
- pullbackJoin :: forall {k} (b :: k) (a :: k). (Thin k, FiniteCat k, Bicartesian k, Ob b) => Cover Joins k a Join -> [SomeLeg Joins k a Join] -> (b ~> a) -> PulledBack Joins k a Join b
- data Sums
- data Summands (x :: k) (y :: k)
- data ByImage (w :: j +-> k)
- data Image
- data Induced t (w :: j +-> k)
- glueExtension :: forall t {i} {j} {k} (w :: j +-> k) (q :: i +-> k) (a :: j) c (b :: i). (StableSite t j, Corepresentable w, LocallyFinite j, FiniteCat k, Sheaf (Induced t w) q, Ob a, Ob b) => Cover t j a c -> (forall (x :: j). Leg t j a c x -> Rift ('OP w) q x b) -> Rift ('OP w) q a b
Sites
type Coverage = Type Source Github #
The kind of coverage names. A coverage is named by an empty type, the first argument of
Site, and has no values.
class CategoryOf k => Site t k where Source Github #
A coverage, named t, on the category k. Several coverages can live on one category, so the
name is a parameter rather than a wrapper on the kind.
A cover is given by its legs, the arrows of the covering family. Every object is covered by
its identity; that cover is left implicit, and Cover and covers list the others. The laws are
- Stability
- covers pull back: restricting a cover of
ato a partbofagives a cover ofb. Given a covercofaand anyf :: b, the object~>abhas a cover (possibly just its identity) each of whose legshsatisfiesf . h =for some leglegArrowg . h'gofcand someh'. Only the equation is asked for. No pullback object has to exist. - Naming
- a family over a cover
c, a functionforall x.asLegt k a c x -> rgluetakes andPulledBackcarries, is consulted only at the legs ofc: those in, or built from the cover's own data. Its values at other legs are unspecified.legsc
Naming matters when several covers share a type-level name c, as Atomic's do on a category
that is not thin and Joins's always do. Then Leg also admits the legs of the other covers
with that name, so a hand-written glue takes its legs from the cover it was given.
Associated Types
data Cover t k (a :: k) c Source Github #
A cover of a. The type c names it, so that Leg can say which cover a leg belongs to;
the value is the evidence that c covers a.
data Leg t k (a :: k) c (x :: k) Source Github #
A leg of the cover c of a, with source x.
Methods
legArrow :: forall (a :: k) c (x :: k). Leg t k a c x -> x ~> a Source Github #
The arrow a leg stands for.
legs :: forall (a :: k) c. Cover t k a c -> [SomeLeg t k a c] Source Github #
The legs of a cover.
Instances
| (HasPullbacks k, FiniteCat k) => Site Atomic k Source Github # | |
| (Thin k, FiniteCat k, Bicartesian k) => Site Joins k Source Github # | |
| CategoryOf k => Site Trivial k Source Github # | |
| Elem HasBinaryCoproducts cs => Site Sums (FREE cs p) Source Github # | |
| (Corepresentable w, Finitary w, FiniteCat k) => Site (ByImage w) j Source Github # | |
| (Site t j, Corepresentable w, LocallyFinite j, FiniteCat k) => Site (Induced t w) k Source Github # | |
class Site t k => HasFiniteCovers t k where Source Github #
A site whose covers can be listed, object by object, as the law tests and the decision
procedure of Proarrow.Category.Enriched.Finitary.Sheaf need. A free category is a Site but
not this: its Ob cannot tell whether an object is a sum.
- Composition
- covers compose. If
ccoversaand every leg ofcis itself covered, the composites coveratoo. With Stability this makes the coverage generate a Grothendieck topology, soclosureis idempotent and preserves meets, whichPlusneeds.testLawvereTierneyis the check.
Methods
covers :: forall (a :: k). Ob a => [SomeCover t k a] Source Github #
The covers of an object, beyond the identity.
Instances
| (HasPullbacks k, FiniteCat k) => HasFiniteCovers Atomic k Source Github # | |
| (Thin k, FiniteCat k, Bicartesian k) => HasFiniteCovers Joins k Source Github # | |
| CategoryOf k => HasFiniteCovers Trivial k Source Github # | |
| (Corepresentable w, Finitary w, FiniteCat k) => HasFiniteCovers (ByImage w) j Source Github # | |
| (HasFiniteCovers t j, Corepresentable w, LocallyFinite j, FiniteCat k) => HasFiniteCovers (Induced t w) k Source Github # | |
data Factors t k (a :: k) c (x :: k) where Source Github #
How an arrow into a factors through a cover of a: the leg it goes through, and the arrow
to that leg's source. The equation f = is the caller's to rely on and the
instance's to respect.legArrow g . h
factorThroughCover :: forall t k (a :: k) c (x :: k). (Site t k, LocallyFinite k) => Cover t k a c -> (x ~> a) -> Maybe (Factors t k a c x) Source Github #
How an arrow into a factors through a cover of a, if it does: through the first leg it
factors through, found by factorThrough. Only the hom-sets have to be finite.
data PulledBack t k (a :: k) c (b :: k) where Source Github #
A cover pulled back along an arrow f :: b : either ~> af itself factors through a leg
(the pullback is b's implicit identity cover), or some cover of b has every leg factoring
through one.
Constructors
| AlreadyFactors :: forall t k (a :: k) c (b :: k). Factors t k a c b -> PulledBack t k a c b | |
| PulledBack :: forall t k (b :: k) c' (a :: k) c. Cover t k b c' -> (forall (x :: k). Leg t k b c' x -> Factors t k a c x) -> PulledBack t k a c b |
class Site t k => StableSite t k where Source Github #
Site's Stability law as an operation: a pullback one can compute with, carrying the
factorisation of each new leg through an old one. It lets a sheaf be glued structurally. Without
it, gluing into a carrier with no glue of its own (an internal hom, the closed sieves) means
searching the carrier's elements (glueBySearch),
which needs the carrier to be finitary.
Separate from Site because Sums cannot implement it: a free bicartesian category is not
extensive, so its covers do not pull back.
Methods
pullbackCover :: forall (b :: k) (a :: k) c. Ob b => Cover t k a c -> (b ~> a) -> PulledBack t k a c b Source Github #
Instances
pullbackAlongId :: forall t k (a :: k) c. Site t k => Cover t k a c -> PulledBack t k a c a Source Github #
A cover pulled back along the identity of the object it covers: itself, each leg factoring through itself. Every instance needs this clause, and this version cannot get it wrong. In a hand-written one, naming another leg with the same source type-checks.
Sheaves
class (Site t k, Profunctor p) => Sheaf t (p :: j +-> k) where Source Github #
A profunctor that is a sheaf for the coverage t on its contravariant side: every matching
family over a cover glues to one element. A family m over the legs of a cover c is
matching when it agrees on overlaps: for legs g, g' and any u :: z ,
~> xv :: z with ~> y, legArrow g . u = legArrow g' . v.
lmap u (m g) = lmap v (m g')Sums below is the smallest worked instance. The laws are
- Restriction
- for matching
m,at every leglmap(legArrowg) (gluec m) = m ggofc: the gluing restricts back to the family; - Uniqueness
: an element is the gluing of its own restrictions.gluec (\g ->lmap(legArrowg) x) = x
Together they make restriction a bijection from the elements at a to the matching families on
c. On a non-matching family glue is unspecified. The Sums instance keeps one leg's
covariant component and drops the other, which is sound only because matching forces them equal.
p is a sheaf when each presheaf p (-) b is one, and glue is stated for every b at once.
A cosheaf, gluing on the covariant side, is a
for a coverage on Sheaf t (Op p). The
library defines no such coverage.OPPOSITE k
Instances are indexed by the shape of the profunctor: the limits below, a site's
representables, and the image of sheafification. An instance per coverage would overlap all of
them, so Trivial gets the function glueTrivial instead.
Methods
glue :: forall (a :: k) c (b :: j). (Ob a, Ob b) => Cover t k a c -> (forall (x :: k). Leg t k a c x -> p x b) -> p a b Source Github #
Instances
| (Site t k, CategoryOf j) => Sheaf t (TerminalProfunctor :: k -> j -> Type) Source Github # | The limits of profunctors are sheaves whenever their factors are: the terminal profunctor for every coverage, and a product of sheaves glued componentwise. |
Defined in Proarrow.Category.Sheaf Methods glue :: forall (a :: k) c (b :: j). (Ob a, Ob b) => Cover t k a c -> (forall (x :: k). Leg t k a c x -> TerminalProfunctor x b) -> TerminalProfunctor a b Source Github # | |
| (StableSite t k, CategoryOf j) => Sheaf t (ClosedSieve t :: k -> j -> Type) Source Github # | The classifier is a sheaf, with gluing built directly: the glued sieve contains |
Defined in Proarrow.Category.Enriched.Finitary.Sheaf Methods glue :: forall (a :: k) c (b :: j). (Ob a, Ob b) => Cover t k a c -> (forall (x :: k). Leg t k a c x -> ClosedSieve t x b) -> ClosedSieve t a b Source Github # | |
| (Site t k, LocallyFinite k, CategoryOf j) => Sheaf t (Sheafify t p :: k -> j -> Type) Source Github # | Sheafification lands in the sheaves (
|
| (StableSite t k, Sheaf t q, Profunctor p, CategoryOf j) => Sheaf t (p :~>: q :: k -> j -> Type) Source Github # | The presheaf internal hom into a sheaf is already a sheaf: a matching family of maps The glued map, at an arrow |
| (Sheaf t p, Sheaf t q) => Sheaf t (p :*: q :: k -> j -> Type) Source Github # | |
| Sheaf t p => Sheaf t (Reindex 'Subobject p fs :: k -> j -> Type) Source Github # | Restricting a sheaf to a subobject gives a sheaf, provided the subobject is a subsheaf: the
element glued from a family of kept elements must be kept too. The tables of There is no instance for |
| (Site t k, FiniteCat j, FiniteCat k, KnownTables j k lm rm) => Sheaf t (Tabulated t lm rm :: k -> j -> Type) Source Github # | A tabulated profunctor glues by search, since it knows nothing of the profunctor it presents.
Only for the coverage its tag names. The tag is the only evidence that the search will
find its element, so a presentation may be used as a sheaf for the coverage it was checked
against and for no other. At |
| (Corepresentable w, Finitary w, FiniteCat k, Profunctor q) => Sheaf (ByImage w) (Rift ('OP w) q :: j -> i -> Type) Source Github # | The extension of a presheaf along |
| (Elem HasBinaryCoproducts cs, Elem HasInitialObject cs, CategoryOf j) => Sheaf Sums (Yo x ('OP b) :: FREE cs p -> j -> Type) Source Github # | Sums are colimits, so the representables are sheaves for The initial object is needed too. An element of |
Coverages
The trivial coverage: only identities cover, so every profunctor is a sheaf.
Instances
| CategoryOf k => HasFiniteCovers Trivial k Source Github # | |
| CategoryOf k => Site Trivial k Source Github # | |
| CategoryOf k => StableSite Trivial k Source Github # | |
Defined in Proarrow.Category.Sheaf Methods pullbackCover :: forall (b :: k) (a :: k) c. Ob b => Cover Trivial k a c -> (b ~> a) -> PulledBack Trivial k a c b Source Github # | |
| data Cover Trivial k (a :: k) c Source Github # | |
Defined in Proarrow.Category.Sheaf | |
| data Leg Trivial k (a :: k) c (x :: k) Source Github # | |
Defined in Proarrow.Category.Sheaf | |
glueTrivial :: forall {k1} k2 (a :: k2) c p (b :: k1). Cover Trivial k2 a c -> (forall (x :: k2). Leg Trivial k2 a c x -> p x b) -> p a b Source Github #
Every profunctor is a sheaf for Trivial, by the eliminator of an empty Cover. This is a
function rather than an instance because that head and the two closure
instances above overlap (at Sheaf Trivial p, say) with neither more
specific than the other, so GHC could not choose between them. Write Sheaf Trivial TerminalProfunctorglue = glueTrivial to get
the instance for one profunctor.
The atomic coverage: every single arrow into an object covers it. So a sieve is covering iff it
is nonempty (the atomic topology, with HasPullbacks as its Ore condition). A sheaf is a
profunctor whose restriction along every arrow is a bijection. On a chain that is a presheaf
that is constant up to iso.
Stability is the pullback square: pulling a leg back along an arrow into its target gives the
cover of that arrow's source by the pullback projection, and the other projection factors it
through the old leg. Covers compose, since a composite of single arrows is a single arrow. This
is the first coverage here whose legs are themselves covered, so it is the first to exercise
HasFiniteCovers's Composition law.
The identity is listed as a cover too. It decides nothing new, and dropping it would take
deciding b ~ a under foreachOb, which a coverage generic in k cannot do.
Instances
| (HasPullbacks k, FiniteCat k) => HasFiniteCovers Atomic k Source Github # | |
| (HasPullbacks k, FiniteCat k) => Site Atomic k Source Github # | |
| (HasPullbacks k, FiniteCat k) => StableSite Atomic k Source Github # | |
Defined in Proarrow.Category.Sheaf Methods pullbackCover :: forall (b :: k) (a :: k) c. Ob b => Cover Atomic k a c -> (b ~> a) -> PulledBack Atomic k a c b Source Github # | |
| data Cover Atomic k (a :: k) c Source Github # | |
| data Leg Atomic k (a :: k) c (x :: k) Source Github # | |
data Along (b :: k) Source Github #
The name of the Atomic cover of an object by a single arrow out of b: the Cover
constructor is Solely and its one Leg constructor is Only. Two distinct arrows b
share the name, so the name is not a singleton, and ~> aSite's Naming law makes that
harmless: pullbackCover answers for the leg of the cover it built, and says nothing true about
an Only built from another arrow. On a thin category the arrow is unique and the name a
singleton after all.
The open-cover coverage of a finite distributive lattice: an object is covered by any family of
objects below it whose join it is. Read the lattice as the opens of a finite space and its
sheaves are the sheaves on that space: a section over an open is determined by, and assembled
from, its sections over any opens that cover it. On (BOOL, BOOL), the opens of the discrete
two-point space (see Proarrow.Category.Instance.Product), the whole space is covered by its
two points.
The empty family covers the bottom, the join of nothing, so a sheaf has exactly one section over the bottom, as over the empty set. On a chain nothing else is covered.
covers lists the antichains strictly below an object that join to it, found by enumerating
subsets, so it is for small lattices only. Other families generate the same sieves.
The instances ask for Bicartesian (meet is the product,
join the coproduct) and Thin, so that "is there an arrow" reads as <=.
FINSET is bicartesian and distributive but not thin, and this
coverage would mean nothing there. Distributivity gives stability: pulled back along
b , a cover <= a{x_i} of a becomes {b , whose join is && x_i}b. Covers compose,
since a join of joins is a join. The topology is subcanonical (representable presheaves are
sheaves), but a two-sided need not be one: the empty cover asks for one
element at the bottom for every object of Yo a (OP b)j, and it has none at an object b has no arrow to.
The finite, stable counterpart of Sums: a distributive lattice is the thin case of the
extensivity that a free bicartesian category lacks.
Instances
| (Thin k, FiniteCat k, Bicartesian k) => HasFiniteCovers Joins k Source Github # | |
| (Thin k, FiniteCat k, Bicartesian k) => Site Joins k Source Github # | |
| (Thin k, FiniteCat k, Bicartesian k) => StableSite Joins k Source Github # | |
Defined in Proarrow.Category.Sheaf Methods pullbackCover :: forall (b :: k) (a :: k) c. Ob b => Cover Joins k a c -> (b ~> a) -> PulledBack Joins k a c b Source Github # | |
| data Cover Joins k (a :: k) c Source Github # | |
| data Leg Joins k (a :: k) c (x :: k) Source Github # | |
The name of every Joins cover: the Cover constructor is ByJoin, holding its legs, and
the Leg constructor is Under, one per member of the family. A ByJoin is a cover of a
only when its legs join to a; covers lists exactly the antichains that do. All the covers
of an object share the name, so Site's Naming law matters here: a family over
one of them is not asked about the legs of another.
sourceBelow :: forall {k} (x :: k) (y :: k) (a :: k) (b :: k). FiniteCat k => (x ~> a) -> (y ~> b) -> Bool Source Github #
Whether the source of the first arrow is below that of the second: in a thin category, whether there is an arrow between them at all.
legBelow :: forall k (a :: k). FiniteCat k => SomeLeg Joins k a Join -> SomeLeg Joins k a Join -> Bool Source Github #
Whether one leg's source is below the other's.
joinOf :: forall {k} (a :: k) r. (HasBinaryCoproducts k, HasInitialObject k, Ob a) => [SomeLeg Joins k a Join] -> (forall (j :: k). (j ~> a) -> r) -> r Source Github #
The join of the legs' sources, as the arrow it has into their common target: the copairing of the legs, starting from the initial object.
pullbackJoin :: forall {k} (b :: k) (a :: k). (Thin k, FiniteCat k, Bicartesian k, Ob b) => Cover Joins k a Join -> [SomeLeg Joins k a Join] -> (b ~> a) -> PulledBack Joins k a Join b Source Github #
Joins's Stability: the meets of the source with the legs. Each is below its leg, so the
factorisation is found by factorThroughCover; it is recomputed per leg rather than carried,
as a leg is only its arrow. The search fails only for a leg of some other cover of b, which
Site's Naming law rules out.
The sum coverage on a free category with binary coproducts: a sum is covered by its two
injections. This is the syntactic site of Spiwack's post (see the module header). In the free
bicartesian closed category FREE cs p, the booleans TermF are
covered by + TermFtrue and false.
Read p a as the ways of producing an a. Being a sheaf means p Bool ≅ p TermF × p TermF:
every pair of branches has a conditional, and only one. With too many, a proof by cases
establishes nothing. With too few, if-then-else is not definable. On a representable the
conditional is , which is why |||glue below is [t, e]. The conditional on a test
f :: c uses the distributive law as well, as in ~> BoolcaseOf.
Stability does not hold. It would need every arrow into a sum to split its source into a
sum (extensivity), and a free bicartesian category is not extensive. The restriction of
id to the left summand is ||| lft :: (u + u) + u ~> u + uid, which factors
through neither injection. With a richer constraint list,
has a source that is not a sum at all.
So the coverage generates no Grothendieck topology. Nothing here relies on stability: mempty :: UnitF ~> u + uglue's
laws are the coproduct's universal property, and FREE cannot list the covers of an arbitrary
object, so it is not a HasFiniteCovers and the topology machinery never runs at it.
Instances
| Elem HasBinaryCoproducts cs => Site Sums (FREE cs p) Source Github # | |
| (Elem HasBinaryCoproducts cs, Elem HasInitialObject cs, CategoryOf j) => Sheaf Sums (Yo x ('OP b) :: FREE cs p -> j -> Type) Source Github # | Sums are colimits, so the representables are sheaves for The initial object is needed too. An element of |
| data Cover Sums (FREE cs p) (a :: FREE cs p) c Source Github # | |
| data Leg Sums (FREE cs p) (a :: FREE cs p) c (z :: FREE cs p) Source Github # | |
Defined in Proarrow.Category.Sheaf data Leg Sums (FREE cs p) (a :: FREE cs p) c (z :: FREE cs p) where
| |
data ByImage (w :: j +-> k) Source Github #
The coverage by the image of a functor. A Corepresentable w is a functor
F = w from %% -k to j, with w d c ≅ F d ~> c. Every object c of j is covered by all
the arrows into it from the image, F d ~> c, so a leg is an element of w. For an object in the
image the cover contains its identity and asks nothing.
It is stable, since pulling a leg back along g is composing with g, and the covers compose,
since the cover of a leg's source is again an image cover, and contains that source's identity.
A presheaf on k extends to a sheaf on j: its right Kan lift q (<| wRift), whose value
at c is a family over all the arrows F d ~> c. The restriction of a sheaf back to k is
w , and the two are adjoint by the
:.: sCorepresentable instance of .Star (Rift (OP w))
The comparison lemma needs F to be fully faithful: corepMap is a bijection on each hom-set,
equivalently ( (~>) ≅ w |> wtestRanFullyFaithful). Then the unit
of the adjunction is an isomorphism exactly on the sheaves, the counit is an isomorphism, and
the sheaves are the presheaves on k. Without it the coverage is still lawful, but its sheaves
are the presheaves on the full subcategory of j on the objects F d. When F sends two
objects to one, every presheaf is a sheaf, and the unit is a diagonal.
Two examples: the left inclusion of a collage, whose other objects are covered by the arrows from the left layer, and the edges of a graph, covering each vertex by the two ends of an edge.
Instances
| (Corepresentable w, Finitary w, FiniteCat k, Profunctor q) => Sheaf (ByImage w) (Rift ('OP w) q :: j -> i -> Type) Source Github # | The extension of a presheaf along |
| (Corepresentable w, Finitary w, FiniteCat k) => HasFiniteCovers (ByImage w) j Source Github # | |
| (Corepresentable w, Finitary w, FiniteCat k) => Site (ByImage w) j Source Github # | |
| (Corepresentable w, Finitary w, FiniteCat k) => StableSite (ByImage w) j Source Github # | |
Defined in Proarrow.Category.Sheaf Methods pullbackCover :: forall (b :: j) (a :: j) c. Ob b => Cover (ByImage w) j a c -> (b ~> a) -> PulledBack (ByImage w) j a c b Source Github # | |
| data Cover (ByImage w) j (a :: j) c Source Github # | |
| data Leg (ByImage w) j (a :: j) c (x :: j) Source Github # | |
data Induced t (w :: j +-> k) Source Github #
The coverage induced along a functor. For a coverage t on j and a functor
F = w from %% -k to j, a cover of d is a t-cover c of F d, and its legs are
all the arrows h :: e ~> d whose image F h factors through a leg of c.
The comparison lemma: when F is fully faithful and every object of j is covered by arrows
out of the image (testCoveredByImage), the sheaves for t are the
sheaves for . Restriction is Induced t ww and extension is the
right Kan lift :.: sq , glued by <| wglueExtension, the adjunction of ByImage. ByImage is
the case where t has only the image covers. Then every induced cover contains an identity,
and every presheaf on k is a sheaf.
The opens of a space and a basis of it are the standard example: sheaves on the space are sheaves on the basis.
Instances
| (HasFiniteCovers t j, Corepresentable w, LocallyFinite j, FiniteCat k) => HasFiniteCovers (Induced t w) k Source Github # | |
| (Site t j, Corepresentable w, LocallyFinite j, FiniteCat k) => Site (Induced t w) k Source Github # | |
| (StableSite t j, Corepresentable w, LocallyFinite j, FiniteCat k) => StableSite (Induced t w) k Source Github # | Pulling back along |
Defined in Proarrow.Category.Sheaf Methods pullbackCover :: forall (b :: k) (a :: k) c. Ob b => Cover (Induced t w) k a c -> (b ~> a) -> PulledBack (Induced t w) k a c b Source Github # | |
| data Cover (Induced t w) k (d :: k) c Source Github # | |
| data Leg (Induced t w) k (d :: k) c (e :: k) Source Github # | |
glueExtension :: forall t {i} {j} {k} (w :: j +-> k) (q :: i +-> k) (a :: j) c (b :: i). (StableSite t j, Corepresentable w, LocallyFinite j, FiniteCat k, Sheaf (Induced t w) q, Ob a, Ob b) => Cover t j a c -> (forall (x :: j). Leg t j a c x -> Rift ('OP w) q x b) -> Rift ('OP w) q a b Source Github #
The extension of a sheaf for the induced coverage is a sheaf for t. Its value at x :: F e ~> a
is found by pulling the cover back along x and gluing in q over the induced cover of e.
A function instead of an instance, because an instance would overlap the ByImage one.