| 
      
      
      From: Dieter K. <cra...@us...> - 2011-06-08 22:34:27
      
     | 
| This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Maxima, A Computer Algebra System".
The branch, master has been updated
       via  6fe1bb34c713aff1ab95accddeace79de1171181 (commit)
       via  30e1ff00e077ab37871127174439aeab33fc502f (commit)
       via  75ace6c28ec3bb30b3d5435cbfaafb7c1f3e355e (commit)
       via  bb3c2935e07865047606a98fef915cf2fc5d4d04 (commit)
       via  0f84492945b25da883d8d881ba9130b5805ce917 (commit)
       via  9984e738807f8a7ea61f93df2bf68893ae000975 (commit)
       via  08d18da806c1dd3f38e4d8f4a2f4659391cd1b14 (commit)
       via  c52aa69594789f0722e6d217abf1abbe9dbfabcb (commit)
       via  bbace6eafe4c5a0bbc3eaec82d8964cd1eb7be94 (commit)
       via  19a3163dc038a664985af8967e6a8d658dde2078 (commit)
       via  7874c57b9dee1ab77feaaec01b3253c53cda416d (commit)
       via  f799bb19bcaf2e5fb1dddd8e40779b713efe595b (commit)
       via  386e669a4f00648349fb43870ab856caed351f49 (commit)
      from  948f8cd61909dfee300d615ce869fbe77b46f38c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6fe1bb34c713aff1ab95accddeace79de1171181
Author: crategus <cra...@us...>
Date:   Thu Jun 9 00:30:01 2011 +0200
    Moving the following documentation to several files:
    
    to Arrays.texi:
    subvarp
    
    to Lists.texi:
    sort
    sublist
    
    to Numbers.texi:
    mod
    isqrt
    
    to Functions.texi:
    fullmap
    fullmapl
    
    to MathFunctions.texi:
    make_random_state
    set_random_state
    random
    sqrt
    sqrtdispflag
    
    to Database.texi:
    equal
    notequal
    zeroequiv
    charfun
    compare
    is
    maybe
    sign
    
    to Simplification.texi:
    additive
    antisymmetric
    commutative
    xthru
    
    to Expressions.texi:
    psubst
    sublis
    sublis_apply_lambda
    subnumsimp
    subst
    substinpart
    substpart
    symbolp
    
    Reorganizing the chapter.
diff --git a/doc/info/Operators.texi b/doc/info/Operators.texi
index e11f6ba..300ee9c 100644
--- a/doc/info/Operators.texi
+++ b/doc/info/Operators.texi
@@ -1,87 +1,20 @@
-@menu
-* nary::                        
-* nofix::                       
-* postfix::                     
-* prefix::                      
-* Arithmetic operators::   
-* Relational operators::   
-* General operators::   
+@menu     
+* Introduction to operators::      
+* Arithmetic operators::
+* Relational operators::
+* Logical operators::
+* Operators for Equations::
+* Assignment operators::
+* User defined operators::
 @end menu
 
-@c FOLLOWING @NODES SHOULD BE CHANGED TO @DEFFN
-@c SINCE NARY, NOFIX, POSTFIX, AND PREFIX ARE ALL MAXIMA FUNCTIONS
-
 @c -----------------------------------------------------------------------------
-@node nary, nofix, Operators, Operators
-@section nary
+@node Introduction to operators, Arithmetic operators, Operators, Operators
+@section Introduction to operators
 @c -----------------------------------------------------------------------------
 
-An @code{nary} operator is used to denote a function of any number of arguments,
-each of which is separated by an occurrence of the operator, e.g.  A+B or A+B+C.
-The @code{nary("x")} function is a syntax extension function to declare @code{x}
-to be an @code{nary} operator.  Functions may be declared to be @code{nary}.  If
-@code{declare(j,nary);} is done, this tells the simplifier to simplify, e.g.
-@code{j(j(a,b),j(c,d))} to @code{j(a, b, c, d)}.
-
-See also @code{Syntax}.
-
-@opencatbox
-@category{Operators} @category{Syntax}
-@closecatbox
-
 @c -----------------------------------------------------------------------------
-@node nofix, postfix, nary, Operators
-@section nofix
-@c -----------------------------------------------------------------------------
-
-@code{nofix} operators are used to denote functions of no arguments.
-The mere presence of such an operator in a command will cause the
-corresponding function to be evaluated.  For example, when one types
-"exit;" to exit from a Maxima break, "exit" is behaving similar to a
-@code{nofix} operator.  The function @code{nofix("x")} is a syntax extension
-function which declares @code{x} to be a @code{nofix} operator.
-
-See also @code{Syntax}.
-
-@opencatbox
-@category{Operators} @category{Syntax}
-@closecatbox
-
-@c -----------------------------------------------------------------------------
-@node postfix, prefix, nofix, Operators
-@section postfix
-@c -----------------------------------------------------------------------------
-
-@code{postfix} operators like the @code{prefix} variety denote functions of a
-single argument, but in this case the argument immediately precedes an
-occurrence of the operator in the input string, e.g. 3!.  The
-@code{postfix("x")} function is a syntax extension function to declare @code{x}
-to be a @code{postfix} operator.
-
-See also @code{Syntax}.
-
-@opencatbox
-@category{Operators} @category{Syntax}
-@closecatbox
-
-@c -----------------------------------------------------------------------------
-@node prefix, Arithmetic operators, postfix, Operators
-@section prefix
-@c -----------------------------------------------------------------------------
-
-A @code{prefix} operator is one which signifies a function of one argument,
-which argument immediately follows an occurrence of the operator.
-@code{prefix("x")} is a syntax extension function to declare @code{x} to be a
-@code{prefix} operator.
-
-See also @code{Syntax}.
-
-@opencatbox
-@category{Operators} @category{Syntax}
-@closecatbox
-
-@c -----------------------------------------------------------------------------
-@node Arithmetic operators, Relational operators, prefix, Operators
+@node Arithmetic operators, Relational operators, Introduction to operators, Operators
 @section Arithmetic operators
 @c -----------------------------------------------------------------------------
 
@@ -354,8 +287,72 @@ Examples:
 @end deffn
 
 @c -----------------------------------------------------------------------------
-@need 1000
-@node Relational operators, General operators, Arithmetic operators, Operators
+@anchor{^^}
+@deffn {Operator} ^^
+@ifinfo
+@fnindex Noncommutative exponentiation
+@end ifinfo
+
+Noncommutative exponentiation operator.
+@code{^^} is the exponentiation operator corresponding to noncommutative
+multiplication @code{.}, just as the ordinary exponentiation operator @code{^}
+corresponds to commutative multiplication @code{*}.
+
+Noncommutative exponentiation is displayed by @code{^^} in 1-dimensional output,
+and by placing the exponent as a superscript within angle brackets @code{< >}
+in 2-dimensional output.
+
+Examples:
+
+@c ===beg===
+@c a . a . b . b . b + a * a * a * b * b;
+@c string (a . a . b . b . b + a * a * a * b * b);
+@c ===end===
+@example
+(%i1) a . a . b . b . b + a * a * a * b * b;
+                        3  2    <2>    <3>
+(%o1)                  a  b  + a    . b
+(%i2) string (a . a . b . b . b + a * a * a * b * b);
+(%o2)                  a^3*b^2+a^^2 . b^^3
+@end example
+
+@opencatbox
+@category{Operators}
+@closecatbox
+@end deffn
+
+@c -----------------------------------------------------------------------------
+@anchor{.}
+@deffn {Operator} .
+@ifinfo
+@fnindex Noncommutative multiplication
+@end ifinfo
+
+The dot operator, for matrix (non-commutative) multiplication.
+When @code{"."} is used in this way, spaces should be left on both sides of
+it, e.g.  @code{A . B}.  This distinguishes it plainly from a decimal point in
+a floating point number.
+
+See also
+@code{dot},
+@code{dot0nscsimp},
+@code{dot0simp},
+@code{dot1simp},
+@code{dotassoc},
+@code{dotconstrules},
+@code{dotdistrib},
+@code{dotexptsimp},
+@code{dotident},
+and
+@code{dotscrules}.
+
+@opencatbox
+@category{Operators}
+@closecatbox
+@end deffn
+
+@c -----------------------------------------------------------------------------
+@node Relational operators, Logical operators, Arithmetic operators, Operators
 @section Relational operators
 @c -----------------------------------------------------------------------------
 
@@ -460,39 +457,97 @@ values, although the arguments of relational expressions are evaluated.
 @end deffn
 
 @c -----------------------------------------------------------------------------
-@node General operators, , Relational operators, Operators
-@section General operators
+@node Logical operators, Operators for Equations, Relational operators, Operators
+@section Logical operators
 @c -----------------------------------------------------------------------------
 
+@c NEEDS EXAMPLES
+
 @c -----------------------------------------------------------------------------
-@anchor{^^}
-@deffn {Operator} ^^
+@anchor{and}
+@deffn {Operator} and
 @ifinfo
-@fnindex Noncommutative exponentiation
+@fnindex Logical conjunction
 @end ifinfo
 
-Noncommutative exponentiation operator.
-@code{^^} is the exponentiation operator corresponding to noncommutative
-multiplication @code{.}, just as the ordinary exponentiation operator @code{^}
-corresponds to commutative multiplication @code{*}.
+The logical conjunction operator.  @code{and} is an n-ary infix operator;
+its operands are Boolean expressions, and its result is a Boolean value.
 
-Noncommutative exponentiation is displayed by @code{^^} in 1-dimensional output,
-and by placing the exponent as a superscript within angle brackets @code{< >}
-in 2-dimensional output.
+@code{and} forces evaluation (like @code{is}) of one or more operands,
+and may force evaluation of all operands.
 
-Examples:
+Operands are evaluated in the order in which they appear.  @code{and} evaluates
+only as many of its operands as necessary to determine the result.  If any
+operand is @code{false}, the result is @code{false} and no further operands are
+evaluated.
 
-@c ===beg===
-@c a . a . b . b . b + a * a * a * b * b;
-@c string (a . a . b . b . b + a * a * a * b * b);
-@c ===end===
-@example
-(%i1) a . a . b . b . b + a * a * a * b * b;
-                        3  2    <2>    <3>
-(%o1)                  a  b  + a    . b
-(%i2) string (a . a . b . b . b + a * a * a * b * b);
-(%o2)                  a^3*b^2+a^^2 . b^^3
-@end example
+The global flag @code{prederror} governs the behavior of @code{and} when an
+evaluated operand cannot be determined to be @code{true} or @code{false}.
+@code{and} prints an error message when @code{prederror} is @code{true}.
+Otherwise, operands which do not evaluate to @code{true} or @code{false} are
+accepted, and the result is a Boolean expression.
+
+@code{and} is not commutative: @code{a and b} might not be equal to
+@code{b and a} due to the treatment of indeterminate operands.
+
+@opencatbox
+@category{Operators}
+@closecatbox
+@end deffn
+
+@c NEEDS EXAMPLES
+
+@c -----------------------------------------------------------------------------
+@anchor{not}
+@deffn {Operator} not
+@ifinfo
+@fnindex Logical negation
+@end ifinfo
+
+The logical negation operator.  @code{not} is a prefix operator;
+its operand is a Boolean expression, and its result is a Boolean value.
+
+@code{not} forces evaluation (like @code{is}) of its operand.
+
+The global flag @code{prederror} governs the behavior of @code{not} when its
+operand cannot be determined to be @code{true} or @code{false}.  @code{not}
+prints an error message when @code{prederror} is @code{true}.  Otherwise,
+operands which do not evaluate to @code{true} or @code{false} are accepted,
+and the result is a Boolean expression.
+
+@opencatbox
+@category{Operators}
+@closecatbox
+@end deffn
+
+@c NEEDS EXAMPLES
+
+@c -----------------------------------------------------------------------------
+@anchor{or}
+@deffn {Operator} or
+@ifinfo
+@fnindex Logical disjunction
+@end ifinfo
+
+The logical disjunction operator.  @code{or} is an n-ary infix operator;
+its operands are Boolean expressions, and its result is a Boolean value.
+
+@code{or} forces evaluation (like @code{is}) of one or more operands,
+and may force evaluation of all operands.
+
+Operands are evaluated in the order in which they appear.  @code{or} evaluates
+only as many of its operands as necessary to determine the result.  If any
+operand is @code{true}, the result is @code{true} and no further operands are
+evaluated.
+
+The global flag @code{prederror} governs the behavior of @code{or} when an
+evaluated operand cannot be determined to be @code{true} or @code{false}.
+@code{or} prints an error message when @code{prederror} is @code{true}.
+Otherwise, operands which do not evaluate to @code{true} or @code{false} are
+accepted, and the result is a Boolean expression.
+
+@code{or} is not commutative: @code{a or b} might not be equal to @code{b or a}
+due to the treatment of indeterminate operands.
 
 @opencatbox
 @category{Operators}
@@ -500,6 +555,11 @@ Examples:
 @end deffn
 
 @c -----------------------------------------------------------------------------
+@node Operators for Equations, Assignment operators, Logical operators, Operators
+@section Operators for Equations
+@c -----------------------------------------------------------------------------
+
+@c -----------------------------------------------------------------------------
 @anchor{#}
 @deffn {Operator} #
 @ifinfo
@@ -544,29 +604,138 @@ Examples:
 @end deffn
 
 @c -----------------------------------------------------------------------------
-@anchor{.}
-@deffn {Operator} .
+@anchor{=}
+@deffn {Operator} =
 @ifinfo
-@fnindex Noncommutative multiplication
+@fnindex Equation operator
+@fnindex Equal (syntactic equality)
 @end ifinfo
 
-The dot operator, for matrix (non-commutative) multiplication.
-When @code{"."} is used in this way, spaces should be left on both sides of
-it, e.g.  @code{A . B}.  This distinguishes it plainly from a decimal point in
-a floating point number.
+The equation operator.
 
-See also
-@code{dot},
-@code{dot0nscsimp},
-@code{dot0simp},
-@code{dot1simp},
-@code{dotassoc},
-@code{dotconstrules},
-@code{dotdistrib},
-@code{dotexptsimp},
-@code{dotident},
-and
-@code{dotscrules}.
+An expression @code{@var{a} = @var{b}}, by itself, represents an unevaluated
+equation, which might or might not hold.  Unevaluated equations may appear as
+arguments to @code{solve} and @code{algsys} or some other functions.
+
+The function @code{is} evaluates @code{=} to a Boolean value.
+@code{is(@var{a} = @var{b})} evaluates @code{@var{a} = @var{b}} to @code{true}
+when @var{a} and @var{b} are identical.  That is, @var{a} and @var{b} are atoms
+which are identical, or they are not atoms and their operators are identical and
+their arguments are identical.  Otherwise, @code{is(@var{a} = @var{b})}
+evaluates to @code{false}; it never evaluates to @code{unknown}.  When
+@code{is(@var{a} = @var{b})} is @code{true}, @var{a} and @var{b} are said to be
+syntactically equal, in contrast to equivalent expressions, for which
+@code{is(equal(@var{a}, @var{b}))} is @code{true}.  Expressions can be
+equivalent and not syntactically equal.
+
+The negation of @code{=} is represented by @code{#}.
+As with @code{=}, an expression @code{@var{a} # @var{b}}, by itself, is not
+evaluated.  @code{is(@var{a} # @var{b})} evaluates @code{@var{a} # @var{b}} to
+@code{true} or @code{false}.
+
+In addition to @code{is}, some other operators evaluate @code{=} and @code{#}
+to @code{true} or @code{false}, namely @code{if}, @code{and}, @code{or}, and
+@code{not}.
+
+Note that because of the rules for evaluation of predicate expressions
+(in particular because @code{not @var{expr}} causes evaluation of @var{expr}),
+@code{not @var{a} = @var{b}} is equivalent to @code{is(@var{a} # @var{b})},
+instead of @code{@var{a} # @var{b}}.
+
+@code{rhs} and @code{lhs} return the right-hand and left-hand sides,
+respectively, of an equation or inequation.
+
+See also @code{equal} and @code{notequal}.
+
+Examples:
+
+An expression @code{@var{a} = @var{b}}, by itself, represents
+an unevaluated equation, which might or might not hold.
+
+@c ===beg===
+@c eq_1 : a * x - 5 * y = 17;
+@c eq_2 : b * x + 3 * y = 29;
+@c solve ([eq_1, eq_2], [x, y]);
+@c subst (%, [eq_1, eq_2]);
+@c ratsimp (%);
+@c ===end===
+@example
+(%i1) eq_1 : a * x - 5 * y = 17;
+(%o1)                    a x - 5 y = 17
+(%i2) eq_2 : b * x + 3 * y = 29;
+(%o2)                    3 y + b x = 29
+(%i3) solve ([eq_1, eq_2], [x, y]);
+                        196         29 a - 17 b
+(%o3)          [[x = ---------, y = -----------]]
+                     5 b + 3 a       5 b + 3 a
+(%i4) subst (%, [eq_1, eq_2]);
+         196 a     5 (29 a - 17 b)
+(%o4) [--------- - --------------- = 17, 
+       5 b + 3 a      5 b + 3 a
+                                  196 b     3 (29 a - 17 b)
+                                --------- + --------------- = 29]
+                                5 b + 3 a      5 b + 3 a
+(%i5) ratsimp (%);
+(%o5)                  [17 = 17, 29 = 29]
+@end example
+
+@code{is(@var{a} = @var{b})} evaluates @code{@var{a} = @var{b}} to @code{true}
+when @var{a} and @var{b} are syntactically equal (that is, identical).
+Expressions can be equivalent and not syntactically equal.
+
+@c ===beg===
+@c a : (x + 1) * (x - 1);
+@c b : x^2 - 1;
+@c [is (a = b), is (a # b)];
+@c [is (equal (a, b)), is (notequal (a, b))];
+@c ===end===
+@example
+(%i1) a : (x + 1) * (x - 1);
+(%o1)                    (x - 1) (x + 1)
+(%i2) b : x^2 - 1;
+                              2
+(%o2)                        x  - 1
+(%i3) [is (a = b), is (a # b)];
+(%o3)                     [false, true]
+(%i4) [is (equal (a, b)), is (notequal (a, b))];
+(%o4)                     [true, false]
+@end example
+
+Some operators evaluate @code{=} and @code{#} to @code{true} or @code{false}.
+
+@c ===beg===
+@c if expand ((x + y)^2) = x^2 + 2 * x * y + y^2 then FOO else 
+@c       BAR;
+@c eq_3 : 2 * x = 3 * x;
+@c eq_4 : exp (2) = %e^2;
+@c [eq_3 and eq_4, eq_3 or eq_4, not eq_3];
+@c ===end===
+@example
+(%i1) if expand ((x + y)^2) = x^2 + 2 * x * y + y^2 then FOO else
+      BAR;
+(%o1)                          FOO
+(%i2) eq_3 : 2 * x = 3 * x;
+(%o2)                       2 x = 3 x
+(%i3) eq_4 : exp (2) = %e^2;
+                              2     2
+(%o3)                       %e  = %e
+(%i4) [eq_3 and eq_4, eq_3 or eq_4, not eq_3];
+(%o4)                  [false, true, true]
+@end example
+
+Because @code{not @var{expr}} causes evaluation of @var{expr},
+@code{not @var{a} = @var{b}} is equivalent to @code{is(@var{a} # @var{b})}.
+
+@c ===beg===
+@c [2 * x # 3 * x, not (2 * x = 3 * x)];
+@c is (2 * x # 3 * x);
+@c ===end===
+@example
+(%i1) [2 * x # 3 * x, not (2 * x = 3 * x)];
+(%o1)                   [2 x # 3 x, true]
+(%i2) is (2 * x # 3 * x);
+(%o2)                         true
+@end example
 
 @opencatbox
 @category{Operators}
@@ -574,6 +743,11 @@ and
 @end deffn
 
 @c -----------------------------------------------------------------------------
+@node Assignment operators, User defined operators, Operators for Equations, Operators
+@section Assignment operators
+@c -----------------------------------------------------------------------------
+
+@c -----------------------------------------------------------------------------
 @anchor{:}
 @deffn {Operator} :
 @ifinfo
@@ -976,1542 +1150,72 @@ the function defined by @code{:=} accepts a variable number of arguments.
 @end deffn
 
 @c -----------------------------------------------------------------------------
-@anchor{=}
-@deffn {Operator} =
-@ifinfo
-@fnindex Equation operator
-@fnindex Equal (syntactic equality)
-@end ifinfo
-
-The equation operator.
-
-An expression @code{@var{a} = @var{b}}, by itself, represents an unevaluated
-equation, which might or might not hold.  Unevaluated equations may appear as
-arguments to @code{solve} and @code{algsys} or some other functions.
-
-The function @code{is} evaluates @code{=} to a Boolean value.
-@code{is(@var{a} = @var{b})} evaluates @code{@var{a} = @var{b}} to @code{true}
-when @var{a} and @var{b} are identical.  That is, @var{a} and @var{b} are atoms
-which are identical, or they are not atoms and their operators are identical and
-their arguments are identical.  Otherwise, @code{is(@var{a} = @var{b})}
-evaluates to @code{false}; it never evaluates to @code{unknown}.  When
-@code{is(@var{a} = @var{b})} is @code{true}, @var{a} and @var{b} are said to be
-syntactically equal, in contrast to equivalent expressions, for which
-@code{is(equal(@var{a}, @var{b}))} is @code{true}.  Expressions can be
-equivalent and not syntactically equal.
-
-The negation of @code{=} is represented by @code{#}.
-As with @code{=}, an expression @code{@var{a} # @var{b}}, by itself, is not
-evaluated.  @code{is(@var{a} # @var{b})} evaluates @code{@var{a} # @var{b}} to
-@code{true} or @code{false}.
-
-In addition to @code{is}, some other operators evaluate @code{=} and @code{#}
-to @code{true} or @code{false}, namely @code{if}, @code{and}, @code{or}, and
-@code{not}.
-
-Note that because of the rules for evaluation of predicate expressions
-(in particular because @code{not @var{expr}} causes evaluation of @var{expr}),
-@code{not @var{a} = @var{b}} is equivalent to @code{is(@var{a} # @var{b})},
-instead of @code{@var{a} # @var{b}}.
-
-@code{rhs} and @code{lhs} return the right-hand and left-hand sides,
-respectively, of an equation or inequation.
-
-See also @code{equal} and @code{notequal}.
-
-Examples:
-
-An expression @code{@var{a} = @var{b}}, by itself, represents
-an unevaluated equation, which might or might not hold.
-
-@c ===beg===
-@c eq_1 : a * x - 5 * y = 17;
-@c eq_2 : b * x + 3 * y = 29;
-@c solve ([eq_1, eq_2], [x, y]);
-@c subst (%, [eq_1, eq_2]);
-@c ratsimp (%);
-@c ===end===
-@example
-(%i1) eq_1 : a * x - 5 * y = 17;
-(%o1)                    a x - 5 y = 17
-(%i2) eq_2 : b * x + 3 * y = 29;
-(%o2)                    3 y + b x = 29
-(%i3) solve ([eq_1, eq_2], [x, y]);
-                        196         29 a - 17 b
-(%o3)          [[x = ---------, y = -----------]]
-                     5 b + 3 a       5 b + 3 a
-(%i4) subst (%, [eq_1, eq_2]);
-         196 a     5 (29 a - 17 b)
-(%o4) [--------- - --------------- = 17, 
-       5 b + 3 a      5 b + 3 a
-                                  196 b     3 (29 a - 17 b)
-                                --------- + --------------- = 29]
-                                5 b + 3 a      5 b + 3 a
-(%i5) ratsimp (%);
-(%o5)                  [17 = 17, 29 = 29]
-@end example
-
-@code{is(@var{a} = @var{b})} evaluates @code{@var{a} = @var{b}} to @code{true}
-when @var{a} and @var{b} are syntactically equal (that is, identical).
-Expressions can be equivalent and not syntactically equal.
-
-@c ===beg===
-@c a : (x + 1) * (x - 1);
-@c b : x^2 - 1;
-@c [is (a = b), is (a # b)];
-@c [is (equal (a, b)), is (notequal (a, b))];
-@c ===end===
-@example
-(%i1) a : (x + 1) * (x - 1);
-(%o1)                    (x - 1) (x + 1)
-(%i2) b : x^2 - 1;
-                              2
-(%o2)                        x  - 1
-(%i3) [is (a = b), is (a # b)];
-(%o3)                     [false, true]
-(%i4) [is (equal (a, b)), is (notequal (a, b))];
-(%o4)                     [true, false]
-@end example
-
-Some operators evaluate @code{=} and @code{#} to @code{true} or @code{false}.
-
-@c ===beg===
-@c if expand ((x + y)^2) = x^2 + 2 * x * y + y^2 then FOO else 
-@c       BAR;
-@c eq_3 : 2 * x = 3 * x;
-@c eq_4 : exp (2) = %e^2;
-@c [eq_3 and eq_4, eq_3 or eq_4, not eq_3];
-@c ===end===
-@example
-(%i1) if expand ((x + y)^2) = x^2 + 2 * x * y + y^2 then FOO else
-      BAR;
-(%o1)                          FOO
-(%i2) eq_3 : 2 * x = 3 * x;
-(%o2)                       2 x = 3 x
-(%i3) eq_4 : exp (2) = %e^2;
-                              2     2
-(%o3)                       %e  = %e
-(%i4) [eq_3 and eq_4, eq_3 or eq_4, not eq_3];
-(%o4)                  [false, true, true]
-@end example
-
-Because @code{not @var{expr}} causes evaluation of @var{expr},
-@code{not @var{a} = @var{b}} is equivalent to @code{is(@var{a} # @var{b})}.
-
-@c ===beg===
-@c [2 * x # 3 * x, not (2 * x = 3 * x)];
-@c is (2 * x # 3 * x);
-@c ===end===
-@example
-(%i1) [2 * x # 3 * x, not (2 * x = 3 * x)];
-(%o1)                   [2 x # 3 x, true]
-(%i2) is (2 * x # 3 * x);
-(%o2)                         true
-@end example
-
-@opencatbox
-@category{Operators}
-@closecatbox
-@end deffn
-
-@c NEEDS EXAMPLES
-
-@c -----------------------------------------------------------------------------
-@anchor{and}
-@deffn {Operator} and
-@ifinfo
-@fnindex Logical conjunction
-@end ifinfo
-
-The logical conjunction operator.  @code{and} is an n-ary infix operator;
-its operands are Boolean expressions, and its result is a Boolean value.
-
-@code{and} forces evaluation (like @code{is}) of one or more operands,
-and may force evaluation of all operands.
-
-Operands are evaluated in the order in which they appear.  @code{and} evaluates
-only as many of its operands as necessary to determine the result.  If any
-operand is @code{false}, the result is @code{false} and no further operands are
-evaluated.
-
-The global flag @code{prederror} governs the behavior of @code{and} when an
-evaluated operand cannot be determined to be @code{true} or @code{false}.
-@code{and} prints an error message when @code{prederror} is @code{true}.
-Otherwise, operands which do not evaluate to @code{true} or @code{false} are
-accepted, and the result is a Boolean expression.
-
-@code{and} is not commutative: @code{a and b} might not be equal to
-@code{b and a} due to the treatment of indeterminate operands.
-
-@opencatbox
-@category{Operators}
-@closecatbox
-@end deffn
-
-@c NEEDS EXAMPLES
-
-@c -----------------------------------------------------------------------------
-@anchor{or}
-@deffn {Operator} or
-@ifinfo
-@fnindex Logical disjunction
-@end ifinfo
-
-The logical disjunction operator.  @code{or} is an n-ary infix operator;
-its operands are Boolean expressions, and its result is a Boolean value.
-
-@code{or} forces evaluation (like @code{is}) of one or more operands,
-and may force evaluation of all operands.
-
-Operands are evaluated in the order in which they appear.  @code{or} evaluates
-only as many of its operands as necessary to determine the result.  If any
-operand is @code{true}, the result is @code{true} and no further operands are
-evaluated.
-
-The global flag @code{prederror} governs the behavior of @code{or} when an
-evaluated operand cannot be determined to be @code{true} or @code{false}.
-@code{or} prints an error message when @code{prederror} is @code{true}.
-Otherwise, operands which do not evaluate to @code{true} or @code{false} are
-accepted, and the result is a Boolean expression.
-
-@code{or} is not commutative: @code{a or b} might not be equal to @code{b or a}
-due to the treatment of indeterminate operands.
-
-@opencatbox
-@category{Operators}
-@closecatbox
-@end deffn
-
-@c NEEDS EXAMPLES
-
-@c -----------------------------------------------------------------------------
-@anchor{not}
-@deffn {Operator} not
-@ifinfo
-@fnindex Logical negation
-@end ifinfo
-
-The logical negation operator.  @code{not} is a prefix operator;
-its operand is a Boolean expression, and its result is a Boolean value.
-
-@code{not} forces evaluation (like @code{is}) of its operand.
-
-The global flag @code{prederror} governs the behavior of @code{not} when its
-operand cannot be determined to be @code{true} or @code{false}.  @code{not}
-prints an error message when @code{prederror} is @code{true}.  Otherwise,
-operands which do not evaluate to @code{true} or @code{false} are accepted,
-and the result is a Boolean expression.
-
-@opencatbox
-@category{Operators}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{additive}
-@defvr {Keyword} additive
-
-If @code{declare(f,additive)} has been executed, then:
-
-(1) If @code{f} is univariate, whenever the simplifier encounters @code{f}
-applied to a sum, @code{f} will be distributed over that sum.  I.e.
-@code{f(y+x)} will simplify to @code{f(y)+f(x)}.
-
-(2) If @code{f} is a function of 2 or more arguments, additivity is defined as
-additivity in the first argument to @code{f}, as in the case of @code{sum} or
-@code{integrate}, i.e.  @code{f(h(x)+g(x),x)} will simplify to
-@code{f(h(x),x)+f(g(x),x)}.  This simplification does not occur when @code{f} is
-applied to expressions of the form @code{sum(x[i],i,lower-limit,upper-limit)}.
-
-@opencatbox
-@category{Operators} @category{Declarations and inferences}
-@closecatbox
-@end defvr
-
-@c -----------------------------------------------------------------------------
-@anchor{antisymmetric}
-@defvr {Declaration} antisymmetric
-
-If @code{declare(h,antisymmetric)} is done, this tells the simplifier that
-@code{h} is antisymmetric.  E.g.  @code{h(x,z,y)} will simplify to 
-@code{- h(x, y, z)}.  That is, it will give (-1)^n times the result given by
-@code{symmetric} or @code{commutative}, where n is the number of interchanges
-of two arguments necessary to convert it to that form.
-
-@opencatbox
-@category{Operators} @category{Declarations and inferences}
-@closecatbox
-@end defvr
-
-@c -----------------------------------------------------------------------------
-@anchor{charfun}
-@deffn {Function} charfun (@var{p})
-
-Return 0 when the predicate @var{p} evaluates to @code{false}; return 1 when
-the predicate evaluates to @code{true}.  When the predicate evaluates to
-something other than @code{true} or @code{false} (unknown),  return a noun form.
-
-Examples:
-
-@c ===beg===
-@c charfun (x < 1);
-@c subst (x = -1, %);
-@c e : charfun ('"and" (-1 < x, x < 1))$
-@c [subst (x = -1, e), subst (x = 0, e), subst (x = 1, e)];
-@c ===end===
-@example
-(%i1) charfun (x < 1);
-(%o1)                    charfun(x < 1)
-(%i2) subst (x = -1, %);
-(%o2)                           1
-(%i3) e : charfun ('"and" (-1 < x, x < 1))$
-(%i4) [subst (x = -1, e), subst (x = 0, e), subst (x = 1, e)];
-(%o4)                       [0, 1, 0]
-@end example
-
-@opencatbox
-@category{Mathematical functions}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{commutative}
-@defvr {Declaration} commutative
-
-If @code{declare(h,commutative)} is done, this tells the simplifier that
-@code{h} is a commutative function.  E.g.  @code{h(x,z,y)} will simplify to
-@code{h(x, y, z)}.  This is the same as @code{symmetric}.
-
-@opencatbox
-@category{Operators} @category{Declarations and inferences}
-@closecatbox
-@end defvr
-
-@c -----------------------------------------------------------------------------
-@anchor{compare}
-@deffn {Function} compare (@var{x}, @var{y})
-
-Return a comparison operator @var{op} (@code{<}, @code{<=}, @code{>}, @code{>=},
-@code{=}, or @code{#}) such that @code{is (@var{x} @var{op} @var{y})} evaluates
-to @code{true}; when either @var{x} or @var{y} depends on @code{%i} and
-@code{@var{x} # @var{y}}, return @code{notcomparable}; when there is no such
-operator or Maxima isn't able to determine the operator, return @code{unknown}.
-
-Examples:
-
-@c ===beg===
-@c compare (1, 2);
-@c compare (1, x);
-@c compare (%i, %i);
-@c compare (%i, %i + 1);
-@c compare (1/x, 0);
-@c compare (x, abs(x));
-@c ===end===
-@example
-(%i1) compare (1, 2);
-(%o1)                           <
-(%i2) compare (1, x);
-(%o2)                        unknown
-(%i3) compare (%i, %i);
-(%o3)                           =
-(%i4) compare (%i, %i + 1);
-(%o4)                     notcomparable
-(%i5) compare (1/x, 0);
-(%o5)                           #
-(%i6) compare (x, abs(x));
-(%o6)                          <=
-@end example
-
-The function @code{compare} doesn't try to determine whether the real domains of
-its arguments are nonempty; thus
-
-@c ===beg===
-@c compare (acos (x^2 + 1), acos (x^2 + 1) + 1);
-@c ===end===
-@example
-(%i1) compare (acos (x^2 + 1), acos (x^2 + 1) + 1);
-(%o1)                           <
-@end example
-
-@c IT IS NOT QUITE TRUE, WHAT ABOUT x=0 ?
-The real domain of @code{acos (x^2 + 1)} is empty.
-
-@opencatbox
-@category{Declarations and inferences}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{equal}
-@deffn {Function} equal (@var{a}, @var{b})
-
-Represents equivalence, that is, equal value.
-
-By itself, @code{equal} does not evaluate or simplify.
-The function @code{is} attempts to evaluate @code{equal} to a Boolean value.
-@code{is(equal(@var{a}, @var{b}))} returns @code{true} (or @code{false}) if
-and only if @var{a} and @var{b} are equal (or not equal) for all possible
-values of their variables, as determined by evaluating
-@code{ratsimp(@var{a} - @var{b})}; if @code{ratsimp} returns 0, the two
-expressions are considered equivalent.  Two expressions may be equivalent even
-if they are not syntactically equal (i.e., identical).
-
-When @code{is} fails to reduce @code{equal} to @code{true} or @code{false}, the
-result is governed by the global flag @code{prederror}.  When @code{prederror}
-is @code{true}, @code{is} complains with an error message.  Otherwise, @code{is}
-returns @code{unknown}.
-
-In addition to @code{is}, some other operators evaluate @code{equal} and
-@code{notequal} to @code{true} or @code{false}, namely @code{if}, @code{and},
-@code{or}, and @code{not}.
-
-@c FOLLOWING STATEMENT IS MORE OR LESS TRUE BUT I DON'T THINK THE DETAILS ARE CORRECT
-@c Declarations (integer, complex, etc)
-@c for variables appearing in @var{a} and @var{b} are ignored by @code{equal}.
-@c All variables are effectively assumed to be real-valued.
-
-The negation of @code{equal} is @code{notequal}.
-
-Examples:
-
-By itself, @code{equal} does not evaluate or simplify.
-
-@c ===beg===
-@c equal (x^2 - 1, (x + 1) * (x - 1));
-@c equal (x, x + 1);
-@c equal (x, y);
-@c ===end===
-@example
-(%i1) equal (x^2 - 1, (x + 1) * (x - 1));
-                        2
-(%o1)            equal(x  - 1, (x - 1) (x + 1))
-(%i2) equal (x, x + 1);
-(%o2)                    equal(x, x + 1)
-(%i3) equal (x, y);
-(%o3)                      equal(x, y)
-@end example
-
-The function @code{is} attempts to evaluate @code{equal} to a Boolean value.
-@code{is(equal(@var{a}, @var{b}))} returns @code{true} when
-@code{ratsimp(@var{a} - @var{b})} returns 0.  Two expressions may be equivalent
-even if they are not syntactically equal (i.e., identical).
-
-@c ===beg===
-@c ratsimp (x^2 - 1 - (x + 1) * (x - 1));
-@c is (equal (x^2 - 1, (x + 1) * (x - 1)));
-@c is (x^2 - 1 = (x + 1) * (x - 1));
-@c ratsimp (x - (x + 1));
-@c is (equal (x, x + 1));
-@c is (x = x + 1);
-@c ratsimp (x - y);
-@c is (equal (x, y));
-@c is (x = y);
-@c ===end===
-@example
-(%i1) ratsimp (x^2 - 1 - (x + 1) * (x - 1));
-(%o1)                           0
-(%i2) is (equal (x^2 - 1, (x + 1) * (x - 1)));
-(%o2)                         true
-(%i3) is (x^2 - 1 = (x + 1) * (x - 1));
-(%o3)                         false
-(%i4) ratsimp (x - (x + 1));
-(%o4)                          - 1
-(%i5) is (equal (x, x + 1));
-(%o5)                         false
-(%i6) is (x = x + 1);
-(%o6)                         false
-(%i7) ratsimp (x - y);
-(%o7)                         x - y
-(%i8) is (equal (x, y));
-(%o8)                        unknown
-(%i9) is (x = y);
-(%o9)                         false
-@end example
-
-When @code{is} fails to reduce @code{equal} to @code{true} or @code{false},
-the result is governed by the global flag @code{prederror}.
-
-@c ===beg===
-@c [aa : x^2 + 2*x + 1, bb : x^2 - 2*x - 1];
-@c ratsimp (aa - bb);
-@c prederror : true;
-@c is (equal (aa, bb));
-@c prederror : false;
-@c is (equal (aa, bb));
-@c ===end===
-@example
-(%i1) [aa : x^2 + 2*x + 1, bb : x^2 - 2*x - 1];
-                    2             2
-(%o1)             [x  + 2 x + 1, x  - 2 x - 1]
-(%i2) ratsimp (aa - bb);
-(%o2)                        4 x + 2
-(%i3) prederror : true;
-(%o3)                         true
-(%i4) is (equal (aa, bb));
-Maxima was unable to evaluate the predicate:
-       2             2
-equal(x  + 2 x + 1, x  - 2 x - 1)
- -- an error.  Quitting.  To debug this try debugmode(true);
-(%i5) prederror : false;
-(%o5)                         false
-(%i6) is (equal (aa, bb));
-(%o6)                        unknown
-@end example
-
-Some operators evaluate @code{equal} and @code{notequal} to @code{true} or
-@code{false}.
-
-@c ===beg===
-@c if equal (y, y - 1) then FOO else BAR;
-@c eq_1 : equal (x, x + 1);
-@c eq_2 : equal (y^2 + 2*y + 1, (y + 1)^2);
-@c [eq_1 and eq_2, eq_1 or eq_2, not eq_1];
-@c ===end===
-@example
-(%i1) if equal (y, y - 1) then FOO else BAR;
-(%o1)                          BAR
-(%i2) eq_1 : equal (x, x + 1);
-(%o2)                    equal(x, x + 1)
-(%i3) eq_2 : equal (y^2 + 2*y + 1, (y + 1)^2);
-                         2                   2
-(%o3)             equal(y  + 2 y + 1, (y + 1) )
-(%i4) [eq_1 and eq_2, eq_1 or eq_2, not eq_1];
-(%o4)                  [false, true, true]
-@end example
-
-Because @code{not @var{expr}} causes evaluation of @var{expr},
-@code{not equal(@var{a}, @var{b})} is equivalent to
-@code{is(notequal(@var{a}, @var{b}))}.
-
-@c ===beg===
-@c [notequal (2*z, 2*z - 1), not equal (2*z, 2*z - 1)];
-@c is (notequal (2*z, 2*z - 1));
-@c ===end===
-@example
-(%i1) [notequal (2*z, 2*z - 1), not equal (2*z, 2*z - 1)];
-(%o1)            [notequal(2 z, 2 z - 1), true]
-(%i2) is (notequal (2*z, 2*z - 1));
-(%o2)                         true
-@end example
-
-@opencatbox
-@category{Operators}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{notequal}
-@deffn {Function} notequal (@var{a}, @var{b})
-
-Represents the negation of @code{equal(@var{a}, @var{b})}.
-
-Examples:
-
-@c ===beg===
-@c equal (a, b);
-@c maybe (equal (a, b));
-@c notequal (a, b);
-@c not equal (a, b);
-@c maybe (notequal (a, b));
-@c assume (a > b);
-@c equal (a, b);
-@c maybe (equal (a, b));
-@c notequal (a, b);
-@c maybe (notequal (a, b));
-@c ===end===
-@example
-(%i1) equal (a, b);
-(%o1)                      equal(a, b)
-(%i2) maybe (equal (a, b));
-(%o2)                        unknown
-(%i3) notequal (a, b);
-(%o3)                    notequal(a, b)
-(%i4) not equal (a, b);
-(%o4)                    notequal(a, b)
-(%i5) maybe (notequal (a, b));
-(%o5)                        unknown
-(%i6) assume (a > b);
-(%o6)                        [a > b]
-(%i7) equal (a, b);
-(%o7)                      equal(a, b)
-(%i8) maybe (equal (a, b));
-(%o8)                         false
-(%i9) notequal (a, b);
-(%o9)                    notequal(a, b)
-(%i10) maybe (notequal (a, b));
-(%o10)                        true
-@end example
-
-@opencatbox
-@category{Operators}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{fullmap}
-@deffn {Function} fullmap (@var{f}, @var{expr_1}, @dots{})
-
-Similar to @code{map}, but @code{fullmap} keeps mapping down all subexpressions
-until the main operators are no longer the same.
-
-@code{fullmap} is used by the Maxima simplifier for certain matrix
-manipulations; thus, Maxima sometimes generates an error message concerning
-@code{fullmap} even though @code{fullmap} was not explicitly called by the user.
-
-Examples:
-
-@c ===beg===
-@c a + b * c;
-@c fullmap (g, %);
-@c map (g, %th(2));
-@c ===end===
-@example
-(%i1) a + b * c;
-(%o1)                        b c + a
-(%i2) fullmap (g, %);
-(%o2)                   g(b) g(c) + g(a)
-(%i3) map (g, %th(2));
-(%o3)                     g(b c) + g(a)
-@end example
-
-@opencatbox
-@category{Function application} @category{Expressions}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{fullmapl}
-@deffn {Function} fullmapl (@var{f}, @var{list_1}, @dots{})
-
-Similar to @code{fullmap}, but @code{fullmapl} only maps onto lists and
-matrices.
-
-Example:
-
-@c ===beg===
-@c fullmapl ("+", [3, [4, 5]], [[a, 1], [0, -1.5]]);
-@c ===end===
-@example
-(%i1) fullmapl ("+", [3, [4, 5]], [[a, 1], [0, -1.5]]);
-(%o1)                [[a + 3, 4], [4, 3.5]]
-@end example
-
-@opencatbox
-@category{Function application} @category{Expressions}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{is}
-@deffn {Function} is (@var{expr})
-
-Attempts to determine whether the predicate @var{expr} is provable from the
-facts in the @code{assume} database.
-
-If the predicate is provably @code{true} or @code{false}, @code{is} returns
-@code{true} or @code{false}, respectively.  Otherwise, the return value is
-governed by the global flag @code{prederror}.  When @code{prederror} is
-@code{true}, @code{is} complains with an error message.  Otherwise, @code{is}
-returns @code{unknown}.
-
-@code{ev(@var{expr}, pred)} (which can be written  @code{@var{expr}, pred} at
-the interactive prompt) is equivalent to @code{is(@var{expr})}.
-
-See also @code{assume}, @code{facts}, and @code{maybe}.
-
-Examples:
-
-@code{is} causes evaluation of predicates.
-
-@c ===beg===
-@c %pi > %e;
-@c is (%pi > %e);
-@c ===end===
-@example
-(%i1) %pi > %e;
-(%o1)                       %pi > %e
-(%i2) is (%pi > %e);
-(%o2)                         true
-@end example
-
-@code{is} attempts to derive predicates from the @code{assume} database.
-
-@c ===beg===
-@c assume (a > b);
-@c assume (b > c);
-@c is (a < b);
-@c is (a > c);
-@c is (equal (a, c));
-@c ===end===
-@example
-(%i1) assume (a > b);
-(%o1)                        [a > b]
-(%i2) assume (b > c);
-(%o2)                        [b > c]
-(%i3) is (a < b);
-(%o3)                         false
-(%i4) is (a > c);
-(%o4)                         true
-(%i5) is (equal (a, c));
-(%o5)                         false
-@end example
-
-If @code{is} can neither prove nor disprove a predicate from the @code{assume}
-database, the global flag @code{prederror} governs the behavior of @code{is}.
-
-@c ===beg===
-@c assume (a > b);
-@c prederror: true$
-@c is (a > 0);
-@c prederror: false$
-@c is (a > 0);
-@c ===end===
-@example
-(%i1) assume (a > b);
-(%o1)                        [a > b]
-(%i2) prederror: true$
-(%i3) is (a > 0);
-Maxima was unable to evaluate the predicate:
-a > 0
- -- an error.  Quitting.  To debug this try debugmode(true);
-(%i4) prederror: false$
-(%i5) is (a > 0);
-(%o5)                        unknown
-@end example
-
-@opencatbox
-@category{Predicate functions} @category{Declarations and inferences}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{maybe}
-@deffn {Function} maybe (@var{expr})
-
-Attempts to determine whether the predicate @var{expr} is provable from the
-facts in the @code{assume} database.
-
-If the predicate is provably @code{true} or @code{false}, @code{maybe} returns
-@code{true} or @code{false}, respectively.  Otherwise, @code{maybe} returns
-@code{unknown}.
-
-@code{maybe} is functionally equivalent to @code{is} with
-@code{prederror: false}, but the result is computed without actually assigning
-a value to @code{prederror}.
-
-See also @code{assume}, @code{facts}, and @code{is}.
-
-Examples:
-
-@c ===beg===
-@c maybe (x > 0);
-@c assume (x > 1);
-@c maybe (x > 0);
-@c ===end===
-@example
-(%i1) maybe (x > 0);
-(%o1)                        unknown
-(%i2) assume (x > 1);
-(%o2)                        [x > 1]
-(%i3) maybe (x > 0);
-(%o3)                         true
-@end example
-
-@opencatbox
-@category{Predicate functions} @category{Declarations and inferences}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{isqrt}
-@deffn {Function} isqrt (@var{x})
-
-Returns the "integer square root" of the absolute value of @var{x}, which is an
-integer.
-
-@opencatbox
-@category{Mathematical functions}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{polymod}
-@deffn  {Function} polymod (@var{p})
-@deffnx {Function} polymod (@var{p}, @var{m})
-
-Converts the polynomial @var{p} to a modular representation with respect to the
-current modulus which is the value of the variable @code{modulus}.
-
-@code{polymod (@var{p}, @var{m})} specifies a modulus @var{m} to be used 
-instead of the current value of @code{modulus}.
-
-See @code{modulus}.
-
-@opencatbox
-@category{Polynomials}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{mod}
-@deffn {Function} mod (@var{x}, @var{y})
-
-If @var{x} and @var{y} are real numbers and @var{y} is nonzero, return
-@code{@var{x} - @var{y} * floor(@var{x} / @var{y})}.  Further for all real
-@var{x}, we have @code{mod (@var{x}, 0) = @var{x}}.  For a discussion of the
-definition @code{mod (@var{x}, 0) = @var{x}}, see Section 3.4, of
-"Concrete Mathematics," by Graham, Knuth, and Patashnik.  The function
-@code{mod (@var{x}, 1)} is a sawtooth function with period 1 with
-@code{mod (1, 1) = 0} and @code{mod (0, 1) = 0}.
-
-To find the principal argument (a number in the interval @code{(-%pi, %pi]}) of
-a complex number, use the function
-@code{@var{x} |-> %pi - mod (%pi - @var{x}, 2*%pi)}, where @var{x} is an
-argument.
-
-When @var{x} and @var{y} are constant expressions (@code{10 * %pi}, for 
-example), @code{mod} uses the same big float evaluation scheme that @code{floor}
-and @code{ceiling} uses.  Again, it's possible, although unlikely, that
-@code{mod} could return an erroneous value in such cases.
-
-For nonnumerical arguments @var{x} or @var{y}, @code{mod} knows several
-simplification rules:
-
-@c ===beg===
-@c mod (x, 0);
-@c mod (a*x, a*y);
-@c mod (0, x);
-@c ===end===
-@example
-(%i1) mod (x, 0);
-(%o1)                           x
-(%i2) mod (a*x, a*y);
-(%o2)                      a mod(x, y)
-(%i3) mod (0, x);
-(%o3)                           0
-@end example
-
-@opencatbox
-@category{Mathematical functions}
-@closecatbox
-@end deffn
-
+@node User defined operators, , Assignment operators, Operators
+@section User defined operators
 @c -----------------------------------------------------------------------------
-@anchor{psubst}
-@deffn  {Function} psubst (@var{list}, @var{expr})
-@deffnx {Function} psubst (@var{a}, @var{b}, @var{expr})
-
-@code{psubst(@var{a}, @var{b}, @var{expr})} is simliar to @code{subst}.  See 
-@code{subst}.
-
-In distinction from @code{subst} the function @code{psubst} makes parallel 
-substitutions, if the first argument @var{list} is a list of equations.
-
-See also @code{sublis} for making parallel substitutions.
-
-Example:
-
-The first example shows parallel substitution with @code{psubst}.  The second
-example shows the result for the function @code{subst}, which does a serial
-substitution.
-
-@c ===beg===
-@c psubst ([a^2=b, b=a], sin(a^2) + sin(b));
-@c subst ([a^2=b, b=a], sin(a^2) + sin(b));
-@c ===end===
-@example
-(%i4) psubst ([a^2=b, b=a], sin(a^2) + sin(b));
-(%o4)                           sin(b) + sin(a)
-(%i5) subst ([a^2=b, b=a], sin(a^2) + sin(b));
-(%o5)                              2 sin(a)
-@end example
-
-@opencatbox
-@category{Expressions}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{make_random_state}
-@deffn  {Function} make_random_state (@var{n})
-@deffnx {Function} make_random_state (@var{s})
-@deffnx {Function} make_random_state (true)
-@deffnx {Function} make_random_state (false)
-
-@c OMIT THIS FOR NOW. SEE COMMENT BELOW.
-@c @defunx make_random_state (@var{a})
-
-A random state object represents the state of the random number generator.
-The state comprises 627 32-bit words.
-
-@code{make_random_state (@var{n})} returns a new random state object
-created from an integer seed value equal to @var{n} modulo 2^32.
-@var{n} may be negative.
-
-@c OMIT THIS FOR NOW. NOT SURE HOW THIS IS SUPPOSED TO WORK.
-@c @code{make_random_state (@var{a})} returns a new random state object
-@c created from an array @var{a}, which must be a Lisp array of 32 unsigned bytes.
-
-@code{make_random_state (@var{s})} returns a copy of the random state @var{s}.
-
-@code{make_random_state (true)} returns a new random state object,
-using the current computer clock time as the seed.
-
-@code{make_random_state (false)} returns a copy of the current state
-of the random number generator.
-
-@opencatbox
-@category{Random numbers}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{set_random_state}
-@deffn {Function} set_random_state (@var{s})
-
-Copies @var{s} to the random number generator state.
-
-@code{set_random_state} always returns @code{done}.
-
-@opencatbox
-@category{Random numbers}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{random}
-@deffn {Function} random (@var{x})
-
-Returns a pseudorandom number.  If @var{x} is an integer,
-@code{random (@var{x})} returns an integer from 0 through @code{@var{x} - 1}
-inclusive.  If @var{x} is a floating point number, @code{random (@var{x})}
-returns a nonnegative floating point number less than @var{x}.  @code{random}
-complains with an error if @var{x} is neither an integer nor a float, or if
-@var{x} is not positive.
-
-The functions @code{make_random_state} and @code{set_random_state}
-maintain the state of the random number generator.
-
-The Maxima random number generator is an implementation of the Mersenne twister
-MT 19937.
-
-Examples:
-
-@c ===beg===
-@c s1: make_random_state (654321)$
-@c set_random_state (s1);
-@c random (1000);
-@c random (9573684);
-@c random (2^75);
-@c s2: make_random_state (false)$
-@c random (1.0);
-@c random (10.0);
-@c random (100.0);
-@c set_random_state (s2);
-@c random (1.0);
-@c random (10.0);
-@c random (100.0);
-@c ===end===
-@example
-(%i1) s1: make_random_state (654321)$
-(%i2) set_random_state (s1);
-(%o2)                         done
-(%i3) random (1000);
-(%o3)                          768
-(%i4) random (9573684);
-(%o4)                        7657880
-(%i5) random (2^75);
-(%o5)                11804491615036831636390
-(%i6) s2: make_random_state (false)$
-(%i7) random (1.0);
-(%o7)                   .2310127244107132
-(%i8) random (10.0);
-(%o8)                   4.394553645870825
-(%i9) random (100.0);
-(%o9)                   32.28666704056853
-(%i10) set_random_state (s2);
-(%o10)                        done
-(%i11) random (1.0);
-(%o11)                  .2310127244107132
-(%i12) random (10.0);
-(%o12)                  4.394553645870825
-(%i13) random (100.0);
-(%o13)                  32.28666704056853
-@end example
-
-@opencatbox
-@category{Random numbers} @category{Numerical methods}
-@closecatbox
-@end deffn
 
 @c -----------------------------------------------------------------------------
-@anchor{sign}
-@deffn {Function} sign (@var{expr})
+@deffn {Function} nary
 
-Attempts to determine the sign of @var{expr} on the basis of the facts in the
-current data base.  It returns one of the following answers: @code{pos}
-(positive), @code{neg} (negative), @code{zero}, @code{pz} (positive or zero),
-@code{nz} (negative or zero), @code{pn} (positive or negative), or @code{pnz}
-(positive, negative, or zero, i.e. nothing known).
-
-@opencatbox
-@category{Declarations and inferences}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{sort}
-@deffn  {Function} sort (@var{L}, @var{P})
-@deffnx {Function} sort (@var{L})
-
-Sorts a list @var{L} according to a predicate @code{P} of two arguments, such
-that @code{@var{P} (@var{L}[k], @var{L}[k + 1])} is @code{true} for any two 
-successive elements.  The predicate may be specified as the name of a function 
-or binary infix operator, or as a @code{lambda} expression.  If specified as
-the name of an operator, the name is enclosed in "double quotes".
-
-The sorted list is returned as a new object; the argument @var{L} is not
-modified.  To construct the return value, @code{sort} makes a shallow copy of
-the elements of @var{L}.
-@c DUNNO IF WE NEED TO GO INTO THE IMPLICATIONS OF SHALLOW COPY HERE ...
-
-@c MIGHT CONSIDER A REF FOR TOTAL ORDER HERE
-If the predicate @var{P} is not a total order on the elements of @var{L}, then 
-@code{sort} might run to completion without error, but the result is undefined.
-@code{sort} complains if the predicate evaluates to something other than 
-@code{true} or @code{false}.
-
-@code{sort (@var{L})} is equivalent to @code{sort (@var{L}, orderlessp)}.
-That is, the default sorting order is ascending, as determined by 
-@code{orderlessp}.  All Maxima atoms and expressions are comparable under 
-@code{orderlessp}.
-
-The predicate @code{ordergreatp} sorts a list in descending order.  The
-predicate @code{ordermagnitudep} sorts Maxima numbers, constant symbols with a
-numerical value, or expressions which can be evaluated to a constant by
-magnitude.  All other elements of the list @var{L} are sorted by
-@code{orderlessp}.  The predicate @code{"<"} allows the ordering by magnitude
-too, but does not order completely if elements in the list @var{L} are not
-comparable under @code{"<"}.
-
-Examples:
-
-@c ===beg===
-@c sort ([11, -17, 29b0, 7.55, 3, -5/2, b + a, 9 * c, 
-@c       19 - 3 * x]);
-@c sort ([11, -17, 29b0, 7.55, 3, -5/2, b + a, 9 * c, 19 - 3 * x], 
-@c       ordergreatp);
-@c sort ([%pi, 3, 4, %e, %gamma]);
-@c sort ([%pi, 3, 4, %e, %gamma], "<");
-@c my_list : [[aa, hh, uu], [ee, cc], [zz, xx, mm, cc], [%pi, %e]];
-@c sort (my_list);
-@c sort (my_list, lambda ([a, b], orderlessp (reverse (a), 
-@c       reverse (b))));
-@c ===end===
-@example
-(%i1) sort ([11, -17, 29b0, 7.55, 3, -5/2, b + a, 9 * c,
-      19 - 3 * x]);
-               5
-(%o1) [- 17, - -, 3, 7.55, 11, 2.9b1, b + a, 9 c, 19 - 3 x]
-               2
-(%i2) sort ([11, -17, 29b0, 7.55, 3, -5/2, b + a, 9*c, 19 - 3*x],
-      ordergreatp);
-                                                   5
-(%o2) [19 - 3 x, 9 c, b + a, 2.9b1, 11, 7.55, 3, - -, - 17]
-                                                   2
-(%i3) sort ([%pi, 3, 4, %e, %gamma]);
-(%o3)                [3, 4, %e, %gamma, %pi]
-(%i4) sort ([%pi, 3, 4, %e, %gamma], "<");
-(%o4)                [%gamma, %e, 3, %pi, 4]
-(%i5) my_list: [[aa,hh,uu], [ee,cc], [zz,xx,mm,cc], [%pi,%e]];
-(%o5) [[aa, hh, uu], [ee, cc], [zz, xx, mm, cc], [%pi, %e]]
-(%i6) sort (my_list);
-(%o6) [[%pi, %e], [aa, hh, uu], [ee, cc], [zz, xx, mm, cc]]
-@group
-(%i7) sort (my_list, lambda ([a, b], orderlessp (reverse (a),
-      reverse (b))));
-@end group
-(%o7) [[%pi, %e], [ee, cc], [zz, xx, mm, cc], [aa, hh, uu]]
-@end example
-
-Order Maxima numbers, constants, and constants expressions by magnitude, and
-all other elements in ascending sorting order:
-
-@c ===beg===
-@c sort([%i,1+%i,2*x,minf,inf,%e,sin(1),0,1,2,3,1.0,1.0b0],
-@c      ordermagnitudep);
-@c ===end===
-@example
-(%i8) sort([%i,1+%i,2*x,minf,inf,%e,sin(1),0,1,2,3,1.0,1.0b0],
-           ordermagnitudep);
-(%o8) [minf, 0, sin(1), 1, 1.0, 1.0b0, 2, %e, 3, inf, %i, 
-                                                     %i + 1, 2 x]
-@end example
-
-@opencatbox
-@category{Lists}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{sqrt}
-@deffn {Function} sqrt (@var{x})
-
-The square root of @var{x}.  It is represented internally by
-@code{@var{x}^(1/2)}.  See also @code{rootscontract}.
-
-@code{radexpand} if @code{true} will cause nth roots of factors of a product
-which are powers of n to be pulled outside of the radical, e.g.
-@code{sqrt(16*x^2)} will become @code{4*x} only if @code{radexpand} is
-@code{true}.
-
-@opencatbox
-@category{Mathematical functions}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{sqrtdispflag}
-@defvr {Option variable} sqrtdispflag
-Default value: @code{true}
-
-When @code{sqrtdispflag} is @code{false}, causes @code{sqrt} to display with
-exponent 1/2.
-@c AND OTHERWISE ... ??
-
-@opencatbox
-@category{Mathematical functions} @category{Display flags and variables}
-@closecatbox
-@end defvr
-
-@c NEEDS EXPANSION, CLARIFICATION, MORE EXAMPLES
-
-@c -----------------------------------------------------------------------------
-@anchor{sublis}
-@deffn {Function} sublis (@var{list}, @var{expr})
-
-Makes multiple parallel substitutions into an expression.  @var{list} is a list
-of equations.  The left hand side of the equations must be an atom.
-
-The variable @code{sublis_apply_lambda} controls simplification after
-@code{sublis}.
-
-See also @code{psubst} for making parallel substitutions.
-
-Example:
-
-@c ===beg===
-@c sublis ([a=b, b=a], sin(a) + cos(b));
-@c ===end===
-@example
-(%i1) sublis ([a=b, b=a], sin(a) + cos(b));
-(%o1)                    sin(b) + cos(a)
-@end example
-
-@opencatbox
-@category{Expressions}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{sublist}
-@deffn {Function} sublist (@var{list}, @var{p})
-
-Returns the list of elements of @var{list} for which the predicate @code{p}
-returns @code{true}.
-
-Example:
-
-@c ===beg===
-@c L: [1, 2, 3, 4, 5, 6];
-@c sublist (L, evenp);
-@c ===end===
-@example
-(%i1) L: [1, 2, 3, 4, 5, 6];
-(%o1)                  [1, 2, 3, 4, 5, 6]
-(%i2) sublist (L, evenp);
-(%o2)                       [2, 4, 6]
-@end example
-
-@opencatbox
-@category{Lists}
-@closecatbox
-@end deffn
-
-@c -----------------------------------------------------------------------------
-@anchor{sublis_apply_lambda}
-@defvr {Option variable} sublis_apply_lambda
-Default value: @code{true}
-
-Controls whether @code{lambda}'s substituted are applied in simplification after
-@code{sublis} is used or whether you have to do an @code{ev} to get things to
-apply.  @code{true} means do the application.
-
-@opencatbox
-@category{Expressions}
-@closecatbox
-@end defvr
-
-@c -----------------------------------------------------------------------------
-@anchor{subnumsimp}
-@defvr {Option variable} subnumsimp
-Default value: @code{false}
-
-If @code{true} then the functions @code{subst} and @code{psubst} can substitute
-a subscripted variable @code{f[x]} with a number, when only the symbol @code{f}
-is given.
-
-See also @code{subst}.
-
-@example
-(%i1) subst(100,g,g[x]+2);
-
-subst: cannot substitute 100 for operator g in expression g
-                                                           x
- -- an error. To debug this try: debugmode(true);
-
-(%i2) subst(100,g,g[x]+2),subnumsimp:true;
-(%o2)                          102
-@end example
-
-@opencatbox
-@category{Expressions}
-@closecatbox
-@end defvr
-
-@c NEEDS CLARIFICATION, MORE EXAMPLES
-
-@c -----------------------------------------------------------------------------
-@anchor{subst}
-@deffn {Function} subst (@var{a}, @var{b}, @var{c})
-
-Substitutes @var{a} for @var{b} in @var{c}.  @var{b} must be an atom or a
-complete subexpression of @var{c}.  For example, @code{x+y+z} is a complete
-subexpression of @code{2*(x+y+z)/w} while @code{x+y} is not.  When @var{b} does
-not have these characteristics, one may sometimes use @code{substpart} or
-@code{ratsubst} (see below).  Alternatively, if @var{b} is of the form
-@code{e/f} then one could use @code{subst (a*f, e, c)} while if @var{b} is of
-the form @code{e^(1/f)} then one could use @code{subst (a^f, e, c)}.  The
-@code{subst} command also discerns the @code{x^y} in @code{x^-y} so that
-@code{subst (a, sqrt(x), 1/sqrt(x))} yields @code{1/a}.  @var{a} and @var{b}
-may also be operators of an expression enclosed in double-quotes @code{"} or
-they may be function names.  If one wishes to substitute for the independent
-variable in derivative forms then the @code{at} function (see below) should be
-used.
-
-@c UMM, REVERSE THIS AND MOVE IT TO substitute ??
-@code{subst} is an alias for @code{substitute}.
-
-The commands @code{subst (@var{eq_1}, @var{expr})} or
-@code{subst ([@var{eq_1}, ..., @var{eq_k}], @var{expr})} are other permissible
-forms.  The @var{eq_i} are equations indicating substitutions to be made.
-For each equation, the right side will be substituted for the left in the 
-expression @var{expr}.  The equations are substituted in serial from left to
-right in @var{expr}.  See the functions @code{sublis} and @code{psubst} for 
-making parallel substi...
 
[truncated message content] |