Complement - Maple Help

Logic

 Complement
 construct the complement of a Boolean expression

 Calling Sequence Complement(b)

Parameters

 b - Boolean expression

Description

 • Complement returns the complement of a Boolean expression, 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 ¬.
 • For an input b, 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.