Approximation¶
This is very much WIP
Dimensions, free variables, constants and boundary conditions are defined and an approximation object is created
Semantics¶
Notes
subsection for each circuit - first atomics then operators
we might need to change the networks to allow stochs?? or are we okay in multi dimensions??
what about the categorical isomorphism - do we need any of them?
separate sections for the different semantics: Riemann, Strato(Ito?) what we have done now is the Riemann semantics
It looks like the below semantics will work for stratonovich as well - given that the usual \(\frac{1}{n}t^n\) anti-deriv rule works and the \(n t^{n-1}\) deriv rule works...
Network Semantics¶
Given a dimension \(n \in \mathbb{R}\) a network is a function \(s : \mathbb{N}^n \rightarrow \mathbb{R}\). The network represents the coefficients of a polynomial, which is a polynomial approximation of the solution.
Atomic circuits¶
Id¶
For \(a : \mathbb{N}^n \rightarrow \mathbb{R}\) and \(i \in \mathbb{N}^n\)
Scalar¶
For \(a : \mathbb{N}^n \rightarrow \mathbb{R}\), \(i \in \mathbb{N}^n\) and \(s \in \mathbb{R}\)
Addition¶
For \(a, b : \mathbb{N}^n \rightarrow \mathbb{R}\) and \(i \in \mathbb{N}^n\)
Multiplication¶
For \(a, b : \mathbb{N}^n \rightarrow \mathbb{R}\), \(i \in \mathbb{N}^n\)
Algorithm¶
How to do it in matrix representation format
Composition¶
For \(v \in \mathbb{N}^n\) let \(|v| = \sum_{k=1}^n v_k\).
In one-dimension: For \(a, b : \mathbb{N} \rightarrow \mathbb{R}\), \(n \in \mathbb{N}\)
Approximation: For \(a, b : [ 0 , ... , P ] \rightarrow \mathbb{R}\), \(n \in \mathbb{N}\)
In \(N\) dimensions: For \(a, b : \mathbb{N}^N \rightarrow \mathbb{R}\), \(n \in \mathbb{N}^N\), \(M \in [1, .., N]\)
Approximation: For \(a, b : \times_{i=1}^N [ 0 , ... , P_i ] \rightarrow \mathbb{R}\), \(n \in \mathbb{N}^N\), \(M \in [1, .., N]\)
Algorithm¶
Either by recursion or by enumeration.
Recursion:
function do_dimension(N, ii, i, v, k)
if N == 0
r = a[v[0]]
for j=1 to ii
r = r*b[v_j]
return r
fi
if i == 0
return do_dimension(N-1, ii, ii, v, n[N-1])
fi
if (i == 1) || ((i == 2) && (N == M+1))
v[i - 1, N] += k
if i == 2
v[0, M] += (ii-1)
fi
return do_dimension(N, ii, i-1, v, 0)
fi
sum = 0.0
for j = 0 to k doe
v[i, N] = j
sum += do_dimension(N-1, ii, i-1, v, k-j)
done
return sum
convolution(a, b, n, M, N)
ab = 0.0
if n[M] == 0
ab += a[n]
fi
for i = 1 to P_M do
v = [v_0, ... , v_i] =
[[v_10, ... , v_1N], ... ] =
[[0, ... , 0], ... ]
ab += do_dimension(N, i + 1, i + 1, v, n[N])
done
return ab
Enumeration:
Copy¶
For \(a, : \mathbb{N}^n \rightarrow \mathbb{R}\) and \(i \in \mathbb{N}^n\)
Register¶
For \(m \in \mathbb{N}\), \(a : \mathbb{N}^n \rightarrow \mathbb{R}\), \(i \in \mathbb{N}^n\)
where \(\hat{i}_k = i_k\) for \(k \neq m\) and \(\hat{i}_m = i_m-1\)
De-Register¶
For \(m \in \mathbb{N}\), \(a : \mathbb{N}^n \rightarrow \mathbb{R}\), \(i \in \mathbb{N}^n\)
where \(\hat{i}_k = i_k\) for \(k \neq m\) and \(\hat{i}_m = i_m+1\)
Power function¶
Square root function
Structural operators¶
Composition¶
For \(s, t : (\mathbb{N}^n \rightarrow \mathbb{R}) \rightarrow (\mathbb{N}^n \rightarrow \mathbb{R})\) and \(a : \mathbb{N}^n \rightarrow \mathbb{R}\)
Monoidal¶
For \(s, t : (\mathbb{N}^n \rightarrow \mathbb{R}) \rightarrow (\mathbb{N}^n \rightarrow \mathbb{R})\) and \(a, b : \mathbb{N}^n \rightarrow \mathbb{R}\)
Trace¶
For \(s : (\mathbb{N}^n \rightarrow \mathbb{R})^c \rightarrow (\mathbb{N}^m \rightarrow \mathbb{R})^d\), \(a : \mathbb{N}^n \rightarrow \mathbb{R}\) and \(i \in \mathbb{N}^n\)
given that \(0 < e < c,d\) and \(c, d > 1\).