Environment - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Logic : Environment

Logic

 Environment
 control level of automatic logical simplification

 Calling Sequence Environment(level)

Parameters

 level - (optional) an integer between 0 and 2 inclusive

Description

 • The Environment command controls the current environment used for automatic simplification of Boolean expressions, that is, which identities and properties are automatically applied to logical expressions.
 • If level is not provided, the current simplification level is returned.  If it is provided, the simplification level is set to level and NULL is returned.
 The default level is 0.

Levels of Logical Simplification

 The following describes the various levels of logical simplification.
 • 0 -- No simplifications.
 • 1 -- Associative properties are applied to remove redundant parentheses; the input is expressed in terms of &and, &or, and ¬.
 • 2 -- In addition to level 1 simplifications, the properties ($a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&and\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}a$ --> a) and ($a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&or\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}a$ --> a) and knowledge of true and false are applied.

Examples

 > $\mathrm{with}\left(\mathrm{Logic}\right)$
 $\left[{\mathrm{&and}}{,}{\mathrm{&iff}}{,}{\mathrm{&implies}}{,}{\mathrm{&nand}}{,}{\mathrm{&nor}}{,}{\mathrm{¬}}{,}{\mathrm{&or}}{,}{\mathrm{&xor}}{,}{\mathrm{BooleanSimplify}}{,}{\mathrm{Canonicalize}}{,}{\mathrm{Complement}}{,}{\mathrm{Contradiction}}{,}{\mathrm{Convert}}{,}{\mathrm{Dual}}{,}{\mathrm{Environment}}{,}{\mathrm{Equivalent}}{,}{\mathrm{Export}}{,}{\mathrm{Implies}}{,}{\mathrm{Import}}{,}{\mathrm{IncidenceGraph}}{,}{\mathrm{Normalize}}{,}{\mathrm{Parity}}{,}{\mathrm{PrimalGraph}}{,}{\mathrm{Random}}{,}{\mathrm{Satisfiable}}{,}{\mathrm{Satisfy}}{,}{\mathrm{SymmetryGroup}}{,}{\mathrm{Tautology}}{,}{\mathrm{TruthTable}}{,}{\mathrm{Tseitin}}\right]$ (1)
 > $\mathrm{Environment}\left(0\right)$
 > $\left(a&andb\right)&anda$
 $\left({a}{\wedge }{b}\right){\wedge }{a}$ (2)
 > $a&iffa$
 ${a}{⇔}{a}$ (3)
 > $\mathrm{Environment}\left(1\right)$
 > $\left(a&andb\right)&anda$
 ${a}{\wedge }{a}{\wedge }{b}$ (4)
 > $a&iffa$
 $\left({a}{\wedge }{a}\right){\vee }\left(\left({¬}{a}\right){\wedge }\left({¬}{a}\right)\right)$ (5)
 > $\mathrm{Environment}\left(2\right)$
 > $\left(a&andb\right)&anda$
 ${a}{\wedge }{b}$ (6)
 > $a&iffa$
 ${a}{\vee }\left({¬}{a}\right)$ (7)

 See Also