MENTAL
 Main Menu
 Language
 Derivatives
 Decimal Point


Decimal Point
 DECIMAL POINT

"Number is plurality or combination of units" (Aristotle).

"Number is the exponent of an operation" (Wittgenstein, Tractatus 6.021).



Semantics

Converting a composite number to a simple number (simple sequence of digits). A composite number is a sequence of numbers, which in turn, can contain numbers.


Syntax

The "decimal point" (.) is used in three possible ways:
  1. Decimal point to the right (postfix): x.
  2. Left decimal point (prefix): .y
  3. Middle decimal point (infix): x.y

Definition
  1. ⟨( x. =: (x ← (x# = 1) →' (x\(x#))). +
    10*([x\[1…((x#)−1)]).) )⟩ // (recursive definition)


    For example,
    (13 5 71 4). = 4 + (13 5 71).*10
    (13 5 71). = 71 + (13 5).*10
    (13 5). = 5 + 13*10


  2. ⟨( .y =: (y. ÷ 10^(y#)) )⟩

    For example,
    .1234 = 1234. ÷ 10^4

  3. ⟨( x.y =: (x. + .y) )⟩

    For example,
    1234.5678 = 1234. + .5678

Examples
  1. (7 12 4). // ev. (7*(10^2) + 12*10 + 4) ev. 824

  2. (42 57). // ev. (42*10 + 57) ev. 477

  3. (7 (12 13) 4). // ev. (7*100 + (12 13).*10 + 4) ev. (7*100 + (12*10 + 13)*10 + 4) ev. 2034.

  4. (1 −23 4). // ev. (100 − 230 + 4) ev. −126

  5. .(4 (5 6) 3) // ev. .(400 + 560 + 3) ev. .963

  6. (3 .4 5). // ev. (300 + 4 + 5) ev. 309

  7. .(3 .4 5) // ev. .(300 + 4 + 5) ev. .309

  8. .(3 .41 5) // ev. .(300 + 4.1 + 5) ev. .(309.1) ev. .3091

  9. (12 13).(1 4 15) // ev. 12*10 + 13 + 1*10−1 * 4*10−2 + 15*10−3 ev. 133.155

  10. 123. // self-evaluates

  11. .123 // self-evaluates

  12. 123.456 // self-evaluates

Remarks
Flexible representation of numbers

Since a number can be composed of other numbers, a flexible representation system is available, allowing a number to be represented in multiple ways.

For example, the number 17 can be represented as:

17 (2 −3). (3 −13). (4 −23). (1.7 0). (1.6 1). (1.5 2). (1.44 2.6). (1.92 −2.2). etc.

Analogously, the number .17 can be represented as:

.17 .(2 −3) .(3 −13) .(4 −23) .(1.7 0) .(1.6 1) .(1.5 2) .(1.44 2.6) .(1.92 −2.2) etc.


Normalization of a number

A number is said to be in normalized format when:
  1. The sequence is composed of digits only.
  2. There is only one sign for the entire sequence.
To switch to normalized format, the operator "." (decimal point) is applied. Examples:
  1. (x = (1.44 2.8))
    x. // ev. 1.44*10 + 2.8 ev. 17.2


  2. ((x = 13) (y = 122))
    (x y). // ev. 13*10 + 122. ev. 252


  3. (x = 12)
    (x★3). // ev. (12 12 12 12). ev. 1332

Variable number

It is a sequence (hierarchical or not) variables may appear. When those variables have concrete values, the sequence is evaluated as a concrete normalized number. Examples:
  1. (2 x 1). // rep. (2*100 + x + 1) ev. 201+x

  2. (x = ab1)
    (a=3 b=2)
    x // ev. 321


  3. (x = (a (b c)).
    x/(a=1 b=2 c=3) // rep. 10 + (2*10 + 3) ev. 33

Properties
  1. ⟨( (m. = m) )⟩

    The "decimal point" operation has no effect on an integer. Examples:

    123. // ev. 123
    3. // ev. 3
    −12. // ev. −12


  2. ⟨( .(x.) = .x )⟩

  3. ⟨( x.. = x. )⟩ // additional dots on the right have no effect

  4. ⟨( ..x ≡ (.x ÷ 10) )⟩

    The additional dots on the left play the same role as the zeros. Examples:

    (..123 ≡ .0123)
    (...123 ≡ .00123)


  5. ⟨( x.θ = x. )⟩

  6. ⟨( θ.x = .x )⟩

  7. ⟨( x.0 = x )⟩

  8. ⟨( 0.x = .x )⟩

  9. ⟨( (−x).y = (−x + .y) )⟩

  10. ⟨( x.(−y) = (x − .y) )⟩

  11. ⟨( (−x).(−y) = (−x + . −y) = −(x.y) = −x.y) )⟩

  12. ⟨( ((x y). + (z u)).) ≡ ((x+z). (y+u).). )⟩

    Examples:
    ((5 4). + (8 9).) // ev. 54 + 89 ev. 143
    ((5+8). (4+9).). // ev. (13 13). ev. 143.


  13. ⟨((x y). * (z).)) ≡ ((x. * z.) (y. * z.)).⟩ // product distribution

    Examples:
    ((5 4). * 3) // ev. 54*3 ev. 162
    ((5*3) (4*3)). // ev. (15 12). ev. 15*10+12 ev. 162


  14. ⟨( −(x y). ≡(−xy). )⟩ // sign distribution

    This property is a consequence of the previous one. Example:
    −(7 6). // eq. (−7 −6). ev. −76

  15. ⟨( (x.y − .y) = x. )⟩

  16. ⟨( (x.yx.) = .y )⟩