Question: Is it possible to define a binary operator in Maple?

I would like to define a binary operator, let's say T, such that `T`(a, b) be displayed a T b.

Is this possible in Maple (preferably 2015 [define doesn't have a 'binary' property], but a solution for any higher version would be welcome)?

Example

restart;

`union`(a, b);

`union`(a, b)

(1)

alias(`#mo("≅")` = `union`):
`union`(a, b);  

`#mo("≅")`(a, b)

(2)

# desired:
`#mrow(mo("a"),mo(" "),mo("≅"),mo(" "),mo("b"))`

`#mrow(mo("a"),mo(" "),mo("≅"),mo(" "),mo("b"))`

(3)
 

 

Download binary_operator.mw

Thanks in advance

Please Wait...