MENTAL
 Main Menu
 Language
 Derivatives
 Intercalation


Intercalation
 INTERCALATION
(Internal Distribution)

"All language communicates itself" (Walter Benjamin).

"Knowledge is language that names and describes" (Wittgenstein).

"To understand a language means to master a technique" (Wittgenstein).



Semántica

Describes the result of intercalate an expression x between all components of a sequence y.


Sintaxis
Definición

It is performed recursively:

⟨( ((xy =: ( y ←' (y# > 1) → ((y\1 x) ∪ (x⊣(y '∪ y\1))) )⟩

This definition is based on e.g.

x⊣(a b c d) =: ((a x) ∪ (x⊣(b c d))


Justification

The intercalation operation is very useful because it acts between components, which is the place where an infix operator is specified. It also simplifies the specification of expressions.


Ejemplos
  1. a⊣(x and z) // rep. (x to y to z) eq. xayaz

  2. +⊣(a b c) // rep. (a + b + c) eq. a+b+c

  3. ^⊣(a b c) // rep. (a ^ b ^ c) eq. a^b^c

  4. *⊣(1 3 5) // rep. 1*3*5 eq. 15

  5. ←⊣(a b c) // rep. (a ← b ← c)

  6. +⊣( 1...10 ) // rep. 1+...+10 rep. 55

  7. *⊣( 1...10 ) // rep. 1*...*10 (factorial of 10)

  8. ab⊣(xyz) // rep. (x ab y ab z)

  9. ((+a+)↓ ⊣ xyz) // rep. x+a+y+a+a+z

  10. abc⊣abc // rep. (a abc b abc c)

  11. α⊣1234 // rep. 1α2α3α4

  12. (u★3)⊣(a b c) // rep. (a u★3 b u★3 c) rep. auuubuuuc

  13. (1...5)⊣(a b c) // rep. (a 1...5 b 1...5 c) rep. a12345b12345c

  14. ((3+4)°)⊣(a b c) // rep. (a 3+4 b 3+4 c)

  15. (a°°)⊣(1 2 3) // rep. (1 a° 2 a° 3)

  16. (1...5)⊣( 1...3 ) // rep. (1 1 1...5 2 1...5 3) rep. 1123452123453

  17. ()⊣(a b c) // rep. (a () b () c) (empty sequence interleaving)

Remarks
Higher order intercalations
  1. a⊣((b c)⊣(u v w)) // rep. a⊣(u bc v bc w) rep. (u a bc a v a bc a w)

  2. (ab⊣ab)⊣ab // rep. (a ab b)⊣ab rep. (a ab ab ab ab b)

  3. ab⊣(ab⊣ab) // rep. ab⊣(a ab b) rep. (a ab ab ab ab b)

  4. x⊣(x⊣(a b c)) // rep. x⊣(a x b x c) rep. (a x x x b x x x c)

    Therefore, (x⊣(x⊣(a b c)) ≡ ((x★2)⊣(a b c))

    En general, ⟨( x⊣(xy) ≡ ((x★2)⊣y) )⟩

Properties
  1. ⟨( θ⊣x = x )⟩ // null expression interleaving

  2. ⟨( (xy)⊣zx⊣(y⊣z) )⟩ // asociatividad

Infinite type intercalations

Examples:
  1. a⊣( 1... ) // rep. (1 to 2 to 3 to ...)

  2. ( a★ )⊣(1 2 3) // rep. (1 (a a a a a ...) 2 (a a a a a ...) 3)