Complement - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Logic

 Complement
 construct the complement of a Boolean expression

 Calling Sequence Complement(b)

Parameters

 b - Boolean expression

Description

 • The Complement command returns the complement of the Boolean expression b, that is, the expression generated by replacing &and with &or, &or with &and, negating all variable instances, and extending to the remaining Boolean operators by their formulas in terms of &and, &or, and ¬.
 • The resulting expression will be equivalent to not b in truth value.

Examples

 > $\mathrm{with}\left(\mathrm{Logic}\right):$
 > $\mathrm{Complement}\left(a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&and\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left(¬\left(a\right)\right)=\mathrm{false}\right)$
 $\left({¬}{a}\right){\vee }{a}{=}{\mathrm{true}}$ (1)
 > $\mathrm{Complement}\left(a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&implies\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b\right)$
 ${¬}\left(\left({¬}{b}\right){⇒}\left({¬}{a}\right)\right)$ (2)
 > $\mathrm{Complement}\left(\left(\left(¬\left(a\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&nor\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&iff\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}c\right)$
 $\left({a}{↑}\left({¬}{b}\right)\right){⊻}\left({¬}{c}\right)$ (3)

Compatibility

 • The Logic[Complement] command was introduced in Maple 2016.
 • For more information on Maple 2016 changes, see Updates in Maple 2016.

 See Also