Buckets:
Title: Learnersโ Languages
URL Source: https://arxiv.org/html/2103.01189
Markdown Content: Back to arXiv
This is experimental HTML to improve accessibility. We invite you to report rendering errors. Use Alt+Y to toggle on accessible reporting links and Alt+Shift+Y to toggle off. Learn more about this project and help improve conversions.
Why HTML? Report Issue Back to Abstract Download PDF Abstract 1Introduction 2Constructions in ๐๐จ๐ฅ๐ฒ 3Toposes of learners
HTML conversions sometimes display errors due to content that did not convert correctly from the source. This paper uses the following packages that are not yet supported by the HTML conversion tool. Feedback on these issues are not necessary; they are known and are being worked on.
failed: dutchcal failed: biblatex
Authors: achieve the best HTML results from your LaTeX submissions by following these best practices.
License: arXiv.org perpetual non-exclusive license arXiv:2103.01189v3 [math.CT] null \addbibresource
LibrarySmall.bib
Learnersโ Languages David I. Spivak Topos Institute Berkeley USA david@topos.institute Abstract
In โBackprop as functorโ, the authors show that the fundamental elements of deep learningโgradient descent and backpropagationโcan be conceptualized as a strong monoidal functor ๐๐๐ซ๐ โข ( ๐๐ฎ๐ ) โ ๐๐๐๐ซ๐ง from the category of parameterized Euclidean spaces to that of learners, a category developed explicitly to capture parameter update and backpropagation. It was soon realized that there is an isomorphism ๐๐๐๐ซ๐ง โ ๐๐๐ซ๐ โข ( ๐๐๐๐ง๐ฌ ) , where ๐๐๐๐ง๐ฌ is the symmetric monoidal category of simple lenses as used in functional programming.
In this note, we observe that ๐๐๐๐ง๐ฌ is a full subcategory of ๐๐จ๐ฅ๐ฒ , the category of polynomial functors in one variable, via the functor ๐ด โฆ ๐ด โข ๐ ๐ด . Using the fact that ( ๐๐จ๐ฅ๐ฒ , โ ) is monoidal closed, we show that a map ๐ด โ ๐ต in ๐๐๐ซ๐ โข ( ๐๐๐๐ง๐ฌ ) has a natural interpretation in terms of dynamical systems (more precisely, generalized Moore machines) whose interface is the internal-hom type [ ๐ด โข ๐ ๐ด , ๐ต โข ๐ ๐ต ] .
Finally, we review the fact that the category ๐ โข
โข ๐๐จ๐๐ฅ๐ of dynamical systems on any ๐ โ ๐๐จ๐ฅ๐ฒ forms a topos, and consider the logical propositions that can be stated in its internal language. We give gradient descent as an example, and we conclude by discussing some directions for future work.
1Introduction
In the paper โBackprop as functorโ [fong2019backprop], the authors show that gradient descent and backpropagationโas used in deep learningโcan be conceptualized as a strong monoidal functor ๐ฟ : ๐๐๐ซ๐ โข ( ๐๐ฎ๐ ) โ ๐๐๐๐ซ๐ง from the category of parameterized euclidean spaces to that of learners, a category developed explicitly to capture parameter update and backpropagation. Here, ๐๐๐ซ๐ is a monad on the category of symmetric monoidal categories. It sends ( ๐ , ๐ผ , โ ) to a category with the same objects Ob โก ๐๐๐ซ๐ โข ( ๐ ) โ Ob โก ๐ , but with hom-sets that include a parameterizing object
๐๐๐ซ๐ ( ๐ ) ( ๐ 1 , ๐ 2 ) โ { ( ๐ , ๐ ) โฃ ๐ โ ๐ , ๐ : ๐ 1 โ ๐ โ ๐ 2 } / โผ
where the parameterizing object ๐ is considered up to an equivalence relation โผ .1 The composite of ๐ 1 โ ๐ 1 โ ๐ 2 and ๐ 2 โ ๐ 2 โ ๐ 3 in ๐๐๐ซ๐ โข ( ๐ ) has parameterizing object ๐ 1 โ ๐ 2 and is given by the ordinary composite
๐ 1 โ ( ๐ 1 โ ๐ 2 ) โ ๐ 2 โ ๐ 2 โ ๐ 3 .
The domain of the backpropagation functor, ๐๐๐ซ๐ โข ( ๐๐ฎ๐ ) , is thus the Para construction applied to the Cartesian monoidal category of Euclidean spaces โ ๐ and smooth maps.
But it was soon realized that ๐๐๐๐ซ๐ง is in fact also given by a Para construction, namely there is an isomorphism ๐๐๐๐ซ๐ง โ ๐๐๐ซ๐ โข ( ๐๐๐๐ง๐ฌ ) , where ๐๐๐๐ง๐ฌ is the symmetric monoidal category of simple lenses as used in functional programming. The objects of ๐๐๐๐ง๐ฌ are sets Ob โก ( ๐๐๐๐ง๐ฌ )
Ob โก ( ๐๐๐ญ ) , but a morphism consists of a pair of functions
๐๐๐๐ง๐ฌ โข ( ๐ด , ๐ต ) :- { ( ๐ 1 , ๐ โฏ ) โฃ ๐ 1 : ๐ด โ ๐ต , ๐ โฏ : ๐ด ร ๐ต โ ๐ด } .
(1)
Thus a map ๐ด โ ๐ต in ๐๐๐ซ๐ โข ( ๐๐๐๐ง๐ฌ ) consists of a set ๐ and functions ๐ 1 : ๐ด ร ๐ โ ๐ต and ๐ โฏ : ๐ด ร ๐ต ร ๐ โ ๐ด ร ๐ . The authors of [fong2019backprop] developed this structure in order to conceptualize the compositional nature of deep learning as comprising a parameterizing set ๐ (often called โthe space of weights and biasesโ) and three functions:
๐ผ
: ๐ด ร ๐ โ ๐ต implement
๐
: ๐ด ร ๐ต ร ๐ โ ๐ update
๐
: ๐ด ร ๐ต ร ๐ โ ๐ด request (2)
The implement function is a ๐ -parameterized function ๐ด โ ๐ต , and the update and request functions take a pair ( ๐ , ๐ ) of โtraining dataโ and both updates the parameterโe.g. by gradient descentโand returns an element of the input space ๐ด , which is used to train another such function in the network. This last stepโthe requestโis not just found in deep learning as practiced, but is in fact crucial for defining composition.2
But by this point, the notation ( ๐ , ๐ผ , ๐ , ๐ ) of ๐๐๐๐ซ๐ง has become heavy and the structure seems to be getting lost. Even knowing ๐๐๐๐ซ๐ง โ ๐๐๐ซ๐ โข ( ๐๐๐๐ง๐ฌ ) seems ad-hoc since the morphisms (1) of ๐๐๐๐ง๐ฌ areโto this pointโmathematically unmotivated. This is where ๐๐จ๐ฅ๐ฒ comes in.
In this note, we observe that ๐๐๐๐ง๐ฌ is a full subcategory of ๐๐จ๐ฅ๐ฒ , the category of polynomial functors in one variable, via the functor ๐ด โฆ ๐ด โข ๐ ๐ด . Using the fact that ( ๐๐จ๐ฅ๐ฒ , โ ) is monoidal closed, we will reconceptualize ๐๐๐ซ๐ โข ( ๐๐๐๐ง๐ฌ ) in terms of polynomial coalgebras, which can be understood as dynamical systems: machines with states that can be observed as โoutputโ and updated based on โinputโ [jacobs2017introduction]. In particular, a morphism ๐ด โ ๐ต in ๐๐๐๐ซ๐ง will be recast as a coalgebra on the internal hom polynomial [ ๐ด โข ๐ ๐ด , ๐ต โข ๐ ๐ต ] , and we will explain this in terms of dynamics.
This viewpoint allows us to substantially generalize the construction in ๐๐๐๐ซ๐ง , a construction which also appears prominently in the theory of open games [ghani2016compositional]. Perhaps more interestingly, it allows us to use the fact that the category ๐ โข
โข ๐๐จ๐๐ฅ๐ of dynamical systems on any interface ๐ โ ๐๐จ๐ฅ๐ฒ forms a topos. A topos is a setting in which one can do dependent type theory and higher-order logic. In fact, the topos of ๐ -coalgebras is in some ways as simple as possible: it is not only a copresheaf topos ๐ โข
โข ๐๐จ๐๐ฅ๐ โ ๐๐๐ญ ๐ for a certain category ๐ , but in fact the site ๐ is the free category on a directed graph that weโll call ๐ณ๐๐พ๐พ ๐ . This makes the logic of ๐ -coalgebrasโand hence of dynamical systems, learners, and game-playersโquite simple. However, the particular graph ๐ณ๐๐พ๐พ ๐ associated to ๐ is highly-structured, and we should find that this structure is inherited by the internal language of ๐ โข
โข ๐๐จ๐๐ฅ๐ .
The point is to consider logical propositions that can be stated in the internal language of ๐ โข
โข ๐๐จ๐๐ฅ๐ and to use these propositions in order to constrain the behavior of learners and game-players (categorified as discussed above), and of interaction patterns between dynamical systems more generally. For example, โgradient descent and backpropagationโ is a property we can express in the internal language. Note that the term language in the title refers to the internal language of the topos ๐ โข
โข ๐๐จ๐๐ฅ๐ , which can be thought of as a language for specifying or constraining learning algorithms or dynamic organizational patterns more generally.
Plan for the paper
In Section 2 we will discuss various relevant constructions in the category ๐๐จ๐ฅ๐ฒ of polynomial functors in one variable. In particular, we will review its symmetric monoidal closed structure ( ๐๐จ๐ฅ๐ฒ , ๐ , โ , [ โ , โ ] ) , its composition monoidal structure ( ๐ , โ ) , and the notion of coalgebras. We explain how morphisms in ๐๐๐๐ซ๐ง can be phrased in terms of coalgebras on internal hom objects, and we reconstruct ๐๐๐ซ๐ โข ( ๐๐๐๐ง๐ฌ ) in these terms.
In Section 3, we first show that the category ๐ โข
โข ๐๐จ๐๐ฅ๐ of ๐ -coalgebras for the endofunctor ๐ : ๐๐๐ญ โ ๐๐๐ญ is a presheaf topos. We then discuss the internal logic of ๐ โข
โข ๐๐จ๐๐ฅ๐ , and we conclude by giving several directions for future work.
Notation
We denote the category of sets by ๐๐๐ญ ; we generally denote sets with upper-case letters ๐ด , ๐ต , etc. Given a natural number ๐ โ โ , we write ๐ญ โ { 1 , โฆ , ๐ } , so 0
โ , 1
{ 1 } , 2
{ 1 , 2 } , etc. Given sets ๐ด , ๐ต , we often write ๐ด โข ๐ต โ ๐ด ร ๐ต to denote their Cartesian product. We will denote polynomials with lower-case letters, ๐ , ๐ , etc.
Acknowledgments
We thank David A. Dalrymple, Dai Girardo, Paul Kreiner, David Jaz Myers, and Alex Zhu for useful conversations. We also acknowledge support from AFOSR grant FA9550-20-10348.
2Constructions in ๐๐จ๐ฅ๐ฒ
In this section we review the category ๐๐จ๐ฅ๐ฒ , for which [kock2012polynomial] is an excellent reference; we also discuss its symmetric monoidal closed structure. Then we discuss polynomial coalgebras and reconceptualize the category ๐๐๐๐ซ๐ง and Gavranoviฤโs bicategorical variant, in that language.
2.1Background on ๐๐จ๐ฅ๐ฒ as a monoidal closed category
For any set ๐ด , let ๐ ๐ด : ๐๐๐ญ โ ๐๐๐ญ be the functor represented by ๐ด ; that is, ๐ ๐ด applied to a set ๐ is ๐๐๐ญ โข ( ๐ด , ๐ ) โ ๐ ๐ด . In particular, ๐ โ ๐ 1 is (isomorphic to) the identity functor ๐ โฆ ๐ and 1 โ ๐ 0 is the constant functor ๐ โฆ 1 . Note that ๐ ๐ด โข ( 1 ) โ 1 ๐ด โ 1 for any ๐ด .
The coproduct of functors ๐น and ๐บ , denoted ๐น + ๐บ , is taken pointwise; this means there is a natural isomorphism
( ๐น + ๐บ ) โข ( ๐ ) โ ๐น โข ( ๐ ) + ๐บ โข ( ๐ )
where the coproduct ๐น โข ( ๐ ) + ๐บ โข ( ๐ ) is taken in ๐๐๐ญ . Similarly, for any set ๐ผ and functors ๐น ๐ , one for each ๐ โ ๐ผ , their coproduct is computed pointwise
( โ ๐ โ ๐ผ ๐น ๐ ) โข ( ๐ ) โ โ ๐ โ ๐ผ ๐น ๐ โข ( ๐ ) .
Definition 2.1.
A polynomial functor ๐ is any coproduct
๐ โ โ ๐ โ ๐ผ ๐ ๐ โข [ ๐ ]
of representable functors, where ๐ผ โ ๐๐๐ญ and each ๐ โข [ ๐ ] โ ๐๐๐ญ are sets. We denote the category of polynomial functors and natural transformations between them by ๐๐จ๐ฅ๐ฒ .
We note that if ๐
โ ๐ โ ๐ผ ๐ ๐ โข [ ๐ ] then ๐ โข ( 1 ) โ ๐ผ ; hence we can write any ๐ โ ๐๐จ๐ฅ๐ฒ in canonical form
๐ โ โ ๐ โ ๐ โข ( 1 ) ๐ ๐ โข [ ๐ ] .
(3)
We refer to each ๐ โ ๐ โข ( 1 ) as a position in ๐ and to each ๐ โ ๐ โข [ ๐ ] as a direction at ๐ .
Example 2.2.
We can consider any set ๐ as a constant polynomial โ ๐ โ ๐ ๐ 0 .
We can consider a polynomial ๐ โ ๐๐จ๐ฅ๐ฒ as a set (or discrete category) ๐ โข ( 1 ) equipped with a functor ๐ โข [ โ ] : ๐ โข ( 1 ) โ ๐๐๐ญ . Then a map of polynomials ๐ : ๐ โ ๐ can be identified with a diagram as follows
๐ โข ( 1 ) ๐ โข ( 1 ) ๐๐๐ญ ๐ 1 ๐ โข [ โ ] โ ๐ โฏ ๐ โข [ โ ]
(4)
That is, ๐ can be decomposed into a function ๐ 1 : ๐ โข ( 1 ) โ ๐ โข ( 1 ) on positions, and for every ๐ โ ๐ โข ( 1 ) with ๐ โ ๐ 1 โข ( ๐ ) , a component function ๐ ๐ โฏ : ๐ โข [ ๐ ] โ ๐ โข [ ๐ ] on directions. This follows from the Yoneda lemma and the universal property of coproducts. We will sometimes use this ( ๐ 1 , ๐ โฏ ) : ๐ โ ๐ notation below.
Example 2.3.
A morphism ๐ด 1 โข ๐ ๐ด 2 โ ๐ต 1 โข ๐ ๐ต 2 can be identified with a function ๐ 1 : ๐ด 1 โ ๐ต 1 and a function ๐ โฏ : ๐ด 1 ร ๐ต 2 โ ๐ด 2 . That is,
๐๐จ๐ฅ๐ฒ โข ( ๐ด 1 โข ๐ ๐ด 2 , ๐ต 1 โข ๐ ๐ต 2 ) โ ๐ต 1 ๐ด 1 โข ๐ด 2 ๐ด 1 โข ๐ต 2 .
(5) Proposition 2.4.
The composite of polynomial functors ๐ , ๐ โ ๐๐จ๐ฅ๐ฒ , which we denote ๐ โ ๐ , is again polynomial with formula
๐ โ ๐ โ โ ๐ โ ๐ โข ( 1 ) โ ๐ : ๐ โข [ ๐ ] โ ๐ โข ( 1 ) ๐ โ ๐ โ ๐ โข [ ๐ ] ๐ โข [ ๐ โข ๐ ]
(6)
The composition operation โ is a (nonsymmetric) monoidal structure on ๐๐จ๐ฅ๐ฒ , with unit ๐ .
Proof.
See page A. โ
Example 2.5.
If ๐
๐ 2 and ๐
๐ + 1 , then ๐ โ ๐ โ ๐ 2 + 2 โข ๐ + 1 whereas ๐ โ ๐ โ ๐ 2 + 1 .
Example 2.6.
Applying a polynomial ๐ to a set ๐ is given by composition: ๐ โข ( ๐ ) โ ๐ โ ๐ .
Proposition 2.7 (The symmetric monoidal category ( ๐๐จ๐ฅ๐ฒ , ๐ , โ ) ).
The category ๐๐จ๐ฅ๐ฒ has a symmetric monoidal structure with unit ๐ and monoidal product โ on objects given by the following formula
๐ โ ๐ โ โ ๐ โ ๐ โข ( 1 ) โ ๐ โ ๐ โข ( 1 ) ๐ ๐ โข [ ๐ ] ร ๐ โข [ ๐ ]
Proof.
See page A. โ
Proposition 2.8 (Internal hom [ โ , โ ] ).
The โ monoidal structure on ๐๐จ๐ฅ๐ฒ is closed; that is, for every ๐ , ๐ โ ๐๐จ๐ฅ๐ฒ there is a polynomial
[ ๐ , ๐ ] โ โ ๐ : ๐ โ ๐ ๐ โ ๐ โ ๐ โข ( 1 ) ๐ โข [ ๐ 1 โข ( ๐ ) ]
(7)
for which we have a natural isomorphism
๐๐จ๐ฅ๐ฒ โข ( ๐ โ ๐ , ๐ ) โ ๐๐จ๐ฅ๐ฒ โข ( ๐ , [ ๐ , ๐ ] ) .
(8) Proof.
See page A. โ
Example 2.9.
Given sets ๐ด and ๐ต , we use Eqs. 5 and 7 to compute that the internal hom between ๐ด โข ๐ ๐ด and ๐ต โข ๐ ๐ต is
[ ๐ด โข ๐ ๐ด , ๐ต โข ๐ ๐ต ] โ ๐ต ๐ด โข ๐ด ๐ด โข ๐ต โข ๐ ๐ด โข ๐ต .
The counit of the adjunction (8) is a natural map eval : ๐ โ [ ๐ , ๐ ] โ ๐ called evaluation. In very much the same way, it induces two sorts of morphisms we will use later:
[ ๐ 1 , ๐ 1 ] โ [ ๐ 2 , ๐ 2 ] โ [ ๐ 1 โ ๐ 2 , ๐ 1 โ ๐ 2 ] and [ ๐ , ๐ ] โ [ ๐ , ๐ ] โ [ ๐ , ๐ ] .
(9) 2.2Coalgebras, generalized Moore machines, and learners
Coalgebras for endofunctors ๐น : ๐๐๐ญ โ ๐๐๐ญ form a major topic of study [arbib1982parametrized, adamek2005introduction, jacobs2017introduction]. In this section we recall the definition and explain the relevance to dynamical systems (generalized Moore machines) and learners.
Definition 2.10 (Coalgebra).
Given a polynomial ๐ , a ๐ -coalgebra is a pair ( ๐ , ๐ฝ ) where ๐ โ ๐๐๐ญ and ๐ฝ : ๐ โ ๐ โ ๐ . A ๐ -coalgebra morphism from ( ๐ , ๐ฝ ) to ( ๐ โฒ , ๐ฝ โฒ ) consists of a function ๐ : ๐ โ ๐ โฒ such that the following diagram commutes:
๐ ๐ โ ๐ ๐ โฒ ๐ โ ๐ โฒ ๐ฝ ๐ ๐ โ ๐ ๐ฝ โฒ
(10)
We denote the category of ๐ -coalgebras and their morphisms by ๐ โข
โข ๐๐จ๐๐ฅ๐ .
Proposition 2.11.
A ๐ -coalgebra ( ๐ , ๐ฝ ) can be identified with a map of polynomials
๐ โข ๐ ๐ โ ๐ .
(11) Proof.
One finds an isomorphism ๐๐จ๐ฅ๐ฒ โข ( ๐ , ๐ โ ๐ ) โ ๐๐จ๐ฅ๐ฒ โข ( ๐ โข ๐ ๐ , ๐ ) by direct calculation. โ
Warning 2.12.
Looking at Proposition 2.11, one might be tempted to think that a map of ๐ -coalgebras as in (10) can be identified with a commuting triangle
๐ โข ๐ ๐ ๐ โฒ โข ๐ ๐ โฒ ๐ ?
but this is not the case; for one thing, the marked arrow does not arise from a function ๐ : ๐ โ ๐ โฒ . The point is, (11) can be misleading when it comes to maps, and hence we will depart from the so-called ๐๐๐ซ๐ construction for 2-cells. For us, the correct sort of map between ๐ -coalgebras is the usual one, as shown in (10).
Proposition 2.13.
For any ๐ , ๐ โ ๐๐จ๐ฅ๐ฒ there is a functor
๐ โข
โข ๐๐จ๐๐ฅ๐ ร ๐ โข
โข ๐๐จ๐๐ฅ๐ โ ( ๐ โ ๐ ) โข
โข ๐๐จ๐๐ฅ๐
making โ
โข ๐๐จ๐๐ฅ๐ a lax monoidal functor ๐๐จ๐ฅ๐ฒ โ ๐๐๐ญ .
Proof.
See page A. โ
The relevance of coalgebras to dynamics was of interest in the earliest of references we know of, namely [arbib1982parametrized], where they are referred to as codynamics. We will proceed with our own terminology.
Definition 2.14 (Moore machine).
For sets ๐ด , ๐ต , an ( ๐ด , ๐ต ) -Moore machine consists of
โข
a set ๐ , elements of which are called states,
โข
a function ๐ : ๐ โ ๐ต , called readout, and
โข
a function ๐ข : ๐ ร ๐ด โ ๐ , called update.
It is further called initialized if it is equipped with an element ๐ 0 โ ๐ .
With an initialized ( ๐ด , ๐ต ) -Moore machine ( ๐ , ๐ , ๐ข , ๐ 0 ) , we can take any ๐ด -stream ๐ : โ โ ๐ด and produce a ๐ต -stream ๐ : โ โ ๐ต inductively using the formula
๐ ๐ + 1 โ ๐ข โข ( ๐ ๐ , ๐ ๐ ) and ๐ ๐ โ ๐ โข ( ๐ ๐ ) .
Proposition 2.15.
An ( ๐ด , ๐ต ) -Moore machine with states ๐ can be identified with a map of polynomials ๐ โข ๐ ๐ โ ๐ต โข ๐ ๐ด , and hence with a ๐ต โข ๐ ๐ด -coalgebra ๐ โ ๐ต โข ๐ ๐ด โ ๐ by Proposition 2.11.
Proof.
The identification uses ๐ 1 โ ๐ and ๐ โฏ โ ๐ข . โ
Replacing ๐ต โข ๐ ๐ด with an arbitrary polynomial ๐ โ ๐๐จ๐ฅ๐ฒ , we think of ๐ -coalgebras as generalized Moore machines. We will refer to them as ๐ -dynamical systems and call ๐ the interface. Mathematically, given ๐ฝ : ๐ โ ๐ โ ๐ , we also get the two-fold composite
๐ โ ๐ฝ ๐ โ ๐ โ ๐ โ ๐ฝ ๐ โ ๐ โ ๐
and indeed the ๐ -fold composite ๐ โ ๐ โฒ ๐ โ ๐ for any ๐ โ โ . The idea is that for every state ๐ โ ๐ , we get a position ๐ โข ( ๐ ) โ ๐ โข ( 1 ) , and for every direction ๐ โ ๐ โข [ ๐ โข ( ๐ ) ] there, we get a new state ๐ข โข ( ๐ , ๐ ) . We thus think of ๐ as an interface for the dynamical system: ๐ โข ( 1 ) says what the world can see about the current stateโi.e. its outward position ๐ โ ๐ โข ( ๐ ) โand ๐ โข [ ๐ ] says what sort of forces or inputs the state can be subjected to.
A map of polynomials ๐ : ๐ โ ๐ โฒ is a change of interface. We can transform a ๐ -dynamical system into a ๐ โฒ -dynamical system that has the same set of states. Indeed, simply compose any ๐ โ ๐ โ ๐ with ๐ โ ๐ : ๐ โ ๐ โ ๐ โฒ โ ๐ .
More generally, a map ๐ : ๐ 1 โ โฏ โ ๐ ๐ โ ๐ โฒ allows us to take ๐ -many dynamical systems ๐ 1 โ ๐ 1 โ ๐ 1 through ๐ ๐ โ ๐ ๐ โ ๐ ๐ and use Proposition 2.13 to combine them into a single dynamical system
๐ โ ( ๐ 1 โ โฏ โ ๐ ๐ ) โ ๐ โ ๐ ๐ โฒ โ ๐
with interface ๐ โฒ and states ๐ โ ๐ 1 ร โฏ ร ๐ ๐ .
Example 2.16.
Wiring diagrams are one way of combining dynamical systems as above.
๐
Plant Controller ๐ด ๐ต ๐ถ Controlled_Plant
(12)
In the wiring diagram (12) three boxes are shown: the controller, the plant, and the system; we can consider each as having a monomial interface:
Plant
๐ถ โข ๐ ๐ด โข ๐ต Controller
๐ต โข ๐ ๐ถ Controlled_Plant
๐ถ โข ๐ ๐ด .
(13)
The wiring diagram itself represents a morphism
๐ : ๐ถ โข ๐ ๐ด โข ๐ต โ ๐ต โข ๐ ๐ถ โ ๐ถ โข ๐ ๐ด
in ๐๐จ๐ฅ๐ฒ . Defining ๐ requires a function ๐ 1 : ๐ถ ร ๐ต โ ๐ถ and a function ๐ โฏ : ๐ถ ร ๐ต ร ๐ด โ ๐ด ร ๐ต ร ๐ถ ; the first is projection and the second is an isomorphism. Together these simply say how the wiring diagram shuttles information within the controlled plant. Indeed, the wiring diagram lets us put together dynamics of the controller and the plant to give dynamics for the controlled plant. That is, given Moore machines ๐ โข ๐ ๐ โ Plant and ๐ โข ๐ ๐ โ Controller , we get a Moore machine ๐ โข ๐ โข ๐ ๐ โข ๐ โ Controlled_Plant .
More generally, we can think of transistors in a computer as dynamical systems, and the logic gates, adder circuits, memory circuits, a connected keyboard or monitor, etc. each as a wiring diagram comprising these simpler systems.
Example 2.17.
In Example 2.16 the wiring pattern is fixed, but as we show in [spivak2020poly], ๐๐จ๐ฅ๐ฒ also supports wiring diagrams for dynamical systems that can change their interaction pattern based on their internal states.
We now come to learners. As mentioned in the introduction, the category ๐๐๐๐ซ๐ง from [fong2019backprop] is better understood as a bicategory which weโll denote ๐ โข ๐๐๐ซ๐ง . Its objects are sets, Ob โก ( ๐ โข ๐๐๐ซ๐ง )
Ob โก ( ๐๐๐ญ ) , a 1-morphism (learner) from ๐ด to ๐ต consists of a set ๐ and maps ๐ผ : ๐ด ร ๐ โ ๐ต and ( ๐ , ๐ ) : ๐ด ร ๐ต ร ๐ โ ๐ด ร ๐ , and a 2-morphismโa morphism between learnersโis a function ๐ : ๐ โ ๐ โฒ making the following squares commute:
๐ด ร ๐ ๐ต ๐ด ร ๐ โฒ ๐ต ๐ผ ๐ด ร ๐ ๐ผ โฒ ๐ด ร ๐ต ร ๐ ๐ด ร ๐ ๐ด ร ๐ต ร ๐ โฒ ๐ด ร ๐ โฒ ( ๐ , ๐ ) ๐ด ร ๐ต ร ๐ ๐ด ร ๐ ( ๐ โฒ , ๐ โฒ )
(14)
We denote the category of learners from ๐ด to ๐ต as ๐ โข ๐๐๐ซ๐ง โข ( ๐ด , ๐ต ) โ ๐๐๐ญ .
Proposition 2.18.
For sets ๐ด , ๐ต , there is an equivalence of categories
๐ โข ๐๐๐ซ๐ง โข ( ๐ด , ๐ต ) โ [ ๐ด โข ๐ ๐ด , ๐ต โข ๐ ๐ต ] โข
โข ๐๐จ๐๐ฅ๐ .
Proof.
See page A. โ
We will now give a definition that generalizes the bicategory ๐ โข ๐๐๐ซ๐ง , give examples, and discuss intuition. In particular, we define a category-enriched operad ๐ โข ๐ซ๐ , which includes ๐ โข ๐๐๐ซ๐ง as a full subcategory.
Definition 2.19 (The operad ๐ โข ๐ซ๐ ).
We define ๐ โข ๐ซ๐ to be the category-enriched operad defined as follows. The objects of ๐ โข ๐ซ๐ are polynomials: Ob โก ( ๐ โข ๐ซ๐ ) โ Ob โก ( ๐๐จ๐ฅ๐ฒ ) . For objects ๐ 1 , โฆ , ๐ ๐ , ๐ โฒ , the category of maps between them is defined by
๐ โข ๐ซ๐ โข ( ๐ 1 , โฆ , ๐ ๐ ; ๐ โฒ ) โ [ ๐ 1 โ โฏ โ ๐ ๐ , ๐ โฒ ] โข
โข ๐๐จ๐๐ฅ๐ .
For any object ๐ , the identity on ๐ is given by the [ ๐ , ๐ ] -coalgebra 1 โ [ ๐ , ๐ ] โข ( 1 ) โ ๐๐จ๐ฅ๐ฒ โข ( ๐ , ๐ ) that sends 1 โฆ id ๐ .
Given objects ๐ 1 , 1 , โฆ , ๐ 1 , ๐ 1 , โฆ , ๐ ๐ , 1 , โฆ , ๐ ๐ , ๐ ๐ , the composition functor
[ ๐ 1 , 1 โ โฏ โ ๐ 1 , ๐ 1 , ๐ 1 ] โข
โข ๐๐จ๐๐ฅ๐ ร โฏ ร [ ๐ ๐ , 1 โ โฏ โ ๐ ๐ , ๐ ๐ , ๐ ๐ ] โข
โข ๐๐จ๐๐ฅ๐
ร [ ๐ 1 โ โฏ โ ๐ ๐ , ๐ โฒ ]
๐๐จ๐๐ฅ๐ โ [ ๐ 1 , 1 โ โฏ โ ๐ ๐ , ๐ ๐ , ๐ โฒ ]
๐๐จ๐๐ฅ๐
is given by repeated application of the maps in (9) and Proposition 2.13.
How do we think of a morphism ( ๐ , ๐ฝ ) : ( ๐ 1 , โฆ , ๐ ๐ ) โ ๐ โฒ in ๐ โข ๐ซ๐ ? It is a dynamical system which has a set ๐ of states. For every state ๐ โ ๐ , we can read out an associated element ๐ฝ 1 โข ( ๐ ) : ๐ 1 โ โฏ โ ๐ ๐ โ ๐ โฒ ; we can think of this as a wiring diagram as in Example 2.16 or a generalization thereof. That is, the current state ๐ dictates an organization pattern ๐ฝ 1 โข ( ๐ ) : how outputs of the internal systems are aggregated and output from the outer interface, and how feedback from outside is distributed internally.
But so far, this is only the readout of ๐ฝ . Whatโs an input? An input to this system consists of a tuple of outputs ๐ โ ( ๐ 1 , โฆ , ๐ ๐ ) โ ๐ 1 โข ( 1 ) ร โฏ ร ๐ ๐ โข ( 1 ) , one output for each of the internal systems, together with an input ๐ โ ๐ โฒ โข [ ๐ฝ 1 โข ( ๐ ) ] to the outer system.
Imagine youโre the officer in charge of an organization: youโre in charge of the system by which your employees and other resources are arranged, how they send information to each other and the outside world, and how the feedback from the outside world is disbursed to the employees and resources. You see what they do, you see how the world responds, and you update your internal state and hence the system itself, however you see fit. In this image, you as the officer are playing the role of ( ๐ , ๐ฝ ) , i.e. a morphism in ๐ โข ๐ซ๐ . But even a simple logic gate or adder circuit in a computerโsomething that doesnโt have a changing internal state or update how resources are connectedโcounts as a morphism in ๐ โข ๐ซ๐ . Again, the only difference in that case is that the state set ๐ โ 1 , the way the internal resources are connectedโis unchanged by inputs.
Example 2.20.
For any operad, there is an algebra of 0 -ary morphisms. In the case of ๐ โข ๐ซ๐ , this algebra sends ๐ โฆ ๐ โข
โข ๐๐จ๐๐ฅ๐ , the category of dynamical systems on ๐ , since the unit of โ is ๐ and [ ๐ , ๐ ] โ ๐ .
Next weโll give a mathematical language for describing dynamical systems as in Example 2.20 as well as the generalized learners (or officers) described above.
3Toposes of learners
We ended the previous section by defining the (category-enriched) operad ๐ โข ๐ซ๐ and explaining how it generalizes the bicategory ๐ โข ๐๐๐ซ๐ง . In this section we mainly discuss the internal language for each learner. That is, given ๐ , ๐ โฒ โ Ob โก ( ๐๐จ๐ฅ๐ฒ )
Ob โก ( ๐ โข ๐ซ๐ ) , where perhaps ๐
๐ 1 โ โฏ โ ๐ ๐ , we discuss the category ๐ โข ๐ซ๐ โข ( ๐ ; ๐ โฒ ) of such learners.
Our first job is to show that every such category is a topos; this will give us access to the Mitchell-Benabou language and Kripke-Joyal semanticsโthe so-called internal language of the topos and its interpretation [macLane1992sheaves]. We then explain the sorts of thingsโpropositionsโthat one can express in this language, e.g. the proposition โI will follow the gradient descent algorithmโ is a particular case.
3.1The topos of ๐ -coalgebras
In this section, we show that for any polynomial ๐ , there is a category ๐ ๐ , called the cofree category on ๐ , for which we can find an equivalence
๐ โข
โข ๐๐จ๐๐ฅ๐ โ ๐ ๐ โข
โข ๐๐๐ญ
between ๐ -coalgebras and functors ๐ ๐ โ ๐๐๐ญ . In fact, the category ๐ ๐ is free on a graph, making it quite easy to understand in certain respects.3
Following [nlab:tree], we define a rooted tree to be a graph ๐ whose free category has an initial object, called the root; the idea is that for any node ๐ , there is exactly one path from the root to ๐ . We denote the nodes of ๐ by ๐ 0 , the root by root ๐ โ ๐ 0 , and for any node ๐ โ ๐ 0 we denote the set of arrows emanating from ๐ by ๐ โข [ ๐ ] . Note that at the target ๐ โฒ of any arrow ๐ โ ๐ โข [ ๐ ] , there sits another rooted tree with root ๐ โฒ ; we denote this tree by cod ๐ โก ( ๐ ) .
Definition 3.1 (The graph ๐ณ๐๐พ๐พ ๐ of ๐ -trees).
For a polynomial ๐ โ ๐๐จ๐ฅ๐ฒ , define a ๐ -tree to be a tuple ( ๐ , ๐ 1 , ๐ โฏ ) , where ๐ is a rooted tree, ๐ 1 : ๐ 0 โ ๐ โข ( 1 ) is a function called the position function, and ๐ ๐ โฏ is a bijection
๐ ๐ โฏ : ๐ โข [ ๐ 1 โข ( ๐ ) ] โ โ ๐ โข [ ๐ ]
for each node ๐ โ ๐ 0 , identifying the set of branches in the tree ๐ at node ๐ with the set of directions in the polynomial ๐ at the position ๐ 1 โข ( ๐ ) .
We denote by ๐ณ๐๐พ๐พ ๐ the graph whose vertex set is the set of ๐ -trees, and for which an arrow ๐ : ๐ โ ๐ โฒ is a branch ๐ โ ๐ โข [ root ๐ ] with ๐ โฒ
cod ๐ โก ( ๐ ) .
Example 3.2.
If ๐
๐ ๐ด for a nonempty set ๐ด then there is only one ๐ -tree: each node has the unique label ๐ โข ( 1 ) โ 1 and ๐ด -many branches.
If ๐
{ go } โข ๐ 1 + { stop } โข ๐ 0 โ ๐ + 1 then counting the number of nodes gives a bijection between set of ๐ -trees and the set โ โช { โ }
โ stop , โ go โ โ stop , โ go โ โ go โ โ stop , โฆ , โ go โ โ go โ โ go โ โฏ
Theorem 3.3.
For any polynomial ๐ there is an equivalence of categories
๐ โข
โข ๐๐จ๐๐ฅ๐ โ ๐๐ซ๐๐ ๐ โข
โข ๐๐๐ญ
where ๐๐ซ๐๐ ๐ is the free category on the graph ๐ณ๐๐พ๐พ ๐ of ๐ -trees.
Proof.
See page A. โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
Figure 1:Left: a dynamical system, i.e. coalgebra, for the polynomial
๐
โ
{
โ
,
โ
}
๐
2
+
โ
โ
2
๐
2
+
1
. Right: the
๐
-tree corresponding to the node
โ
.
3.2The internal language of
๐
โข
โข ๐๐จ๐๐ฅ๐
For any category ๐ , the category ๐ โข
โข ๐๐๐ญ of functors ๐ โ ๐๐๐ญ forms a topos. In particular, this means that mathematicians have already developed a language and logic that faithfully represents the structures of ๐ โข
โข ๐๐๐ญ , and we can import it wholesale; see [fong2019seven, Chapter 7] or [macLane1992sheaves, Chapter VI]. Now that we know from Theorem 3.3 that ๐ โข
โข ๐๐จ๐๐ฅ๐ is a topos for any ๐ โ ๐๐จ๐ฅ๐ฒ , we are interested in corresponding language for the topos ๐ โข ๐๐๐ซ๐ง โข ( ๐ด , ๐ต )
[ ๐ด โข ๐ ๐ด , ๐ต โข ๐ ๐ต ] โข
โข ๐๐จ๐๐ฅ๐ of learners, for any sets ๐ด , ๐ต ; hence the title โlearnersโ languages.โ However since most of the relevant abstractions work more generally for ๐ โข
โข ๐๐จ๐๐ฅ๐ , weโll mainly work there.
Not assuming the reader knows topos theory, we will proceed as though we are defining the few relevant concepts from scratch, when in actuality we are merely โreading them offโ from the established literature. For example Definition 3.4 simply unpacks the topos-theoretic definition of a logical proposition as a subobject of the terminal object in the topos ๐ โข
โข ๐๐จ๐๐ฅ๐ .
Definition 3.4.
A logical proposition (about ๐ -coalgebras) is defined to be a set ๐ โ ๐ณ๐๐พ๐พ ๐ of ๐ -trees satisfying the condition that if ๐ โ ๐ is a tree in ๐ , then for any direction ๐ โ ๐ โข [ root ๐ ] , the tree cod ๐ โก ( ๐ ) โ ๐ is also a tree in ๐ .
Proposition 3.5 gives us an easy way to construct logical propositions about ๐ -coalgebras, and hence learners. Namely, it says if we put a condition on the ๐ -positions that can show up as labels, and if we put a condition on the codomain map (how directions in the tree lead to new positions), we get a logical proposition. Of course, these arenโt the only ones, but they form a nice special case.
Recall from Definition 3.1 that a ๐ -tree is a rooted tree ๐ equipped with a position function ๐ 1 : ๐ 0 โ ๐ โข ( 1 ) ; we elide the bijections (earlier denoted ๐ ๐ โฏ : ๐ โข [ ๐ ] โ ๐ โข [ ๐ 1 โข ( ๐ ) ] ) in what follows.
Proposition 3.5.
Given ๐ โ ๐๐จ๐ฅ๐ฒ , suppose given subsets
๐ โ ๐ โข ( 1 ) and ๐ โ โ ๐ โ ๐ โ ๐ โ ๐ โข [ ๐ ] ๐ .
Then the following set of trees is a logical proposition:
๐ ๐ ๐ โ { ๐ โ ๐ณ๐๐พ๐พ ๐ โฃ โ ( ๐ : ๐ 0 ) . ๐ 1 ( ๐ ) โ ๐ โง โ ( ๐ : ๐ [ ๐ ] ) . cod ๐ ( ๐ ) โ ( ๐ ๐ ๐ ) } .
Proof.
The result is immediate from Definition 3.4. โ
Example 3.6 (Gradient descent).
The gradient descent, backpropagation algorithm used by each โneuronโ in a deep learning architecture can be phrased as a logical proposition about learners. The whole learning architecture is then put together as in [fong2019backprop], or as weโve explained things above, using the operad ๐ โข ๐ซ๐ from Definition 2.19.
So suppose a neuron is tasked with learning a function โ ๐ โ โ ๐ , and it has a parameter space โ ๐ , i.e. we are given a smooth function ๐ : โ ๐ ร โ ๐ โ โ ๐ . We will define a corresponding logical proposition using Proposition 3.5. Define ๐ โ ๐๐จ๐ฅ๐ฒ by
๐ โ [ โ ๐ โข ๐ โ ๐ , โ ๐ โข ๐ โ ๐ ] โ โ ๐ : โ ๐ โข ๐ โ ๐ โ โ ๐ โข ๐ โ ๐ ๐ โ ๐ ร โ ๐ .
Define ๐ โ { ( ๐ 1 , ๐ โฏ ) โฃ ๐ 1 : โ ๐ โ โ ๐ , ๐ โฏ : โ ๐ ร โ ๐ โ โ ๐ } by saying that ๐ 1 โข ( ๐ฅ ) must be of the form ๐ โข ( ๐ , ๐ฅ ) for some ๐ โ โ ๐ in the parameter set and that ๐ ๐ฅ โฏ is given by โpulling back gradient vectorsโ using the map on cotangent spaces defined by composing with the derivative of ๐ 1 at ๐ฅ , in the usual way.
Now given ( ๐ 1 , ๐ โฏ ) โ ๐ , we continue with the setup of Proposition 3.5 by defining ๐ โข ( ๐ 1 , ๐ โฏ ) : โ ๐ ร โ ๐ โ ๐ to say how the learner updates its current parameter value ๐ โ โ ๐ given an input-output pair; this again is specified by the deep learning algorithm. Typically, it uses a loss function to calculate a cotangent vector at ๐ โข ( ๐ , ๐ฅ ) which is passed back to a cotangent vector at ๐ , and a dual vector of some โlearning rateโ ๐ is traversed.
The details are important for implementation, but not for understanding the idea. The idea is that as long as we say what sorts of maps are allowed (smooth maps with reverse derivatives) and how they update, we have defined a logical proposition.
The logical propositions that come from Proposition 3.5 are very special. More generally, one could have a logical proposition like โwhenever I receive two red tokens within three seconds, I will wait five seconds and then send either three blue tokens or two blues and six reds.โ As long as this behavior has the โwheneverโ flavorโmore precisely as long as it satisfies the condition in Definition 3.4โit will be a logical proposition in the topos.
3.3Future work
There are many avenues for future work. One is to give more syntactic languageโbeyond the logical symbols true , false , โง , โจ , โ , ยฌ , โ , โ that exist in any toposโfor building logical propositions in the ๐ โข
โข ๐๐จ๐๐ฅ๐ toposes specifically. Another is to understand various modalities in these toposes.
The sort of morphisms between toposes that seem to arise most naturally in this context are not the usual kindโadjoint functors โฐ โ โฐ โฒ for which the left adjoint preserves all finite limits, called geometric morphismsโbut instead adjoint functors โฐ โ โฐ โฒ for which the left adjoint preserves all connected limits. Thus another avenue for future research is to consider how logical and type-theoretic statements move between toposes that are connected in this way.
Appendix AProofs Proof of Proposition 2.4.
It is well-known that composition of functors is a monoidal operation, so it suffices to see that the polynomial (6) is the composite of functors ๐ , ๐ . To show this, we use the fact that for any set ๐ด we have a bijection ๐ ๐ด โ โ ๐ โ ๐ด ๐ to calculate the composite
๐ โ ๐
โ โ ๐ โ ๐ โข ( 1 ) โ ๐ โ ๐ โข [ ๐ ] ๐ โ โ ๐ โ ๐ โข ( 1 ) โ ๐ โ ๐ โข [ ๐ ] ๐
โ โ ๐ โ ๐ โข ( 1 ) โ ๐ โ ๐ โข [ ๐ ] โ ๐ โ ๐ โข ( 1 ) โ ๐ โ ๐ โข [ ๐ ] ๐
โ โ ๐ โ ๐ โข ( 1 ) โ ๐ : ๐ โข [ ๐ ] โ ๐ โข ( 1 ) โ ๐ โ ๐ โข [ ๐ ] โ ๐ โ ๐ โข [ ๐ โข ( ๐ ) ] ๐ โ โ ๐ โ ๐ โข ( 1 ) โ ๐ : ๐ โข [ ๐ ] โ ๐ โข ( 1 ) ๐ โ ๐ โ ๐ โข [ ๐ ] ๐ โข [ ๐ โข ๐ ]
where the first isomorphism is (3), the second is substitution, the third is the distributive law, and the fourth is properties of exponents. โ
Proof of Proposition 2.7.
With the formula given, it is clear that the โ -operation is associative (up to isomorphism), and that ๐ , which has ๐ โข ( 1 ) โ 1 and ๐ โข [ 1 ] โ ๐ , is a unit. One can also check that the formula is functorial in ๐ and ๐ , completing the proof. โ
Proof of Proposition 2.8.
The natural isomorphism is given by rearranging terms:
๐๐จ๐ฅ๐ฒ โข ( ๐ โ ๐ , ๐ )
โ โ ๐ โ ๐ โข ( 1 ) โ ๐ โ ๐ โข ( 1 ) โ ๐ โ ๐ โข ( 1 ) โ ๐ โ ๐ โข [ ๐ ] ๐ โข [ ๐ ] ร ๐ โข [ ๐ ]
โ โ ๐ โ ๐ โข ( 1 ) โ ๐ 1 : ๐ โข ( 1 ) โ ๐ โข ( 1 ) โ ๐ โ ๐ โข ( 1 ) โ ๐ โ ๐ โข [ ๐ 1 โข ( ๐ ) ] ๐ โข [ ๐ ] ร ๐ โข [ ๐ ]
โ โ ๐ โ ๐ โข ( 1 ) โ ๐ 1 : ๐ โข ( 1 ) โ ๐ โข ( 1 ) ( โ ๐ โ ๐ โข ( 1 ) โ ๐ โ ๐ โข [ ๐ 1 โข ( ๐ ) ] ๐ โข [ ๐ ] ) ร ( โ ๐ โ ๐ โข ( 1 ) โ ๐ โ ๐ โข [ ๐ 1 โข ( ๐ ) ] ๐ โข [ ๐ ] )
โ โ ๐ โ ๐ โข ( 1 ) โ ๐ : ๐ โ ๐ โ ๐ โ ๐ โข ( 1 ) โ ๐ โ ๐ โข [ ๐ 1 โข ( ๐ ) ] ๐ โข [ ๐ ]
โ ๐๐จ๐ฅ๐ฒ โข ( ๐ , โ ๐ : ๐ โ ๐ ๐ โ ๐ โ ๐ โข ( 1 ) ๐ โข [ ๐ 1 โข ( ๐ ) ] ) โ ๐๐จ๐ฅ๐ฒ โข ( ๐ , [ ๐ , ๐ ] ) .
In order, these isomorphisms are given by: unfolding the definition of morphisms in ๐๐จ๐ฅ๐ฒ , distributivity, products commuting with products, definition of morphisms in ๐๐จ๐ฅ๐ฒ , rules of exponents, and Eq. 7โs definition of [ ๐ , ๐ ] , respectively. โ
Proof of Proposition 2.13.
We need to give not only the functor ๐ : ๐ โข
โข ๐๐จ๐๐ฅ๐ ร ๐ โข
โข ๐๐จ๐๐ฅ๐ โ ( ๐ โ ๐ ) โข
โข ๐๐จ๐๐ฅ๐ , for any ๐ , ๐ โ ๐๐จ๐ฅ๐ฒ but also a functor { 1 } โ ๐ โข
โข ๐๐จ๐๐ฅ๐ , which we can identify with a ๐ -coalgebra; we take the latter to be the unique function 1 โ ๐ โ 1 . For the former, one could proceed abstractly using the fact that there is a duoidal structure on ๐๐จ๐ฅ๐ฒ
( ๐ โ ๐ ) โ ( ๐ โ ๐ก ) โ ( ๐ โ ๐ ) โ ( ๐ โ ๐ก ) .
Indeed, since for sets ๐ , ๐ we have ๐ โ ๐ โ ๐ ร ๐ , the result will follow from the properties of duoidal structures (applied in the case where ๐ โ ๐ and ๐ก โ ๐ are constant polynomials). However, for the readerโs convenience, we will give the map ๐ : ๐ โข
โข ๐๐จ๐๐ฅ๐ ร ๐ โข
โข ๐๐จ๐๐ฅ๐ โ ( ๐ โ ๐ ) โข
โข ๐๐จ๐๐ฅ๐ more explicitly.
Given ๐ฝ : ๐ โ ๐ โ ๐ and ๐พ : ๐ โ ๐ โ ๐ , we define a function
๐ โข ๐
โ ( ๐ โ ๐ ) โ ( ๐ โข ๐ ) โ โ ๐ โ ๐ โข ( 1 ) โ ๐ โ ๐ โข ( 1 ) ( ๐ โข ๐ ) ๐ โข [ ๐ ] ร ๐ โข [ ๐ ]
( ๐ , ๐ก )
โฆ ( ๐ โ ๐ฝ 1 ( ๐ ) , ๐ โ ๐พ 1 ( ๐ก ) , ( ๐ , ๐ ) โฆ ( ๐ฝ ๐ โฏ ( ๐ ) , ๐พ ๐ โฏ ( ๐ ) ) .
This is natural in ๐ , ๐ , which makes ๐ a functor for any ๐ , ๐ . One can check that all the axioms of a lax monoidal functor are verified, in the sense that the required diagrams commute up to natural isomorphism. โ
Proof of Proposition 2.18.
On one hand, an object in ๐ โข ๐๐๐ซ๐ง โข ( ๐ด , ๐ต ) as described in (2) consists of a set ๐ and functions ๐ด ร ๐ โ ๐ต and ๐ด ร ๐ต ร ๐ โ ๐ด and ๐ด ร ๐ต ร ๐ โ ๐ . On the other hand, we have [ ๐ด โข ๐ ๐ด , ๐ต โข ๐ ๐ต ] โ ๐ต ๐ด โข ๐ด ๐ด โข ๐ต โข ๐ ๐ด โข ๐ต by Example 2.9, so a coalgebra ๐ โ [ ๐ด โข ๐ ๐ด , ๐ต โข ๐ ๐ต ] โ ๐ consists of a function ๐ โ ๐ต ๐ด , a function ๐ โ ๐ด ๐ด โข ๐ต , and a function ๐ โ ๐ ๐ด โข ๐ต . The two descriptions can be identified by currying. The [ ๐ด โข ๐ ๐ด , ๐ต โข ๐ ๐ต ] โข
โข ๐๐จ๐๐ฅ๐ morphisms
๐ ๐ต ๐ด โข ๐ด ๐ด โข ๐ต โข ๐ ๐ด โข ๐ต ๐ โฒ ๐ต ๐ด โข ๐ด ๐ด โข ๐ต โข ( ๐ โฒ ) ๐ด โข ๐ต
are easily seen to coincide with those shown in (14). โ
Proof of Theorem 3.3.
It is well-known that ๐ โข
โข ๐๐๐ญ is equivalent to the category of discrete opfibrations over ๐ via the category-of-elements construction. When ๐ is free on a graph ๐บ , the category of elements for any functor โ : ๐ โ ๐๐๐ญ is also free on a graph, say ๐ป . In this case the opfibration can be identified with a graph homomorphism ๐ : ๐ป โ ๐บ with the property (โopfibโ) that for any vertex โ โ ๐ป , the function on arrows ๐ป โข [ โ ] โ โ ๐บ โข [ ๐ โข ( โ ) ] induced by ๐ is a bijection. Under this correspondence, a morphism โ โ โ โฒ of copresheaves is identified with a graph homomorphism ๐ : ๐ป โ ๐ป โฒ for which ๐
๐ โฒ โ ๐ .
Thus we have reduced to showing that there is an equivalence between ๐ โข
โข ๐๐จ๐๐ฅ๐ and the category of those graph homomorphisms ๐ : ๐ป โ ๐ณ๐๐พ๐พ ๐ that have the opfib property. Suppose given a ๐ -coalgebra ๐ฝ : ๐ โ ๐ โ ๐ ; it includes a function ๐ฝ 1 : ๐ โ ๐ โข ( 1 ) and for each ๐ โ ๐ a function ๐ฝ ๐ โฏ : ๐ โข [ ๐ฝ 1 โข ( ๐ ) ] โ ๐ . We define the corresponding graph ๐บ ๐ , ๐ฝ to have vertex set ๐ , and each ๐ โ ๐ to have ๐ โข [ ๐ฝ 1 โข ( ๐ ) ] -many outgoing arrows; the target of each outgoing arrow ๐ โ ๐ โข [ ๐ฝ 1 โข ( ๐ ) ] is defined to be ๐ฝ ๐ โฏ โข ( ๐ ) . The graph homomorphism ๐ : ๐บ ๐ , ๐ฝ โ ๐ณ๐๐พ๐พ ๐ is defined inductively: for any ๐ โ ๐ , the ๐ -tree ๐ โข ( ๐ ) has root labeled ๐ฝ 1 โข ( ๐ ) , and for each outgoing branch ๐ โ ๐ โข [ ๐ฝ 1 โข ( ๐ ) ] the target vertex is assigned the label ๐ฝ 1 โข ( ๐ โฒ ) , where ๐ โฒ โ ๐ฝ ๐ โฏ โข ( ๐ ) , and for each outgoing branch ๐ โฒ โ ๐ โข [ ๐ฝ 1 โข ( ๐ โฒ ) ] the target vertex is assigned the label ๐ฝ 1 โข ( ๐ โฒโฒ ) where ๐ โฒโฒ โ ๐ฝ ๐ โฒ โฏ โข ( ๐ โฒ ) , and so on. It is clear that ๐ satisfies the opfib property, since it assigns to each vertex ๐ in the graph ๐บ ๐ , ๐ฝ a vertex in ๐ณ๐๐พ๐พ ๐ (the ๐ -tree ๐ โข ( ๐ ) ) with the same set ๐ โข [ ๐ฝ 1 โข ( ๐ ) ] of outgoing arrows.
Conversely, given a graph homomorphism ๐ : ๐บ โ ๐ณ๐๐พ๐พ ๐ with the opfib property, let ๐ ๐บ be the set of vertices in ๐บ . The required coalgebra map ๐ฝ : ๐ ๐บ โ ๐ โ ๐ ๐บ consists of a function ๐ฝ 1 : ๐ ๐บ โ ๐ โข ( 1 ) and a function ๐ฝ ๐ โฏ : ๐ โข [ ๐ฝ 1 โข ( ๐ ) ] โ ๐ ๐บ for every ๐ โ ๐ ๐บ . We take the function ๐ฝ 1 to send vertex ๐ to the root label ๐ โข ( root ๐ โข ( ๐ ) ) for tree ๐ โข ( ๐ ) . Since we have a bijection ๐ โข [ ๐ฝ 1 โข ( ๐ ) ] โ ๐บ โข [ ๐ ] , we can take ๐ฝ ๐ โฏ to simply be the target function ๐บ โข [ ๐ ] โ ๐ ๐บ for the graph ๐บ .
It is a straightforward calculation to check that these two constructions are mutually inverse, and to check that graph homomorphisms over ๐ณ๐๐พ๐พ ๐ correspond bijectively to morphisms of ๐ -coalgebras. โ
\printbibliography Report Issue Report Issue for Selection Generated by L A T E xml Instructions for reporting errors
We are continuing to improve HTML versions of papers, and your feedback helps enhance accessibility and mobile support. To report errors in the HTML that will help us improve conversion and rendering, choose any of the methods listed below:
Click the "Report Issue" button. Open a report feedback form via keyboard, use "Ctrl + ?". Make a text selection and click the "Report Issue for Selection" button near your cursor. You can use Alt+Y to toggle on and Alt+Shift+Y to toggle off accessible reporting links at each section.
Our team has already identified the following issues. We appreciate your time reviewing and reporting rendering errors we may not have found yet. Your efforts will help us improve the HTML versions for all readers, because disability should not be a barrier to accessing research. Thank you for your continued support in championing open access for all.
Have a free development cycle? Help support accessibility at arXiv! Our collaborators at LaTeXML maintain a list of packages that need conversion, and welcome developer contributions.
Xet Storage Details
- Size:
- 48 kB
- Xet hash:
- 8edf31c226e54277b8b797aa04e83433b6b4b34b131095100757e368a28f7e23
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.