# Functional processes

A functional process is something that maps a set of inputs to a set of outputs.  This can include production processes, which turn inputs into different outputs, construction processes, which assemble inputs into an output, or physical processes, which change the properties of some or all of the inputs.  Their basic notation is:

$f_p(R_{in}, \varphi)\rightarrow R_{out}$$R_{in}$ Set of resource inputs, assuming the output’s multiplicity is one.
$\varphi$ A 4-tuple describing a process.
$R_{out}$ Set of resource outputs, including wastes left over.

A process is what actually maps the inputs to the outputs and is analogous to a function in linear algebra.  It includes its own properties needed to measure the costs of processes:

$\varphi = (id, map, cost, dependencies)$
$id$: Like for the definition of $r$, a hashable identifier.
$map$: Maps $R_{in}$ to $R_{out}$.
$cost$: A set of resource inputs that describe the cost per run.  In my handwritten notes, I use こ as a shorthand subscript, but since hiragana doesn’t work in WordPress’s latex software, I’ll just spell it out “ko”.
$dependencies$: A set of products that are required for the process but not consumed as a cost.  Usually this is something like equipment or coolant.  I use で as a shorthand, so as above, I will write “de”.

There are some other relevant terms to define:
$\epsilon$: Exploitation multiplicity (from the formula $e = r\epsilon$
$r_{de}$: Set of resources describing the cost per allocation
え: Equipment available (will be written “eq”)
$\Omega$: Overproduction coefficient

The way the cost values are represented is important for how we perform calculations on them.  Descriptively, we can treat them as a set of $s$ values.  Computationally, it is much simpler to use vectors of reals (floats), which include a value for all resources involved in the calculation in an immutable order.  For example:
$\varphi_{ko} = (A,B,C,X)\ \ r_{ko}=(X,Y,Z)$
$\varphi_{ko} = \langle 0.2, 5.3, 8.9, 6.4 \rangle \ \ r_{ko} = \langle 3.5, 1.7, 0.8 \rangle$But, when performing calculations on them, they should include all resources:
$\varphi_{ko} = \langle 0.2, 5.3, 8.9, 6.4, 0, 0 \rangle \ \ r_{ko} = \langle 0, 0, 0, 3.5, 1.7, 0.8 \rangle$
Thus, calculating the total cost becomes a simple matter of vector addition:
$= \varphi_{ko} + r_{ko} = \langle 0.2, 5.3, 8.9, 9.9, 1.7, 0.8 \rangle$

So, the production cost ($R_{ko}$) for something can then be calculated like so:
$A \leftarrow \varphi_{de} \setminus eq = \{ \emptyset \} ? \left [ \sum^n_{i \in \varphi_{de} \setminus eq} R_{ko,i} \right ] : \langle 0 \rangle_n$
This is the cost of additional equipment required, which is hopefully zero.
$R_{ko} = A + \varphi_{ko} + r_{de}\epsilon$ Cost of production, simple
$\hat{R}_{ko} = A + \varphi_{ko} + \Omega r_{de}\epsilon$ Cost of production, failure-protected.
The value of $\Omega$ depends on the product and community in question.  In VIAAC theory, hubs have different failure protections than spokes.

What if we have heterogeneous inputs and want to compare two processes?  Depending on our constraints, we can either directly compare the energy cost, or we can use the “relative aggregate cost”, defined as such:
$\alpha = \sum_{id \in r_{de}, S}(r_{de})_{id}\epsilon s^{-1}_{id}$Here we are trying to find the relative resource intensity as a proportion of the total supply we have.  This means lower is better.  An example showing a new process being rejected and accepted based on this can be found in this paste.