CONTEXT (benchmarks/emergent_simplex_dimension.py): number = dimension = the SIMPLEX GRADE of a coupled-NFR form (EPI): the k-clique K_k is the (k-1)-simplex, (k-1)-dimensional, carrying the cardinal (k-1). This benchmark asks the dynamic question: does the canonical TNFR dynamics -- Emission (AL) creating NFRs, U3 resonant Coupling/Resonance (UM/RA) linking phase-compatible nodes -- SPONTANE- OUSLY build these simplices and CLIMB in grade/dimension by itself?
THE MECHANISM (canonical): a set of mutually phase-compatible NFRs (|phi_i - phi_j| <= dphi_max for all pairs, the U3 resonance gate) is a CLIQUE in the resonant-coupling graph = a complete K_k = a coherent simplex = a form (EPI) of grade k-1 = dimension k-1. So the emergent dimension is the grade of the largest MUTUALLY-RESONANT cluster, and the dynamics that grows that cluster grows the dimension.
WHAT EMERGES (measured below):
So the dimension is DYNAMICALLY GENERATED by resonant coherence, one fractal- resonant degree at a time -- exactly "the emergent complexity of the form generates the dimensions".
HONEST SCOPE: clique = simplex and the U3 phase-compatibility gate are the canonical objects; max-clique / synchronization are standard. The TNFR result is that the canonical Emission + resonant-Coupling dynamics builds simplices of increasing grade, that coherence GATES each lift, and that synchronization GROWS the simplex -- so the simplex-grade dimension (= cardinal) is dynamically generated by coherence, not imposed.
Run: python benchmarks/emergent_dimension_dynamics.py
Theoretical anchor: AGENTS.md (Emission AL; U3 resonant coupling UM/RA; phase gate |phi_i-phi_j|<=dphi_max); benchmarks/emergent_simplex_dimension.py (number = dimension = simplex grade). Status: RESEARCH (dynamic generation).
"""
Emergent Dimension Dynamics: the TNFR coherence dynamics BUILDS coherent
simplices of increasing grade -- dimension generated one resonant degree at a
time.
============================================================================
CONTEXT (benchmarks/emergent_simplex_dimension.py): number = dimension = the
SIMPLEX GRADE of a coupled-NFR form (EPI): the k-clique K_k is the
(k-1)-simplex, (k-1)-dimensional, carrying the cardinal (k-1). This benchmark
asks the dynamic question: does the canonical TNFR dynamics -- Emission (AL)
creating NFRs, U3
resonant Coupling/Resonance (UM/RA) linking phase-compatible nodes -- SPONTANE-
OUSLY build these simplices and CLIMB in grade/dimension by itself?
THE MECHANISM (canonical): a set of mutually phase-compatible NFRs
(|phi_i - phi_j| <= dphi_max for all pairs, the U3 resonance gate) is a CLIQUE
in the resonant-coupling graph = a complete K_k = a coherent simplex = a form
(EPI) of grade k-1 = dimension k-1. So the emergent dimension is the grade of
the largest MUTUALLY-RESONANT cluster, and the dynamics that grows that cluster
grows the dimension.
WHAT EMERGES (measured below):
- M1 RESONANT ACCRETION: Emission of a phase-COHERENT NFR, resonantly coupled
to the existing cluster, lifts the simplex by ONE grade: point -> edge ->
triangle -> tetrahedron -> ... i.e. 0D -> 1D -> 2D -> 3D -> ... One
coherent resonant degree = one dimension. The dynamics climbs by itself.
- M2 COHERENCE GATES IT: an INCOHERENT emission (phase outside the U3 gate)
does NOT couple to the cluster -> the maximal simplex is UNCHANGED -> no
dimension lift. Only RESONANT degrees raise the dimension.
- M3 SYNCHRONIZATION GROWS IT: a cluster whose phases are spread beyond the
gate has a small maximal simplex; as UM/RA synchronize the phases, more
pairs become compatible and the simplex GROWS to the full clique. Coherence
dynamics lifts the dimension.
So the dimension is DYNAMICALLY GENERATED by resonant coherence, one fractal-
resonant degree at a time -- exactly "the emergent complexity of the form
generates the dimensions".
HONEST SCOPE: clique = simplex and the U3 phase-compatibility gate are the
canonical objects; max-clique / synchronization are standard. The TNFR result
is that the canonical Emission + resonant-Coupling dynamics builds simplices of
increasing grade, that coherence GATES each lift, and that synchronization
GROWS the simplex -- so the simplex-grade dimension (= cardinal) is dynamically
generated by coherence, not imposed.
Run:
python benchmarks/emergent_dimension_dynamics.py
Theoretical anchor: AGENTS.md (Emission AL; U3 resonant coupling UM/RA; phase
gate |phi_i-phi_j|<=dphi_max); benchmarks/emergent_simplex_dimension.py
(number = dimension = simplex grade). Status: RESEARCH (dynamic generation).
"""
from __future__ import annotations
import pathlib
import sys
import networkx as nx
import numpy as np
_SRC = pathlib.Path(__file__).resolve().parents[1] / "src"
if str(_SRC) not in sys.path:
sys.path.insert(0, str(_SRC))
DPHI_MAX = np.pi / 6 # U3 resonance gate
def _circ(a: float, b: float) -> float:
"""Circular phase distance |phi_a - phi_b| in [0, pi]."""
return float(abs(np.angle(np.exp(1j * (a - b)))))
def _resonant_graph(phases: list[float]) -> nx.Graph:
"""U3 resonant-coupling graph: edge iff |phi_i - phi_j| <= DPHI_MAX."""
G = nx.Graph()
G.add_nodes_from(range(len(phases)))
for i in range(len(phases)):
for j in range(i + 1, len(phases)):
if _circ(phases[i], phases[j]) <= DPHI_MAX:
G.add_edge(i, j)
return G
def _max_grade(G: nx.Graph) -> int:
"""Largest clique size = simplex vertex count (grade + 1)."""
return max((len(c) for c in nx.find_cliques(G)), default=1)
def main() -> None:
print("=" * 70)
print("EMERGENT DIMENSION DYNAMICS (coherence builds simplices)")
print("=" * 70)
# -- M1: resonant accretion climbs the grade one degree at a time -------
print("\n[M1] Emission of coherent NFRs + U3 coupling lifts the grade:")
phases: list[float] = [0.0] # seed NFR (a point, 0D)
grades = [_max_grade(_resonant_graph(phases))]
for k in range(1, 5):
phases.append(0.01 * ((-1) ** k)) # coherent emission (inside gate)
grades.append(_max_grade(_resonant_graph(phases)))
dims = [g - 1 for g in grades]
print(f" NFRs emitted : {list(range(1, len(grades) + 1))}")
print(f" simplex grade: {grades}")
print(f" dimension : {dims} (point->edge->tri->tetra->4-simplex)")
assert grades == [1, 2, 3, 4, 5], grades
assert dims == [0, 1, 2, 3, 4]
print(" -> PASS: each coherent resonant emission = +1 grade = +1 dim.")
# -- M2: an INCOHERENT emission does NOT lift the dimension --------------
tetra = [0.0, 0.01, -0.01, 0.005] # K_4: tetrahedron (3D)
grade_before = _max_grade(_resonant_graph(tetra))
incoherent = tetra + [np.pi] # a phase pi away: outside the gate
grade_after = _max_grade(_resonant_graph(incoherent))
print("\n[M2] Coherence GATES the lift (incoherent emission):")
print(f" tetrahedron (3D) grade {grade_before} -> "
f"{grade_before - 1}D")
print(f" + 1 INCOHERENT NFR (phi=pi) grade {grade_after} -> "
f"{grade_after - 1}D")
assert grade_before == 4 and grade_after == 4, (grade_before, grade_after)
print(" -> PASS: an incoherent emission does NOT join the simplex;")
print(" the dimension is unchanged. Only RESONANT degrees lift it.")
# -- M3: synchronization GROWS the simplex ------------------------------
spread = [0.0, 0.15, 0.30, 0.45, 0.60] # spread beyond the gate
grade_spread = _max_grade(_resonant_graph(spread))
phi = np.array(spread)
for _ in range(60): # UM/RA synchronize toward the resonant-neighbour mean
G = _resonant_graph(list(phi))
new = phi.copy()
for i in range(len(phi)):
nb = list(G.neighbors(i))
if nb:
m = np.angle(np.mean(np.exp(1j * phi[nb])))
new[i] = phi[i] + 0.4 * np.angle(np.exp(1j * (m - phi[i])))
phi = new
grade_sync = _max_grade(_resonant_graph(list(phi)))
print("\n[M3] Synchronization (UM/RA) GROWS the coherent simplex:")
print(f" spread cluster grade {grade_spread} -> {grade_spread - 1}D")
print(f" after sync grade {grade_sync} -> {grade_sync - 1}D")
assert grade_sync > grade_spread, (grade_spread, grade_sync)
print(" -> PASS: coherence dynamics lifts the maximal simplex grade")
print(" (more pairs become resonant), raising the dimension.")
print("\n" + "=" * 70)
print("VERDICT")
print("=" * 70)
print(
"The dimension is DYNAMICALLY GENERATED by resonant coherence,\n"
" one fractal-resonant degree at a time. The dynamics builds it:\n"
" Emission (AL) creates NFRs; U3 resonant Coupling/Resonance\n"
" (UM/RA) links the phase-compatible ones into a clique = a\n"
" coherent simplex = the EPI form. Its GRADE = cardinal = dim.\n"
"M1: each coherent resonant emission lifts the grade one step --\n"
" point -> edge -> triangle -> tetra -> 0D -> 1D -> 2D -> 3D.\n"
"M2: COHERENCE GATES it -- an incoherent emission does not join,\n"
" so the dimension does not rise. Only RESONANT degrees count.\n"
"M3: SYNCHRONIZATION grows the simplex -- as phases align, more\n"
" pairs become resonant and the maximal simplex (the dim) climbs.\n"
"So 'the emergent complexity of the TNFR form generates the\n"
" dimensions' is realised dynamically: the coherent simplex (EPI)\n"
" climbs in grade/dimension by itself, gated and driven by\n"
" resonance. 3D is a tetrahedron of four mutually-resonant NFRs\n"
" the dynamics assembles; the grade keeps climbing as coherence\n"
" grows (not pinned at 3)."
)
if __name__ == "__main__":
main()