Question: Should type/linear simplify its argument?

What is the opinion here on the following. If given   A which is linear in x, but not simplified. now type(A,x) gives false.  But type(simplify(A),x) gives true.

Does this mean it is the user responsibility to simplify the expression first before calling type on it? 

Why does not type command do this internally to see if it is linear before deciding? What is the reason for this design choice?

interface(version);

`Standard Worksheet Interface, Maple 2025.2, Windows 10, November 11 2025 Build ID 1971053`

restart;

 

A:=(x+y+1)^2-(x+y-1)^2;

(x+y+1)^2-(x+y-1)^2

simplify(A);

4*x+4*y

type(A,linear(y))

false

type(simplify(A),linear(y))

true

type(A,linear(x))

false

type(simplify(A),linear(x))

true

 

 

Download why_simplify_is_needed_feb_9_2026.mw

Please Wait...