MENTAL
 Main Menu
 Properties
 MENTAL, a Compact Language


MENTAL, a Compact Language
 MENTAL, A COMPACT
LANGUAGE

"To understand is to compress" (Gregory Chaitin).

"Understanding is the minimum expression of the maximum shared" (Jorge Wagensberg).

"Understanding is relating a reality to something more compact than itself and, in the limit, to its own essence" (Jorge Wagensberg).

"Science is the simplest and most compressed form of understanding reality" (Jorge Wagensberg).



The Compression

Finite mathematical objects can be represented extensively (by specifying them one at a time) or intensively (by specifying a pattern, shape, property, or algorithm). When the intensive representation of an object is shorter than the extensive one, we say that we have compressed or compacted them.

Infinite mathematical objects can only be represented intensively. If it is not possible to do so, then such objects are inexpressible with our linguistic resources.

This approach to compression is used by Gregory Chaitin [2002, 2005, 2006] to illustrate the limitations of mathematics:
The APL language

Kenneth Iverson created a compact mathematical notation for manipulating matrices to simplify the teaching of algebra to his students. This notation served him to create in 1962, together with Adin D. Falkoff, the programming language APL (the acronym for "A Programming Language"), an interactive language of high level of abstraction that offered a compact, simple and easy to learn notation, challenging the traditional mathematical notation, a notation oriented mainly for matrix manipulation (array-oriented language), which includes arithmetic and logical operations. For Iverson [1980], the notation was a "thinking tool".

The APL language served as an inspiration for other functional-type programming languages and for mathematical software in general. Iverson received the Turing Award in 1979 for his contributions to mathematical notation in programming languages.

The main features of APL are: The advantages of APL are: Examples:
  1. n ← 4 5 6 7 (creation of a vector n with the specified values)

  2. n+4 (add 4 to all values of n: 8 9 10 11)

  3. +/n (sum all values of n: 38)

  4. ί4 (values 1 to 4: 1 2 3 4)

  5. 3+ί4 (sum 3 to the previous values: 4 5 6 7)

  6. +/(3+ί4) (sum of previous values: 22)
(ί is the Greek letter "iota")


The J language

In 1989, Kenneth Iverson, together with Roger Hui and Arthur Whiney, created a prototype of a new language that formed the germ of the J language, an enhancement of APL with some features of the functional languages FP (Function Programming) and FL (Function Level).

FP was created by John Backus (the creator of the Fortran language and the BNF notation for defining programming language grammars). Backus was inspired by APL to create FP. FL is the successor of FP and was created in 1989 by John Backus together with John Williams and Edward Wimmers. Most of the innovative ideas of these two languages were implemented in J.

The main features of J are: Disadvantages of J:
MENTAL and Compression

Science, in general, tends to use the fewest number of concepts. It seeks the supreme conceptual understanding and the maximum possible simplicity.

MENTAL is a compressed language in a triple sense: 1) at the semantic level because of the reduced number of primitives; 2) at the syntactic level because no keywords are used, only symbols; 3) because it facilitates the compression of programs.

MENTAL is oriented to expressions, which result from combining the primitives of the language: Comparing MENTAL with APL and J:
MENTAL vs. APL

The above expressions of APL are almost equally compact in MENTAL:
  1. n=(4 5 6 7) // creating a vector n with the specified values

  2. (n° = ( [n↓]+4 )) // add 4 to all values of n: n=(8 9 10 11)

  3. +⊣n // sum all values of n: 38

  4. 1...4 // values from 1 to 4

  5. 3+[1...4] // add 3 to the above values: 4 5 6 7

  6. +⊣(3+[1...4]) // sum of the above values: 22

MENTAL vs. J

Bibliography