## File: glossary.chapt.txt

package info (click to toggle)
yacas 1.3.6-2
 `123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256` `````` Glossary *A glossary *INTRO This is a short glossary of terms frequently used in the {Yacas} documentation. *A arity arity "Arity" is the number of arguments of a function. For example, the function {Cos(x)} has one argument and so we say that "{Cos} has arity 1". Arity of a function can be 0, 1, 2, ... {Yacas} allows to define functions with the same name but different arities, and different rules corresponding to these arities will be used. Also, it is possible to define a function with optional arguments, for example, {Plot2D} is one such function. Such functions can have any arity larger or equal to a certain minimum arity (the number of non-optional arguments). *SEE Function, OpPrecedence, Rule *A array array An array is a container object that can hold a fixed number of other Yacas objects in it. Individual elements of an array can be accessed using the {[]} operation. Most list operations also work on arrays. Arrays are faster than lists but the array size cannot be changed. *SEE Array'Create *A atoms atoms Atoms are basic Yacas objects that are used to represent symbols, numbers, and function names. An atom has a string representation which is shown when it is displayed. For example, {3.14159}, {x}, {A123}, {+}, {"good morning"} are atoms. Atoms can be of type string, number, or symbol. For example, {y1} is a symbolic atom, {954} is a number atom, and {""} is an (empty) string atom. Symbolic atoms are normally used in {Yacas} to denote mathematical unknowns and function names. Number and string atoms are used to denote values. A symbolic atom can be bound to a value (in which case it becomes a variable), or to a rule or several rules (in which case it becomes a function). An atom can also have a property object. *SEE Atom, String *A CAS CAS Abbreviation for "computer algebra system". {Yacas} is a CAS. *A constants constants Constants such as {I}, {Pi} or {GoldenRatio} are symbolic atoms that are specially interpreted by {Yacas}. For example, there are simplification rules that transform expressions such as {Sin(Pi)} into {0}. When requesting a numerical evaluation of a constant, the numerical value is given to the current value as set with {N}. Some constants take a long time to compute and therefore they are cached at the highest precision computed so far. These are the "cached constants". *SEE N, CachedConstant, Pi, GoldenRatio, CatalanConstant, gamma, I *A equations *A {==} equations To denote symbolic equations, the operator {==} is used. This operator does not assign or compare its sides. For example, the expression {Sin(x)==1} is kept unevaluated and can be passed as argument to functions. For example, In> Solve(Sin(x)==1, x) Out> {x==Pi/2}; The symbolic equation operator {==} is also useful to represent solutions of equations or to specify substitutions, give options, and so on. *SEE Solve, Where, Plot2D *A functions functions A function is a symbolic atom that is bound to a rule or several rules. A function can have none, one, or more arguments. Functions can also have a variable number of arguments. Arguments of functions are arbitrary Yacas objects. Functions can be evaluated, that is, the rules bound to them may be executed. For example, {Cos(Pi+0)} is an expression that contains two functions and four atoms. The atom {Pi} is a symbolic atom which is normally not bound to anything. The atom {0} is a numeric atom. The atoms {Cos} and {+} are symbolic atoms which are bound to appropriate simplification rules. So these two atoms are functions. Note that these functions have different syntax. {Cos} is a normal function which takes its arguments in parentheses. The atom {+} is a function with special syntax because "{+}" is placed between its arguments and no parentheses are used. The rules to which {+} is bound are such that the expression {Pi+0} is evaluated to the symbolic atom {Pi}. The rules for {Cos} are such that the expression {Cos(Pi)} is evaluated to the numeric atom {-1}. The example {Yacas} session is: In> Cos(Pi+0) Out> -1; Some functions are built-in and implemented in C++, while others are library functions. The built-in functions are usually less flexible than the library functions because they cannot be left unevaluated. Given incorrect arguments, a built-in function will generate an error. However, a user-defined function may simply return unevaluated in such cases. *SEE Function, Rule, <-- *A lists lists A list is a basic {Yacas} container object. A list is written as e.g. {{a, b, c}} or {{}} (empty list). Individual elements of a list can be accessed using the {[]} operation. Lists can be concatenated, and individual elements can be removed or inserted. Lists are ubiquitous in {Yacas}. Most data structures in the standard library is based on lists. Lists are also used internally to represent {Yacas} expressions. For example, the expression {Cos(x+1)} is represented internally as a nested list: In> FullForm( Cos(x+1) ) (Cos (+ x 1 )) Out> Cos(x+1); *SEE List, Listify, UnList, Length, FullForm *A matrices matrices A matrix is represented as a list of lists. Matrices are represented in the "row-major" order: a matrix is a list of rows, and each row is a list of its elements. Some basic linear algebra operations on matrices are supported. *SEE Determinant, Identity, IsDiagonal, EigenValues *A operators operators Operators are functions that have special syntax declared for them. An operator can be "bodied", infix, prefix or postfix. Because of this, operators must have precedence. Apart from the syntax, operators are exactly the same as any other functions, they can have rules bound to them in the same way. *SEE Bodied, Infix, Prefix, Postfix *A plotting plotting Plotting is currently supported via the {Plot2D} and {Plot3DS} functions. Functions of one or two variables can be plotted on given intervals with a given precision. {Yacas} generates all numerical data for plots. *SEE Plot2D, Plot3DS *A precedence precedence Precedence is a property of the syntax of an operator that specifies how it is parsed. Only operators, i.e. functions with special syntax, can have precedence. Precedence values are nonnegative integers: 0, 1, ... Lower numbers bind more tightly. For example, the operator "{+}" binds less tightly (i.e. has a higher precedence value) than the operator "{*}" and so the expression {a+b*c} is parsed as {a+(b*c)}, as one would expect. Infix operators can have different left-side and right-side precedence. For example, the infix operator "{-}" has left precedence *EVAL OpLeftPrecedence("-") and right precedence *EVAL OpRightPrecedence("-") -- this allows us to parse expressions such as {a-b+c} correctly, as \$(a-b)+c\$, and not as \$a-(b+c)\$. *SEE Bodied, OpPrecedence, OpLeftPrecedence, OpRightPrecedence *A properties properties Properties are special additional objects (tags) that can be tied to expressions. For example, the expression {1+x} may be tagged by an expression {y} by the command In> a:= ExtraInfo'Set(1+x,y); Out> 1+x; Now {a} refers to an expression {1+x} which is different from all other copies of {1+x} because it is tagged by {y}. *SEE ExtraInfo'Get, ExtraInfo'Set *A rules rules Rules are the principal mechanism of expression evaluation in {Yacas}. A rule specifies that a certain symbolic expression is to be replaced by another expression. If no rule that matches a given symbolic expression can be found, the expression is left unevaluated. This is usually the desired behavior for a CAS. For example, a user can type In> func1(x+0) Out> func1(x); and use an undefined function {func1}. Since no rules are defined for the function {func1}, it is not evaluated, but its argument has been simplified. Only expressions containing functions can be evaluated by rules. (Atoms are evaluated only if they are bound to a value.) Several rules can be defined for a given function. Rules can be erased or added at run time. *SEE Rule, <--, Retract *A strings strings A string is an atom with character string value, for example, {"abcd"}. Individual characters of the string can be accessed using the {[]} operation. Some string manipulation functions are supported. *SEE String, StringMid'Get, StringMid'Set *A syntax syntax {Yacas} uses an infix syntax similar to C or Fortran. However, the syntax is entirely user-defined and very flexible. Infix, prefix, postfix operators can be defined, as well as "bodied" functions. This allows to write mathematical expressions more comfortably, for example, In> D(x) Sin(x)+1 Out> Cos(x); Functions with special syntax can have different precedence. *SEE Bodied, Infix, Prefix, Postfix, OpPrecedence *A variables variables Variables are symbolic atoms bound to a "value". Value is any Yacas object, such as an atom or a list. For example, after executing In> a := 1 Out> 1; the symbolic atom {a} becomes a variable bound to a value, the numeric atom {1}. *SEE Eval, :=, Clear *A warranty warranty {Yacas} is Free Software ("logiciel libre") and comes with {NO WARRANTY}. See <*the appropriate section of the GPL|yacasdoc://refprog/1/2/*> for full information. ``````