> If Product and Sum where built-in to some new version of SPAD they
> would include the 'product' and 'sum' operations as an inherent part
> of their definition. The existence of these operations is dictated by
> describing them as categorical limits. So for example

> See: http://axiom-wiki.newsynthesis.org/LimitsAndColimits

> Then for example the definition of a simple piecewise function might
> look like this:
> 
>   p:Sum(NegativeInteger,ZeroInteger,PositiveInteger)->Integer :=
>       sum(Integer,x +-> -(x^2), x +-> 0,x +-> x^2)

That looks nice. But, of course it involves quite a lot. (You have 
demonstrated that by the package Sum2Functions.) Namely, if I define (or 
rather just use) for two domains X and Y the type Sum(X, Y), then for 
every other domain A the compiler would know about a function

   sum: (X->A,Y->A) -> Sum(X,Y)->A

(of course *without* the need of some package like Sum2Functions).


But then Sum and Product are just special cases of (Co-)Limits. So maybe 
a Limit and CoLimit constructor should be built-in to the language. My 
question would then be, does such a general construction allow to 
recover the concret handling of Record/Cross/Union etc.? (Record, Cross, 
and Union would then, of course, not be built-in.) By "concrete" I don't 
just mean theoretically, but it rather concerns the question how could 
this Limit stuff really be implemented into the compiler?


> What makes you think that polynomials of the kind you describe should
> look different in a more categorical-oriented language? I don't see
> it.

Invent some other concrete application for which you could demonstrate 
the benefit of the categorical programming language SPAD-CAT. Your 
example, I cited above, is already something. Other examples?

Ralf

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---


Reply via email to