## 2 Conceptual Framework
### From Germinal Vectors to Musical Outputs  
The three main abstract data structures of the GenoMus framework--germinal conditions, encoded genotypes, and encoded phenotypes--contain a vector of the same form: a simple one-dimensional array of \(n\) numbers \(\in[0,1]\). Due to limits for the representation of reals, but mainly to enable some crucial numeric transformations as pointers to functions (explained in Section 3.3.4), these arrays only include values with a six-digit mantissa. More formally, the only elements these vectors include are those members of the set  
\[V=\{x\in\mathbb{Q}\mid 0\leq x\leq 1,x\cdot 10^{6}\in\mathbb{N}\}. \tag{3}\]  
Data structures handled below are encoded as vectors \(\vec{x}=(x_{1},x_{2},...,x_{n})\) of any length \(n\), belonging to a finite \(n\)-dimensional vector space  
\[V^{n}=\{\vec{x}\mid x_{n}\in V,n\in\mathbb{N}_{>0}\}. \tag{4}\]  
The complete search space needed to contain all possible encoded representations can be defined as the vector space  
\[S=\bigcup_{i=1}^{n}V^{i}, \tag{5}\]  
a superset that contains all vectors of any length \(\geq 1\) up to \(n\), where the upper limit of \(n\) depends on the practical limitations of computation and memory. For a given set of restrictions \(R\), any arbitrarily long vector \(\in S\) is a germinal vector \(\vec{x}\). So, let  
\[G_{cond}=\{(\vec{x},R)\mid\vec{x}\in S\} \tag{6}\]  
be the set of all possible germinal conditions. Let \(E_{gen}\) be the set of all possible encoded genotypes \(\vec{y}=(y_{1},y_{2},...,y_{m})\) with the same restrictions \(R\). Every germinal condition \(\in G_{cond}\) corresponds to a valid encoded genotype \(\in E_{gen}\) capable of generating a valid functional expression representing a music score. Unlike \(G_{cond}\), which accepts as germinal vector any member \(\in S\), \(E_{gen}\) includes only vectors decodable as computable functional expressions. The surjective map \(tran:\ G_{cond}\twoheadrightarrow E_{gen}\) transcribes any germinal conditions into an encoded genotype. Hence, the set \(E_{gen}\) can be defined as:  
\[E_{gen}=\{(\vec{y},R)\mid\vec{y}\in S,\exists\;(\vec{y},R)=tran(\vec{x},R)\}. \tag{7}\]  
The application \(tran\) involves several subprocesses covered next in detail, in such a way that the germinal conditions \(((x_{1},x_{2},...,x_{n}),R)\) generate a deterministic decision tree leading to the construction of a unique genotype \(((y_{1},y_{2},...,y_{m}),R)\), mapping the values \(x_{n}\) to \(y_{m}\) one-by-one according to restrictions \(R\). Since the number of choices \(m\) needed to build a valid encoded genotype rarely matches the length \(n\) of a germinal vector \(\vec{x}\), truncation and loops are employed:  
* If \(\vec{x}\) has more items than needed, they are ignored, effectively acting as a truncation of the remaining unused part of \(\vec{x}\). * If \(tran\) needs more elements than those supplied by \(\vec{x}\), \(tran\) reads \(\vec{x}\) elements repeatedly from the beginning as a circular array, until reaching a closure, to complete a valid vector \(\vec{y}\). That implies that germinal vectors with even a single value are valid inputs to be transformed into functional expressions. * To avoid infinite recursion when loops occur while applying \(tran(\vec{x},R)\), the restrictions \(R\) introduce some limits to the depth of functional trees and the length of parameter lists. Let \(D_{gen}\) be the set of all possible decoded genotypes. Members in this set are all possible text strings representing well-formed function trees, plus a _seed_ value, necessary when random processes are involved. Another surjective map, \(dec:\ E_{gen}\twoheadrightarrow D_{gen}\), takesan encoded genotype and produces its corresponding decoded genotype, presented as a human-readable evaluable expression. This is also a surjection, since different but equivalent encoded genotypes can generate the same executable function tree as a text output.