Ordinal Compression¶
The ordinal pattern of a finite real-valued sequence extracts only the relative ordering of its entries, discarding all magnitude information. Given an injective function \(f : \{0, \dots, d-1\} \to \mathbb{R}\), its ordinal pattern is the unique permutation \(\sigma \in S_d\) such that \(f \circ \sigma\) is strictly increasing:
This construction, due to Bandt and Pompe (2002), is the basis of permutation entropy and a wide family of complexity measures for time series. Composing ordinal pattern extraction with the delay embedding yields the ordinal delay map --- a lossy compression of delay windows that is invariant under monotone observation transforms and whose codomain has size at most \(d!\).
Ordinal pattern: definitions and properties¶
Proved (IsOrdinalPatternOf)
Definition. A permutation \(\sigma \in S_d\) is the ordinal pattern of \(f : \{0,\dots,d-1\} \to \mathbb{R}\) if \(f \circ \sigma\) is strictly monotone:
Lean 4 statement --- OrdinalPattern.lean:59
Proved (ordinalPattern)
Definition. For an injective \(f : \{0,\dots,d-1\} \to \mathbb{R}\), the ordinal pattern \(\pi(f)\) is the unique permutation \(\sigma \in S_d\) such that \(f \circ \sigma\) is strictly increasing.
Lean 4 statement --- OrdinalPattern.lean:105
Proved (ordinalPattern_exists_unique)
Theorem. For any injective \(f : \{0,\dots,d-1\} \to \mathbb{R}\), there exists a unique permutation \(\sigma \in S_d\) such that \(f \circ \sigma\) is strictly monotone:
Lean 4 statement --- OrdinalPattern.lean:97
Existence is witnessed by Tuple.sort from Mathlib; uniqueness follows because
two permutations that both sort the same injective function must agree on every
input.
Proved (isOrdinalPatternOf_comp_strictMono)
Theorem (Monotone invariance). If \(\sigma\) is the ordinal pattern of \(f\) and \(g : \mathbb{R} \to \mathbb{R}\) is strictly monotone, then \(\sigma\) is also the ordinal pattern of \(g \circ f\):
Ordinal patterns depend only on relative ordering, not on the scale or shape of the observation function.
Lean 4 statement --- OrdinalPattern.lean:64
Proved (ordinalPattern_surjective)
Theorem (Surjectivity). Every permutation \(\sigma \in S_d\) is realizable as the ordinal pattern of some injective function:
Lean 4 statement --- OrdinalPattern.lean:131
The ordinal delay map¶
Composing the delay embedding \(\Phi_{f,\alpha,k}\) with ordinal pattern extraction yields the ordinal delay map, a compression from states to permutations. It is defined on the subtype of states with tie-free windows (\(\operatorname{WindowDistinct}\)), since ordinal pattern extraction requires injectivity of the input function.
Proved (ordinalDelayMap)
Definition. The ordinal delay map of window length \(k\) sends each state \(x\) (with tie-free window) to the ordinal pattern of its delay vector:
Lean 4 statement --- OrdinalTakens.lean:55
Proved (ordinalDelayMap_monotone_invariant)
Theorem (Monotone invariance of the ordinal delay map). If \(g : \mathbb{R} \to \mathbb{R}\) is strictly monotone, then replacing \(\alpha\) by \(g \circ \alpha\) does not change the ordinal delay map:
This is the formal justification for the robustness of permutation entropy to monotone signal transformations.
Lean 4 statement --- OrdinalTakens.lean:65
Proved (ordinalDelayMap_eq_of_order_eq)
Theorem (Order characterization). Two states with the same relative ordering in their delay windows receive the same ordinal pattern.
Lean 4 statement --- OrdinalTakens.lean:79
theorem ordinalDelayMap_eq_of_order_eq {f : X → X} {α : X → ℝ} {k : ℕ}
(x y : { x : X // WindowDistinct f α k x })
(h : ∀ i j : Fin k,
delayEmbedding f α k x.val i < delayEmbedding f α k x.val j ↔
delayEmbedding f α k y.val i < delayEmbedding f α k y.val j) :
ordinalDelayMap f α k x = ordinalDelayMap f α k y
Observed patterns and counting bounds¶
Given an orbit of length \(N\) and a window size \(d\), the observed patterns are the ordinal patterns encountered along the orbit. Three independent upper bounds constrain the size of this set.
Proved (observedPatterns)
Definition. The observed patterns along an orbit of length \(N\) with window size \(d\):
Lean 4 statement --- OrdinalTakens.lean:98
Proved (card_observedPatterns_le_factorial)
Theorem (Factorial bound). \(\bigl|\operatorname{ObsPatterns}(f, \alpha, d, x, N)\bigr| \;\le\; d!\)
Lean 4 statement --- OrdinalTakens.lean:105
Proved (card_observedPatterns_le_length)
Theorem (Length bound). \(\bigl|\operatorname{ObsPatterns}(f, \alpha, d, x, N)\bigr| \;\le\; N.\)
Lean 4 statement --- OrdinalTakens.lean:113
Proved (card_observedPatterns_le_period)
Theorem (Period bound). On a periodic orbit, the number of distinct ordinal patterns is at most the minimal period:
Lean 4 statement --- OrdinalTakens.lean:121
Mathematical context¶
The three counting bounds give complementary constraints on the complexity of ordinal dynamics:
| Bound | Source | Tight when |
|---|---|---|
| \(\le d!\) | Codomain of \(S_d\) | Full permutation complexity (chaotic regime) |
| \(\le N\) | Pigeonhole on orbit length | Short transients |
| \(\le p(x)\) | Periodicity | Low-period attractors |
The permutation entropy of Bandt and Pompe (2002) is defined as $\(H_d(f, \alpha, x) \;=\; -\sum_{\sigma \in S_d} p_\sigma \log p_\sigma,\)$ where \(p_\sigma\) is the relative frequency of pattern \(\sigma\) along the orbit. The factorial bound gives the maximum entropy \(\log(d!)\); the period bound shows that periodic orbits have entropy at most \(\log(p(x))\), independent of orbit length.
The monotone invariance theorem is the formal justification for a key practical property: permutation entropy is robust to any strictly monotone recalibration of the observation function, making it well-suited to real-world signals where sensor nonlinearity is present but monotone.
Connection to navi-SAD
The ordinal delay map formalizes the methodology behind navi-SAD's permutation entropy pipeline: per-head SAD trajectories are treated as delay-coordinate embeddings, and complexity is measured via the observed ordinal pattern distribution. See Formal Backing for navi-SAD.