InstallLogicalClassesAA:
PROC [] ~ {
local declarations
orClass, notClass, andClass, existsClass, forAllClass: CompoundClass;
define compound classes
binary operations
andClass ← MakeBinOpClass[$and, $andOp, $a, $b, MathConstructors.MakeBigMathSym['\266], "a AND b", "$a & $b"];
orClass ← MakeBinOpClass[$or, $orOp, $a, $b, MathConstructors.MakeBigMathSym['\267], "a OR b", "$a | $b"];
unary operations
notClass ← MakeUnaryOpClass[$not, $notOp, $a, MathConstructors.MakeBigMathSym['\152], "~a", "~ $a"];
existsClass ← MakeUnaryOpClass[$exists, $existsOp, $a, MathConstructors.MakeBigMathSym['\264], "exists a", "E $a"];
forAllClass ← MakeUnaryOpClass[$forAll, $forAllOp, $a, MathConstructors.MakeBigMathSym['\265], "forAll a", "A $a"];
MathDB.InstallCompoundClass[existsClass];
MathDB.AddOperator[existsClass, $Logical];
MathDB.InstallCompoundClass[forAllClass];
MathDB.AddOperator[forAllClass, $Logical];
MathDB.InstallCompoundClass[andClass];
MathDB.AddOperator[andClass, $Logical];
MathDB.InstallCompoundClass[orClass];
MathDB.AddOperator[orClass, $Logical];
MathDB.InstallCompoundClass[notClass];
MathDB.AddOperator[notClass, $Logical];
};
InstallLogicalClassesB:
PROC [] ~ {
local declarations
eqFormulaClass, notEqFormulaClass, ltFormulaClass, leFormulaClass, geFormulaClass, gtFormulaClass, approachesClass, impliesClass, equivClass: CompoundClass;
relations
eqFormulaClass ← MakeRelationClass[$eqFormula, $equals, $lhs, $rhs, MathConstructors.MakePlainSym['=], "a = b", "$lhs = $rhs", "equal($lhs, $rhs)", "Eq[$lhs, $rhs]"];
notEqFormulaClass ← MakeRelationClass[$notEqFormula, $equals, $lhs, $rhs, MathConstructors.MakeXCSym['\140,'\041], "a # b", "$lhs # $rhs"];
ltFormulaClass ← MakeRelationClass[$ltFormula, $lt, $lhs, $rhs, MathConstructors.MakePlainSym['<], "a < b", "$lhs < $rhs"];
gtFormulaClass ← MakeRelationClass[$gtFormula, $gt, $lhs, $rhs, MathConstructors.MakePlainSym['>], "a > b", "$lhs > $rhs"];
leFormulaClass ← MakeRelationClass[$leFormula, $le, $lhs, $rhs, MathConstructors.MakeXCSym['\145,'\041], "a <= b", "$lhs <= $rhs"];
geFormulaClass ← MakeRelationClass[$geFormula, $ge, $lhs, $rhs, MathConstructors.MakeXCSym['\146,'\041], "a >= b", "$lhs >= $rhs"];
approachesClass ← MakeRelationClass[$approachesFormula, $approaches, $lhs, $rhs, MathConstructors.MakePlainSym['\256], "a -> b", "$lhs -> $rhs", "Rep($lhs, $rhs)", "Rep[$lhs, $rhs]"];
impliesClass ← MakeRelationClass[$impliesFormula, $implies, $lhs, $rhs, MathConstructors.MakeBigMathSym['\117], "a => b", "$lhs => $rhs"];
equivClass ← MakeRelationClass[$equivFormula, $equiv, $lhs, $rhs, MathConstructors.MakeBigMathSym['\116], "a equiv b", "$lhs equiv $rhs"];
MathDB.InstallCompoundClass[eqFormulaClass];
MathDB.AddOperator[eqFormulaClass, $Logical];
MathDB.InstallCompoundClass[notEqFormulaClass];
MathDB.AddOperator[notEqFormulaClass, $Logical];
MathDB.InstallCompoundClass[ltFormulaClass];
MathDB.AddOperator[ltFormulaClass, $Logical];
MathDB.InstallCompoundClass[leFormulaClass];
MathDB.AddOperator[leFormulaClass, $Logical];
MathDB.InstallCompoundClass[gtFormulaClass];
MathDB.AddOperator[gtFormulaClass, $Logical];
MathDB.InstallCompoundClass[geFormulaClass];
MathDB.AddOperator[geFormulaClass, $Logical];
MathDB.InstallCompoundClass[approachesClass];
MathDB.AddOperator[approachesClass, $Logical];
MathDB.InstallCompoundClass[impliesClass];
MathDB.AddOperator[impliesClass, $Logical];
MathDB.InstallCompoundClass[equivClass];
MathDB.AddOperator[equivClass, $Logical];
};