Incompatible changes .. was Re: Program stack overflow defining infix operator
Subject: Incompatible changes .. was Re: Program stack overflow defining infix operator
From: Barton Willis
Date: Mon, 10 Aug 2009 04:54:44 -0500
Maxima already has simplifying and non-simplifying logical connectives.
Both conjunctions are named "and." The simplifying and noncommutative "and"
(%i6) a and b;
1> (SIMP-MAND ((MAND) $A $B) 1 NIL)
<1 (SIMP-MAND ((MAND SIMP) $A $B))
(%o6) a and b
And the nonsimplifying "and"
(%i7) if a and b then 42 else 0;
1> (IS-MAND ($A $B))
<1 (IS-MAND ((MAND) $A $B))
1> (SIMP-MAND ((MAND) $A $B) 1 NIL)
<1 (SIMP-MAND ((MAND SIMP) $A $B))
(%o7) if a and b then 42 else 0
This conjunction gets routed through is-mand and simp-mand.
Further there is a defmspec mand function. The function mand
is sometimes called before simp-mand
(%i14) a and b;
1 Enter "and" [a and b]
1 Exit "and" a and b
1> (SIMP-MAND ((MAND) $A $B) 1 NIL)
<1 (SIMP-MAND ((MAND SIMP) $A $B))
(%o14) a and b
Barton