%mathpiper,def="LogicVerify"

Function("LogicVerify",{aLeft,aRight})
[
  If(aLeft != aRight,
    Verify(CanProve(aLeft => aRight),True)
  );
];

%/mathpiper



%mathpiper_docs,name="LogicVerify",categories="Programmer Functions;Testing"
*CMD LogicVerify --- verifying equivalence of two expressions
*STD
*CALL
	LogicVerify(question,answer)

*PARMS

{question} -- expression to check for

{answer} -- expected result after evaluation


*DESC

The command {LogicVerify} can be used to verify that an
expression is <I>equivalent</I> to  a correct answer after evaluation.
It returns {True} or {False}

*E.G.
In> LogicVerify(a And c Or b And Not c,a Or b)
Result: True;
In> LogicVerify(a And c Or b And Not c,b Or a)
Result: True;

*SEE Simplify, CanProve, KnownFailure, Verify, TestMathPiper, LogicTest

%/mathpiper_docs