"Science may place limits on knowledge, but it should not place limits on the imagination" (Bertrand Russell).
"Our minds, or our consciousness, appear at the border between the real and the imaginal" (Fred Alan Wolf).
Concept of Virtual Expression
Definition
A virtual expression is an expression that refers to other already existing expressions (called base expressions) and automatically changes when the base expressions change.
Remarks
Virtual expressions can be parameterized or non-parameterized. There can also be mixture of parameterized and non-parameterized virtual expressions.
The concept of virtual expression is generic, i.e., it is applicable to all types of expressions.
Virtual expressions simplify the specification by relying on already existing expressions.
There are many types of virtual expressions. One widely used type of virtual expression is the "view", which is a rearrangement or a selection of the components of a base expression.
There can be different virtual expressions associated with the same base expressions.
There may be higher order virtual expressions.
There may be parameterized virtual expressions that depend on one or more variables in the abstract space.
Examples of non-parameterized virtual expressions.
Transposed matrix
We have the following matrix (sequence of sequences of the same length):
( x = ((a b c) (d e f)) ) // matrix of 2 rows and 3 columns
This expression is equivalent to:
( (x1 = a) (x2 = b) (x3 = c)
(x\2\1 = d) (x\2\2 = e) (x\2\3 = f) )
We want to obtain the xt view of x below, which corresponds to the transposed matrix of x:
( xt = ((a d) (b e) (c f)) ) // matrix of 3 rows and 2 columns
This expression is generic, so it is valid at all times, so that if, for example, we make a change in x, then we automatically have the new value of xt:
We want the expression union to correspond at all times to the union of both sets, regardless of their values. This is simply achieved by the generic expression.
〈( union = {u↓ v↓} )〉
Initially,
union // ev. {a b c d e f}
If we make the change
(u = {1 2 3})
then we automatically have the new value of union:
union // ev. {1 2 3 d e f} )
Selection of elements of a sequence
We have the following numerical sequence:
(s = (45 34 6 12 85 23 72 51})
We want sel1 to be, at all times, the sequence with the elements of s less than or equal to 50 and sel2 those greater than this amount.
〈( t(x) = ((nf = x#) // number of rows of x.
(nc = (x#)#) // number of columns of x
(v = ( ( ( 0★nf)★nc ))
v/&〈( v = x )) )〉 ¡v )〉
( x = (abc def) )
t(x) // ev. (ad be cf)
Union of any two sets x and y:
〈( union(xy) = {x↓ y↓} )〉 // general definition
( u = {a b c} )
( v = {d e f} )
union(u v) // ev. {a b c d e f}
〈( unionuv = union(u v) )〉 // definition for two specific sets.
( u = {1 2 3} ) // modification of set u
unionuv // ev. {1 2 3 d e f} (new union of u and v).
Selection, respectively, of elements less than or equal to and greater than n in any sequence s: