On 03/04/2017 09:51 PM, Waldek Hebisch wrote:
>> I think these 3 functions are the same.

> (1) -> s := multiset [1, 2, 3, 2, 3, 3, 3]
> 
>    (1)  {1,2: 2,4: 3}
>                                               Type: Multiset(PositiveInteger)
> (2) -> parts(s)
> 
>    (2)  [1,2,2,3,3,3,3]
>                                                   Type: List(PositiveInteger)
> (3) -> members(s) 
> 
>    (3)  [3,2,1]
>                                                   Type: List(PositiveInteger)
> 
> so parts and members definitely are different.  entries are
> defined for streams while parts and members do not work
> on streams.

Yes, definitely different. But why? Well, obviously, Multiset redefines
the contract of "members: % -> List S" that is actually inherited from
HomogeneousAggregate(S).

In HOAGG, the specification of members and parts is identical. Who would
think that these functions ever return something different?

I'm not really in favour of this current situation. Better would be to
define one function for the generic case and let the signature of the
other only apper in the more concrete Domain/Category.

Maybe it's not so dramatic here since the definition in Multiset is more
specific, but imagine inheritances from two categories C1, C2 with two
different specifications for the same signature. Which specification
then counts in Join(C1,C2) and which in Join(C2,C1) or are they the
same, but it's unclear which one.

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.

Reply via email to