Try

GETDATABASE('AbelianMonoid, 'CONSTRUCTORCATEGORY)$Lisp and
GETDATABASE('DistributionCategory, 'CONSTRUCTORCATEGORY)$Lisp

While in the first case we have in the returns expression

  (SIGNATURE (Zero) ($) constant)

the second call yields

  (SIGNATURE (Zero) ($))

without the "constant" marker.

AbelianMonoid defines

  0 : constant -> %

while DistributionCategory defines

  0 : () -> %

I consider "constant -> %" as a funny writing for "%", the mapping
() -> % is clearly not the same type as %. Mathematically, yes, there's
no difference, but ()->% can have side effects in SPAD, while % can not.

It probably currently makes no difference in FriCAS, but I would rather
like to write

  0: %

into the .spad file instead of "constant -> %" or "() -> %".

Furthermore since the type ()->% is for me not equivalent to %, I
consider it even a bug.

Distribution(R) implements 0 via

  0 == distributionByMoments sequence repeating [0]

but we have

  distributionByMoments : Sequence R -> %

so the result type is clearly % and not ()->%.

Waldek, can we get rid of "constant->" and "()->" for the definition of
constants already now? I think you've worked on this, but I'm not sure
about the status.

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 http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to