### Related

##### defmatch-lambda-matchdeclare

matchdeclare (a, lamb...

defmatch (linearp, a*...

linearp (3*x + (y + ...

Calculate

##### defmatch-freeof-matchdeclare

L:[a,b];

matchdeclare (''L, fr...

defmatch (linearp, a*...

Calculate

##### defmatch-lambda-matchdeclare

matchdeclare (a, lamb...

eq...

lin...

Calculate

? defmatch;

Calculate

##### defmatch-freeof-matchdeclare

L:[a,b];

matchdeclare (''L, fr...

defmatch (linearp, a*...

Calculate

##### defmatch-lambda-matchdeclare

matchdeclare (a, lamb...

eq...

lin...

Calculate

? defmatch;

Calculate

##### defmatch-freeof-matchdeclare

matchdeclare (a, free...

defmatch (linearp, a*...

linearp (3*x + (y + ...

Calculate

##### defmatch-freeof-matchdeclare

L:[a,b];

matchdeclare ([a,b], ...

defmatch (linearp, a*...

Calculate

##### defmatch-lambda-letrules-matchdeclare

matchdeclare (a, lamb...

eq...

lin...

Calculate

### defmatch

Run Example
```(%i1)matchdeclare (a, lambda ([e], e#0 and freeof(x, e)), b,                    freeof(x));
(%o1)                                done
(%i2) defmatch (linearp, a*x + b);
(%o2)                               linearp
(%i3)  linearp (3*x + (y + 1)*x + y^2);
2
(%o3)                         [b = y , a = y + 4]
(%i4) ```
Run Example
```L:[a,b];
(%o1)                               [a, b]
(%i2) matchdeclare ([a,b], freeof(x));
(%o2)                                done
(%i3) defmatch (linearp, a*x + b);
(%o3)                               linearp
(%i4)  linearp (3*x + (y + 1)*x + y^2);
2
(%o4)                         [b = y , a = y + 4]
(%i5)   linearp (3*z + (y + 1)*z + y^2);
2
(%o5)                     [b = (y + 4) z + y , a = 0]
(%i6) ```
Run Example
```matchdeclare (a, lambda ([e], e#0 and freeof(x, e)), b, freeof(x));
(%o1)                                done
(%i2)                    defmatch (linearp, a*x + b);
(%o2)                               linearp
(%i3)                   linearp (3*z + (y + 1)*z + y^2);
(%o3)                                false
(%i4) matchdeclare(n, integerp, x, true);
(%o4)                                done
(%i5) defrule(r1, f(n*x), n*f(x));
(%o5)                        r1 : f(n x) -> n f(x)
(%i6) apply1(f(3*y) + f(z*y), r1);
(%o6)                           f(y z) + f(3 y)
(%i7) ```

### Related Help

Help for Defmatch