Equivalent - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Logic

  

Equivalent

  

test for logical equivalence

  

Implies

  

test for logical implication

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Equivalent(a, b, p)

Implies(a, b, p)

Parameters

a, b

-

Boolean expressions

p

-

(optional) unevaluated name

Description

• 

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.

Examples

withLogic:

Equivalenta&anda&orb,a

true

(1)

Equivalenta&iffa&orb,b&impliesa

true

(2)

Equivalenta&impliesb,b&impliesa,p

false

(3)

p

a=false,b=true

(4)

Equivalent&nota&andb,&nota&or&notb,p

true

(5)

p

a&andba&impliesb

true

(6)

a&xorba&andb&or&nota&or&notb

true

(7)

Impliesb&impliesa&impliesc,a&iffb&orb&andc,p

false

(8)

p

a=false,b=true,c=false

(9)

Impliesa&orb,a&or&notb,p

false

(10)

p

a=false,b=true

(11)

See Also

Logic

Logic/Satisfy

Logic/Tautology