For any small category C, FioretreatsC-sorted abstract syntax in the functor category [C,Pr(LC)] where L is some 2-monad on Cat; any such functor P denotes a set that is indexed in sorts and contexts (where the 2-monad L takes a category of sorts to the corresponding category of contexts). When C is a set and L is either finite limit or finite product completion, we recover the standard notions of many-sorted abstract syntax; in general, we get a variety of forms of dependently sorted or generalised abstract syntax.
We will assume here that L is the free finite limit completion 2-monad; our goal is to study Fiore’s general substitution monoidal structure from the point of view of classifying topoi, building on Johnstone’s analogous observations (Elephant, D3.2) on the non-symmetric monoidal structure of the object classifier. The topos theoretic viewpoint that we will explore is nothing more than a rephrasing of Fiore’s account in terms of the Kleisli composition in a 2-monad; nonetheless the perspective of classifying topoi is enlightening, as it provides an explanation for precisely what internal geometrical structure one expects in a given topos for abstract syntax, potentially leading to improved internal languages.
For any small category C, the category of presheaves Pr(LC) corresponds to the classifying topos of diagrams of shape C. Following Anel and Joyal, we shall write AC for this “affine” classifying topos; under the conventions of op. cit., we may then identify the category of sheaves ShAC with the presheaf category Pr(LC).
The universal property of AC as the classifying topos of C-diagrams means that for any topos X, a diagram CPShX corresponds essentially uniquely (by left Kan extension) to a morphism of topoi XPˉAC. We have a generic C-shaped diagramCGCShAC corresponding under this identification to the identity map on AC. More explicitly, the diagram GC is the following composite:
GC:≡CηCLCよCPr(LC)=ShAC
Given a morphism of topoi XfAC, we may recover the diagram C→ShX that it classifies as the composite CGCShACf∗ShX.
In case X≡AC, then, we have a correspondence between C-shaped diagrams of sheaves on AC and endomorphisms of AC; we are interested in representing the compositions of such endomorphisms as a tensor product on the functor category [C,ShAC].
In particular, let CP,QShAC be two diagrams; taking characteristic maps, we have endomorphisms of affine topoi ACPˉ,QˉAC, which we may compose to obtain ACQˉ∘PˉAC; then, we will define the tensor P∙Q to be the diagram whose characteristic morphism of affine topoi is Pˉ∘Qˉ. In other words:
To give an explicit computation of the tensor product, we first compute the inverse image of any ACfAC on representables よCΓ for Γ∈LC. As any left exact functor LCHE is the right Kan extension of CH∘ηCE along CηCLC, we can conclude that HΓ≅limΓ→ηCdH(ηCd). We will use this in our calculation below, setting H:≡f∗∘よC.
f∗よCΓ≅limΓ→ηCdf∗よCηCd≅limΓ→ηCdf∗GCd
We are now prepared to compute the tensor product of any CP,QShAC.
Above, we have written (⋅) and (⋔) for the tensoring and cotensoring of ShAC over Set respectively. Thus, the fully pointwise computation is as follows: