Status: CANONICAL — Derived from first principles
Date: March 2026
Version: 0.0.3.3
Prerequisite: AGENTS.md §Foundational Physics, UNIFIED_GRAMMAR_RULES.md §U2, §U6
Every physical theory with continuous symmetries possesses conservation laws (Noether, 1918). TNFR, however, operates on discrete graphs with discrete operator sequences constrained by grammar rules U1–U6. The question is:
Do the grammar constraints play the role of continuous symmetries and generate conservation laws?
This document argues that the answer is yes, via explicit derivation and numerical validation. The unified grammar is not merely a validation filter; it is the structural symmetry whose invariance implies approximate conservation of structural charge.
Structural Continuity Theorem: Let be a TNFR network evolving under the nodal equation with grammar constraints U1–U6 satisfied. Then:
where is the structural charge density, is the , and when grammar is satisfied.
Every node in a TNFR network evolves according to:
where:
Phase evolves through coupling with the nodal equation:
where is the phase coupling function determined by the operator sequence. For Coupling (UM) and Resonance (RA) operators, drives synchronization: (Kuramoto-type).
The evolution is restricted to operator sequences satisfying U1–U6:
These constraints define the grammar manifold — the space of all allowed evolutions.
where:
Structural Potential (global, ΔNFR-driven):
Phase Curvature (local, phase-driven):
The charge couples the global potential landscape with the local geometric curvature. This is the natural conserved quantity because:
where:
Phase Current (transport of phase coherence):
Reorganization Flux (transport of structural pressure):
The current carries two types of structural information:
The charge–current pairing is not arbitrary. It arises from the sector structure of TNFR fields:
| Sector | Charge Component | Current Component | Driving Physics |
|---|---|---|---|
| Potential | ΔNFR distribution & redistribution | ||
| Geometric |
These sectors are coupled through the complex geometric field , discovered via the anticorrelation (see §Mathematical Unification Discoveries).
By the nodal equation, changes through operator applications. Under grammar U2 (convergence):
This ensures is bounded.
where are the circular mean weights. Under grammar U3 (coupling):
because phase compatibility constrains the differential phase velocity.
The graph divergence at node :
Combining §4.1–4.3, the rate of change of charge is:
The structural source term is:
Theorem (Structural Conservation). Let be a finite TNFR network with nodes evolving under the nodal equation, with operator sequences satisfying U1–U6. Then the source term satisfies:
where depends on topology and operator parameters but not on . In particular, as (continuum limit), and conservation quality .
Proof.
We establish explicit bounds on each component of and show that grammar constraints make them mutually cancelling up to a residual that vanishes with network size.
Step 1. Operator norm bounds on (from U2).
Each canonical operator modifies by a bounded multiplicative factor. In the implementation:
For a sequence of destabilizers and stabilizers applied over interval , the cumulative gain is:
U2 requires whenever . In the minimal case , the net factor per destabilizer–stabilizer pair is:
This product exceeds 1, so a single OZ–IL pair is expansive. However, in practice stabilizers often appear in greater number than destabilizers (typical sequences contain 2–3 IL per OZ). The key bound from U2 is not that each pair contracts, but that the integral converges:
This holds because U6 independently confines , which bounds the aggregate (since is a weighted sum of values). Therefore:
where is guaranteed by U2+U6.
Step 2. Bound on (from U3).
Phase evolves as where is the phase coupling function. From §4.2:
U3 requires for coupled pairs. For Kuramoto-type coupling , this gives . With bounded (finite network, bounded frequencies), each phase velocity satisfies:
Therefore:
Step 3. Current divergence tracks charge variation (balance identity).
The current components are defined from the same fields that define charge:
The graph divergence applies the graph Laplacian again. For any function on a connected graph with nodes and average degree , the Laplacian satisfies .
When charge changes at node , the change is driven by modifications to (affecting ) and to phase (affecting ). The same modifications also alter and respectively, because operators couple both sectors through the nodal equation .
The key identity (exact on the continuum, approximate on graphs) is:
where the residuals and arise from: (a) the discrete graph approximation to continuous operators, and (b) nonlinear terms ( vs. linear, wrap-around vs. linear difference).
The source term is therefore:
Step 4. Residual vanishes under grammar constraints.
We bound each residual:
(a) Potential residual : The mismatch between and arises because uses inverse-distance weighting () while uses neighbor averaging. On a graph with diameter and minimum degree :
U6 ensures is bounded (confinement prevents unbounded ). As with fixed average degree, for small-world topologies, giving .
(b) Geometric residual : The mismatch between and arises from the nonlinearity of and the wrap-around in . Linearizing for small phase differences:
U3 constrains , giving . In practice, grammar-compliant sequences maintain (typical rad), yielding .
Step 5. Aggregate bound and scaling.
Combining the per-node residual bound:
The RMS residual is bounded independently of , while the per-node residual decreases as the network grows (denser graph better discrete approximation). This yields the scaling law:
validated numerically with across topologies (§10.4).
Step 6. Grammar violation detection.
When a grammar rule is violated, the corresponding bound fails:
| Violation | Effect on | Detection |
|---|---|---|
| U2 (no stabilizer after OZ) | , diverges |
Thus is a computable diagnostic that identifies which grammar rule was broken.
Remark. The proof is constructive: all bounds are computable from network parameters (, , , ) and operator constants (, , , ). The function in implements these bounds numerically.
The full conservation law decomposes into two coupled sub-equations:
The two sectors are not independent. The coupling strength is:
Numerical experiments show –, confirming significant cross-sector coupling. This coupling is the physical manifestation of the complex field unification .
Note: The "Analogy" column lists structural parallels to established physics for intuition. These are naming conventions within TNFR, not claims of deriving those physical conservation laws.
| Grammar Rule | Symmetry Type | Conserved Quantity | Analogy |
|---|---|---|---|
| U2 (Convergence) | Temporal translation | Total Noether charge | Energy conservation |
| U3 (Phase coupling) | Phase rotation | Phase current |
The conserved quantities form a hierarchy:
When grammar is violated, specific conserved quantities break:
This provides a diagnostic tool: measuring which conservation law is violated reveals which grammar rule was broken.
A Ward identity constrains the expectation value of observables between operator applications. For a TNFR operator applied at step :
where denotes the network average at step .
Each of the 13 canonical operators has a characteristic conservation signature:
| Operator | Conservation Character | ||
|---|---|---|---|
| Emission (AL) | Charge source (creation) | ||
| Reception (EN) |
For a complete grammar-valid sequence :
The total source over a complete sequence vanishes because U1 requires closure (sources created by generators must be absorbed by closures) and U2 requires convergence (destabilizer sources must be compensated by stabilizer sinks).
Experimental note (Causal Chain): The operator-specific Ward signatures in §7.2 are consistent with the experimentally observed complete causal chain: Operator → (ν_f, ΔNFR) → dEPI/dt → Tetrad → (ℰ, Q). Each operator produces a unique tetrad fingerprint (see STRUCTURAL_OPERATORS.md §17.2 and example 37). The IL-OZ symmetry (ΔE = −0.011 for both, despite opposite physics) confirms that charge source/sink classification depends on signed ΔNFR, not the perturbation magnitude.
Define the structural energy functional from the five canonical fields:
This is the half-sum of the energy density invariant defined in AGENTS.md §Tensor Invariants. All five tetrad fields contribute — omitting would break the Noether correspondence because phase gradient stress is the local driver of K_φ transport.
always (sum of squares).
Proposition: Under grammar-compliant evolution (U2 satisfied):
Proof sketch (not a complete formal proof):
Therefore is a candidate Lyapunov function for grammar-compliant dynamics. A complete formal proof of asymptotic stability would require analytic bounds on the nonlinear operator interactions; the per-operator bounds in §8.4 provide supporting evidence.
Refinement (Grammar-Energy Landscape): The Lyapunov contractivity bound () is sufficient but not necessary for energy descent. Experimental evidence (example 38) shows sequences with (non-contractive) that still achieve net energy descent (). The formal bound is conservative; actual grammar-compliant sequences may descend more steeply than the multiplicative product predicts, because operators interact nonlinearly on the shared graph state.
The dissipation rate has physical meaning:
where is the structural dissipation function. This quantifies how quickly the network approaches its coherent attractor.
High → fast convergence to coherence (heavy stabilization)
Low → slow convergence (exploration phase)
→ grammar violation (energy injection without control)
Each of the 13 canonical operators admits a formal energy bound derived from its glyph factor. Operators are classified into four energy classes:
Energy Class Taxonomy
| Class | Definition | Bound Form |
|---|---|---|
| Stabiliser |
Per-Operator Bounds
| Operator | Glyph | Class | Rate | Glyph Factor | Derivation |
|---|---|---|---|---|---|
| Coherence | IL | Stabiliser | IL_DNFR = 0.75 | ; IL multiplies NFR by → energy component scales as |
U2 Grammar Consequence (Sequence Contractiveness)
For a grammar-compliant sequence , define the energy multiplier per operator:
1 - \rho_i & \text{stabiliser} \\ 1 + \kappa_i & \text{destabiliser} \\ 1 & \text{neutral} \end{cases}$$ The cumulative product $\Pi = \prod_{i=1}^{n} m_i$ satisfies: - $\Pi < 1$ → **net-contractive** sequence (U2 satisfied) - $\Pi \geq 1$ → **non-contractive** (U2 may be violated) *Example*: OZ followed by 4×IL: $(1 + 3.0) \times (1 - 0.438)^4 = 4.0 \times 0.0997 \approx 0.40 < 1$ ✓ ### 8.5 Spectral Gap Characterisation The **diffusive relaxation time-scale** is controlled by the canonical TNFR diffusion operator $L_{\mathrm{rw}} = I - D^{-1}W$ (the EPI channel of the nodal equation; see `structural_diffusion`): the field relaxes as $e^{-\nu_f \lambda_2 t}$, where $\lambda_2$ is the spectral gap of the symmetric normalized Laplacian $L_{\mathrm{sym}} = I - D^{-1/2} W D^{-1/2}$ (same spectrum as $L_{\mathrm{rw}}$, orthonormal eigenbasis). The **combinatorial algebraic connectivity** $\lambda_1$ of $L = D - A$ is the related graph-topology measure; the two coincide only up to the degree normalisation ($\lambda_1/d$ on a $d$-regular graph) and differ on irregular graphs. The convergence rate below uses the **normalized** (canonical) gap; `analyze_spectral_gap` exposes it as `diffusion_gap`. **Spectral Quantities** | Quantity | Symbol | Formula | Physical Meaning | |----------|--------|---------|-----------------| | Spectral gap | $\lambda_1$ | $\min(\lambda_k : \lambda_k > 0)$ | Algebraic connectivity | | Relaxation time | $\tau_{\text{relax}}$ | $1/\lambda_1$ | Time for slowest non-trivial mode to decay by $e$ | | Mixing time | $t_{\text{mix}}$ | $\ln(N)/\lambda_1$ | Upper bound on mixing time | | Cheeger bound | $h$ | $\sqrt{2\,d_{\max}\,\lambda_1}$ | Isoperimetric lower bound | | Spectral ratio | $r$ | $\lambda_{\max}/\lambda_1$ | Condition number of dynamics | **Effective Convergence Rate** The per-operator convergence rate is bounded by the minimum of the operator's Lyapunov contraction rate and the spectral gap: $$r_{\text{eff}} = \min(\rho, \lambda_1)$$ For stabilisers, the energy half-life is: $$t_{1/2} = \frac{\ln 2}{r_{\text{eff}}}$$ This characterisation shows that: 1. Well-connected topologies ($\lambda_1$ large) allow operators to converge faster 2. Loosely-connected topologies bottleneck convergence regardless of operator strength 3. The spectral ratio $\lambda_{\max}/\lambda_1$ measures the dynamic range of the system **Implementation**: `src/tnfr/physics/lyapunov.py` — complete per-operator bounds, spectral gap analysis, and sequence contractiveness proofs. **Validation**: the Lyapunov test suite in `tests/core_physics/test_lyapunov_operators.py`. ### 8.6 Relaxation-rate identity and the partial Lyapunov reduction The structural H-theorem of the EPI diffusion channel — the Dirichlet energy $F = \tfrac12\sum_{ij} A_{ij}(\mathrm{EPI}_i - \mathrm{EPI}_j)^2$ is non-increasing under $\partial_t\mathrm{EPI} = -\nu_f L_{\mathrm{rw}}\mathrm{EPI}$, a *proven* fact (Lyapunov functional of the heat semigroup; see `examples/08_emergent_geometry/135_arrow_of_time_h_theorem.py`) — decays at the **canonical rate** $$F(t) \sim e^{-2\nu_f \lambda_2 t},\qquad \lambda_2 = \lambda_2(L_{\mathrm{sym}}) = \texttt{diffusion\_gap},$$ verified to machine precision in a mode-isolated test ($|{\rm err}| \sim 10^{-15}$ across regular and irregular graphs; the combinatorial $\lambda_2(L=D-A)$ gives the *wrong* rate, off by the degree factor $1/d$ on regular graphs and more on irregular ones). This is the **same** $\lambda_2$ that §8.5 uses for the Lyapunov convergence rate: the diffusion H-theorem and the structural Lyapunov energy share a single relaxation clock, $\nu_f\,\lambda_2(L_{\mathrm{sym}})$. **Partial reduction of the open $dE/dt\le 0$ proof.** The energy functional $E = \tfrac12\sum(\Phi_s^2 + |\nabla\phi|^2 + K_\phi^2 + J_\phi^2 + J_{\Delta\mathrm{NFR}}^2)$ splits into (i) **gradient / Dirichlet sectors** ($|\nabla\phi|^2$ and the EPI diffusion sector), whose decrease is *governed by the proven structural H-theorem* at rate $2\nu_f\lambda_2$, and (ii) a **residual**: the destabiliser (U4: OZ/ZHIR/VAL) energy injection — bounded by the U2 contract — together with the conjugate-momentum sectors $(J_\phi, J_{\Delta\mathrm{NFR}})$. Under stabiliser-only (destabiliser-free) evolution the diffusion-governed sectors are therefore provably non-increasing. This **reduces** the open asymptotic-stability question to the U4 residual; it does **not** close it — it isolates exactly what an outstanding proof must control. The same monotone-relaxation structure recurs in the grammar layer (the Parry / Markov H-theorem, `examples/08_emergent_geometry/150_emergent_grammatical_pattern_parry.py`): all three functionals relax to equilibrium by one mechanism, on the one canonical clock $\nu_f\,\lambda_2(L_{\mathrm{sym}})$. ### 8.7 The two conservation/Lyapunov structures TNFR carries **two distinct conservation laws**, on two different fields, sharing the one relaxation clock of §8.6: | | EPI channel (diffusion) | Tetrad / grammar | |---|---|---| | **Field** | the scalar form EPI | the tetrad $(\Phi_s, \lvert\nabla\phi\rvert, K_\phi, \dots)$ | | **Conserved quantity** | degree-weighted total $\sum_i \deg(i)\,\mathrm{EPI}_i$ (left null vector of $L_{\mathrm{rw}}$) | Noether charge $Q=\sum_i(\Phi_s+K_\phi)$ | | **Conserved under** | $\partial_t\mathrm{EPI}=-\nu_f L_{\mathrm{rw}}\mathrm{EPI}$ | grammar U1–U6 | | **Lyapunov functional** | Dirichlet energy $F=\tfrac12\sum A_{ij}(\mathrm{EPI}_i-\mathrm{EPI}_j)^2$ | $E=\tfrac12\sum(\Phi_s^2+\lvert\nabla\phi\rvert^2+K_\phi^2+J_\phi^2+J_{\Delta\mathrm{NFR}}^2)$ | | **Equilibrium** | uniform EPI (stationary measure $\pi_i\propto\deg i$) | confined tetrad (U2 satisfied) | | **Implementation** | `structural_diffusion.degree_weighted_total`, `stationary_distribution` | `conservation.compute_noether_charge`, `compute_energy_functional` | The two are **independent** (the degree-weighted total acts on EPI; $Q$ on the tetrad), but both relax on the **same clock** $\nu_f\,\lambda_2(L_{\mathrm{sym}})$ (§8.6): $F$ provably (the structural H-theorem), $E$ for its diffusion-governed sectors. This is standard graph-diffusion conservation plus the tetrad conservation law of §8.1–§8.6; the only contribution is the explicit statement that TNFR runs **two** parallel conservation/Lyapunov structures on one clock. --- ## 9. Discrete Formulation on Graphs ### 9.1 Graph Laplacian Connection The discrete divergence used in TNFR conservation is the **random-walk graph Laplacian** $L_{\mathrm{rw}} = I - D^{-1}W$ — the $1/d_i$ normalisation turns the combinatorial Laplacian $L = D - A$ into $L_{\mathrm{rw}}$: $$(\nabla \cdot \mathbf{J})(i) \approx \frac{1}{d_i} \sum_{j \sim i} [J(j) - J(i)] = \frac{1}{d_i} (L \cdot \mathbf{J})_i = (L_{\mathrm{rw}} \mathbf{J})_i$$ so the relaxation spectrum governing conservation is that of $L_{\mathrm{rw}}$ (equivalently the symmetric $L_{\mathrm{sym}}$), consistent with §8.5. This connects conservation on graphs to spectral graph theory. ### 9.2 Spectral Decomposition Expanding in the eigenbasis of the graph Laplacian $L \psi_k = \lambda_k \psi_k$: $$\rho(i) = \sum_k \hat{\rho}_k \psi_k(i), \quad J(i) = \sum_k \hat{J}_k \psi_k(i)$$ The continuity equation mode-by-mode: $$\frac{d\hat{\rho}_k}{dt} + \lambda_k \hat{J}_k = \hat{\mathcal{S}}_k$$ Low-frequency modes ($\lambda_k$ small): charge changes slowly, mainly transported → *conservation regime* High-frequency modes ($\lambda_k$ large): rapid transport, potential dissipation → *relaxation regime* ### 9.3 Conservation Resolution by Scale The eigenvalue spectrum of $L$ determines at which scales conservation holds most precisely: - **Global modes** ($k = 0, 1$): Total charge $Q$ is most conserved - **Mesoscale modes**: Sector-level conservation with cross-coupling - **Local modes** ($k \to N$): Rapid equilibration, sources/sinks active This spectral hierarchy mirrors the U5 multi-scale coherence principle. --- ## 10. Numerical Validation ### 10.1 Protocol Conservation validated across: - **Topologies**: Watts-Strogatz, Barabási-Albert, Grid, Complete - **Sizes**: $N = 10$ to $N = 500$ - **Dynamics**: Nodal equation integration with $\Delta t = 0.01$ - **Duration**: 20–100 steps per experiment - **Discretization**: Crank-Nicolson (trapezoidal) divergence averaging $\frac{1}{2}[\nabla\!\cdot\!\mathbf{J}_{\text{before}} + \nabla\!\cdot\!\mathbf{J}_{\text{after}}]$ for $\mathcal{O}(\Delta t^2)$ accuracy ### 10.2 Key Results | Metric | WS(30,4,0.3) | BA(30,3) | Grid(5×5) | |--------|-------------|----------|-----------| | Charge drift (20 steps) | $2.0 \times 10^{-4}$ | $1.8 \times 10^{-4}$ | $2.3 \times 10^{-4}$ | | Conservation quality | 0.65 | 0.63 | 0.61 | | Sector asymmetry | 1.03 | 1.12 | 1.08 | | Cross-coupling $\kappa$ | 0.65 | 0.58 | 0.71 | | Energy monotonicity | Yes | Yes | Yes | ### 10.3 Interpretation - **Charge drift < 0.03%** across all topologies — $Q$ is effectively conserved - **Conservation quality ≈ 0.6** reflects the discrete approximation; improves with smaller $\Delta t$ and denser networks - **Cross-coupling** ≈ 0.6–0.7 confirms the Ψ unification is physically real - **Energy monotonically decreasing** supports Lyapunov proposition ### 10.4 Scaling Behavior Conservation quality scales as: $$q(N) \sim 1 - \frac{C}{\sqrt{N}}$$ where $C \approx 2.1$ is topology-dependent. In the continuum limit ($N \to \infty$): $q \to 1$, i.e., **exact conservation**. --- ## 11. Physical Interpretation and Analogies > **Note**: The tables in this section draw structural analogies between TNFR conservation quantities and established physical theories. These parallels serve as intuition aids and naming conventions; they are not claims that TNFR derives or replaces those physical theories. ### 11.1 Electrodynamics Analogy | TNFR | Electrodynamics | |------|-----------------| | $\rho = \Phi_s + K_\phi$ | $\rho = \text{charge density}$ | | $\mathbf{J} = (J_\phi, J_{\Delta\text{NFR}})$ | $\mathbf{J} = \text{current density}$ | | Grammar U-rules | Gauge symmetry U(1) | | Operator sequences | Gauge transformations | | $\mathcal{S}_{\text{grammar}}$ | Gauge anomaly | | Energy functional $E$ | Field energy $\frac{1}{2}(E^2 + B^2)$ | ### 11.2 Fluid Dynamics Analogy | TNFR | Fluid Dynamics | |------|---------------| | $\rho$ → structural charge | $\rho$ → mass density | | $\mathbf{J}$ → structural flow | $\rho\mathbf{v}$ → momentum density | | Grammar → incompressibility | $\nabla \cdot \mathbf{v} = 0$ | | Coherence (IL) → viscosity | Energy dissipation | ### 11.3 Thermodynamic Analogy | TNFR | Thermodynamics | |------|---------------| | $E$ → structural energy | Internal energy $U$ | | $\mathcal{D}$ → dissipation rate | Entropy production $\dot{S}$ | | Grammar evolution → irreversibility | Second law | | Coherent attractor → equilibrium | Thermal equilibrium | --- ## 12. Applications ### 12.1 Grammar Violation Detection Conservation residuals serve as a **real-time grammar violation detector**: ```python tracker = ConservationTracker(G) tracker.record(t=0.0) apply_operator_sequence(G, sequence) tracker.record(t=1.0) balance = tracker.latest_balance if balance.grammar_violation_index > 0.5: violations = detect_grammar_violations_from_conservation(balance) # violations['violation_types'] reveals WHICH rule was broken ``` ### 12.2 Self-Optimization via Conservation Monitoring The `ConservationTracker` can guide the self-optimizing engine: 1. **Monitor** conservation quality during optimization 2. **Detect** when operator choices violate grammar (rising residuals) 3. **Correct** by selecting operators that restore conservation 4. **Verify** improvement after correction ### 12.3 Network Health Telemetry Conservation quality serves as an aggregate health metric: - $q > 0.9$: Excellent structural coherence - $0.5 < q < 0.9$: Active dynamics, normal operation - $q < 0.5$: Possible grammar violation or fragmentation risk ### 12.4 Predictive Diagnostics The sector decomposition predicts failure modes: - **Potential sector dominant**: ΔNFR imbalance → U2/U6 risk - **Geometric sector dominant**: Phase decoherence → U3 risk - **Both elevated**: Cascading bifurcation → U4/U5 risk ### 12.5 Operator-Tetrad Fingerprinting The per-operator Ward identities (§7.2) are experimentally confirmed by the **operator-tetrad fingerprint matrix** ([example 37](../examples/02_physics_regimes/37_operator_tetrad_synergy.py)). Each operator produces a unique signature across (Φ_s, |∇φ|, K_φ, ξ_C), and the causal chain Operator → Tetrad → (ℰ, Q) is unidirectional. This fingerprint can serve as a runtime diagnostic to identify which operator was applied from conservation residual patterns. --- ## 13. Implementation Reference ### 13.1 Core Module **File**: `src/tnfr/physics/conservation.py` | Component | Purpose | |-----------|---------| | `ConservationSnapshot` | Frozen state capture at time $t$ | | `ConservationBalance` | Two-snapshot continuity verification | | `ConservationTimeSeries` | Multi-step diagnostics | | `ConservationTracker` | Live tracking across operator sequences | | `compute_charge_density(G)` | $\rho(i) = \Phi_s(i) + K_\phi(i)$ | | `compute_current_divergence(G)` | $\nabla \cdot \mathbf{J}$ | | `compute_noether_charge(G)` | $Q = \sum_i \rho(i)$ | | `compute_energy_functional(G)` | $E = \frac{1}{2}\sum(\Phi_s^2 + K_\phi^2 + J_\phi^2 + J_{\Delta\text{NFR}}^2)$ | | `verify_conservation_balance(...)` | Continuity equation residual (Crank-Nicolson, O(Δt²)) | | `decompose_conservation_residual(...)` | Sector decomposition (Crank-Nicolson) | | `analyze_sector_coupling(...)` | Cross-sector correlation | | `compute_grammar_conservation_bounds(G)` | Theoretical bounds from U-rules | | `detect_grammar_violations_from_conservation(...)` | Violation classification | | `WardIdentity` | Per-operator conservation signature | | `LyapunovResult` | Lyapunov dE/dt analysis | | `SpectralConservation` | Graph Laplacian eigendecomposition | | `compute_ward_identity(...)` | Single-step Ward identity | | `verify_sequence_ward_identity(...)` | Sequence Σ⟨S_k⟩ ≈ 0 | | `compute_lyapunov_derivative(...)` | dE/dt and dissipation D[G] | | `compute_spectral_conservation(...)` | Spectral mode analysis | | `compute_conservation_scaling(...)` | q(N) ~ 1 − C/√N fit | **Per-Operator Lyapunov Module** (`src/tnfr/physics/lyapunov.py`): | Component | Purpose | |-----------|---------| | `EnergyClass` | Enum: STABILISER, DESTABILISER, NEUTRAL, MIXED | | `OperatorLyapunovBound` | Per-operator formal energy bound with derivation | | `OPERATOR_LYAPUNOV_BOUNDS` | Registry of all 13 operator bounds | | `get_bound(name_or_glyph)` | Lookup by operator name or glyph | | `compute_operator_energy_bound(...)` | Theoretical ΔE upper bound per step | | `compute_sequence_energy_bound(...)` | Cumulative energy bound across sequence | | `verify_operator_lyapunov(...)` | Empirical vs theoretical bound check | | `analyze_spectral_gap(G)` | Full Laplacian eigendecomposition: λ₁, τ_relax, t_mix, Cheeger | | `analyze_operator_convergence(G, name)` | Combined Lyapunov + spectral rate | | `prove_sequence_lyapunov(operators)` | Formal U2 contractiveness proof | ### 13.2 Tests **File**: `tests/core_physics/test_conservation_laws.py` — 62 tests **File**: `tests/core_physics/test_lyapunov_operators.py` — 96 tests (per-operator bounds, spectral gap, sequence proofs) ### 13.3 Benchmark **File**: `benchmarks/conservation_law_validation.py` ### 13.4 Example **File**: `examples/02_physics_regimes/17_conservation_law_demo.py` --- ## 14. Summary of Main Results 1. **Structural Continuity Theorem**: $\partial\rho/\partial t + \nabla \cdot \mathbf{J} = \mathcal{S}_{\text{grammar}}$ where $\mathcal{S} \to 0$ under U1–U6. 2. **Noether Correspondence**: Each grammar rule corresponds to a conserved quantity — grammar is the structural symmetry of TNFR. 3. **Two-Sector Structure**: Conservation decomposes into potential ($\Phi_s \leftrightarrow J_{\Delta\text{NFR}}$) and geometric ($K_\phi \leftrightarrow J_\phi$) sectors coupled through $\Psi = K_\phi + i J_\phi$. 4. **Ward Identities**: Each canonical operator has a characteristic conservation signature; complete sequences satisfy $\sum_k \langle \mathcal{S}_k \rangle \approx 0$. 5. **Lyapunov Stability**: The energy functional $E = \frac{1}{2}\sum(\Phi_s^2 + |\nabla\phi|^2 + K_\phi^2 + J_\phi^2 + J_{\Delta\text{NFR}}^2)$ is non-increasing under grammar-compliant evolution in all tested configurations, supporting asymptotic stability of coherent attractors. Formal per-operator bounds are derived from glyph factors for all 13 canonical operators (§8.4), with explicit spectral gap characterisation (§8.5) giving topology-dependent convergence rates. A complete proof of asymptotic stability remains open. 6. **Numerical Validation**: Charge drift < 0.03% across topologies; conservation quality improves toward 1 in the continuum limit. 7. **Diagnostic Application**: Conservation residuals detect and classify grammar violations in real time. --- --- ## Implementation & Examples ### SDK Entry Points ```python from tnfr.sdk import TNFR net = TNFR.create(20).ring().evolve(5) cons = net.conservation() # ConservationReport print(cons.summary()) # Q, E, dE/dt, stability ``` ### Executable Demonstrations | Example | Concept from this document | |---------|---------------------------| | [17_conservation_law_demo.py](../examples/02_physics_regimes/17_conservation_law_demo.py) | Noether charge, energy functional, Lyapunov stability, Ward identities | | [34_conservation_protocol_suite.py](../examples/02_physics_regimes/34_conservation_protocol_suite.py) | Multi-topology conservation protocol: charge drift, q(N) scaling, sector decomposition (§10) | | [36_grammar_violation_detector.py](../examples/02_physics_regimes/36_grammar_violation_detector.py) | Grammar violation detection via conservation residuals (§12.1), violation classification | ### Key Source Modules - `src/tnfr/physics/conservation.py` — Canonical conservation implementation - `src/tnfr/sdk/simple.py` — `ConservationReport` dataclass --- **Status**: CANONICAL **Derived from**: Nodal equation + Grammar U1–U6 **Validated by**: 158 tests (62 conservation + 96 Lyapunov), numerical experiments across topologies **Implementation**: `src/tnfr/physics/conservation.py`| Phase dynamics & curvature transport |
| U3 (coupling without phase check) | , |
| U6 ( escapes confinement) | , charge accumulates | $ |
compute_grammar_conservation_bounds(G)src/tnfr/physics/conservation.py| Electric charge |
| U6 (Confinement) | Potential boundedness | Structural energy | Mass-energy bound |
| U1 (Initiation/Closure) | Sequence completeness | Charge creation/annihilation balance | Baryon number |
| U4 (Bifurcation control) | Curvature stability | Topological charge | Winding number |
| U5 (Multi-scale) | Scale invariance | Hierarchical charge | Fractal dimension |
| Charge neutral (redistribution) |
| Coherence (IL) | Charge sink (stabilization) |
| Dissonance (OZ) | Charge source (destabilization) |
| Coupling (UM) | Charge transport (no creation) |
| Resonance (RA) | Charge transport + dissipation |
| Silence (SHA) | Exactly conserved |
| Expansion (VAL) | Charge source |
| Contraction (NUL) | Charge sink |
| Self-org (THOL) | Internal redistribution |
| Mutation (ZHIR) | Phase-dependent |
| Transition (NAV) | Trajectory-dependent |
| Recursivity (REMESH) | Scale redistribution |
| Multiplicative contraction, |
| Destabiliser | Multiplicative expansion, |
| Neutral | $ | \Delta E |
| Mixed | Competing stabilising and destabilising components | Worst-case bound |
| Reception | EN | Stabiliser | EN_MIX = 0.2413 | Jensen inequality on convex combination: |
| Coupling | UM | Stabiliser | UM_DNFR = 0.15 | Phase-synchronisation reduces NFR by factor |
| Self-organisation | THOL | Stabiliser | THOL_ACCEL = 0.10 | Autopoietic redistribution: global form preserved, local energy absorbed |
| Transition | NAV | Stabiliser | NAV_ETA = 0.5 | Regime shift mixes EPI with target at ratio → contraction by |
| Dissonance | OZ | Destabiliser | OZ_DNFR = 2.0 | Multiplicative amplification: |
| Expansion | VAL | Destabiliser | VAL_SCALE = 1.05 | Scaling : |
| Emission | AL | Destabiliser | AL_BOOST = 0.10 | Additive: |
| Resonance | RA | Destabiliser | RA_VF = 0.05 | Amplification on frequency component |
| Silence | SHA | Neutral | SHA_VF = 0.9 | Near-isometric: $ |
| Mutation | ZHIR | Neutral | ZHIR_SHIFT = 0.3 | Phase shift: $ |
| Recursivity | REMESH | Neutral | REMESH_ALPHA = 0.5 | Advisory operator: no field modification → exact isometry |
| Contraction | NUL | Mixed | NUL_DENS = 1.111 | EPI shrinks () but NFR densifies () |