One clarification. Actually despite what Gaby wrote in an earlier email, I still don't think it is quite correct to claim that a functor such as List is an endofunctor, at least not in the category-theoretic sense. The reason is that it is defined as follows:
List(R:Type): Join(ListAggregate(R), ... ) The source category of List, i.e. Type, is not the same as the target category of List, i.e. Join(ListAggregate(R), ... ). In general we want domain constructors to add "structure" so the target of the functor is a category with more structure than the source. Therefore technically or pedantically speaking it can not be an endofunctor. But, since the categories in Axiom form a complete lattice of inclusions, i.e. they are related as sub-categories, and Type is the top of that lattice, there is always a forgetful functor that just forgets the extra structure defined by Join(ListAggregate(R), ... ) and treats just as 'Type". If we call this forgetful functor Hide: Join(ListAggregate(R), ... ) -> Type Then the actual endofunctor is Hide List : Type -> Type And in general we should write List o Hide List o Hide List o ... n times ... A functor like Hide is implicit for any pair of categories related by inclusion. Similarly there is a forgetful functor that makes Set an endofunctor SetCategory -> SetCategory, etc. Regards, Bill Page. On Tue, Nov 15, 2011 at 1:18 PM, Bill Page <[email protected]> wrote: > On Tue, Nov 15, 2011 at 12:59 PM, Martin Baker wrote: > >> ... >>I think what I was trying to get at is if: >> >> B is some base class >> T is an endofunctor >> (in category theoretic terms) >> >> Then this 'generates' a sequence of categories: >> >> T B, T^2 B, T^3 B ... >> > > I don't think that is correct. T B need not be a category as such. An > endofunctor is defined as a kind of mapping > > T: X -> X > > where B is in (i.e. satisfies) some category X. T applied to B is a > domain, T applied to T applied to B is a domain - all in the same > category X. > > Similarly, T^2, i.e. T applied to T applied to _, is an endofunctor > > T^2 : X -> X > >> If we now swap to SPAD terminology, when we implement a monad, do we >> extend the above category sequence or do we create the implementation >> independently like: >> >> List Integer, List List Integer, List List List Integer ... >> > > Ok. (List List List ... n times ... _ ) is a functor in Axiom. > >> or using your program: >> >> MonadList(Integer),MonadList(List Integer), MonadList(List List >> Integer)... >> > > The way I wrote it at first, MonadList is a package, not a domain > constructor. In a sense, packages extend domains. > >> Actually I think it should really be: >> >> MonadList(Integer),MonadList(MonadList(Integer)), >> MonadList(MonadList(MonadList( Integer)))... >> > > Yes, this is what we want. > >> So, thinking about it again, its not an issue, because the individual >> domains extend the individual categories. So the infinite sequence of >> domains extends the infinite sequence of categories. >> >> So I think I've answered my own question? >> > > Did you? > > Regards, > Bill Page. > -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en.
