Re: [sage-support] pattern matching question

2010-07-01 Thread Burcin Erocal
On Thu, 1 Jul 2010 13:40:03 -0700 (PDT) jeral wrote: > Hi, All. > > Is there any way in sage to match not only given expression against > pattern, but equivalent expressions too? > Say, i want to match expression with pattern pat = c*x^p*y^q*z^r, > > (2*x^2*y^3*z^4).match(pat) > > works fine,

[sage-support] pattern matching question

2010-07-01 Thread jeral
Hi, All. Is there any way in sage to match not only given expression against pattern, but equivalent expressions too? Say, i want to match expression with pattern pat = c*x^p*y^q*z^r, (2*x^2*y^3*z^4).match(pat) works fine, but (x*y).match(pat) returns None, while x*y is special case of c*x^p*y^q