On Tue, Dec 15, 2009 at 2:33 AM, Ralf Hemmecke wrote: > >> The interpreter internally translates 'x=y' to 'equation(x,y)' so try this: >> >> Try this: >> >> ---rhxBEGIN newop.spad >> )abbrev domain MYINT MyInt >> MyInt(): Join(IntegerNumberSystem, ConvertibleTo String, OpenMath,_ >> Canonical, canonicalsClosed) with >> equation: (%, %) -> % >> == Integer add >> equation((x:%) , (y:%)):% == x - y >> ---rhxEND newop.spad > > OK, that might be a workaround for now, but you probably agree that this > is an interpreter bug. In my case there is a function "=: (%, %) -> %" > around so the interpreter should rather pick this instead of translating > = to equation in the first place. No? >
I am not sure. i think the problem is that there is no good design in Axiom/FriCAS for the use boolean operators versus symbolic boolean expressions/relations such as equations and inequalities. The interpreter wants = to be symbolic but it is not consistent since other operators such as < and > or even ~= are not treated this way. The Equation domain exports a coercion coerce : % -> Boolean if S has SETCAT (really should be 'eval' !) which evaluates the relation using = from SetCategory. In the library = is (almost) always treated in the same way as > and <, i.e. as functions that return a boolean value. So I guess one could say that this is a typical kind of interpreter hack. > Or is "=" in FriCAS just to be considered as syntactic sugar for > "equation"? Cannot be try, since there is also =:(%,%)->Boolean. > See above. > Maybe only people like me add signatures like "=: (%, %) -> %", so it is > not too important, but I would count that behaviour as a bug. > As I said, I think it is more of a design bug. I know Gaby has started to do some work in OpenAxiom to straighten this out but I think it would be worthwhile to discuss it further. I did spend some time thinking about inequalities a few months ago: http://axiom-wiki.newsynthesis.org/SandBoxInequation http://axiom-wiki.newsynthesis.org/SandBoxEquation Comments? Regards, Bill Page. -- 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 fricas-de...@googlegroups.com. To unsubscribe from this group, send email to fricas-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en.