Hello,
can you help me with my problem?
If I want to verify two objects like this
> a:=exp(I*x)=0;
> b:=cos(x)+I*sin(x)=0;
I can use the command
> verify(a, b, 'relation(testeq)');
But how can I verify equality of more complicated objects, for example
> a:={exp(I*x)=0, x^2-x};
> b:={cos(x)+I*sin(x)=0, x*(x-1)};
The command
> verify(a, b, 'set(testeq)');
is (of course) not enough. Is there a way how to do it? How to compare the objects recursively? Mayby the solution is to write my owv verification object, but I don't know how to do it. Is it possible to define a procedure and use it in such way?
> verify(a, b, 'myproc')
If it is so, how should the procedure look like, so it could be used for verification.
Thank you very much for your help.
Karel Srot
verify
It seems that verify needs some spoon-feeding. For example:
a:={exp(I*x)=0, x^2-x}:
b:={cos(x)+I*sin(x)=0, x*(x-1)}:
verify(a, b, 'set(testeq)');
false
restart;
a:={exp(I*x)=0, x^2-x}:
b:={convert(cos(x)+I*sin(x),exp)=0, expand(x*(x-1))}:
verify(a, b,verify(a, b, 'set'));
true
Hope this helps.
J. Tarr
Maybe I described my problem
Maybe I described my problem imprecisely. I want to test objects in more general way. I post a new blog post where my problem is better described. Now I can't see the post im my blog posts (why?), but I will give here the link when I will be able to do that.
The link to my blog post is http://www.mapleprimes.com/blog/karel-srot/testing-objects-for-equivalence. I hope there is my problem described better.
Verification
In this particular example, the verification can be done as
a:={exp(I*x)=0, x^2-x}: b:={cos(x)+I*sin(x)=0, x*(x-1)}: verify(a,b,set({testeq,relation(testeq)})); trueA new verification procedure can be added as in the following example,
VerifyTools:-AddVerification(example=proc(x,y) evalb(x=y^2) or evalb(y=x^2) end); verify(1,3,example); false verify(2,4,example); trueA series of examples of verification procedures can be found through
I posted a command for nested verification in my blog, Nested Verification. Using it, the verification in the first example in this comment can be done as
verify(a,b,nested(testeq)); true__________
Alec Mihailovs
http://mihailovs.com/Alec/