Hi Robert
If I type exactly what you wrote it works --- but if I remove the '*x' then
it doesn't:
(%i6) applyb1( (a|b and c), bayes);
(%o6) ((a | c)*(b | a and c))/b | c
(%i7) applyb1 (%, bayes);
(%o7) ((a | c)*(b | a and c))/b | c
In case it helps, build_info gives me the following - I am using the OS X
binary package from the website.
Maxima version: 5.19.2
Maxima build date: 17:49 9/1/2009
host type: i686-apple-darwin8.11.1
lisp-implementation-type: SBCL
lisp-implementation-version: 1.0.30
Nathaniel
2009/10/1 Robert Dodier <robert.dodier at gmail.com>
> On Thu, Oct 1, 2009 at 9:45 AM, Nathaniel Virgo
> <nathanielvirgo at gmail.com> wrote:
>
> > It should say
> >
> > applyb1(expr, bayes)
> >
> > that was just a typo in my mail - the result is the same - it fails to
> apply
> > Bayes' rule to the subexpression.
>
> Hmm, it works for me.
>
> (%i1) infix("|",50,50);
> (%o1) |
> (%i2) matchdeclare([AA,BB,CC],all);
> (%o2) done
> (%i3) defrule(bayes, (AA|BB and CC), (BB|AA and CC)*(AA|CC)/(BB|CC));
> (AA | CC) (BB | AA and CC)
> (%o3) bayes : (AA | BB and CC) -> --------------------------
> BB | CC
> (%i4) applyb1( (a|b and c)*x, bayes);
> (a | c) (b | a and c) x
> (%o4) -----------------------
> b | c
> (%i5) applyb1 (%, bayes);
> (%o5) (a | b and c) x
>
>
> What does build_info(); return for you? I have Maxima 5.19.2
> + Clisp 2.48 on Linux.
>
> best
>
> Robert Dodier
>