Logic - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Logic : Boolean : Logic Package : Logic/Tautology

Logic

  

Tautology

  

test for a tautology

  

Contradiction

  

test for a contradiction

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Tautology(b, p)

Contradiction(b, p)

Parameters

b

-

Boolean expression

p

-

(optional) unevaluated name

Description

• 

The Tautology and Contradiction commands test whether the given Boolean expression b is a tautology or a contradiction.

• 

The Tautology(b) calling sequence returns true if b is a tautology (true for every valuation of its variables) and false otherwise.  Similarly, Contradiction(b) returns true if b is a contradiction (false for every valuation of its variables) 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 that the test may be significantly faster if p is not given.

Examples

withLogic:

Tautologya &and b &or `&not`a &or `&not`b

true

(1)

Tautologya &iff b &or b,'p'

false

(2)

p

a=true,b=false

(3)

Tautologya &or `&not`a,'p'

true

(4)

p

Contradictiona &or `&not`a &and b &nor b

true

(5)

Contradictiona &iff b &or b,'p'

false

(6)

p

a=false,b=true

(7)

Contradiction`&not`a &and a,'p'

true

(8)

p

See Also

Logic

Logic/Equivalent

Logic/Satisfy

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam