Maxima 5.29.1 http://maxima.sourceforge.net
using Lisp SBCL 1.0.40.0.debian
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) g(mu,nu):= if (mu=0 and nu =0) then 1
elseif (mu=1 and nu =1) then -1
elseif (mu=2 and nu =2) then -1
elseif (mu=3 and nu =3) then -1
elseif ( mu#nu and ((mu=1 or mu=2 or mu=3 or mu=0)and(nu=1
or nu=2 or nu=3 or nu=0)) ) then 0
else 'g(mu,nu)$
(%i2) expr: g(i,j);
(%o2) g(i, j)
(%i3) expr: subst([i=1, j=2], expr);
(%o3) g(1, 2)
(%i4) ev(expr);
(%o4) g(1, 2)
(%i5) g(1,2);
(%o5) 0
(%i6)
So, why in the (%o4) maxima returns g(1,2) instead of 0?