When an expression is here said to be "undefined," it means that, in the absence of external information about the interpretation of the expression, it is semantically void, meaningless, and/or nonsensical.
Mathematical operators take one or more operands, which are here referred to by an 'x' subscripted with a number.
Operators defined here as "unary" are defined as operating on their first operand that is not equal to tu'o (referred to as "the operand" within the respective definitions), regardless of where it occurs in the operand list.
See also: CLL section 18.16, example 16.3 and the paragraph before it, in which the operand of va'a is in the x_1 place; CLL section 18.14, example 14.1, in which the operand of va'a is in the x_2 place.
If all operands of an operator are tu'o, the value of the expression is equal to tu'o.
If an operand described in an operator's definition is missing from the operator's operand list and there is no default value given, the missing operand shall be interpreted as tu'o.
If one or more extra operands not described in an operator's definition are present in the operator's operand list, they affect the evaluation in an undefined or unspecified manner analogous to sumti attached to a selbri with do'e.
Lojban mathematical operators are defined in terms of conventional mathematical operators, and thus there is an implicit type system used in determining the value of an expression. Mekso operands may be of any of the following types:
number — a "number" production in the formal grammar, usually corresponding to an element of the complex plane
array — an array, vector, ordered list/set, or tuple of one or more mekso values, constructed using jo'i
matrix — a composition of one or more arrays of numbers, all of the same size, constructed using pi'a or sa'i
function
If an operator is applied to operands of a type which its definition does not address, the expression is undefined.
The operand tu'o is polymorphic; its type in an expression is determined by its surrounding context.
Operator-specific type information (currently in the "Notes" subsections) needs to be included in the main definitions somehow without being too clunky.
A null operator, in the sense that it returns all its arguments unchanged. Used as syntactic glue in poly-ary operators, such as to pass three arguments to a ternary operator in infix notation.
Proposed keyword
null operator
See Also
{tu'o} Null operand
Examples of ge'a Usage
papano bi'eju'u re gei pipanopano bi'eju'u re ge'a re
.1010 (base 2) × 2 ^ 110 (base 2) (CLL, 18.14.4)
cmavo: fe'i (VUhU1)
Current definition
divided by — n-ary mathematical operator: divided by; division operator; (((a / b) / c) / ...) --
When reducing a pi'i expression from left to right, the types of the two operands considered at each point must together take one of the following forms:
number and number — standard mathematical multiplication; evalutes to a number
number and matrix or matrix and number — scaling the elements of a matrix by a factor; evaluates to a matrix
number and array of numbers or array of numbers and number — scaling the elements of an array by a factor; evaluates to an array of numbers
matrix and matrix — standard matrix multiplication; the number of columns in the first matrix must equal the number of rows in the right matrix, otherwise the result is undefined; evaluates to a matrix
matrix and array of numbers — The operator sa'i is implicitly applied to the array, and the expression is then evaluated as a matrix-matrix multiplication, yielding a one-column matrix that is then implicitly converted to an array of the numbers in its column.
When pi'i has only one operand, it is the identity function.
Examples of pi'i Usage
Proposed Definition of su'i
su'i (VUhU1)
plus — n-ary mathematical operator: plus; addition operator; (((a + b) + c) + ...) --
Keywords:
Examples of su'i Usage
cmavo: vu'u (VUhU1)
Current definition
minus — n-ary mathematical operator: minus; subtraction operator; (((a - b) - c) - ...) --
Proposed definition
subtraction: x1 - x2 - x3 ...
Proposed keyword
subtract
minus
See Also
va'a
ni'u
Notes
This is the operator for subtraction. It is distinct from {va'a} which is the operator for negation, and also from {ni'u} which is a minus sign and is part of the number