Logic
Equivalent
test for logical equivalence
Implies
test for logical implication
Calling Sequence
Parameters
Description
Examples
Equivalent(a, b, p)
Implies(a, b, p)
a, b
-
Boolean expressions
p
(optional) unevaluated name
The Equivalent and Implies commands test the Boolean expressions a and b for logical equivalence or logical implication respectively.
The Equivalent(a, b) calling sequence returns true in the event that the two expressions are logically equivalent, and false if they are not. Similarly, Implies(a, b) returns true if a implies b (that is, if for every valuation for which a is true, then b is also true) and false otherwise.
If the parameter p is supplied and the test returns false, then a valuation is assigned to p which demonstrates a negative result. Otherwise, p is assigned NULL.
Note: The test may be significantly faster if p is not given.
with⁡Logic:
Equivalent⁡a&anda&orb,a
true
Equivalent⁡a&iffa&orb,b&impliesa
Equivalent⁡a&impliesb,b&impliesa,p
false
a=false,b=true
Equivalent⁡¬⁡a&andb,¬⁡a&or¬⁡b,p
a&andb⇒a&impliesb
a&xorb⇒a&andb&or¬⁡a&or¬⁡b
Implies⁡b&impliesa&impliesc,a&iffb&orb&andc,p
a=false,b=true,c=false
Implies⁡a&orb,a&or¬⁡b,p
See Also
Logic/Satisfy
Logic/Tautology
Download Help Document