diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 0250b21d..e8abf785 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -11,6 +11,7 @@ repos:
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
+ args: ['--unsafe']
- id: debug-statements
- id: end-of-file-fixer
- id: requirements-txt-fixer
diff --git a/docs/assets/js/mathjax.js b/docs/assets/js/mathjax.js
index 0c7803cf..561944cd 100644
--- a/docs/assets/js/mathjax.js
+++ b/docs/assets/js/mathjax.js
@@ -1,9 +1,11 @@
window.MathJax = {
+ loader: {load: ['[tex]/colortbl']},
tex: {
inlineMath: [["\\(", "\\)"]],
displayMath: [["\\[", "\\]"]],
processEscapes: true,
- processEnvironments: true
+ processEnvironments: true,
+ packages: {'[+]': ['colortbl']},
},
options: {
ignoreHtmlClass: ".*|",
diff --git a/docs/fundamentals/ideas/congeneric_decomposition.md b/docs/fundamentals/ideas/congeneric_decomposition.md
index 878292d3..6ce33b9a 100644
--- a/docs/fundamentals/ideas/congeneric_decomposition.md
+++ b/docs/fundamentals/ideas/congeneric_decomposition.md
@@ -1,3 +1,220 @@
+---
+hide:
+ - toc
+---
# Congeneric Decomposition
-Coming soon
+Cogeneric decomposition is a method for decomposing symbolic sequences from a systems thinking perspective,
+emphasizing the importance of order. It decomposes a sequence into a tuple of cogeneric sequences,
+each of which consists of equivalent elements at certain positions, while all other positions are empty.
+This reversible process preserves the order of the sequence and allows the original sequence to be fully reconstructed.
+
+The concept of Cogeneric decomposition can be demonstrated using an example:
+
+Let's assume there is a symbolic sequence `INTELLIGENCE IS THE ABILITY TO ADAPT` congeneric decomposition
+could be presented by the following table, where each row is a congeneric sequence and `-` is an empty position in a congeneric sequence.
+
+
+
+
+
+
+``` mermaid
+block-beta
+ columns 36
+ seq1["I"] seq2["N"] seq3["T"] seq4["E"] seq5["L"] seq6["L"] seq7["I"] seq8["G"] seq9["E"] seq10["N"]
+ seq11["C"] seq12["E"] seq13[" "] seq14["I"] seq15["S"] seq16[" "] seq17["T"] seq18["H"] seq19["E"] seq20[" "]
+ seq21["A"] seq22["B"] seq23["I"] seq24["L"] seq25["I"] seq26["T"] seq27["Y"] seq28[" "] seq29["T"] seq30["O"]
+ seq31[" "] seq32["A"] seq33["D"] seq34["A"] seq35["P"] seq36["T"]
+
+ space:36
+
+ i1["I"] i2["-"] i3["-"] i4["-"] i5["-"] i6["-"] i7["I"] i8["-"] i9["-"] i10["-"]
+ i11["-"] i12["-"] i13["-"] i14["I"] i15["-"] i16["-"] i17["-"] i18["-"] i19["-"] i20["-"]
+ i21["-"] i22["-"] i23["I"] i24["-"] i25["I"] i26["-"] i27["-"] i28["-"] i29["-"] i30["-"]
+ i31["-"] i32["-"] i33["-"] i34["-"] i35["-"] i36["-"]
+
+ n1["-"] n2["N"] n3["-"] n4["-"] n5["-"] n6["-"] n7["-"] n8["-"] n9["-"] n10["N"]
+ n11["-"] n12["-"] n13["-"] n14["-"] n15["-"] n16["-"] n17["-"] n18["-"] n19["-"] n20["-"]
+ n21["-"] n22["-"] n23["-"] n24["-"] n25["-"] n26["-"] n27["-"] n28["-"] n29["-"] n30["-"]
+ n31["-"] n32["-"] n33["-"] n34["-"] n35["-"] n36["-"]
+
+ t1["-"] t2["-"] t3["T"] t4["-"] t5["-"] t6["-"] t7["-"] t8["-"] t9["-"] t10["-"]
+ t11["-"] t12["-"] t13["-"] t14["-"] t15["-"] t16["-"] t17["T"] t18["-"] t19["-"] t20["-"]
+ t21["-"] t22["-"] t23["-"] t24["-"] t25["-"] t26["T"] t27["-"] t28["-"] t29["T"] t30["-"]
+ t31["-"] t32["-"] t33["-"] t34["-"] t35["-"] t36["T"]
+
+ e1["-"] e2["-"] e3["-"] e4["E"] e5["-"] e6["-"] e7["-"] e8["-"] e9["E"] e10["-"]
+ e11["-"] e12["E"] e13["-"] e14["-"] e15["-"] e16["-"] e17["-"] e18["-"] e19["E"] e20["-"]
+ e21["-"] e22["-"] e23["-"] e24["-"] e25["-"] e26["-"] e27["-"] e28["-"] e29["-"] e30["-"]
+ e31["-"] e32["-"] e33["-"] e34["-"] e35["-"] e36["-"]
+
+ l1["-"] l2["-"] l3["-"] l4["-"] l5["L"] l6["L"] l7["-"] l8["-"] l9["-"] l10["-"]
+ l11["-"] l12["-"] l13["-"] l14["-"] l15["-"] l16["-"] l17["-"] l18["-"] l19["-"] l20["-"]
+ l21["-"] l22["-"] l23["-"] l24["L"] l25["-"] l26["-"] l27["-"] l28["-"] l29["-"] l30["-"]
+ l31["-"] l32["-"] l33["-"] l34["-"] l35["-"] l36["-"]
+
+ g1["-"] g2["-"] g3["-"] g4["-"] g5["-"] g6["-"] g7["-"] g8["G"] g9["-"] g10["-"]
+ g11["-"] g12["-"] g13["-"] g14["-"] g15["-"] g16["-"] g17["-"] g18["-"] g19["-"] g20["-"]
+ g21["-"] g22["-"] g23["-"] g24["-"] g25["-"] g26["-"] g27["-"] g28["-"] g29["-"] g30["-"]
+ g31["-"] g32["-"] g33["-"] g34["-"] g35["-"] g36["-"]
+
+ c1["-"] c2["-"] c3["-"] c4["-"] c5["-"] c6["-"] c7["-"] c8["-"] c9["-"] c10["-"]
+ c11["C"] c12["-"] c13["-"] c14["-"] c15["-"] c16["-"] c17["-"] c18["-"] c19["-"] c20["-"]
+ c21["-"] c22["-"] c23["-"] c24["-"] c25["-"] c26["-"] c27["-"] c28["-"] c29["-"] c30["-"]
+ c31["-"] c32["-"] c33["-"] c34["-"] c35["-"] c36["-"]
+
+ sp1["-"] sp2["-"] sp3["-"] sp4["-"] sp5["-"] sp6["-"] sp7["-"] sp8["-"] sp9["-"] sp10["-"]
+ sp11["-"] sp12["-"] sp13[" "] sp14["-"] sp15["-"] sp16[" "] sp17["-"] sp18["-"] sp19["-"] sp20[" "]
+ sp21["-"] sp22["-"] sp23["-"] sp24["-"] sp25["-"] sp26["-"] sp27["-"] sp28[" "] sp29["-"] sp30["-"]
+ sp31[" "] sp32["-"] sp33["-"] sp34["-"] sp35["-"] sp36["-"]
+
+ s1["-"] s2["-"] s3["-"] s4["-"] s5["-"] s6["-"] s7["-"] s8["-"] s9["-"] s10["-"]
+ s11["-"] s12["-"] s13["-"] s14["-"] s15["S"] s16["-"] s17["-"] s18["-"] s19["-"] s20["-"]
+ s21["-"] s22["-"] s23["-"] s24["-"] s25["-"] s26["-"] s27["-"] s28["-"] s29["-"] s30["-"]
+ s31["-"] s32["-"] s33["-"] s34["-"] s35["-"] s36["-"]
+
+ h1["-"] h2["-"] h3["-"] h4["-"] h5["-"] h6["-"] h7["-"] h8["-"] h9["-"] h10["-"]
+ h11["-"] h12["-"] h13["-"] h14["-"] h15["-"] h16["-"] h17["-"] h18["H"] h19["-"] h20["-"]
+ h21["-"] h22["-"] h23["-"] h24["-"] h25["-"] h26["-"] h27["-"] h28["-"] h29["-"] h30["-"]
+ h31["-"] h32["-"] h33["-"] h34["-"] h35["-"] h36["-"]
+
+ a1["-"] a2["-"] a3["-"] a4["-"] a5["-"] a6["-"] a7["-"] a8["-"] a9["-"] a10["-"]
+ a11["-"] a12["-"] a13["-"] a14["-"] a15["-"] a16["-"] a17["-"] a18["-"] a19["-"] a20["-"]
+ a21["A"] a22["-"] a23["-"] a24["-"] a25["-"] a26["-"] a27["-"] a28["-"] a29["-"] a30["-"]
+ a31["-"] a32["A"] a33["-"] a34["A"] a35["-"] a36["-"]
+
+ b1["-"] b2["-"] b3["-"] b4["-"] b5["-"] b6["-"] b7["-"] b8["-"] b9["-"] b10["-"]
+ b11["-"] b12["-"] b13["-"] b14["-"] b15["-"] b16["-"] b17["-"] b18["-"] b19["-"] b20["-"]
+ b21["-"] b22["B"] b23["-"] b24["-"] b25["-"] b26["-"] b27["-"] b28["-"] b29["-"] b30["-"]
+ b31["-"] b32["-"] b33["-"] b34["-"] b35["-"] b36["-"]
+
+ y1["-"] y2["-"] y3["-"] y4["-"] y5["-"] y6["-"] y7["-"] y8["-"] y9["-"] y10["-"]
+ y11["-"] y12["-"] y13["-"] y14["-"] y15["-"] y16["-"] y17["-"] y18["-"] y19["-"] y20["-"]
+ y21["-"] y22["-"] y23["-"] y24["-"] y25["-"] y26["-"] y27["Y"] y28["-"] y29["-"] y30["-"]
+ y31["-"] y32["-"] y33["-"] y34["-"] y35["-"] y36["-"]
+
+ o1["-"] o2["-"] o3["-"] o4["-"] o5["-"] o6["-"] o7["-"] o8["-"] o9["-"] o10["-"]
+ o11["-"] o12["-"] o13["-"] o14["-"] o15["-"] o16["-"] o17["-"] o18["-"] o19["-"] o20["-"]
+ o21["-"] o22["-"] o23["-"] o24["-"] o25["-"] o26["-"] o27["-"] o28["-"] o29["-"] o30["O"]
+ o31["-"] o32["-"] o33["-"] o34["-"] o35["-"] o36["-"]
+
+ d1["-"] d2["-"] d3["-"] d4["-"] d5["-"] d6["-"] d7["-"] d8["-"] d9["-"] d10["-"]
+ d11["-"] d12["-"] d13["-"] d14["-"] d15["-"] d16["-"] d17["-"] d18["-"] d19["-"] d20["-"]
+ d21["-"] d22["-"] d23["-"] d24["-"] d25["-"] d26["-"] d27["-"] d28["-"] d29["-"] d30["-"]
+ d31["-"] d32["-"] d33["D"] d34["-"] d35["-"] d36["-"]
+
+ p1["-"] p2["-"] p3["-"] p4["-"] p5["-"] p6["-"] p7["-"] p8["-"] p9["-"] p10["-"]
+ p11["-"] p12["-"] p13["-"] p14["-"] p15["-"] p16["-"] p17["-"] p18["-"] p19["-"] p20["-"]
+ p21["-"] p22["-"] p23["-"] p24["-"] p25["-"] p26["-"] p27["-"] p28["-"] p29["-"] p30["-"]
+ p31["-"] p32["-"] p33["-"] p34["-"] p35["P"] p36["-"]
+
+ classDef c1 fill:#ff7f0e,color:#fff;
+ classDef c2 fill:#ffbb78,color:#000;
+ classDef c3 fill:#2ca02c,color:#fff;
+ classDef c4 fill:#98df8a,color:#000;
+ classDef c5 fill:#d62728,color:#fff;
+ classDef c6 fill:#ff9896,color:#000;
+ classDef c7 fill:#9467bd,color:#fff;
+ classDef c8 fill:#c5b0d5,color:#000;
+ classDef c9 fill:#8c564b,color:#fff;
+ classDef c10 fill:#c49c94,color:#000;
+ classDef c11 fill:#e377c2,color:#fff;
+ classDef c12 fill:#f7b6d2,color:#000;
+ classDef c13 fill:#bcbd22,color:#fff;
+ classDef c14 fill:#dbdb8d,color:#000;
+ classDef c15 fill:#17becf,color:#fff;
+ classDef c16 fill:#9edae5,color:#000;
+
+ class seq1,seq7,seq14,seq23,seq25,i1,i7,i14,i23,i25 c1
+ class seq2,seq10,n2,n10 c2
+ class seq3,seq17,seq26,seq29,seq36,t3,t17,t26,t29,t36 c3
+ class seq4,seq9,seq12,seq19,e4,e9,e12,e19 c4
+ class seq5,seq6,seq24,l5,l6,l24 c5
+ class seq8,g8 c6
+ class seq11,c11 c7
+ class seq13,seq16,seq20,seq28,seq31,sp13,sp16,sp20,sp28,sp31 c8
+ class seq15,s15 c9
+ class seq18,h18 c10
+ class seq21,seq32,seq34,a21,a32,a34 c11
+ class seq22,b22 c12
+ class seq27,y27 c13
+ class seq30,o30 c14
+ class seq33,d33 c15
+ class seq35,p35 c16
+```
+
+Congeneric sequence for `E`
+``` mermaid
+block-beta
+ columns 36
+ e1["-"] e2["-"] e3["-"] e4["E"] e5["-"] e6["-"] e7["-"] e8["-"] e9["E"] e10["-"]
+ e11["-"] e12["E"] e13["-"] e14["-"] e15["-"] e16["-"] e17["-"] e18["-"] e19["E"] e20["-"]
+ e21["-"] e22["-"] e23["-"] e24["-"] e25["-"] e26["-"] e27["-"] e28["-"] e29["-"] e30["-"]
+ e31["-"] e32["-"] e33["-"] e34["-"] e35["-"] e36["-"]
+```
+
+
+could be a part of multiple symbol sequences that have the same order of `E` element.
+
+While keeping the main idea, the congeneric decomposition could be applied, with a flavor, to any type of special case symbolic sequences, such as Order.
+
+
+
+
diff --git a/docs/fundamentals/ideas/geometric_mean_based_characteristics.md b/docs/fundamentals/ideas/geometric_mean_based_characteristics.md
index 504d1552..86ba5fb5 100644
--- a/docs/fundamentals/ideas/geometric_mean_based_characteristics.md
+++ b/docs/fundamentals/ideas/geometric_mean_based_characteristics.md
@@ -1,3 +1,40 @@
+---
+hide:
+ - toc
+---
# Geometric Mean as Alternative to Probability
-Coming soon
+At first glance, introducing the concept of [intervals](interval_as_a_basic_information_unit.md) may seem like an unnecessary complication.
+After all, if the ultimate goal is to estimate the probability of a symbol, there are much simpler methods - counting the frequency of occurrence of a symbol relative to the total.
+
+However, this perspective begins to shift when we consider other types of aggregate functions beyond the arithmetic mean.
+One particularly insightful example is the geometric mean of intervals.
+While the arithmetic mean smooths out the "structure" of the data and bring us back to probability
+(since the average interval between identical symbols is simply the inverse of their probability),
+the geometric mean responds to the diversity of intervals in a fundamentally different way.
+
+If the intervals between repeated elements are uniform, the geometric mean and the arithmetic mean will be the same.
+But as the intervals become more irregular — because symbols appear in bursts or clusters — [the geometric mean begins
+to diverge from the arithmetic mean](https://en.wikipedia.org/wiki/AM%E2%80%93GM_inequality).
+This makes it a sensitive indicator of the order within the sequence, not just the frequency.
+
+
+
+*Visual proof of the arithmetic mean - geometric mean inequality. Source: [wikipedia.org](https://en.wikipedia.org/wiki/File:AM_GM_inequality_visual_proof.svg)*
+
+Building on this idea, Former Order Analysis explored the potential of reinterpreting classical probabilistic and information-theoretic measures in terms of these intervals.
+Instead of relying solely on symbol frequencies, it reformulated the measures using the geometric mean instead of probability (arithmetic mean).
+
+\begin{array}{|c|c|}
+\hline
+Entropy & Average \ remoteness \\
+\hline
+H= - \sum_{j=1}^{m}{p_j \log_2{p_j}} = \frac {1} {n} * \sum_{j=1}^{m}{n_j \log_2 \Delta_{a_j}} & g = \frac{1}{n} * \sum_{j=1}^{m}{n_j \log_2{\Delta_{g_j}}} = \frac{1}{n} * \sum_{j=1}^{m}{\sum_{i=1}^{n_j} \log_2 \Delta_{ij}} \\
+\hline
+\end{array}
+
+*Example of Shennon's Entropy analog - Average remoteness. Where $n$ - seqeunce length, $m$ - alphabet power, $n_j$ - count of element $j$-th, $\Delta_{a_j}$ - average mean of intervals for element $j$-th, $\Delta_{g_j}$ - geometric mean of intervals for element $j$-th, $\Delta_{ij}$ - $i$-th interval for element $j$-thg*
+
+These measures are fine-grained and sensitive to the temporal or spatial order of elements in a sequence.
+Allows us to distinguish between sequences of symbols that may have identical probability distributions
+but differ in the way those symbols are arranged - insight that traditional measures completely miss.
diff --git a/docs/fundamentals/ideas/index.md b/docs/fundamentals/ideas/index.md
index 8c15c86d..b7aecd8b 100644
--- a/docs/fundamentals/ideas/index.md
+++ b/docs/fundamentals/ideas/index.md
@@ -1,3 +1,20 @@
# Ideas
-Coming soon
+Formal Order Analsis is based on five main ideas:
+
+* [Sequence as a Whole Object](sequence_as_a_whole_object.md) -
+Treat a symbolic sequence as a unique whole, focusing on its internal structure and emergent properties.
+
+* [Order as a Property](order_as_a_property.md) -
+By replacing each symbol in a sequence with its index in a dynamic alphabet, we define an "Order" — a new property that separates the content of the sequence from its composition.
+
+* [Congeneric Decomposition](congeneric_decomposition.md) -
+This method breaks a symbolic sequence into layered sub-sequences where each layer isolates a single symbol’s positions,
+preserving the sequence’s internal order and making its structure more analyzable.
+
+* [Interval as a Basic Information Unit](interval_as_a_basic_information_unit.md) -
+Intervals measure the distance between repeated elements, revealing hidden patterns in repetition and spacing.
+
+* [Geometric Mean as Alternative to Probability](geometric_mean_based_characteristics.md) -
+Using measurements based on the geometric mean of intervals instead of the probability of symbols (the arithmetic mean of occurrence)
+allows us to move from recording simple frequency to recording the underlying structure and regularity in the arrangement of symbols.
diff --git a/docs/fundamentals/ideas/interval_as_a_basic_information_unit.md b/docs/fundamentals/ideas/interval_as_a_basic_information_unit.md
index dba6d4fe..634e1606 100644
--- a/docs/fundamentals/ideas/interval_as_a_basic_information_unit.md
+++ b/docs/fundamentals/ideas/interval_as_a_basic_information_unit.md
@@ -1,3 +1,54 @@
+---
+hide:
+ - toc
+---
# Interval as a Basic Information Unit
-Coming soon
+Intervals serve as a fundamental unit of information by measuring the number of different
+items, events, or symbols that occur between reseated in a sequence.
+
+The intervals for symbol `A` in the following sequence would be `[3, 3, 1, 1, 2, 1, 1]`
+``` mermaid
+block-beta
+ columns 12
+ s1["A"] s2["C"] s3["T"] s4["A"] s5["C"] s6["G"] s7["A"] s8["A"] s9["A"] s10["T"] s11["A"] s12["A"]
+ i1["3"]:3 i2["3"]:3 i3["1"]:1 i4["1"]:1 i5["2"]:2 i6["1"]:1 i7["1"]:1
+
+ classDef c3 fill:#2ca02c,color:#fff;
+ classDef c4 fill:#98df8a,color:#000;
+ class s1,s4,s7,s8,s9,s11,s12 c3
+ class i1,i2,i3,i4,i5,i6,i7 c4
+```
+
+In general, a sequence does not necessarily end with the same symbol it begins with.
+To cover all cases, we consider the sequence as a looped sequence representing an infinite pattern with the same characteristics as the original data
+This cyclic approach corresponds to the idea of representativeness heuristic.
+
+The intervals for symbol `C` in the following cycled sequence would be `[3, 9]`
+``` mermaid
+block-beta
+ columns 15
+ s1["A"] s2["C"] s3["T"] s4["A"] s5["C"] s6["G"] s7["A"] s8["A"] s9["A"] s10["T"] s11["A"] s12["A"] space s13["T"] s14["C"]
+ space i1["3"]:3 i2["9"]:10
+ s12 --> s13
+
+ classDef c3 fill:#2ca02c,color:#fff;
+ classDef c4 fill:#98df8a,color:#000;
+ class s2,s5,s14 c3
+ class i1,i2 c4
+```
+
+The circular pattern preserves both the statistical properties and the order of elements.
+Moreover, the average interval length is the inverse of the probability of an event, which directly relates intervals to probability.
+
+\begin{array}{|c|c|c|}
+\hline
+ & \Delta_a & P \\
+\hline
+A & \frac{3 + 3 + 1 + 1 + 2 + 1 + 1}{7} = \frac{12}{7} \approx 1.7142; & \frac{7}{12} = (\frac{12}{7})^{-1} = \Delta_a^{-1} \\
+\hline
+C & \frac{3 + 9}{2} = \frac{12}{2} = 6 & \frac{2}{12} = \frac{1}{6} = 6^{-1} = \Delta_a^{-1} \\
+\hline
+\end{array}
+
+This makes intervals a crucial informational unit that offers deeper insights into the sequence than individual occurrences alone.
diff --git a/docs/fundamentals/ideas/order_as_a_property.md b/docs/fundamentals/ideas/order_as_a_property.md
index 19deeea3..401d2928 100644
--- a/docs/fundamentals/ideas/order_as_a_property.md
+++ b/docs/fundamentals/ideas/order_as_a_property.md
@@ -1,3 +1,338 @@
+---
+hide:
+ - toc
+---
# Order as a Property
-Coming soon
+Formal order analysis defines a special property of symbolic sequences - an Order.
+The order is a sequence of natural numbers obtained from the original symbolic sequence by replacing each
+of its elements with a natural number corresponding to the index of this element in the alphabet
+sorted by the appearance of the elements in the original sequence [1, 2, 3].
+
+The concept of an Order can be conveniently demonstrated using an example:
+
+
+Let's assume there is a symbolic sequence
+
+``` mermaid
+block-beta
+ columns 36
+ s1["I"] s2["N"] s3["T"] s4["E"] s5["L"] s6["L"] s7["I"] s8["G"] s9["E"] s10["N"]
+ s11["C"] s12["E"] s13[" "] s14["I"] s15["S"] s16[" "] s17["T"] s18["H"] s19["E"] s20[" "]
+ s21["A"] s22["B"] s23["I"] s24["L"] s25["I"] s26["T"] s27["Y"] s28[" "] s29["T"] s30["O"]
+ s31[" "] s32["A"] s33["D"] s34["A"] s35["P"] s36["T"]
+```
+
+
+Find and enumirate the first appearance of each element
+
+``` mermaid
+block-beta
+ columns 36
+ s1["I"] s2["N"] s3["T"] s4["E"] s5["L"] s6["L"] s7["I"] s8["G"] s9["E"] s10["N"]
+ s11["C"] s12["E"] s13[" "] s14["I"] s15["S"] s16[" "] s17["T"] s18["H"] s19["E"] s20[" "]
+ s21["A"] s22["B"] s23["I"] s24["L"] s25["I"] s26["T"] s27["Y"] s28[" "] s29["T"] s30["O"]
+ s31[" "] s32["A"] s33["D"] s34["A"] s35["P"] s36["T"]
+
+ space:36
+
+ i1_1["1"] i2_1["2"] i3_1["3"] i4_1["4"] i5_1["5"] space:2 i6_1["6"] space:2 i7_1["7"] space
+ i8_1["8"] space i9_1["9"] space:2 i10_1["10"] space:2
+ i11_1["11"] i12_1["12"] space:4 i13_1["13"]
+ space:2 i14_1["14"] space:2
+ i15_1["15"] space i16_1["16"]
+
+ classDef c1 fill:#ff7f0e,color:#fff;
+ classDef c2 fill:#ffbb78,color:#000;
+ classDef c3 fill:#2ca02c,color:#fff;
+ classDef c4 fill:#98df8a,color:#000;
+ classDef c5 fill:#d62728,color:#fff;
+ classDef c6 fill:#ff9896,color:#000;
+ classDef c7 fill:#9467bd,color:#fff;
+ classDef c8 fill:#c5b0d5,color:#000;
+ classDef c9 fill:#8c564b,color:#fff;
+ classDef c10 fill:#c49c94,color:#000;
+ classDef c11 fill:#e377c2,color:#fff;
+ classDef c12 fill:#f7b6d2,color:#000;
+ classDef c13 fill:#bcbd22,color:#fff;
+ classDef c14 fill:#dbdb8d,color:#000;
+ classDef c15 fill:#17becf,color:#fff;
+ classDef c16 fill:#9edae5,color:#000;
+
+ class s1,i1_1 c1
+ class s2,i2_1 c2
+ class s3,i3_1 c3
+ class s4,i4_1 c4
+ class s5,i5_1 c5
+ class s8,i6_1 c6
+ class s11,i7_1 c7
+ class s13,i8_1 c8
+ class s15,i9_1 c9
+ class s18,i10_1 c10
+ class s21,i11_1 c11
+ class s22,i12_1 c12
+ class s27,i13_1 c13
+ class s30,i14_1 c14
+ class s33,i15_1 c15
+ class s35,i16_1 c16
+
+ s1 --> i1_1
+ s2 --> i2_1
+ s3 --> i3_1
+ s4 --> i4_1
+ s5 --> i5_1
+ s8 --> i6_1
+ s11 --> i7_1
+ s13 --> i8_1
+ s15 --> i9_1
+ s18 --> i10_1
+ s21 --> i11_1
+ s22 --> i12_1
+ s27 --> i13_1
+ s30 --> i14_1
+ s33 --> i15_1
+ s35 --> i16_1
+```
+
+The alphabet (with indexes) for the sequence would be sequence of unique elements:
+
+
+``` mermaid
+block-beta
+ columns 16
+ s1["I"] s2["N"] s3["T"] s4["E"] s5["L"] s8["G"]
+ s11["C"] s13[" "] s15["S"] s18["H"]
+ s21["A"] s22["B"] s27["Y"] s30["O"]
+ s33["D"] s35["P"]
+
+ space:16
+
+ i1_1["1"] i2_1["2"] i3_1["3"] i4_1["4"] i5_1["5"] i6_1["6"] i7_1["7"]
+ i8_1["8"] i9_1["9"] i10_1["10"]
+ i11_1["11"] i12_1["12"] i13_1["13"]
+ i14_1["14"]
+ i15_1["15"] i16_1["16"]
+
+ classDef c1 fill:#ff7f0e,color:#fff;
+ classDef c2 fill:#ffbb78,color:#000;
+ classDef c3 fill:#2ca02c,color:#fff;
+ classDef c4 fill:#98df8a,color:#000;
+ classDef c5 fill:#d62728,color:#fff;
+ classDef c6 fill:#ff9896,color:#000;
+ classDef c7 fill:#9467bd,color:#fff;
+ classDef c8 fill:#c5b0d5,color:#000;
+ classDef c9 fill:#8c564b,color:#fff;
+ classDef c10 fill:#c49c94,color:#000;
+ classDef c11 fill:#e377c2,color:#fff;
+ classDef c12 fill:#f7b6d2,color:#000;
+ classDef c13 fill:#bcbd22,color:#fff;
+ classDef c14 fill:#dbdb8d,color:#000;
+ classDef c15 fill:#17becf,color:#fff;
+ classDef c16 fill:#9edae5,color:#000;
+
+ class s1,i1_1 c1
+ class s2,i2_1 c2
+ class s3,i3_1 c3
+ class s4,i4_1 c4
+ class s5,i5_1 c5
+ class s8,i6_1 c6
+ class s11,i7_1 c7
+ class s13,i8_1 c8
+ class s15,i9_1 c9
+ class s18,i10_1 c10
+ class s21,i11_1 c11
+ class s22,i12_1 c12
+ class s27,i13_1 c13
+ class s30,i14_1 c14
+ class s33,i15_1 c15
+ class s35,i16_1 c16
+
+ s1 --> i1_1
+ s2 --> i2_1
+ s3 --> i3_1
+ s4 --> i4_1
+ s5 --> i5_1
+ s8 --> i6_1
+ s11 --> i7_1
+ s13 --> i8_1
+ s15 --> i9_1
+ s18 --> i10_1
+ s21 --> i11_1
+ s22 --> i12_1
+ s27 --> i13_1
+ s30 --> i14_1
+ s33 --> i15_1
+ s35 --> i16_1
+
+ i1_1 --> s1
+ i2_1 --> s2
+ i3_1 --> s3
+ i4_1 --> s4
+ i5_1 --> s5
+ i6_1 --> s8
+ i7_1 --> s11
+ i8_1 --> s13
+ i9_1 --> s15
+ i10_1 --> s18
+ i11_1 --> s21
+ i12_1 --> s22
+ i13_1 --> s27
+ i14_1 --> s30
+ i15_1 --> s33
+ i16_1 --> s35
+```
+
+
+Determine the order of the sequence by replacing each element of the sequence with its corresponding alphabet index
+
+``` mermaid
+block-beta
+ columns 36
+ s1["I"] s2["N"] s3["T"] s4["E"] s5["L"] s6["L"] s7["I"] s8["G"] s9["E"] s10["N"]
+ s11["C"] s12["E"] s13[" "] s14["I"] s15["S"] s16[" "] s17["T"] s18["H"] s19["E"] s20[" "]
+ s21["A"] s22["B"] s23["I"] s24["L"] s25["I"] s26["T"] s27["Y"] s28[" "] s29["T"] s30["O"]
+ s31[" "] s32["A"] s33["D"] s34["A"] s35["P"] s36["T"]
+
+ space:36
+
+ i1_1["1"] i2_1["2"] i3_1["3"] i4_1["4"] i5_1["5"] i5_2["5"] i1_2["1"] i6_1["6"] i4_2["4"] i2_2["2"] i7_1["7"] i4_3["4"]
+ i8_1["8"] i1_3["1"] i9_1["9"] i8_2["8"] i3_2["3"] i10_1["10"] i4_4["4"] i8_3["8"]
+ i11_1["11"] i12_1["12"] i1_4["1"] i5_3["5"] i1_5["1"] i3_3["3"] i13_1["13"]
+ i8_4["8"] i3_4["3"] i14_1["14"] i8_5["8"] i11_2["11"]
+ i15_1["15"] i11_3["11"] i16_1["16"] i3_5["3"]
+
+ classDef c1 fill:#ff7f0e,color:#fff;
+ classDef c2 fill:#ffbb78,color:#000;
+ classDef c3 fill:#2ca02c,color:#fff;
+ classDef c4 fill:#98df8a,color:#000;
+ classDef c5 fill:#d62728,color:#fff;
+ classDef c6 fill:#ff9896,color:#000;
+ classDef c7 fill:#9467bd,color:#fff;
+ classDef c8 fill:#c5b0d5,color:#000;
+ classDef c9 fill:#8c564b,color:#fff;
+ classDef c10 fill:#c49c94,color:#000;
+ classDef c11 fill:#e377c2,color:#fff;
+ classDef c12 fill:#f7b6d2,color:#000;
+ classDef c13 fill:#bcbd22,color:#fff;
+ classDef c14 fill:#dbdb8d,color:#000;
+ classDef c15 fill:#17becf,color:#fff;
+ classDef c16 fill:#9edae5,color:#000;
+
+ class s1,s7,s14,s23,s25,i1_1,i1_2,i1_3,i1_4,i1_5 c1
+ class s2,s10,i2_1,i2_2 c2
+ class s3,s17,s26,s29,s36,i3_1,i3_2,i3_3,i3_4,i3_5 c3
+ class s4,s9,s12,s19,i4_1,i4_2,i4_3,i4_4 c4
+ class s5,s6,s24,i5_1,i5_2,i5_3 c5
+ class s8,i6_1 c6
+ class s11,i7_1 c7
+ class s13,s16,s20,s28,s31,i8_1,i8_2,i8_3,i8_4,i8_5 c8
+ class s15,i9_1 c9
+ class s18,i10_1 c10
+ class s21,s32,s34,i11_1,i11_2,i11_3 c11
+ class s22,i12_1 c12
+ class s27,i13_1 c13
+ class s30,i14_1 c14
+ class s33,i15_1 c15
+ class s35,i16_1 c16
+
+
+ s1 --> i1_1
+ s7 --> i1_2
+ s14 --> i1_3
+ s23 --> i1_4
+ s25 --> i1_5
+
+ s2 --> i2_1
+ s10 --> i2_2
+
+ s3 --> i3_1
+ s17 --> i3_2
+ s26 --> i3_3
+ s29 --> i3_4
+ s36 --> i3_5
+
+ s4 --> i4_1
+ s9 --> i4_2
+ s12 --> i4_3
+ s19--> i4_4
+
+ s5 --> i5_1
+ s6 --> i5_2
+ s24 --> i5_3
+
+ s8 --> i6_1
+
+ s11 --> i7_1
+
+ s13 --> i8_1
+ s16 --> i8_2
+ s20 --> i8_3
+ s28 --> i8_4
+ s31 --> i8_5
+
+ s15 --> i9_1
+ s18 --> i10_1
+
+ s21 --> i11_1
+ s32 --> i11_2
+ s34 --> i11_3
+
+ s22 --> i12_1
+ s27 --> i13_1
+ s30 --> i14_1
+ s33 --> i15_1
+ s35 --> i16_1
+```
+
+
+The order of symbolic sequence `INTELLIGENCE IS THE ABILITY TO ADAPT` is
+
+``` mermaid
+block-beta
+ columns 36
+ i1_1["1"] i2_1["2"] i3_1["3"] i4_1["4"] i5_1["5"] i5_2["5"] i1_2["1"] i6_1["6"] i4_2["4"] i2_2["2"] i7_1["7"] i4_3["4"]
+ i8_1["8"] i1_3["1"] i9_1["9"] i8_2["8"] i3_2["3"] i10_1["10"] i4_4["4"] i8_3["8"]
+ i11_1["11"] i12_1["12"] i1_4["1"] i5_3["5"] i1_5["1"] i3_3["3"] i13_1["13"]
+ i8_4["8"] i3_4["3"] i14_1["14"] i8_5["8"] i11_2["11"]
+ i15_1["15"] i11_3["11"] i16_1["16"] i3_5["3"]
+```
+
+Despite the triviality of the concept Order, it allows us to separate the elements and composition of a sequence and to define the compositional equivalence of different sequences.
+
+Example of sequences with equals orders:
+
+```pyodide exec="on" install="foapy,numpy"
+import foapy
+import numpy as np
+
+seqA = list("INTELLIGENCE IS THE ABILITY TO ADAPT TO CHANGE")
+seqB = list("1N73LL1G3NC321527H324B1L17Y27024D4P72702CH4NG3")
+orderA = foapy.order(seqA)
+orderB = foapy.order(seqB)
+print("SeqA and SeqB orders are equals -", np.all(orderA == orderB))
+print("Order =", orderA)
+```
+
+
+
+# References:
+
+1. Curtis Cooper and Robert E. Kennedy. 1992. Patterns, automata, and Stirling numbers of the second kind. Math. Comput. Educ. 26, 2 (Spring 1992), 120–124.
+2. Gumenjuk A., Kostyshin A., Simonova S. An approach to the research of the structure of linguistic and musical texts. Glottometrics. 2002. № 3. P. 61–89.
+3. (In russian) V.I. Arnold, Complexity of finite sequences of zeros and ones and geometry of finite function spaces: el. print, 2005. http://mms.mathnet.ru/meetings/2005/arnold.pdf
diff --git a/docs/fundamentals/ideas/sequence_as_a_whole_object.md b/docs/fundamentals/ideas/sequence_as_a_whole_object.md
new file mode 100644
index 00000000..3f4b72dd
--- /dev/null
+++ b/docs/fundamentals/ideas/sequence_as_a_whole_object.md
@@ -0,0 +1,26 @@
+# Sequence as a whole object
+
+Symbol sequences are a common model in theoretical and applied science.
+This prevalence is since almost any object of study can be represented as a sequence of elements or events.
+
+However, if we set aside our knowledge of the essence of the elements in a specific case and
+consider the sequence itself as a separate object of study, then it turns out that methods used
+to study them are almost exclusively statistical.
+With the only exception being methods for comparison / alignment of two or more sequences
+(for example, the Levenshtein distance).
+
+None of these methods describe a sequence as a holistic object.
+The Levenshtein distance requires another sequence to compare with the original one, which makes
+the measures of this approach "relative". The probabilistic approach decomposes the sequence into
+elements and calculates their probabilities (frequencies). Thus, the sequence is replaced, as an object of study,
+by a probability distribution. In turn, a specific probability distribution corresponds to an infinite
+number of sequences with a ratio of elements "close" to the one in the original sequence.
+Moments, conditional probabilities, Shannon entropy, and Markov chains allow us to more accurately
+model the object under study, but they still essentially rely on the idea of decomposing a sequence
+into independent elements, ignoring the sequence as a holistic object. Practically all existing approaches
+to the study and description of symbolic sequences originate from the set-theoretic approach.
+
+Formal order analysis is based on the belief that a symbolic sequence can be considered as a holistic object
+with emergent properties, which corresponds to systems thinking. In addition to the distribution
+of elements this method studies arrangement of its components - the internal structure (pattern) of the sequence,
+which determines its uniqueness among others, including those consisting of the same set of elements.
diff --git a/docs/fundamentals/ideas/sequence_as_an_system_object.md b/docs/fundamentals/ideas/sequence_as_an_system_object.md
deleted file mode 100644
index c46c29ec..00000000
--- a/docs/fundamentals/ideas/sequence_as_an_system_object.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Sequence as a System Object
-
-Coming soon
diff --git a/mkdocs.yml b/mkdocs.yml
index 8975d29b..a96bf592 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -6,8 +6,8 @@ nav:
- fundamentals/index.md
- "Ideas":
- fundamentals/ideas/index.md
- - "Sequence as a whole object": fundamentals/ideas/sequence_as_an_system_object.md
- - "Order as a sequence property": fundamentals/ideas/order_as_a_sequence_property.md
+ - "Sequence as a whole object": fundamentals/ideas/sequence_as_a_whole_object.md
+ - "Order as a property": fundamentals/ideas/order_as_a_property.md
- "Congeneric decomposition": fundamentals/ideas/congeneric_decomposition.md
- "Interval as a basic information unit": fundamentals/ideas/interval_as_a_basic_information_unit.md
- "Geomteric mean as alternative to probability": fundamentals/ideas/geometric_mean_based_characteristics.md
@@ -138,12 +138,16 @@ markdown_extensions:
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.snippets
- - pymdownx.superfences
- tables
- pymdownx.tabbed:
alternate_style: true
- pymdownx.arithmatex:
generic: true
+ - pymdownx.superfences:
+ custom_fences:
+ - name: mermaid
+ class: mermaid
+ format: !!python/name:pymdownx.superfences.fence_code_format
plugins:
- autorefs