[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-math] newbie type problem

From: Martin Rubey
Subject: Re: [Axiom-math] newbie type problem
Date: Mon, 20 Dec 2004 17:59:58 +0100

Dear Frank,

 > We shall implement derivation rules via rules. First intention is:
 > ablrules := rule abl(a+b,c) == abl(a,c) + abl(b,c)
 > but axiom evaluates abl(a+b,c) to zero and makes a rule 0 ->
 > abl()+abl(). Simple ...rule 'abl(... does not work because of wrong
 > type... 

You'd have to read the section "Rules and Pattern Matching" in the axiom
book. The answer is:

abl := operator 'abl

ablplus := rule abl(a+b,c) == abl(a,c) + abl(b,c)

There is also a possibility of "adorning" pattern variables -- see the same
section. In your case, you want to have a rule that applies only to monomials,
so it will be roughly

ablmonomial := rule abl(m | monomial?(m)) == ...

However, it is pretty obvious that rules should only be the quick and dirty

Hope this helps,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]