&and - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


Logic Package Operators

 

Description

Precedence

Examples

Description

• 

The Logic package uses a two-valued logic system, while standard Maple logic is three-valued.  For this reason, all Boolean expressions used in the Logic package must be expressed in terms of the operators &and, &iff, &implies, &nand, &nor, &not, &or, and &xor.

• 

You may either enter expressions in terms of these operators directly into Maple, or transform expressions of type logical into expressions in terms of these operators with the Logic[Import] command.

Precedence

• 

Note that the Logic package operators do not have the same precedence as corresponding three-valued operators.  In particular, all operators have the same precedence, so a&orb&andc is equivalent to a&orb&andc, not a&orb&andc. Parentheses should be used to correctly specify the precedence.

Examples

withLogic:

Exporta&orb,form=MOD2

1+a+1b+1

(1)

Exporta&norb&andc&orb

notaorbandcorb

(2)

Importaborc

abc

(3)

Export&nota&orb&xorc&nandb,form=boolean

notnotaorbxorcandb

(4)

See Also

Logic

Logic[Environment]

Logic[Export]

Logic[Import]

type,logical