Prof. Dr. Johannes Grabmeier wrote:
>
> Thanks, this solves one of the two problems!
>
> The first problem seems to have to do that seeningly the interpreter
> deals differently with numbers 1 and 2 and perhaps calls < from the
> Integers.
>
> The coorect behaviour is shown by the following example with Strings:
>
> C := FiniteSet(String, ["red", "green", "yellow", "pink"])
You defined '<='. Which means that you used inherited '<'. But
S is "closer" to FiniteSet than PartialOrder so '<' was inherited
from S. More precisely, FriCAS _first_ looks for operation in
S and only later in categories. Defining '<' solves problem
when S is Integer. But in general one would have to override
all operations that depend on order. Namely, operations defined
in S use order from S. I must admit that I find it safer to avoid
inheritance from domains in cases when one wants to redefine
operations.
--
Waldek Hebisch
--
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.