The divide command tests whether B divides A in the case of polynomials. An optional third argument P specifies the modulus.
divide(x^2-1,x-1); 1 divide(x^2-1,x-1,11); 1