;;;	Copyright (c) 1990 by Aubrey Jaffer, All rights reserved.

;;; This section deals with functions which are non-algebraic or
;;; unspecified.  These functions are canonicalized with regard to
;;; symmetric, antisymmetric, even, odd, distributive and anti-distributive
;;; properties on a per argument basis.  This does not canonicalize
;;; functions because there are many other functional properties.  What is
;;; possible in this area?  What other properties are important to include?

;;; f(x,y,z) = f(y,x,z)		f is symmetric in arguments 1 and 2.
;;; f(x,y,z) = -f(y,x,z)	f is anti-symmetric in arguments 1 and 2.
;;; f(x,y) = f(-x,y)		f is even in argument 1.
;;; f(x,y) = -f(-x,y)		f is odd in argument 1. 
;;; f(g(x,y),z) = g(f(x,z),y)	f and g distribute over argument 1. 
;;; f(g(x,y),z) = -g(f(x,z),y)	f and g anti-distribute over argument 1. 

;;; When one of the functions in a distributive pair is '+' (and '-') the
;;; system knows that constant factors can be pulled out.  When one of the
;;; functions in a distributive pair is '*' the system knows that it applies
;;; to '/' and exponentiated terms also. 

;;; Normalization procedure:

;;; First, apply distributive rules to pairs (to sets?) of distributive
;;; functions in such a was as to push the lower priority function to the
;;; bottom (smallest terms).  '+' followed by '*' and exponentiation are the
;;; highest priority functions. 

;;; Starting with the innermost terms conditionally negate arguments in
;;; order to make the highest order term of the argument positive (negating
;;; the function if odd). 

;;; Finally, sort sets of symmetric arguments by highest order term ranking.

;;;	Copyright (c) 1990 by Aubrey Jaffer, All rights reserved.

;;; This section deals with the user session protocol.

;;; The user can specify a line number prototype or the default can be
;;; used.  line_number(<legal identifier>) sets the prototype.
;;; Subsequent unnumbered lines are assigned labels identical to the
;;; prototype except that the last field (consecutive alphabetic or
;;; consecutive numeric characters) is a unique field of the same type
;;; as the field.

;;; Equations can be referenced by their line numbers by operators
;;; which use equations.  Equations given as arguments to functions
;;; generate an error.  If the line number of an expression is given
;;; as an argument to an operator @ = expression is the equation
;;; actually used.

;;; JACAL maintains a data base of equations and line numbers.  Each
;;; equation is associated with its line number.  The line number of
;;; each expression is associated with <line number> = expression.
;;; Each equation in the data base expresses a fact relating variables
;;; to each other.  Equations can be removed from the data base by the
;;; command dismiss(<line number>);.

;;; When a symbol which is a line number is used in an expression or
;;; as an argument to a function, the database is searched for an
;;; equation referencing that symbol.  One of those equations is used
;;; to eliminate variables or simplify the expression.
