and form (list, set, or expression) - Maple Help

Home : Support : Online Help : Programming : Data Types : Conversion : and form (list, set, or expression)

convert/and

convert list, set, expression to and form

convert/or

convert list, set to or form

convert/xor

convert list, set to xor form

 Calling Sequence convert(exprA, and) convert(expr, or) convert(expr, xor)

Parameters

 exprA - list, set, or expression expr - list or set

Description

 • The convert/and command converts a given list, set, or expression to an and form. Given expr as a list $[{a}_{1},{a}_{2},{a}_{3},...,{a}_{n}]$, convert/and converts the list into the form ${a}_{1}\mathrm{and}{a}_{2}\mathrm{and}{a}_{3}\mathrm{...}\mathrm{and}{a}_{n}$. If the given list or set is empty, true is returned.
 • The convert/or command converts a given list or set to an or form. Given expr as a list $[{a}_{1},{a}_{2},{a}_{3},...,{a}_{n}]$, convert/or converts the list into the form ${a}_{1}\mathrm{or}{a}_{2}\mathrm{or}{a}_{3}\mathrm{...}\mathrm{or}{a}_{n}$. If the given list or set is empty, false is returned.
 • The convert/xor command converts a given list or set to an xor form. Given expr as a list $[{a}_{1},{a}_{2},{a}_{3},...,{a}_{n}]$, convert/xor converts the list into the form ${a}_{1}\mathrm{xor}{a}_{2}\mathrm{xor}{a}_{3}\mathrm{...}\mathrm{xor}{a}_{n}$. If the given list or set is empty, true is returned.

Examples

 > $\mathrm{convert}\left(\left[a,b,c\right],\mathrm{and}\right)$
 ${a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{c}$ (1)
 > $\mathrm{convert}\left(\left[\right],\mathrm{and}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{convert}\left(a⇒b,\mathrm{and}\right)$
 ${a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}$ (3)
 > $\mathrm{convert}\left(a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{or}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b,\mathrm{and}\right)$
 ${a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}$ (4)
 > $\mathrm{convert}\left(f\left(a,b\right),\mathrm{and}\right)$
 ${a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}$ (5)
 > $\mathrm{convert}\left(abc,\mathrm{and}\right)$
 ${a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{c}$ (6)
 > $\mathrm{convert}\left(\left\{a,b,c\right\},\mathrm{or}\right)$
 ${a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{or}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{or}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{c}$ (7)
 > $\mathrm{convert}\left(\left[\right],\mathrm{or}\right)$
 ${\mathrm{false}}$ (8)
 > $\mathrm{convert}\left(\left\{a,b,c\right\},\mathrm{xor}\right)$
 ${a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{xor}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{xor}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{c}$ (9)
 > $\mathrm{convert}\left(\left[\right],\mathrm{xor}\right)$
 ${\mathrm{true}}$ (10)