Hi Ralf,

 I agree with your reservations against the name functor (in the sense
of category theory) which is different from what map is doing. In your
signature it is clear that map is an
map part of a functor definition, hence given the following data:

i) f: A -> B  a map in a category C, with objects A,B
ii) a functor F : C --> D, which maps objects A,B,,... in category C to
    objects F(A),F(B),... in category D
iii) we need to define maps in D from maps in C, hence
    F( f:A --> B) |-->  F(f) : F(A) --> F(B)  [which is your signature]
iv) functoriality means that   F( f o g) = F(f) o F(g)  [where o is
the composition in C or D]
    given this, one can compute maps F(f) in D by going back to C,
using the map f there.

Example: Let FinSet be the category of finite sets, all such sets X
are isomorphic to a
  set [n-1] where cardinality of X is n, and [n-1] = {0,1,2,...,n-1}
(or if ordered as
  list [0,1,2,...,n-1])   (In a CAS we can see the elements as
arguments of an expression,
  indexed by a finite set)
Now look at the covariant powerset functor P, e.g. P{1,2} =
{{},{1},{2},{1,2}}, and a function
f(1)=a, f(2)=b with f : {1,2} ---> {a,b}, now P(f) is a map of the form
P(f) : {{},{1},{2},{1,2}} ---> {{},{a},{b},{a,b}}, now map (or fold,
unfold, etc ) is the mechanism
to use the functoriality and compute P(f) by using f, hence
P(f)(PX) = map(f,PX)  and this makes it _covariant_   (there are other
powerset functors).

Now categorically we can write easily P(P(f)) : PPA --> PPB where PPA,
PPB are powersets of powersets of a set, having a generic form {
{{1},...}, ... } hence the brackets start to nest.
In a CAS I would like to use map on such objects too, hence be able to
apply functors iteratively. Example:

P(P(f)) {{{1},{1,2}}} = {P(f){{1}}, P(f){{1,2}}} = {{f({1})},
{{f({1}),f({2})}} = {{{a},{a,b}}}

hence map is just pushing the operation into structured data, and may
be doing this several levels deep. Haskel's monads can do this, as
they represent (particular) mathematical functors.

So map is in my eyes an impementation detail which is not directly
mapped to the mathematical structure, as it is not (easily) composed
(as endofunctors can be). Further
more it implements only the part of the functor which deals with
morphisms, but all discusion here is set (element) bases and hence
categorically evil :<

Just my 2 cents
BF.


On Sat, Oct 22, 2016 at 8:21 AM, Ralf Hemmecke <[email protected]> wrote:
> On 10/22/2016 08:08 AM, oldk1331 wrote:
>> Bill, I'm sorry that I give a bad example.
>>
>> About the axioms that "map" has to fullfill:
>>     map(id, x) === x    for all x
>>     map(f, map(g,x)) === map(compose(f,g), x)    for all x, f, g
>>
>> Of course it's possible to have a Functor(E)
>> for AbelianMonoidRing(R,E), it may not "make sense",
>> but it is doable, so it is important to have a documentation
>> for map in each domain that implements it.
>
> I still don't like "Functor" as a name. And in fact "map" is also not
> the right name. But, naming aside... I'd rather would like to change the
> signature of "map" from
>
>   map: (f: S -> S, %) -> %
>
>  into
>
>    map: (f: S -> S) -> (% -> %)
>
> and then it becomes clearer, that for a (categorial) functor F one would
> rather like to have:
>
>    map: (f: A -> B) -> (F(A) -> F(B))
>
> which somehow supports my dislike of the name "Functor".
>
> Am I wrong?
>
> Ralf
>
> --
> You received this message because you are subscribed to the Google Groups 
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.



-- 
% Dr Bertfried Fauser
%      Phone :  +49 7471 4031397   Mobile : +49 176 64094110

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to