1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256

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 nonoptional 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 builtin and implemented in C++, while others are library functions.
The builtin functions are usually less flexible than the library functions because they cannot be left unevaluated.
Given incorrect arguments, a builtin function will generate an error.
However, a userdefined 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 "rowmajor" 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 <i>higher</i> 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 leftside and rightside precedence.
For example, the infix operator "{}" has left precedence
*EVAL OpLeftPrecedence("")
and right precedence
*EVAL OpRightPrecedence("")
 this allows us to parse expressions such as {ab+c} correctly, as $(ab)+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 userdefined 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 GPLyacasdoc://refprog/1/2/*> for full information.
