Logic - Maple Programming Help

Home : Support : Online Help : Mathematics : Logic : Logic/Complement

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(\left(a&and\mathrm{¬}\left(a\right)\right)=\mathrm{false}\right)$
 $\left({¬}{a}\right){\vee }{a}{=}{\mathrm{true}}$ (1)
 > $\mathrm{Complement}\left(a&impliesb\right)$
 ${¬}\left(\left({¬}{b}\right){⇒}\left({¬}{a}\right)\right)$ (2)
 > $\mathrm{Complement}\left(\mathrm{¬}\left(a\right)&norb&iffc\right)$
 $\left({a}{↑}\left({¬}{b}\right)\right){⊻}\left({¬}{c}\right)$ (3)

Compatibility

 • The Logic[Complement] command was introduced in Maple 2016.