Re: [Maxima] Infix operator definition



Furuya-san,

Yes, nouns and verbs in Maxima often cause difficulties.  Here is one
way to solve your specific problem:

  sump(f):=not(atom(f)) and part(f,0)=nounify('sum)$

or even better (because the nounify is only performed once):

  sump(f):=not(atom(f)) and part(f,0)=''(nounify('sum))$

See my bugnote 711539 for other problems with nouns and verbs.

By the way, if efficiency matters, "inpart" is much better than "part"
in cases like this, because "part" reformats the whole expression to be
in output form before selecting the part.  It is not clever enough to
realize that part(sum(...),0) cannot possibly be affected by the
conversion to output form.

       -s