"The most ambitious plan is the one most likely to succeed" (George Pólya).
"It would be fair to say that the concept of a forest is simpler than the concept of a tree" (Ray Kurzweil).
"To understand is to compress" (Gregory Chaitin).
"True language, deep language, must open consciousness" (Nietzsche).
Characteristics of the Language
It consists of 12 pairs of universal semantic primitives. Each pair of primitives are opposites or duals.
It is an orthogonal language in a double sense: because the primitives are independent of each other and because the primitives can be freely combined with each other, without restrictions, by means of the primitives themselves. The lexical semantics is the same as the structural semantics, that is, the primitives are combined by means of the primitives themselves.
In contrast, traditional programming languages have arithmetic, logical, control, etc., operations with combinatorial constraints between them.
It is a universal formal language. It is not a particular formal language, with a corresponding grammar, because if it were, it would be subject to restrictions. Therefore, it has no formal grammar, but it does have a universal semantic grammar, in the sense that it allows freely combining some primitives with others. But with MENTAL, as a mother language, particular languages can be defined, with their corresponding grammars.
It is a theoretical language, ideal, without implementational references.
Like any language, it cannot express its own semantics. The universal semantic primitives are inexpressible. Only their manifestations, their instances, can be expressed.
It is an expression-oriented language.
Expressions are formed by combining instances of primitives. They have a hierarchical structure: an expression is composed of other expressions (subexpressions), and these in turn of others, and so on until you reach the atomic expressions, which are the characters.
An expression can be a set, a sequence, a function, a rule, an object, a procedure, a set of sets, a set of functions, a sequence of rules, and so on.
Expressions can be of various types: imaginary, recursive, fractal, shared, virtual, linked, interlinked, interlaced, paradoxical, imaginary, fuzzy, etc.
Expressions reside in an "abstract space". We do not talk about memory because memory is an implementing concept. In the process of evaluating expressions there is an "abstract time", which corresponds to the form of the expressions. Sequences are evaluated serially and sets are evaluated in parallel. Abstract space and abstract time are linked, they are two aspects of one and the same thing.
The concept of abstract space is especially important. It is an abstraction of physical space, n-dimensional geometric space and internal (mental) space or memory.
All expressions are processes because they are evaluated. The result of evaluating an expression can be the same or different from the original expression. If the result of the evaluation is the same, we say that the expression is self-evaluating. There is the possibility of partial evaluation of expressions. There is also a "reverse evaluation" which is applied in potential substitution expressions.
Data and code are language expressions. All expressions can be modified during the expression evaluation process.
All expressions can be parameterized. In traditional programming languages only procedures can be parameterized.
There are 3 meta-expressions: θ (the null or non-existent expression), α (the existential expression) and Ω (the universal expression, representing all possible expressions of the language).
It allows to express quantitative magnitudes (by means of quantity and unit) and to operate with them. Units can be simple or compound. Quantitative quantities are expressions that can be freely combined and be, for example, arguments or results of functions.
It also allows you to express qualitative quantities, where the quantity is a real number between 0 and 1, and the unit is a quality (such as high, rich, fast, etc.), including the quality of true or false.
It has a "hypersemantics", a generic semantics for contrary primitives.
It is a polymorphic language, that is, it allows combining expressions of different types. For example, a sequence can contain 4 elements: a number, a set, a rule and a function.
It is a symbolic language, which does not use keywords, but only symbols or signs. It is a compressed language, but of great expressive power.
There is no semantic gap, i.e. the primitives of MENTAL are not artificial concepts but are also semantic primitives of natural language. Consequently, the language is simple to learn and use.
Universal Semantic Primitives
The universal semantic primitives are all interrelated. They all support each other. This feature is called "bootstrapping".
All primitives are orthogonal, that is, they are independent of each other. Despite being independent, they have numerous relationships with each other. And they can be combined without restrictions by means of the primitives themselves (lexical semantics is the same as structural semantics). The true expressive power of language lies in combinatorics.
The following table specifies the 12 universal primitives of language, along with their contraries or duals.
N°
Primitive
Syntax
1
Parameterized Generalization
〈...x...〉
Non-Parameterized Generalization
〈...〉
2
Qualitative Particularization
x/y
Quantitative Particularization
x\n
3
Parallel Grouping (Ensemble)
{x y ... z}
Serial Grouping (Sequence)
(x y ... z)
4
Normal Distribution
[…[…]…]
Linear Distribution
[…⌊…⌋…]
5
Potential Substitution
(x =: y)
Actual Substitution
(x = y)
Initial Substitution
(x := y)
6
Equivalence
(x ≡ y)
Contrary Equivalence
(x ≡' y)
7
Evaluation
No operator
No Evaluación
x°
8
Addition
(x + y)
Subtraction
(x − y)
9
Condition
(x ← y)
Contrary Condition
(x ←' y)
10
Ascending Vertical Navigation
x↑
Descending Vertical Navigation
x↓
11
Start Execution of x
x!
Finish Execution of x and Return y as Result
x¡y
12
Continue Process x
(▶ x)
Stop Process x
(■ x)
Notes:
In parameterized generic expressions, parameters are in bold.
The "Contrary" operation (') on primitives is a meta operator, since it applies only to operators. It indicates a contravariant semantics. In the case of an operation, the opposite operation "undoes" what was performed by the direct operation.
For every dyadic (two-argument) operator ⊥, there are the opposite operators on the right (⊥') and on the left ('⊥):
(x⊥y)(⊥')y // ev. x
("ev." indicates "evaluates to")
(x⊥y)('⊥)x // ev. y
The "Contrary" operator can also be applied to expressions that are defined as contrary. For example,
(Black' = White) (White' = Black)
1. Generalization
A generic expression is an expression that remains active at all times, during the entire evaluation process. A generic expression can be parameterized or not.
The parameters of a generic expression are names that represent any expression. When a parameter appears more than once in the generic expression, they represent the same expression.
Examples of non-parameterized expressions:
〈( z = x+y )〉
Specifies that, at all times, z is x+y
((x = 3) (y = 5))
z // ev. 8
(x = a)
z // ev. a+5
〈( x>5 → (x = 5) )〉
Specifies that, at any time, x cannot exceed 5
(x = 7)
x // ev. 5
Examples of parameterized expressions:
〈{ (x y) ← (x+y = 3) }〉
Specifies the set of all two-component sequences whose sum is 3:
(1 2) (2 1) (0 3) (3 0) (−7 10) (a 3−a) ...
Definition of a function:
( f(x y) = (x+y x*y) )〉
Applications of the function:
f(3 4) // ev. (7 12)
f(a b) // ev. (a+b a*b)
2. Particularization
There are two ways:
Qualitative particularization: x/y
Specifies an expression y relative to another x.
Serves to specify an attribute or quality of x and to particularize the expression x. As a quality it can be read as "is a".
There are basically three forms: entity/attribute, entity/value and entity/(attribute/value).
x/3
It is equivalent to x3, a variable with subscript.
Example of the third form;
table/(color/white)
Specifies that the table color is white.
Quantitative or positional particularization: x\n
Selects the order number component n from the sequence x.
(x = (a b c d))
x\1 // ev. a
x\4 // ev. d
x\5 // ev. θ (there is no fifth element)
3. Grouping
There are two ways:
Serial grouping (sequence):
(x1 ... xn)
Specifies a higher-order expression consisting of expressions that are evaluated in series. For example,
(x 2*x y 3*y)
which evaluates, if x=2 and y=3, as (2 4 3 9)
Parallel grouping (set):
{x1 ... xn}
Specifies a higher-order expression consisting of expressions that are evaluated in parallel. For example,
{x=a y=b x 2*x y 3*y}
which evaluates, if x=2 and y=3, as (2=a 3=b 2 4 3 9)
4. Distribution
There are 3 forms:
Normal distribution.
It is a compact way to represent a series of expressions that have a common part. The expressions to be distributed are specified in square brackets. The scope of the distribution is delimited by bold square brackets. For example:
[(a [x y] b)]) // rep. (a x b) (a y b)
([(a [x y] [1 2])]) // rep. ((a x 1) (a x 2) (a x 2) (a y 1) rep.)
([{a [x y] [1 2]}]) // rep. ({a x 1} {a x 1} {a x 2} {u y 1} rep. {a y 2})
("rep." means "represents")
Linear distribution.
It is analogous to the normal distribution, but with one-to-one correspondence. They are specified with open square brackets above The scope of the distribution is also delimited by bold square brackets. For example:
([(a ⌊x y⌋ b ⌊1 2⌋)]) // rep. ((a x b 1) (a y b 2)))
([{a ⌊x y⌋ b ⌊1 2⌋}]) // rep. ({a x b 1} {a and b 2})
There is also local distribution, where the distribution scope is implicit. For example,
(x a[1 2 3] y) // rep. (x a1 a2 a3 y)
5. Substitution
There are 4 ways:
Current (or immediate) substitution: (x = y)
Indicates immediate substitution of the expression x by the expression y.
(a = 3)
(b = a+1) // ev. (b = 4)
i*i = −1 // imaginary unit
(a i*i) // ev. (a −1)
Potential (or deferred) substitution: (x =: y)
Indicates that the expression x represents the expression y.
(a =: 7777) a
The expression a is self-evaluating, but represents 7777 7777 evaluates to a (reverse evaluation)
Initial substitution: (x := y)
Indicates that the expression x takes the initial value y.
(D := {0 1 2 3 4 5 6 7 8 9})
The initial value of D is specified;
No equality (or inequality):
(x =' y) or (x ≠ y)
It is used only as a condition or as a declarative expression. For example,
(x=3 y=4)
(x≠y → z) // ev. z
(a ≠ b) // declarative expression
(a ≠ b → c) // ev. c
(a = b → c)
Evaluates as θ. The condition
6. Equivalence: (x ≡ y)
An expression x is equivalent to another y if both represent the same entity.
For example, (x+y ≡ y+x) (commutative property of the sum)
There is also the form (x ≡' y) (non-equivalence) which is used only as a condition or as a declarative expression.
7. Evaluation
By default, every expression is evaluated automatically (from left to right) on sequences and simultaneously on sets, so there is no explicit evaluation operator.
(2^3^4^5) is evaluated as ((2^3)^4)^5)
(^ denotes exponentiation)
There is, on the other hand, the opposite "no evaluation" operator (°):
(x° = 3)
(y° = (x° + x)) // ev. (y = x+3)
(y° = x (+°) 3) // ev. (y = 3+3)
(y = x+3)° // ev. (y = x+3)
Note; In the substitution expression (x = y), y is evaluated first and its value is assigned to x.
8. Addition: x+y
This is the traditional arithmetic operation of addition, but applied to any expressions:
Describes the repetition of x n times. The result is an open expression.
a☆3 // rep. a a a a
ab☆3 // rep. ab ab ab ab ab
( a☆3 ) // rep. (a a a a)
There is also the variant with the operator ★ (filled star), which indicates that the result of the expression is a sequence. For example, a★3 represents the sequence (a a a a), i.e., aaa.
5. Reversal: x∼
Invert a sequence x, evaluating it from right to left, instead of left to right. For example:
(a b b c d)∼ // ev. (d c b a)
(r1 ^ r2 ^ r3 ^ r4)∼ // ev. (r4 ^ r3 ^ r2 ^ r1)
This expression would be evaluated as ((r4^r3)^r2)^r1
6. Intercalation: x⊣y or y⊢x
Describes the intercalation of an expression x between the components of another expression y.
x⊣(a b c) // rep. (a x b x c)
+⊣(a b c) // rep. (a + b + c)
7. Logical operations
Logical operations are based on existential values. They are analogous to the connectives of classical logic, where θ plays the role of "false" and α the role of "true".
Negation (¬).
The logical negation of an expression x is the inverse of its existential value (θ or α). Examples:
¬3 // ev. θ
¬(3=4) // ev. α
Conjunction (x∧y).
The logical conjunction of two expressions is θ if one of its existential values is θ, and α otherwise. Examples:
3∧4 // ev. α
(4<3)∧(3<4) // ev. θ
Disjunction (x∨y).
The logical disjunction of two expressions is α if one of their existential values is α, and θ otherwise. Examples:
The first form describes an open expression made up of consecutive numbers between r1 and r2. In the second form the second element is specified, thus indirectly specifying an increment (r2−r1).