Question: testing equivalence of relations

Hello, my question is connected to the topic in my blogpost - Testing objects for equivalence. Alec Mihailovs wrote a procedure for nested verifications. But this doesn't work for relations where one relation equals to the second one multiplied by a constant. They are different, but solution is the same. For example: x=1 2*x=2 also Maple answers false. verify(x=1, 2*x=2,relation); false I wrote a procedure which test this case. Is there a way how to do it better and more reliable (and eventually use it with nested verifications)? Thank you for your help. Karel Srot My code: TestRelations1:=proc(r1,r2) local a, b, d, m; if r1::{`<>0 then d:=simplify(a/b); print(d); if type(d, complexcons) then RETURN(`dependent`); else RETURN(`probably not dependent`) end if; elif simplify(a)=0 then RETURN(`dependent`); else RETURN(`probably_not_dependent`); end; else RETURN(`different types`); end if; end: TestRelations1(x+y-1=0, 2*x=2-2*y); dependent TestRelations1(cos(x)^2+sin(x)^2=1-z, z=0); dependent TestRelations1(sin(x+y)=0, 2*sin(x)*cos(y)+2*cos(x)*sin(y)=0); probably_not_dependent but TestRelations1(expand(sin(x+y),trig)=0, 2*sin(x)*cos(y)+2*cos(x)*sin(y)=0); dependent
Please Wait...