Logic - Maple Help

Online Help

All Products    Maple    MapleSim


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

Logic

  

Satisfy

  

find a valuation satisfying an expression

  

Satisfiable

  

determine if expression can be satisfied

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Satisfiable(expr)

Satisfy(expr, alpha)

Parameters

expr

-

Boolean expression

alpha

-

(optional) list or set of names

Description

• 

A satisfying assignment is an assignment to the variables of a given Boolean expression that satisfies the expression. If expr is not satisfiable, then NULL is returned.

• 

The Satisfiable command returns true if the Boolean expression expr is satisfiable, that is, if a satisfying assignment exists. Otherwise false is returned.

• 

The Satisfy command returns a set of equations representing a satisfying assignment to expr. If expr is not satisfiable, then NULL is returned.

• 

If the optional second parameter to Satisfy is present, the valuation includes all variable names in alpha.

Examples

withLogic:

Satisfiablea &or b

true

(1)

Satisfya &or b

a=true,b=false

(2)

Satisfya &or b,a,b,c

a=true,b=false,c=false

(3)

Satisfiablea &and `&not`a

false

(4)

The following returns NULL since it is unsatisfiable.

Satisfya &and `&not`a

Satisfya &implies b &xor `&not`c

a=false,b=true,c=false

(5)

Compatibility

• 

The Logic[Satisfiable] command was introduced in Maple 2016.

• 

The Logic[Satisfy] command was updated in Maple 2016.

• 

For more information on Maple 2016 changes, see Updates in Maple 2016.

See Also

Logic

Logic/Equivalent

 


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