Difference sequence

The difference sequence of a given sequence \(a\) is the sequence \(\Delta a\) of differences of its adjacent entries.

Definition
Denote by \(\) the empty sequence of numbers. Let \(a\) be a sequence of numbers. Denote by \(\textrm{Lng}(a) \in \mathbb{N} \cup \{\infty\}\) the length of \(a\). Put \(L = \textrm{Lng}(a)\). For an \(i \in \mathbb{N}\) smaller than \(L\), denote by \(a_i\) the \((1+i)\)-th entry of \(a\). If \(\textrm{Lng}(a) < \infty\), then \(a\) is expressed as \((a_i)_{i=0}^{L-1}\). Otherwise, \(a\) is expressed as \((a_i)_{i=0}^{\infty}\).

The difference sequence \(\Delta a\) of \(a\) is defined in the following way: The \(\Delta\) operator can be regarded as a (partial) function assigning a new sequence of numbers to each sequence of numbers. Therefore the composite \(\Delta^n\) makes sense for any \(n \in \mathbb{N}\).
 * 1) If \(L = 0\), then \(\Delta a\) is undefined or defined as a specific sequence such as \(\) depending on the context.
 * 2) If \(0 < L < \infty\), then \(\Delta a\) is defined as the finite sequence \((a_{i+1}-a_i)_{i=0}^{L-2}\) of length \(L-1\).
 * 3) If \(L = \infty\), \(\Delta a\) is defined as the infinite sequence \((a_{i+1}-a_i)_{i=0}^{\infty}\).

Relation to Bashicu matrix system
The difference sequence appears in various branches of mathematics, and also in googology. Let \(S\) denote the set of finite sequences of natural numbers. A bad root searching rule for \(S\) is a partial computable function \(\textrm{Parent} \colon S \times \mathbb{N} \to \mathbb{N}\) such that for any \((a,i)\) in the domain of \(\textrm{Parent}\), \(j = \textrm{Parent}(a,i)\) satisfies the following axioms: Denote by \(S_{\leq} \subset S\) the subset of monotonically increasing finite sequences. Given a bad root searching rule \(\textrm{Parent}\) for \(S\), we obtain a total computable function \(\textrm{Ancesstor} \colon S \to S_{\leq}, \ a \mapsto \textrm{Ancestor}(a)\) in the following recursive way: The first entry of \(\textrm{Ancestor}(a)\) (if exists) is called the bad root of \(a\) with respect to \(\textrm{Parents}\). Finally, we obtain a total computable map \(\textrm{BadPart} \colon S \to S_{\leq}, \ a \mapsto \textrm{BadPart}(a)\) in the following way: Since the difference sequence of a monotonically increasing sequence of natural number is a sequence of a natural number, the composite of \(\Delta\) and \(S_{\leq}\) gives a total computable function \(\textrm{Kaiser} \colon S \setminus \{\} \to S\). As the Goedel correspondence allows us to encode a finite sequence of natural numbers into a natural number, \(\textrm{Kaiser}\) allows us to encode a finite sequence of finite sequnces into a finite sequence. Through the coding depending on the choice of the bad root finding rule \(\textrm{Parent}\), Bashicu matrix system, which is originally regarded as a notation based on finite matrices of natural numbers, can be encoded into a notation system based on finite sequences of natural numbers in a way similar to Koteitan's interpretation into hydra diagrams.
 * 1) \(i < \textrm{Lng}(a)\)
 * 2) \(j < i\)
 * 3) \(a_j \leq a_i\)
 * 1) Put \(L = \textrm{Lng}(a) \in \mathbb{N}\).
 * 2) If \(L = 0\), then set \(\textrm{Ancestor}(a) = \).
 * 3) Suppose \(L > 0\).
 * 4) If \((a,L-1)\) is not in the domain of \(\textrm{Parent}\), then set \(\textrm{Ancestor}(a) = \).
 * 5) Suppose that \((a,L-1)\) is in the domain of \(\textrm{Parent}\).
 * 6) Put \(p = \textrm{Parent}(a,L-1) \in \mathbb{N}\).
 * 7) Put \(a' = (a_i)_{i=0}^{p} \in S\)
 * 8) Then \(\textrm{Ancestor}(a)\) is the concatenation of \(\textrm{Ancestor}(a)\) and \((L-1)\).
 * 1) Put \(P = \textrm{Ancestor}(a)\).
 * 2) Put \(L = \textrm{Lng}(P)\).
 * 3) Then \(\textrm{BadPart}(a)\) is the finite sequence \((a_{P_i})_{i=0}^{L-1}\), which is monotonically increasing by the axioms of a bad root finding rule.

Applications
There are several notations based on difference sequences, which are designed to be variants or extensions of specific versions of Bashicu matrix system or their subsystems.
 * Hyperprimitive sequence system
 * Y sequence
 * N primitive