"Substituting ideas for calculations" (Dirichlet).
"A synthesis is worth ten analyses" (Eugenio d'Ors).
"We only think in signs" (Jacques Derrida).
Normal Distribution in Context
Semantics
The distribution of an open expression
x = (x1 x2 ... xn)↓
within the context or scope of another expression y represents the expression formed by n expressions equal to y, where in the order i has been replaced by xi.
Syntax
[I [x1 x2 ... xn] D]
Bold square brackets indicate the context or scope of the distribution. I indicates the left scope of the expression and D the right scope. I and D may not exist (be null expressions).
A distribution requires two pairs of nested square brackets. The inner ones delimit the expression to be distributed. The outer ones delimit the scope of the distribution.
Informal definition
[I [x1 x2 ... xn] D] =: I x1 D I x2 D ... I xn D
The definition of the distribution is done informally, although illustratively. It is not done formally, because if it could be done, then the operation would be derivative, not primitive.
Justification
The distribution is a descriptive mechanism for simplifying the specification of a series of expressions that have a common part.
Examples
([(u [a b c] v)]) // rep. ((u a v) (u b v) (u b v) (u c v)) eq. (uav ubv ucv)
([x+[a b]] y) // rep. (x+a x+b y)
([(x+[a b] y)]) // rep. ((x+a y) (x+b y))
(x=([(u [a b] v)])) // rep. (x=(((u a v) (u b v))) eq. (x=(uav ubv))
([x=(u [a b] v)]) // rep. (x=(u a v) x=(u b v))
{[[a b c]+1]} // rep. {a+1 b+1 c+1}
(x = {[[a b c]1]}) // rep. (x = {a1 b1 c1})
([ab[u v w]]) // rep. (abu abv abw)
([x/[a b c] ]) // rep. (x/a x/b x/c)
([x=[1 2 3] ]) // rep. (x=1 x=2 x=3)
([x>[a b c ]) // rep. (x>a x>b x>c)
([[x and z]! ]) // rep. (x! y! z!)
([[x and z]←a]) // rep. (x←a y←a z←a)
([a+[3 5 7]]) // rep. (a+3 a+5 a+7)
([a (b [c d]) e]) // rep. (a (a (b c) e a (b d) e)
(x° = [a b c]°) // ev. x=[a b c]
([u x v]) // rep. (u a v u b v u c v)
The For-Next loop of the Basic language
For i = n1 To n2
x
Next
can be expressed as follows:
([(i=[n1…n2] x)])
Axioms
When the expression to be distributed has only one component, it is evaluated as the same expression without the two pairs of square brackets.
〈( ([x [y] z]) = (x y z)) ← (y# = 1) )〉
〈( ([[x]]) = x) ← (x# = 1) )〉
Note that the potential substitution has been changed to immediate substitution.
Examples:
([1 2 3 [abc]]) // ev. (1 2 3 abc)
([[abc] 1 2 3]) // ev. (abc 2 3 4)
([1 2 [abc] 3 4]) // ev. (1 2 abc 3 4)
([[abc]]) // ev. abc
When there is no left scope and no right scope, there is no distribution.
〈( [[x]] = x )〉
Examples:
[[abc]] // ev. abc
([[a b]]) // ev. (a b)
Empty distribution: [].
([] = θ)
〈( ([x [] y]) = (x y) )〉
Example:
([1 [] 2]) // ev. (1 2)
Common scope distributions
When two distributive expressions share the same scope, you have a common scope distribution. If we have x=(x1 x2 ... xn)↓ and y=(y1 y2 ... yn)↓, an informal definition would be:
[I [x] C [y] D] =: [I x1 C [y] D] ... [I xn C [y] D]
I indicates the left scope of the expression of the two expressions to be distributed, D the right scope and C the central scope between the two expressions. I, C and D may not exist (be null expressions).
Since the evaluation is from left to right, first x is distributed, and on the result y is distributed. The second expression is the most rapidly varying.
This definition is generalizable for any number of expressions to be distributed with a common scope.
inside another open expression (I x C y D)↓ is equal to n open expressions equal to the latter, where in the order expression < code>i has been replaced x by xi and y by yi.
I indicates the left scope of the expression of the two expressions to be distributed, D the right scope and C the scope between the two expressions. I, C and D may not exist (be null expressions).
Syntax
[I ⌊x1 x2 ... xn⌋ C ⌊y1 y2 ... yn⌋ D]
Informal definition
[I ⌊x⌋ C ⌊y⌋ D] =: I x1 C y1 D ... I xn C yn D
Justification
The linear distribution is a descriptive mechanism that also makes it possible to simplify the specification of a series of expressions that have a common part.
Remarks
This definition is generalizable for any number of expressions to be distributed with a common scope.
In the case that the expressions to be distributed do not have the same length, it is assumed that the shorter ones are matched with the longer ones by means of null expressions.
Both types of square brackets (normal and italic) may appear within the same scope.
Examples
[(⌊a b⌋ ⌊1 2⌋)]) // rep. ((a 1) (b 2))
([(⌊a b⌋ x ⌊1 2⌋)]) // rep. ((a x 1) (b x 2))
([(⌊x and z⌋ = ⌊1 2 3⌋)]) // rep. ((x = 1) (y = 2) (z = 3))
([(⌊x y⌋ + ⌊a b⌋ + z)]) // rep. ((x+a+z) (y+b+z))
(x = ⌊a b c⌋)
([x x]) // rep. (a a a b b c c) eq. aabbcc
(x = ⌊a b c⌋
(y= [xx])) // rep. (y = aa bb cc)
(z = [yy]) // rep. (z = aaaa bbbb cccc)
([a ⌊1 2⌋ b ⌊4 5 6⌋ c]) // rep. (a 1 b 4 a 2 b 5 a b 6)
([(⌊a b⌋ ⌊c d⌋ ⌊u v⌋ ⌊w x⌋]) // rep. (a c b d u w a c b d u x a c b d v w a c b d v x) eq. acbduwacbduxacbdvwacbdvx
Axioms
When the expression to be distributed has only one component, it is evaluated as the same expression without the two pairs of square brackets.
〈( ([x ⌊y] z]) = (x y z)) ← (y# = 1) )〉
〈( ([⌊x⌋]) = x) ← (x# = 1) )〉
Note that the potential substitution has been changed to immediate substitution.
Examples:
([1 2 3 ⌊abc⌋]) // ev. (1 2 3 abc)
([⌊abc⌋ 1 2 3]) // ev. (abc 2 3 4)
([1 2 [abc] 3 4]) // ev. (1 2 abc 3 4)
([[abc]]) // ev. abc
Empty linear distribution: ⌊⌋.
(⌊⌋ = θ)
〈( ([x ⌊⌋ y]) = (x y) )〉
Example:
([1 ⌊⌋ 2]) // ev. (1 2)
Local Distribution
Semantics
Local distribution is an operation in which there is no explicit scope, but implicit scope. The implicit scope is delimited by blanks or parentheses. The local distribution can be normal or linear.