 Export - Maple Help

Logic

 Export
 express in terms of Logic package operators Calling Sequence Export(expr, {form}) Parameters

 expr - expression suitable for use by the Logic package form - expression where form=MOD2 or form=boolean Description

 • The Export command transforms the expression $\mathrm{expr}$ into one of a specified type. Available Conversions

 The following conversions are available (form must be one of these).
 • MOD2: The Boolean expression is converted to its equivalent modulo 2 format by mapping &and to multiplication, &xor to addition, true to $1$, and false to $0$.
 • boolean: Any Logic package operators present in the expression are replaced with the equivalent ternary logical operators, for example, and, or, and not. Examples

 > $\mathrm{with}\left(\mathrm{Logic}\right):$
 > $\mathrm{Export}\left(\left(\mathrm{&and}\left(a,b,c\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&or\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b,\mathrm{form}=\mathrm{boolean}\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}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{or}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}$ (1)
 > $\mathrm{Export}\left(\left(\mathrm{&nor}\left(a,b,c\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&and\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b,\mathrm{form}=\mathrm{boolean}\right)$
 ${\mathbf{not}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left({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}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}$ (2)
 > $\mathrm{Export}\left(\left(¬\left(a\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&or\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b,\mathrm{form}=\mathrm{MOD2}\right)$
 ${1}{+}{a}{}\left({b}{+}{1}\right)$ (3)