Tag. presheaf
Notes (22)
Predecessors simplify later predecessors-simplify-later
A predecessor of is a top element of its strict downset: a strict morphism through which every strict morphism into factors uniquely. Equivalently, β the downset is representable.
The Yoneda lemma then collapses later to evaluation:
with becoming restriction along . The name is from the naturals: every strict map into factors through , so on β in the topos of trees β later is just the shift
and a LΓΆb step is a base value together with a rule producing the value at from the value at .
When this predecessor exists, we can give a simpler description of later, as in the topos of trees, but this may not be possible in all direct categories.
Definition. Earlier on presheaves earlier-presheaf
Later takes a limit over smaller indices. Dually, the earlier modality takes a colimit over larger indices: an element of at is a -element sitting at some object strictly above , carried down along a chosen morphism .
Earlier is left adjoint to later:
Under this adjunction, corresponds to
.
Definition. Later on families later-family
Conjugation with the adjunction between presheaves and families lets us induce a later construction on families from the one on presheaves,
Concretely, later on families evaluates to
Definition. Later on presheaves later-presheaf
The later modality for presheaves on a direct category is given by the presheaf of natural transformations
out of the strict downset.
An element of at is a coherent choice of -elements at all objects strictly smaller than .
Restriction in along precomposes with the induced map . At an object of minimal degree the strict downset is empty, so is trivial there.
Via functoriality, every presheaf restricts to smaller indices. Thus we may define the map
that sends an element over to the family of all its restrictions along morphisms from strictly lower objects.
Theorem. LΓΆb induction on families lob-family
Like later on families, the recursion principle for families is inherited from that on presheaves. Given a family and a step
the construction is a chain of transpositions with LΓΆb for presheaves used in the middle:
Just as for presheaves, the fixed point constructed above is unique: the two transpositions are bijections, and the presheaf-level fixed point is already unique.
Theorem. LΓΆb induction for presheaves on a direct category lob-presheaf
Let be a direct category and a presheaf on it. Every map
has a fixed point: a global element with
and this fixed point is unique.
The hypothesis says: the value of at any object is determined by its values over the strict past β turns a coherent family over the strict downset of into a value at . The proof is recursion along the well-founded : at each , the section already constructed over the past assembles into an element of , and extends it to .
Definition. Locally contractive endofunctors locally-contractive-functor
Write for the presheaf of morphisms . An endofunctor on presheaves is locally contractive when its action on morphisms factors through later: there is a map
The adjoint triple between presheaves and families presheaf-family-adjoint-triple
A family over is a set for each object , with no action of morphisms. Families form a category : a morphism is a function for each .
Forgetting the restriction maps of a presheaf gives a functor
It has both a left and a right adjoint,
The two adjoints demonstrate different means of forcing a family to be functorial. The right adjoint universally quantifies over morphisms in,
with restriction along given by precomposition. The left adjoint instead existentially quantifiers over morphisms out:
with restriction acting on the first component. (For we ask that have a set of objects, so that this sum is a set and thus defines a presheaf.)
Theorem. Presheaves are monadic and comonadic over families presheaves-monadic-comonadic-over-families
The adjoint triple induces a monad and a comonad on .
Both comparison functors are equivalences: presheaves are the EilenbergβMoore algebras of and the co-EilenbergβMoore coalgebras of ,
So presheaves are both monadic and comonadic over families.
Reading the algebra structure concretely: a -algebra on a family is a map for each , subject to the monad algebra laws β that is, exactly a functorial action of restriction.
The comonadic reading is the same structure seen from the elementβs side: a -coalgebra is a map , giving each value its restriction along every morphism into . Where the monad says restriction acts on values, the comonad says a value already carries all of its restrictions β and the coalgebra laws say it does so coherently.
Definition. Proper and maximal sieves proper-maximal-sieve
The representable is itself a sieve on . A sieve on is proper when it is not equal to the representable.
Say that a proper sieve is maximal when it contains all other proper sieves as a sub-sieve.
Definition. Sieves sieve
A sieve on an object of is a subobject of the representable presheaf : a presheaf with a monic morphism . Sieves are a generalization from the notion of ideal found in ring theory to category theory.
A morphism belongs to , written , when lies in the image of the inclusion at . Because is a presheaf and the inclusion is natural, membership is closed under precomposition:
A sieve is thus a βdownward closedβ collection of morphisms into .
Sieves on are ordered by refinement: when every morphism belonging to belongs to .
Theorem. Maximality of the strict downset among proper sieves strict-downset-maximal
Call a direct structure reflecting when every morphism between objects of equal degree is a split epimorphism. In a reflecting direct category, every non-invertible-in-degree morphism strictly raises degree, and the strict downset is as large as a proper sieve can be:
If the direct structure is reflecting, then every proper sieve on refines into the strict downset:
Suppose with of equal degree. By reflection has a section , and closure under precomposition gives , contradicting properness.
So every morphism in strictly raises degree. That is, every morphism in is also a member of .
Definition. The strict downset sieve of a direct category strict-downset-sieve
Let carry a direct structure. The strict downset of an object is the presheaf of morphisms into from strictly lower objects:
with restriction by precomposition β well defined since degrees are non-decreasing, so precomposing can only stay strictly below.
The evident inclusion makes a sieve on . It is moreover a proper sieve, as it exlcudes the identity.
Definition. Element of a Presheaf element-of-presheaf
An element of a presheaf at an object is an element of the set .
Definition. Universal Element of a Presheaf universal-element
A universal element of a presheaf on a category is an element , where is some object of , demonstrating that is representable by .
(Slightly) more concretely, a universal element is captured by the following three pieces of data
- An object of
- An element
- A proof that the map sending a morphism to is an equivalence
This third point states that morphisms from into are uniquely determined by an element of at the domain .
Or equivalently, universal elements are terminal in the category of elements.
What is a universal property, really? universal-property
Universal properties are a convenient method for defining an object in a category up to isomorphism. Rather than giving a concrete, bottom-up construction of an object, we can instead uniquely specify its behavior.
Consider the example of products in a category . We say that the product of and is any object of such that the following diagram commutes.
We say that satisfies the universal property of the product of and .
Surely this matches our set-based intuition of what a product should behave like. Similarly, we can sketch out constructions of other universal properties like initial objects, terminal objects, exponentials, etc. However, what is precisely meant by the term universal property?
The notion of a universal property is made precise by the notion of a universal element of a presheaf. That is, an object satisfies a universal property if we can build a universal element of the appropriate presheaf at that object.
Letβs look at the universal element characterization of the products example. Note that a map into a product is determined by a map into each component. To map into , we need both a map into and a map into , as in the above diagram. That is, to build a map , we must simultaneously provide elements of and at .
Using the product of presheaves, this means we are providing a single element of the presheaf . Quite nicely, the universal element of this presheaf provides the object of that is the product of and . The universal element, provided that it exists, contains the following data:
- An object
- An element
- A proof that the map sending to a pair of maps , is an equivalence. Therefore, any element of factors through
Recall that the product of presheaves is computed pointwise in the category of sets, so if we expand the type of the element above we find that is a pair of maps and .
The first part of this pair is precisely . Correspondingly, the second part of this pair is . Finally, the universality of the element (i.e. the proof that any other element factors through ) captures our commutative diagram from above.
This is a very rough sketch of what a universal property is, and has elided for now an important application of the Yoneda lemma. In any case, all a universal property is really saying is that a particular presheaf is representable; and, rather elegantly, a universal element of a presheaf is convenient packaging of that representability proof.
In summary, universal properties are not as ad-hoc as they may initially seem, and the language of presheaves provides a reusable and precise definition that can be instantiated to describe a very large class of properties.
Definition. Constant Presheaf constant-presheaf
The constant presheaf of a set on a category is a functor such that
I often call this the discrete presheaf for , but I donβt know if thatβs standard.
Finite Cardinal Arithmetic in a Topos finite-cardinal-arithmetic-topos
In a topos with a natural numbers object , you can define finite cardinals as objects that arise as the pullback along a morphism of the generic finite cardinal. Write for the cardinal corresponding to .
The above characterization is a little obtuse and does warrant some more explanation. One way to make it more concrete is that and , and that finite cardinals warrant a nice induction principle. If is a property expressible in the internal language such that satisfies , and that whenever satisfies then satisfies ; then every finite cardinal satisfies . That is, forms a -closed subobject of and thus is all of .
My working mental model is in a presheaf topos, where the natural numbers object can be defined explicitly as .
Definition 0.1. Constant Presheaf constant-presheaf
The constant presheaf of a set on a category is a functor such that
I often call this the discrete presheaf for , but I donβt know if thatβs standard.
The finite cardinals with respect to can be characterized then as,
These obey nice algebraic properties.
Definition. Category of Elements category-of-elements
Let be a presheaf on a category . The category of elements of is the displayed category over whose displayed objects over are the elements , and whose displayed morphisms over from to are proofs that .
Since is a set, there is at most one displayed morphism over each between given elements: a morphism of elements is a morphism of that happens to carry back to . Its total category is the classical category of elements , and a universal element of is exactly a terminal object of .
Theorem. Day Convolution is Closed day-closed-structure
Let be a symmetric monoidal closed category that is complete and cocomplete. Let be a small monoidal -enriched category and be -enriched presheaves on . Define
Then, for Day convolution ,
Proof. Proof that Day Convolution is Closed day-closed-structure-proof
For , the enriched hom in is given by the end:
β
Symmetrically, and , so the enriched presheaf category is biclosed [1].
Definition. Day Convolution day-convolution
Let be a symmetric monoidal closed category that is complete and cocomplete. Let be a small monoidal -enriched category. The Day convolution of -enriched presheaves is the enriched presheaf
with unit the representable .
Day convolution makes the enriched presheaf category a monoidal category, symmetric when is [1]. It is moreover closed.
Under the enriched Yoneda embedding the convolution of representables is representable, , so Day convolution is the cocontinuous extension of the tensor of .
As a Kan Extension
Equivalently, is the left Kan extension of along .
In
When , we recover the ordinary Day convolution of presheaves , where the formula simplifies to:
Theorem. Next on Grammars Is Presheaf Structure grammar-next-presheaf
For presheaves, restricts along the strict past, as in later on presheaves. A grammar is only a family over strings, so a map into the later on grammars is extra data. It sends a parse over to parses over every proper suffix of .
Let , so that . This is the comonad for the suffix order, and presheaves are comonadic over families. The counit law forces the first component of a coalgebra to be the identity. Hence:
- a presheaf on strings under the suffix order is the same as a grammar with a map that satisfies coassociativity. Restricting to and then to must agree with restricting to directly;
- for a proposition-valued grammar (a language), coassociativity is automatic, and exists exactly when the language is closed under suffixes. For example, has one, but does not, since is empty.
LΓΆb does not need on . The fixed-point equation only restricts a global parse , and a global parse can always be restricted. In the Agda, the grammar-level IsCoalgebra record, with only the field next, is in Grammar/Later/Coalgebra.agda on the guarded branch.
On presheaves the strict downset of is represented by , because every proper suffix of is a suffix of . So predecessors simplify later to . On grammars there is no such simplification, since the factors at different suffixes are unrelated.