SYSTEM OF ALGORITHMS
Algorithm 2:
Complete discrete Hodge decomposition (k=1) for EQUILIBRIUM-741
Purpose For a given flow (1-forms on ribs) \omega\in\mathbb{R}^m Find: \omega = \omega_{\mathrm{grad}} + \omega_{\mathrm{curl}} + h,
where:
- \omega_{\mathrm{grad}} = d_0\varphi = B^\top\varphi,
- \omega_{\mathrm{curl}} = \delta_2\psi,
- h is the harmonic 1 form that satisfies
\delta_1 h = 0,\qquad d_1 h = 0.
Input
- Oriented graph G=(V,E), |V|=n=741, |E|=m.
- Rib weights (conductivity) c_e>0 or value w_e>0.
- Triangles F (2-simplexes) by Default Triangles v0.1, |F|=p.
- Stream \omega\in\mathbb{R}^m on the oriented ribs.
Step 0. Weighting and metrics
0.1. If you have a value of w_e, translate in conductivity
c_e=\exp(-w_e/\tau).
Collect:W_1=\mathrm{diag}(c_e)\in\mathbb{R}^{m\times m}.
0.2. Weight of triangles
Default:
W_2=\mathrm{diag}(w_t),\quad w_t=\frac{1}{3}(c_{ij}+c_{ik}+c_{jk}).
Step 1. Assemble boundary operators B and B_2
1.1. Knot-rebro incident
B\in\mathbb{R}^ nd\times m .
1.2. Incident of the rib-triangle
B_2\in\mathbb{R}^{m\times p}
by canonical orientation of triangles t=[i,j,k] (with i<j<k) and rule:
\partial[i,j,k]=[j,k]-[i,k]+[i,j].
Step 2. Define d and \delta
Discrete differentials:
d_0 = B^\top : \mathbb{R}^n\to\mathbb{R}^m,\qquad d_1 = B_2^\top : \mathbb{R}^m\to\mathbb{R}^p.
Weighed Codifferentials:
\delta_1 = B W_1 : \mathbb{R}^m\to\mathbb{R}^n,
\delta_2 = W_1^{-1} B_2 W_2 : \mathbb{R}^p\to\mathbb{R}^m.
(This is consistent with scalar works \langle\cdot,\cdot\rangle_1 = \cdot^\top W_1 \cdot and \langle\cdot,\cdot\rangle_2 = \cdot^\top W_2 \cdot.)
Step 3. Find the gradient part \omega_QQQ\mathrm{grad}
We solve the problem of potential \varphi\in\mathbb{R}^n:
\varphi = \arg\min_{\varphi}\|\omega - d_0\varphi\|_{W_1}^2.
Normal Equations:
L_0\,\varphi = \delta_1 \omega, \qquad L_0 := \delta_1 d_0 = B W_1 B^\top.
3.1. Calibration (required)
Since L_0 has a nucleus (constants), we make one of:
- fix \varphi_{v_0}=0 (anchor node)
- or add condition \sum_i \varphi_i = 0
3.2. We receive
\omega_{\mathrm{grad}} = d_0\varphi = B^\top\varphi,
r_1 = \omega - \omega_{\mathrm{grad}}.
Control:
\delta_1 r_1 = 0 \quad (\text{within numerical error}).
Step 4. Find the vortex part \omega_{\mathrm{curl}> through \psi the Triangles
Looking for \psi\in\mathbb{R}^P as:
\psi = \arg\min_{\psi}\|r_1 - \delta_2\psi\|_{W_1}^2.
Normal Equations:
L_2\,\psi = d_1 r_1, where
L_2 := d_1 \delta_2 = B_2^\top W_1^{-1} B_2 W_2.
4.1. Calibration for \psi
If the complex has 2-cycles, L_2 It can also be deformed. Default:
- Condition \sum_t \psi_t=0
or fix \psi_{t_0}=0.
4.2. We receive
\omega_{\mathrm{curl}} = \delta_2\psi = W_1^{-1} B_2 W_2\psi,
h = r_1 - \omega_{\mathrm{curl}}.
Step 5. Quality checks and diagnostics
5.1. Harmonious
We check two conditions:
- Divergence Zero:
\|\delta_1 h\|_2 \approx 0 - Vortex Zero:
\|d_1 h\|_2 \approx 0
If both are small, the decomposition is correct.
5.2. Orthogonality (in W_1-metric)
Check:
\langle \omega_{\mathrm{grad}}, \omega_{\mathrm{curl}}\rangle_{1}\approx 0, \quad \langle \omega_{\mathrm{grad}}, h\rangle_{1}\approx 0, \quad \langle \omega_{\mathrm{curl}}, h\rangle_{1}\approx 0.
5.3. Energy components (diagnosis of “soul structure”)
Define:
E_{\mathrm{grad}}=\|\omega_{\mathrm{grad}}\|_{W_1}^2,\quad E_{\mathrm{curl}}=\|\omega_{\mathrm{curl}}\|_{W_1}^2,\quad E_h=\|h\|_{W_1}^2.
Interpretation:
- large E_ ?\mathrm{grad}?: system “potential” (can be reduced to reconfiguring levels)
- large E_ ?\mathrm{curl}?: dominated by local circulations/rhythms
- large E_h: strong structural memory (not washed away by diffusion)
Step 6. Build 1-laplasian and “crystal memory” as core
We define Hodge-laplasian on 1-forms:
\Delta_1 = d_0\delta_1 + \delta_2 d_1.
In matrices (according to our definitions):
\Delta_1 = B^\top B W_1 + W_1^{-1} B_2 W_2 B_2^\top.
Crystal memory at k level=1: \dim\ker(\Delta_1) \;=\; b_1
(the first number of Betty complex, with correct sampling).
Practically:
- find some own meanings \lambda\approx 0
- number of such \lambda = “memory” dimensions
Algorithm output 2
- \omega_{\mathrm{grad}}\in\mathbb{R}^m
- \omega_{\mathrm{curl}}\in\mathbb{R}^m
- h\in\mathbb{R}^m
- diagnostic metrics: \|\delta_1 h\|, \|d_1 h\|, energies E, and \dim\ker(\Delta_1)
A practical “minimum for launch” on EQUILIBRIUM-741
If you want to implement this without long preparation:
- Graph: kNN (k=12), weight c_e=\exp(-w_e/\tau)
- Triangles: size clicks 3 with cap=60/node
- Assembly: B, B_2, W_1, W_2
- Solver: twice solve rarefied symmetric systems (for \varphi and \psi)
- Diagnostics: norms and energies, then spectrum \Delta_1 near zero
If you want, I'll give you the algorithm 3: Crystal of the Soul - Diffusion 1-forms": how to start \frac{d\omega}{dt}=-\Delta_1\omega
and watch how \omega(t) aims for h (memory), plus how to connect the control \mathcal{U}(t).
Algorithm 3:
Diffusion on 1-forms and the “manifestation of memory” of the Soul Crystal (EQUILIBRIUM-741)
Goal
Run flow dynamics (1-forms on edges) so that:
- smooth local voltages/vortices
- Identify the harmonic component h (structural memory)
- if necessary, manage the process through external influences
Sign in
- Diluted matrices B, B_2 (from Algorithm 2)
- Weight matrices W_1=\mathrm{diag}(c_e), W_2=\mathrm{diag}(w_t)
- Start Stream (1-form) \omega_0\in\mathbb{R}^m
- (Optionally) management \mathcal{U}(t)\in\mathbb{R}^m or impulses
Preparation: Assemble Hodge Laplacean on 1-forms
Using the agreed default form (from Algorithm 2):
\Delta_1 = d_0\delta_1 + \delta_2 d_1
where
d_0=B^\top,\quad \delta_1=B W_1,\quad d_1=B_2^\top,\quad \delta_2=W_1^{-1}B_2W_2.
In the form of “two contributions”:
1) Upper (gradient) contribution
\Delta_{1,\mathrm{up}} = d_0\delta_1 = B^\top B W_1
2) Lower (vortex) contribution
\Delta_{1,\mathrm{down}} = \delta_2 d_1 = W_1^{-1} B_2 W_2 B_2^\top
Total:
\Delta_1=\Delta_{1,\mathrm{up}}+\Delta_{1,\mathrm{down}}.
Part A. Linear diffusion (without control)
A1. Continuous Dynamics
\frac{d\omega}{dt} = -\Delta_1\,\omega.
Formal decision:
\omega(t)=e^{-t\Delta_1}\,\omega_0.
Meaning: All components that lie outside \ker(\Delta_1) fade. There is a projection on the nucleus - harmonic memory.
A2. Discretization in time: “implicit Euler” (stable default)
Choose a step \Delta t>0 and we consider:
\omega_{k+1} = \omega_k - \Delta t\,\Delta_1\,\omega_{k+1}
So let's solve the linear system:
(I+\Delta t\,\Delta_1)\,\omega_{k+1}=\omega_k.
Why so:
implicit step is stable for any \Delta t (important on large graphs).
A3. Stop: When the “memory showed up”
We make a stop according to one of the criteria:
- little change
\frac{\|\omega_{k+1}-\omega_k\|_{W_1}}{\|\omega_k\|_{W_1}} < \varepsilon_{\mathrm{stop}} - little energy outside the core (residual “decay”)
\|\Delta_1\omega_k\|_2 < \varepsilon_{\mathrm{lap}}
The result: h \approx \omega_k is the manifested harmonic part.
Part B. Diagnosis during the process
At each step, count three values (useful for the “soul map”):
B1. Divergence (nodal “leakage/inflow”)
\mathrm{div}(\omega_k)=\delta_1\omega_k=B W_1\omega_k\in\mathbb{R}^n.
B2. Vortex (triangular circulation)
\mathrm{curl}(\omega_k)=d_1\omega_k=B_2^\top\omega_k\in\mathbb{R}^p.
B3. Energy (Strength)
E(\omega_k)=\|\omega_k\|_{W_1}^2=\omega_k^\top W_1\omega_k.
Interpretation of diffusion process:
- \|\mathrm{div}\| Falling → The “Node Unbalanced”
- \|\mathrm{curl}\| decreases → local circulation dissipates
- where both divergence and vortex are close to zero.
Part C. Managed diffusion (interference)
C1. Continuous managed model
\frac{d\omega}{dt} = -\Delta_1\omega + \mathcal{U}(t).
C2. Discrete Implicit Step with Control
(I+\Delta t\,\Delta_1)\,\omega_{k+1}=\omega_k + \Delta t\,\mathcal{U}_k.
C3. Default management strategies (three modes)
Mode 1: “Local impulse”
We want to strengthen/weaken the flow on the selected set of edges S\subset E:
(\mathcal{U}_k)_e= \begin{cases} u_k(e), & e\in S\\ 0,& e\notin S \end{cases}
Mode 2: “Rising vortex”
Interfere proportionally with the vortex:
\mathcal{U}_k = -\eta\, W_1^{-1} B_2 W_2\,(B_2^\top \omega_k)
This is a direct suppression component of \delta_2 d_1\omega.
Mode 3: “Reduction to potential”
We intervene in proportion to the divergence:
\mathcal{U}_k = -\eta\, B^\top (B W_1 \omega_k)
This extinguishes the contribution d_0\delta_1\omega.
Part D. “Memory Projection” as an Alternative Quick Method
If you do not want to chase time, you can immediately calculate the harmonic part:
h = \Pi_{\ker(\Delta_1)}\,\omega_0
Practically:
- Find several vectors \phi_1,\dots,\phi_r s \lambda\approx 0
- Assemble the matrix \Phi=[\phi_1\ \dots\ \phi_r]
- projection:
h = \Phi(\Phi^\top W_1 \Phi)^{-1}\Phi^\top W_1 \omega_0
Diffusion is useful in that it gives “tracks” of attenuation and maps of stresses over time.
Algorithm output 3
- sequence \omega_k (evolution of streams)
- h\approx \omega_{k^\*} — manifested harmonic memory
- Diagnostic series: \|\delta_1\omega_k\|, \|d_1\omega_k\|, E(\omega_k)
Default parameters (not to think)
- \Delta t = 1.0
- \varepsilon_{\mathrm{stop}} = 10^{-4}
- \varepsilon_{\mathrm{lap}} = 10^{-6}
- number of steps: maximum 200 (usually less is enough)