On Mon, Apr 16, 2012 at 09:03:49AM +0200, Ralf Hemmecke wrote:
>> 1. I know what is "a domain of that category",
>> but what does this mean: "a package of that category" ?
>
> A category (or in other words, an interface) is (basically) just a list
> of exports of the form
>
> foo: A -> B
>
> A domain or package is an implementation of this interface.
> The difference between package and domain is: in the exports of a domain
> appears % in the exports of a package it doesn't. But, I'm sure you know
> this already.
Spad understands d : D, for a domain D.
But if D is a package, it, probably would not.
Respectively, if d : D, D : Ring, then Spad understands what is d*d,
without the user program specifying the origin of "*".
And with a package, the user program needs also to define from where the
function f is taken which is applied to d.
Right?
So where exactly is your problem with the above?
The problem is: how to follow the advice?
1) Define
category Show : Category with show : % -> String
All right.
2) "And define packages of that category".
What packages to define in order to make `show' to print as folows?
show ( [(1,-1),(2,-2)] :: List Product(INT,INT) ) -->
"[(1,-1),(2,-2)]"
show ( [ [(1,-1),(2,-2)], [(3,4)] ] :: List List Product(INT,INT) )
-->
"[[(1,-1),(2,-2)],[(3,4)]]",
and so on, for compositions?
Regards,
------
Sergei
[email protected]
--
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.