TNFR Logo
TheoryLearnSoftwareResearch

On this page

TNFR

Resonant Fractal Nature Theory — a mathematical framework for coherent patterns on graph-coupled networks.

About
  • Project history
  • Editorial policy
  • Contact
Resources
  • GitHub
  • PyPI
  • DOI · Zenodo
Legal
  • MIT License
  • Citation
© 2026 TNFR project — MIT licensed.DOI 10.5281/zenodo.17602860
docs
grammar
PHYSICS_VERIFICATION.md
API_CONTRACTS.mdCANONICAL_OZ_SEQUENCES.mdEMPIRICAL_CONFRONTATION_EEG.mdREADME.mdSTRUCTURAL_FIELDS_TETRAD.mdSTRUCTURAL_INTERFACE_THEORY.md
theory
APPLIED_STRUCTURAL_ANALYSIS.mdCATALOG_TYPE_HYGIENE_PROGRAMME.mdDISSIPATIVE_AND_OPEN_SYSTEMS.mdEMERGENT_ONTOLOGY.mdEXTENDED_FIELDS_AND_DERIVED_QUANTITIES.mdFUNDAMENTAL_THEORY.mdGAUGE_SYMMETRY_AND_UNIFICATION.mdGLOSSARY.mdMATHEMATICAL_DYNAMICS_BASIS.mdMINIMAL_STRUCTURAL_DEGREES.mdNUCLEUS_A_PRIME_LADDER_ATLAS.mdNUCLEUS_B_EQUIVARIANCE_OBSTRUCTIONS.mdPHYSICAL_REGIME_CORRESPONDENCES.mdREADME.mdREMESH_INFINITY_DERIVATION.mdSTRUCTURAL_CONSERVATION_THEOREM.mdSTRUCTURAL_OPERATORS.mdSTRUCTURAL_STABILITY_AND_DYNAMICS.mdTNFR_BSD_RESEARCH_NOTES.mdTNFR_HODGE_RESEARCH_NOTES.mdTNFR_NAVIER_STOKES_RESEARCH_NOTES.mdTNFR_NUMBER_THEORY.mdTNFR_P_VS_NP_RESEARCH_NOTES.mdTNFR_RIEMANN_RESEARCH_NOTES.mdTNFR_VARIATIONAL_PRINCIPLE.mdTNFR_YANG_MILLS_RESEARCH_NOTES.mdTNFR.pdfUNIFIED_GRAMMAR_RULES.md
factorization-lab
analysis
analyze_patterns.pycertificate_manifest.py
benchmarks
benchmark_analysis.pybenchmark_expansion_suite.pyfull_spectrum_factorization.pypaley_gap_extended.pypaley_gap_smoke.pytest_benchmark_suite.py
demos
experiment_contexts
exp_0b1663cd19b7.jsonexp_0bf0054b7474.jsonexp_75a4c8ca616a.jsonexp_848ee0fd1857.jsonexp_f6fe00562193.jsonexp_fdf3da424e1e.json
failure_telemetry_batch.pyfeedback_integration_demo.pyintegration_demo_snapshots.dbseed_management_integration_demo.pysnapshot_integration_demo.pytrajectory_143.jsontrajectory_77.jsontrajectory_89.jsontrajectory_91.jsontrajectory_97.json
docs
FACTORING_PLAYBOOK.mdFALSE_POSITIVE_TEST_SUITE.mdOPERATOR_CERTIFICATES.mdROADMAP.mdSPECTRAL_ROUTE.md
experiment_contexts
exp_cebe1d9e7d8e.json
notebooks
spectral_history.ipynb
scripts
run_false_positive_tests.py
tests
run_false_positive_test_suite.pytest_cli.pytest_false_positive_methodology.pytest_false_positive_verifier.pytest_feedback_integration.pytest_partitioning.pytest_seed_management.pytest_self_opt_support.pytest_snapshot_system.pytest_spectral_paley.pytest_verification_robustness.py
tnfr_factorization
__init__.pyapi.pycli.pyfailure_telemetry.pyfeedback_adapter.pyfeedback_integration.pypartitioning.pyself_opt_support.pyspectral_paley.py
demo_snapshots.dbLICENSE_SNAPSHOT.mdPACKAGE_SUMMARY.mdREADME.mdseed_management.pysnapshot_system.pytest_certificate_hashing.pytest_installation.pyverification_trajectory_77.json
benchmarks
analyze_tetrad_universality.pyb0star_alpha_canonical_product_graphs.pybenchmark_optimization_tracks.pybenchmark_utils.pyboundary_vibration.pybridge_primes_riemann.pychiral_involution.pycli_utils.pycoherence_projector_sense_index.pycommutant_bridge.pycomposition_arithmetic.pyconfinement_zones_test.pyconservation_law_validation.pydirected_paley_bridge.pyemergent_arithmetic_pulse.pyemergent_atom_dynamics.pyemergent_atomic_shells.pyemergent_base_dimension.pyemergent_dimension_dynamics.pyemergent_fractal_pulse.pyemergent_fractal_simplex_dimension.pyemergent_integers_symmetry.pyemergent_musical_nfr.pyemergent_nfr_geometry.pyemergent_nfr_where.pyemergent_rationals.pyemergent_rhythm.pyemergent_screening.pyemergent_shell_cardinals.pyemergent_shell_ordering.pyemergent_simplex_dimension.pyemergent_substrate_symmetry.pyequivariance_wall.pyexternal_phase_gate_validation.pyfield_methods_battery.pygolden_residue_remesh_bridge.pyintegrated_force_regime_study.pyinverse_spectrum_to_symmetry.pyk_phi_safety_demo.pykuramoto_farey_bridge.pymissing_piece_bridge.pymultichannel_interface_benchmark.pynavier_stokes_recipe_bridge.pynodal_propagator_residue_bridge.pyns_moment_hierarchy_cascade.pyoperational_irreducibility.pypaley_bridge.pyphase_curvature_investigation.pyphase_wall.pyphi_s_confinement_investigation.pyprimes_as_consequence.pypulse_phase_coherence_budget.pyREADME.mdremesh_infinity_riemann_baseline.pyremesh_infinity_riemann_composed.pyremesh_infinity_riemann_modified_graph.pyremesh_infinity_riemann_operator.pyremesh_infinity_riemann_spectral_basis.pyremesh_infinity_riemann_spectral_robustness.pyremesh_infinity_riemann_spectral.pyresidue_phase_vs_riemann.pystructural_interface_benchmark.pytemporal_interface_benchmark.pytetrad_results_aggregate.pyu2_destabilization_irreversibility.pyuniversality_clusters.pyxi_c_fast_experiment.py
primality-test
benchmarks
comprehensive_benchmark.py
docs
ADVANCED_INTEGRATION.mdmathematical_foundation.mdperformance_analysis.md
examples
advanced_examples.pybasic_usage.py
tnfr_primality
__init__.py__main__.pyadvanced_cli.pyadvanced_core.pycli.pyconstants.pycore.pyoptimized.py
MANIFEST.inPACKAGE_SUMMARY.mdREADME.mdRELEASE_NOTES_v1.0.mdsetup.pytest_installation.py
tests
core_physics
__init__.pytest_conservation_laws.pytest_delta_nfr_computation_paths.pytest_delta_nfr.pytest_dispersion_coherence_sign_invariance.pytest_emergent_constants_guard.pytest_lyapunov_operators.pytest_nodal_equation.pytest_structural_triad.py
data
replay_manifests
sample_run
_manifest_summary.json_manifest.json_partition_files.txt.gz
self_opt_validation
seed_alpha
paley.json
seed_beta
integration.json
seed_gamma
unknown.json
self_optimization
test_run
partitioned
test_run
test_run_p0.jsontest_run_p1.json
_manifest_summary.json_manifest.json
engines
test_pattern_discovery_manifest.pytest_self_optimization_engine.py
mathematics
__init__.pytest_autodiff.pytest_backends.pytest_dissipative_dynamics.pytest_epi.pytest_factory_patterns.pytest_metrics.pytest_navier_stokes_refounded.pytest_number_theory_canonical.pytest_operators.pytest_residue_networks.pytest_riemann_nodal_pulse.pytest_riemann_pulse_coherence.pytest_spaces.pytest_transforms.pytest_validator.py
operators
test_canonical_operators_modern.pytest_grammar_canon.pytest_grammar_canonical_consistency.pytest_grammar_dynamics.pytest_operator_contracts.pytest_operator_strategies.py
parallel
test_fractal_partition_manifest.py
physics
test_conservation_gauge_unification.pytest_dissipative_conservation.pytest_emergent_chemistry.pytest_field_cache_invalidation.pytest_gauge.pytest_phase_transition.pytest_signatures.pytest_spectral_conservation.pytest_structural_diffusion.pytest_structural_integrity.pytest_symplectic_substrate.pytest_tetrad_bounds.pytest_variational.pytest_yang_mills_closure.pytest_yang_mills_derivability.pytest_yang_mills_scaling.pytest_yang_mills_structural_gap.pytest_yang_mills_u6_sweep.py
scripts
test_run_self_opt_validation.pytest_run_self_optimization.py
sdk
__init__.pytest_simple_advanced.py
__init__.pyconftest.pyREADME.mdtest_breast_cancer_phase_gate_demo.pytest_classical_mechanics.pytest_distributed_fft.pytest_external_phase_gate_validation.pytest_factorization_entrypoint.pytest_multichannel_interface.pytest_nodal_optimizer.pytest_phase_gate_api.pytest_replay_register_manifest.pytest_signal_confrontation.pytest_structural_interface_api.pytest_structural_interface_baselines.pytest_structural_interface_benchmark.pytest_temporal_interface.pytest_vectorized_coherence_length_regression.pytest_wine_quality_phase_gate_demo.pyutils.py
examples
01_foundations
01_hello_world.py02_musical_resonance.py03_network_formation.py04_operator_sequences.py05_coherence_evolution.py06_network_topologies.py07_phase_transitions.py08_emergent_phenomena.py09_visualization_suite.py10_simplified_sdk_showcase.py
02_physics_regimes
11_classical_limit_comparison.py115_operator_contract_audit.py12_classical_mechanics_demo.py13_quantum_mechanics_demo.py14_uncertainty_and_interference.py15_train_crossing_demo.py17_conservation_law_demo.py26_gauge_structure_demo.py27_variational_principle_demo.py28_dissipative_systems_demo.py29_lyapunov_stability_demo.py30_self_optimization_demo.py31_mathematical_constants_basis.py33_complex_field_unification.py34_conservation_protocol_suite.py35_tetrad_irreducibility.py36_grammar_violation_detector.py37_operator_tetrad_synergy.py38_grammar_energy_landscape.py39_nodal_equation_decomposition.py
03_riemann_zeta
157_nodal_pulse_phase_attack.py41_von_mangoldt_zeta_demo.py42_riemann_zeros_as_resonances.py43_prime_ladder_hamiltonian_demo.py44_weil_explicit_formula_demo.py45_li_keiper_demo.py46_weil_tnfr_positivity_demo.py47_alpha_sweep_demo.py48_admissible_family_sweep_demo.py49_nodeaware_gauge_sweep_demo.py50_uniform_coercivity_demo.py51_adaptive_coercivity_demo.py52_paley_gap_coercivity_demo.py53_lyapunov_spectral_positivity_demo.py54_hilbert_polya_demo.py55_structural_zero_density_demo.py56_spectral_emergence_demo.py57_admissible_rescaling_demo.py58_oscillatory_correction_demo.py
04_riemann_L_twisted
59_dirichlet_l_function_demo.py60_dirichlet_l_continuation_demo.py61_dirichlet_l_hamiltonian_demo.py62_dirichlet_weil_explicit_formula_demo.py63_dirichlet_li_keiper_demo.py64_twisted_weil_positivity_demo.py65_twisted_alpha_sweep_demo.py66_twisted_admissible_family_sweep_demo.py67_twisted_nodeaware_gauge_sweep_demo.py68_twisted_hermite_family_demo.py69_twisted_coercivity_uniform_demo.py70_twisted_paley_gap_coercivity_demo.py71_twisted_lyapunov_spectral_demo.py72_twisted_hilbert_polya_demo.py73_twisted_structural_zero_density_demo.py74_twisted_spectral_emergence_demo.py75_twisted_admissible_rescaling_demo.py76_twisted_oscillatory_correction_demo.py
05_type_hygiene
77_remesh_infinity_residue_split_demo.py78_nuf_type_signature_demo.py79_epi_type_signature_demo.py80_phi_type_signature_demo.py81_dnfr_type_signature_demo.py82_remesh_window_type_signature_demo.py83_delta_phi_max_type_signature_demo.py84_coupling_weights_type_signature_demo.py85_tetrad_closure_signature_demo.py86_currents_closure_signature_demo.py87_aggregates_closure_signature_demo.py88_urules_consistency_signature_demo.py89_operator_catalog_discipline_signature_demo.py
06_navier_stokes
158_navier_stokes_two_face_refounded.py
07_number_theory
100_prime_families_orbits.py101_numbers_as_coupled_network.py102_nodal_flow_primes_equilibria.py116_nuf_emergent_prime_visibility.py146_primality_grammatical_inertness.py147_numbers_as_free_monoid_words.py148_capacity_arm_carries_von_mangoldt.py149_p14_is_the_capacity_arm_operator.py153_structural_frequency_rank_cyclotomy.py40_arithmetic_number_theory.py94_generative_number_construction.py95_primes_from_spectral_waves.py96_spectral_vibration_of_coherence.py97_goldbach_additive_multiplicative.pyemergent_chemistry_particles_demo.py
08_emergent_geometry
103_emergent_substrate_meets_riemann.py106_per_node_polarization_geometry.py107_orthogonal_structure_emergent_geometry.py108_emergent_field_generating_structure.py112_structure_predicts_coherence_flow.py113_overdamped_projection_bridge.py114_substrate_conserved_quantities.py117_emergent_geometry_residue_graph.py118_emergent_vs_classical_operator.py119_phase_sector_directed_residue.py120_symmetry_wall_substrate_vs_spectrum.py121_canonical_symmetry_break_negative.py122_factorization_phase_sector.py123_symmetry_sector_decomposition.py124_emergent_metric_fractal_consistency.py125_node_is_the_emergent_substrate.py126_two_layers_base_fiber.py127_base_is_emergent_not_imposed.py128_base_substrate_coemergence.py129_spectral_gap_base_fiber_clock.py130_operators_break_substrate_charges.py131_coemergent_loop_convergence.py132_geometric_phase_holonomy.py133_psi_topological_defects.py134_spectral_dimension_heat_kernel.py135_arrow_of_time_h_theorem.py136_heat_kernel_coefficients.py137_synchronization_transition.py138_structure_frequency_synchronization.py139_grammar_formal_language.py140_grammar_automaton.py141_grammar_rule_decomposition.py142_grammar_operator_quotient.py143_glyphic_function_sublanguage.py144_branching_combinator.py145_syntactic_monoid_starfree.py150_emergent_grammatical_pattern_parry.py151_grammar_in_emergent_geometry.py152_operator_contract_tetrahedron.py154_conductor_annotated_qr_spectrum.py155_ontological_position_of_numbers.py156_emergence_directness_law.py98_emergent_symplectic_substrate.py99_structural_diffusion.pyunified_fields_showcase.py
09_millennium
109_p_vs_np_coherence_synthesis.py110_bsd_rank_structural_pressure.py111_hodge_discrete_and_honest_gap.py
10_applications
159_empirical_confrontation_pipeline.py90_phase_gate_monitor_demo.py91_breast_cancer_phase_gate_demo.py92_wine_quality_phase_gate_demo.py93_structural_interface_demo.pypytorch_cuda_demo.py
README.md
scripts
replay
__init__.pyregister_manifest.py
__init__.pyREADME.mdrebuild_failure_manifest.pyrun_reproducible_benchmarks.pyrun_self_opt_validation.pyrun_self_optimization.pytnfr_is_prime.pyvalidate_conservation_law.pyverify_internal_references.py
src
core
__init__.pyevaluation.py
tnfr
backends
__init__.pyjax_backend.pynumpy_backend.pyoptimized_numpy.pyREADME.mdtorch_backend.py
cli
__init__.py__init__.pyiarguments.pyarguments.pyiexecution.pyexecution.pyiinteractive_validator.pyREADME.mdutils.pyutils.pyi
compat
__init__.pydataclass.pyjsonschema_stub.pymatplotlib_stub.pynumpy_stub.pyREADME.md
config
__init__.py__init__.pyiconstants.pyconstants.pyidefaults_core.pydefaults_init.pydefaults_metric.pydefaults.pyfeature_flags.pyfeature_flags.pyiglyph_constants.pyoperator_names.pyoperator_names.pyiphysics_derivation.pyprecision_modes.pypresets.pypresets.pyiREADME.mdsecurity.pythresholds.pytnfr_config.py
constants
__init__.py__init__.pyialiases.pyaliases.pyicanonical.pymetric.pymetric.pyioperational.py
core
__init__.pycontainer.pydefault_implementations.pyexceptions.pyinterfaces.pyREADME.md
dynamics
__init__.py__init__.pyiadaptation.pyadaptation.pyiadaptive_sequences.pyadaptive_sequences.pyiadelic.pyadvanced_cache_optimizer.pyadvanced_fft_arithmetic.pyaliases.pyaliases.pyibifurcation.pycache_aware_fft_engine.pycanonical.pycanonical.pyicomputational_hub.pycoordination.pycoordination.pyidistributed_fft.pydnfr.pydnfr.pyidynamic_limits.pyemergent_centralization.pyemergent_integration_engine.pyfeedback.pyfeedback.pyifft_backend.pyfft_cache_coordinator.pyfft_dispatchers.pyfft_engine.pyfft_workers.pyfused_dnfr.pyhomeostasis.pyhomeostasis.pyiintegrators.pyintegrators.pyilearning.pylearning.pyimetabolism.pymulti_modal_cache.pynbody_tnfr.pynbody.pynodal_optimizer.pyoptimization_orchestrator.pypropagation.pyREADME.mdruntime.pyruntime.pyisampling.pysampling.pyiselectors.pyselectors.pyiself_optimizing_engine.pyspectral_structural_fusion.pystructural_cache.pystructural_clip.pysymplectic.pyunified_backend.pyunified_mathematical_cache_orchestrator.py
engines
computation
__init__.pyfft_engine.pyunified_fft_engine.pyunified_gpu_system.py
constants
__init__.pycanonical.pyoperational.py
integration
__init__.pyemergent_integration.py
pattern_discovery
__init__.pymathematical_patterns.pymulti_modal_cache.py
self_optimization
__init__.pyengine.py
__init__.pyREADME.md
errors
__init__.pycontextual.py
factorization
__init__.py
flatten
README.md
gamma
README.md
glyph_history
README.md
glyph_runtime
README.md
immutable
README.md
initialization
README.md
io
README.md
math
__init__.pyfields_symbolic.pygrammar_validators.pyoptimizer.pyREADME.mdsymbolic.py
mathematics
__init__.pybackend.pybackend.pyidynamics.pydynamics.pyiepi.pyepi.pyigenerators.pygenerators.pyiliouville.pymetrics.pymetrics.pyinumber_theory.pyoperators_factory.pyoperators_factory.pyioperators.pyoperators.pyioptimized_primality.pyprojection.pyprojection.pyiREADME.mdruntime.pyruntime.pyispaces.pyspaces.pyispectral.pytransforms.pytransforms.pyiunified_cache.pyunified_numerical.pyzeta.py
metrics
__init__.py__init__.pyibuffer_cache.pybuffer_cache.pyicache_utils.pycoherence.pycoherence.pyicommon.pycommon.pyicore.pycore.pyidiagnosis.pydiagnosis.pyiemergence.pyexport.pyexport.pyiglyph_timing.pyglyph_timing.pyilearning_metrics.pylearning_metrics.pyilocal_coherence.pyphase_coherence.pyphase_compatibility.pyREADME.mdreporting.pyreporting.pyisense_index.pysense_index.pyitelemetry.pytetrad.pytrig_cache.pytrig_cache.pyitrig.pytrig.pyi
multiscale
__init__.pyhierarchical.pyREADME.md
navier_stokes
__init__.pyconservative_face.pyoperator.py
node
README.md
observers
README.md
operators
network_analysis
__init__.pysource_detection.py
postconditions
__init__.pymutation.py
preconditions
__init__.pycoherence.pydissonance.pyemission.pymutation.pyreception.pyresonance.py
strategies
__init__.pydefaults.pygpu_strategies.pystrategy.py
__init__.py__init__.pyialgebra.pycanonical_patterns.pycascade.pycoherence.pycontraction.pycoupling.pycycle_detection.pydefinitions_base.pydefinitions.pydefinitions.pyidissonance.pyemission.pyexpansion.pygrammar_application.pygrammar_canon.pygrammar_context.pygrammar_core.pygrammar_dynamics.pygrammar_error_factory.pygrammar_memoization.pygrammar_patterns.pygrammar_telemetry.pygrammar_types.pygrammar_u6.pygrammar_validate.pygrammar.pygrammar.pyihamiltonian.pyhealth_analyzer.pyintrospection.pyjitter.pyjitter.pyilifecycle.pymetabolism.pymetrics_basic.pymetrics_core.pymetrics_network.pymetrics_structural.pymetrics_u6.pymetrics.pymutation.pynodal_equation.pyoperator_contracts.pypattern_detection.pypatterns.pyREADME.mdreception.pyrecursivity.pyregistry.pyregistry.pyiremesh.pyremesh.pyiresonance.pyself_organization.pysilence.pystructural_units.pytransition.py
parallel
__init__.pyauto_scaler.pydistributed.pyengine.pymonitoring.pypartitioner.pyREADME.md
performance
guardrails.py
physics
__init__.py_helpers.pycalibration.pycanonical.pycell.pyclassical_mechanics.pyconservation_gauge_unification.pyconservation.pydissipative_conservation.pyemergent_chemistry.pyemergent_particles.pyextended.pyfields.pygauge.pyintegrity.pyinteractions.pylife.pylyapunov.pypatterns.pyphase_transition.pyquantum_mechanics.pyREADME.mdsignatures.pyspectral_conservation.pyspectral_metrics.pystructural_diffusion.pysymplectic_substrate.pytelemetry.pyunified.pyvariational.pyvectorized_ops.py
primality
__init__.py
recipes
__init__.pycookbook.pyREADME.md
riemann
__init__.pyadmissible_family_sweep.pyadmissible_rescaling.pyaggregates_closure_signature.pyalpha_sweep.pyanalytic_continuation_dirichlet.pyanalytic_continuation.pycoercivity_uniform.pycoupling_weights_type_signature.pycurrents_closure_signature.pydelta_phi_max_type_signature.pydirichlet_l.pydnfr_type_signature.pyepi_type_signature.pyhilbert_polya.pyli_keiper.pylyapunov_spectral_positivity.pynodal_pulse.pynodeaware_gauge_sweep.pynuf_type_signature.pyoperator_catalog_discipline_signature.pyoperator.pyoscillatory_correction.pypaley_gap_coercivity.pyphi_type_signature.pyprime_ladder_hamiltonian.pypulse_coherence.pyremesh_infinity_residue_split.pyremesh_window_type_signature.pyspectral_emergence.pystructural_zero_density.pytelemetry.pytetrad_closure_signature.pytwisted_admissible_family_sweep.pytwisted_admissible_rescaling.pytwisted_alpha_sweep.pytwisted_coercivity_uniform.pytwisted_hermite_family.pytwisted_hilbert_polya.pytwisted_li_keiper.pytwisted_lyapunov_spectral_positivity.pytwisted_nodeaware_gauge_sweep.pytwisted_oscillatory_correction.pytwisted_paley_gap_coercivity.pytwisted_prime_ladder_hamiltonian.pytwisted_spectral_emergence.pytwisted_structural_zero_density.pytwisted_weil_explicit_formula.pytwisted_weil_positivity.pyurules_consistency_signature.pyvon_mangoldt.pyweil_explicit_formula.pyweil_positivity.py
schemas
__init__.pygrammar.jsonREADME.md
sdk
__init__.py__init__.pyiadaptive_system.pyadaptive_system.pyibuilders.pybuilders.pyifluent.pyfluent.pyiREADME.mdself_opt.pysimple.pytemplates.pytemplates.pyiutils.py
security
__init__.pycrypto.pydatabase.pyREADME.mdsubprocess.pyvalidation.py
sequencing
__init__.pypatterns.pyREADME.md
services
__init__.pyorchestrator.pyREADME.md
sparse
__init__.pyREADME.mdrepresentations.py
structural
README.md
telemetry
__init__.pycache_metrics.pycache_metrics.pyiconstants.pynu_f.pynu_f.pyiREADME.mdunified_telemetry_system.pyverbosity.pyverbosity.pyi
tools
__init__.pydomain_templates.pyREADME.mdsequence_generator.pytnfr_is_prime_cli_optimized.pytnfr_is_prime_cli.py
topology
__init__.pyasymmetry.pyREADME.md
utils
cache_layers.pycache.pycache.pyicallbacks.pycallbacks.pyichunks.pychunks.pyidata.pydata.pyifast_diameter.pygraph.pygraph.pyiinit.pyinit.pyiio.pyio.pyinumeric.pynumeric.pyiREADME.mdtopology.pyunified_cache.py
validation
__init__.py__init__.pyiaggregator.pybase.pycompatibility.pycompatibility.pyiconfig.pygraph.pygraph.pyihealth.pyinput_validation.pyinterface_baselines.pyinvariants.pymultichannel_interface.pyphase_gate.pyREADME.mdrules.pyrules.pyiruntime.pyruntime.pyisequence_validator.pysignal_confrontation.pysoft_filters.pysoft_filters.pyispectral.pyspectral.pyistructural_interface.pytemporal_interface.pyunified_validation_system.pyvalidator.pywindow.pywindow.pyi
visualization
__init__.pycascade_viz.pyhierarchy.pyREADME.mdsequence_plotter.py
yang_mills
__init__.pyclosure.pyderivability.pyscaling.pystructural_gap.pyu6_sweep.py
__init__.py__init__.pyi_compat.py_version.py_version.pyialias.pyalias.pyibackend_config.pycache.pycache.pyiexecution.pyexecution.pyiflatten.pyflatten.pyigamma.pygamma.pyiglyph_history.pyglyph_history.pyiglyph_runtime.pyglyph_runtime.pyiimmutable.pyimmutable.pyiinitialization.pyinitialization.pyiio.pyio.pyilocking.pylocking.pyinode.pynode.pyiobservers.pyobservers.pyiontosim.pyontosim.pyipy.typedrng.pyrng.pyisecure_config.pyselector.pyselector.pyisense.pysense.pyistructural.pystructural.pyitokens.pytokens.pyitrace.pytrace.pyitypes.pytypes.pyiunits.pyunits.pyi
tetrad_evaluator.py
.pre-commit-config.yaml.semgrep.yaml.zenodo.jsonARCHITECTURE.mdbandit.yamlCHANGELOG.mdCITATION.cffCONTRIBUTING.mdEMERGENT_CANON_AUDIT.mdEMERGENT_DERIVATION_PLAN.mdLICENSE.mdMakefileMANIFEST.inpyproject.tomlpyrightconfig.jsonPYTORCH_CUDA_INTEGRATION.mdREADME.mdSECURITY.mdTESTING.mdTNFR_Website_Content_Brief.md
FILE: theory/STRUCTURAL_CONSERVATION_THEOREM.md

STRUCTURAL_CONSERVATION_THEOREM.md

TNFR Structural Conservation Theorem

Noether-Like Laws from the Nodal Equation

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


Table of Contents

  1. Scope and Motivation
  2. Governing Dynamics Recap
  3. Structural Charge and Current Definitions
  4. Derivation of the Continuity Equation
  5. Two-Sector Decomposition
  6. Noether Correspondence: Grammar ↔ Conservation
  7. Ward Identities for Operator Sequences
  8. Lyapunov Stability from the Energy Functional
  9. Discrete Formulation on Graphs
  10. Numerical Validation
  11. Physical Interpretation and Analogies
  12. Applications
  13. Implementation Reference
  14. Summary of Main Results

1. Scope and Motivation

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.

Main Result

Structural Continuity Theorem: Let GGG be a TNFR network evolving under the nodal equation ∂EPI/∂t=νf⋅ΔNFR(t)\partial\text{EPI}/\partial t = \nu_f \cdot \Delta\text{NFR}(t)∂EPI/∂t=νf​⋅ΔNFR(t) with grammar constraints U1–U6 satisfied. Then:

∂ρ∂t+∇⋅J=Sgrammar\frac{\partial \rho}{\partial t} + \nabla \cdot \mathbf{J} = \mathcal{S}_{\text{grammar}}∂t∂ρ​+∇⋅J=S

where ρ=Φs+Kϕ\rho = \Phi_s + K_\phiρ=Φs​+Kϕ​ is the structural charge density, J=(Jϕ,JΔNFR)\mathbf{J} = (J_\phi, J_{\Delta\text{NFR}}) is the , and when grammar is satisfied.


2. Governing Dynamics Recap

2.1 Nodal Equation

Every node iii in a TNFR network evolves according to:

∂EPIi∂t=νf,i⋅ΔNFRi(t)(NE)\frac{\partial \text{EPI}_i}{\partial t} = \nu_{f,i} \cdot \Delta\text{NFR}_i(t) \quad \text{(NE)}∂t∂EPIi​​=

where:

  • EPIi\text{EPI}_iEPIi​ is the Primary Information Structure at node iii
  • νf,i∈R+\nu_{f,i} \in \mathbb{R}^+νf,i​ is the structural frequency (Hz_str)

2.2 Phase Dynamics

Phase evolves through coupling with the nodal equation:

∂ϕi∂t=νf,i⋅h(ΔNFRi,ϕi,{ϕj}j∈N(i))\frac{\partial \phi_i}{\partial t} = \nu_{f,i} \cdot h(\Delta\text{NFR}_i, \phi_i, \{\phi_j\}_{j \in \mathcal{N}(i)})∂t∂ϕi​

where hhh is the phase coupling function determined by the operator sequence. For Coupling (UM) and Resonance (RA) operators, hhh drives synchronization: h→sin⁡(ϕj−ϕi)h \to \sin(\phi_j - \phi_i)h→sin(ϕj​−ϕ (Kuramoto-type).

2.3 Grammar Constraints

The evolution is restricted to operator sequences satisfying U1–U6:

  • U2 (Convergence): ∫0T∣νf⋅ΔNFR∣ dt<∞\int_0^T |\nu_f \cdot \Delta\text{NFR}| \, dt < \infty∫0T​∣νf​⋅ΔNFR∣d

These constraints define the grammar manifold MG\mathcal{M}_GMG​ — the space of all allowed evolutions.


3. Structural Charge and Current Definitions

3.1 Structural Charge Density

ρ(i,t)=Φs(i,t)+Kϕ(i,t)\rho(i, t) = \Phi_s(i, t) + K_\phi(i, t)ρ(i,t)=Φs​(i,t)+K

where:

Structural Potential (global, ΔNFR-driven): Φs(i)=∑j≠iΔNFRjd(i,j)α,α=2\Phi_s(i) = \sum_{j \neq i} \frac{\Delta\text{NFR}_j}{d(i,j)^\alpha}, \quad \alpha = 2Φs​(i)=∑j

Phase Curvature (local, phase-driven): Kϕ(i)=wrap ⁣(ϕi−circmeanj∈N(i)ϕj)K_\phi(i) = \text{wrap}\!\left(\phi_i - \text{circmean}_{j \in \mathcal{N}(i)} \phi_j\right)Kϕ​(i)=wrap(ϕi​

The charge ρ\rhoρ couples the global potential landscape with the local geometric curvature. This is the natural conserved quantity because:

  1. Φs\Phi_sΦs​ aggregates the reorganization pressure field (information about the entire network projected onto node iii)
  2. KϕK_\phiKϕ​ captures the local geometric mismatch (how much node ii deviates from its neighborhood's mean phase)

3.2 Structural Current Vector

J(i,t)=(Jϕ(i,t),  JΔNFR(i,t))\mathbf{J}(i, t) = \big(J_\phi(i, t),\; J_{\Delta\text{NFR}}(i, t)\big)J(i,t)=(Jϕ​(i,t),J

where:

Phase Current (transport of phase coherence): Jϕ(i)=1∣N(i)∣∑j∈N(i)sin⁡(ϕj−ϕi)J_\phi(i) = \frac{1}{|\mathcal{N}(i)|} \sum_{j \in \mathcal{N}(i)} \sin(\phi_j - \phi_i)Jϕ​(i)=∣N(i

Reorganization Flux (transport of structural pressure): JΔNFR(i)=1∣N(i)∣∑j∈N(i)(ΔNFRj−ΔNFRi)J_{\Delta\text{NFR}}(i) = \frac{1}{|\mathcal{N}(i)|} \sum_{j \in \mathcal{N}(i)} \big(\Delta\text{NFR}_j - \Delta\text{NFR}_i\big)JΔNFR​(i)=

The current J\mathbf{J}J carries two types of structural information:

  • JϕJ_\phiJϕ​ transports phase coherence — how synchronization flows through the network
  • JΔNFRJ_{\Delta\text{NFR}}JΔNFR​ transports reorganization pressure — how structural stress redistributes

3.3 Why This Pairing?

The charge–current pairing (ρ,J)(\rho, \mathbf{J})(ρ,J) is not arbitrary. It arises from the sector structure of TNFR fields:

SectorCharge ComponentCurrent ComponentDriving Physics
PotentialΦs\Phi_sΦs​JΔNFRJ_{\Delta\text{NFR}}JΔNFR​ΔNFR distribution & redistribution
GeometricK

These sectors are coupled through the complex geometric field Ψ=Kϕ+iJϕ\Psi = K_\phi + i J_\phiΨ=Kϕ​+iJϕ​, discovered via the r(Kϕ,Jϕ)≈−0.997r(K_\phi, J_\phi) \approx -0.997 anticorrelation (see §Mathematical Unification Discoveries).


4. Derivation of the Continuity Equation

4.1 Time Derivative of Structural Potential

∂Φs(i)∂t=∑j≠i1d(i,j)α∂ΔNFRj∂t\frac{\partial \Phi_s(i)}{\partial t} = \sum_{j \neq i} \frac{1}{d(i,j)^\alpha} \frac{\partial \Delta\text{NFR}_j}{\partial t}∂t∂Φs​

By the nodal equation, ΔNFRj\Delta\text{NFR}_jΔNFRj​ changes through operator applications. Under grammar U2 (convergence):

∑j≠i∣∂ΔNFRj/∂t∣d(i,j)α<∞\sum_{j \neq i} \frac{|\partial \Delta\text{NFR}_j / \partial t|}{d(i,j)^\alpha} < \infty∑j=i​d(

This ensures ∂Φs/∂t\partial \Phi_s / \partial t∂Φs​/∂t is bounded.

4.2 Time Derivative of Phase Curvature

∂Kϕ(i)∂t=∂ϕi∂t−∑j∈N(i)wj∂ϕj∂t\frac{\partial K_\phi(i)}{\partial t} = \frac{\partial \phi_i}{\partial t} - \sum_{j \in \mathcal{N}(i)} w_j \frac{\partial \phi_j}{\partial t}∂t∂Kϕ​

where wjw_jwj​ are the circular mean weights. Under grammar U3 (coupling):

∣∂ϕi∂t−∑jwj∂ϕj∂t∣≤CU3\left|\frac{\partial \phi_i}{\partial t} - \sum_j w_j \frac{\partial \phi_j}{\partial t}\right| \leq C_{\text{U3}}​∂t∂ϕ

because phase compatibility constrains the differential phase velocity.

4.3 Discrete Divergence of Current

The graph divergence at node iii:

(∇⋅J)(i)=1∣N(i)∣∑j∈N(i)[(Jϕ(j)−Jϕ(i))+(JΔNFR(j)−JΔNFR(i))](\nabla \cdot \mathbf{J})(i) = \frac{1}{|\mathcal{N}(i)|} \sum_{j \in \mathcal{N}(i)} \Big[\big(J_\phi(j) - J_\phi(i)\big) + \big(J_{\Delta\text{NFR}}(j) - J_{\Delta\text{NFR}}(i)\big)\Big](∇⋅J)(i)=

4.4 The Balance Equation

Combining §4.1–4.3, the rate of change of charge is:

Δρ(i)Δt=ΔΦs(i)Δt+ΔKϕ(i)Δt\frac{\Delta \rho(i)}{\Delta t} = \frac{\Delta \Phi_s(i)}{\Delta t} + \frac{\Delta K_\phi(i)}{\Delta t}ΔtΔρ(i)​=

The structural source term is:

S(i)=Δρ(i)Δt+(∇⋅J)(i)\mathcal{S}(i) = \frac{\Delta \rho(i)}{\Delta t} + (\nabla \cdot \mathbf{J})(i)S(i)=ΔtΔρ(i)​+(

4.5 Grammar Implies Conservation

Theorem (Structural Conservation). Let GGG be a finite TNFR network with NNN nodes evolving under the nodal equation, with operator sequences satisfying U1–U6. Then the source term satisfies:

∥S∥ℓ2  ≤  CnetN\|\mathcal{S}\|_{\ell^2} \;\leq\; \frac{C_{\text{net}}}{\sqrt{N}}∥S∥ℓ2​≤

where CnetC_{\text{net}}Cnet​ depends on topology and operator parameters but not on NNN. In particular, ∥S∥ℓ2→0\|\mathcal{S}\|_{\ell^2} \to 0∥S∥ℓ as (continuum limit), and conservation quality .

Proof.

We establish explicit bounds on each component of S(i)=Δρ(i)/Δt+(∇⋅J)(i)\mathcal{S}(i) = \Delta\rho(i)/\Delta t + (\nabla \cdot \mathbf{J})(i)S(i)=Δρ(i)/Δt+(∇⋅J)(i) and show that grammar constraints make them mutually cancelling up to a residual that vanishes with network size.

Step 1. Operator norm bounds on ∂ΔNFR/∂t\partial\Delta\text{NFR}/\partial t∂ΔNFR/∂t (from U2).

Each canonical operator modifies ΔNFRi\Delta\text{NFR}_iΔNFRi​ by a bounded multiplicative factor. In the implementation:

  • Stabilizers (IL): ΔNFRi↦ρIL⋅ΔNFRi\Delta\text{NFR}_i \mapsto \rho_{\text{IL}} \cdot \Delta\text{NFR}_iΔNFRi​↦ρIL​⋅ΔNFR, where (operational stabiliser gain; the contract fixes the sign , not the magnitude).

For a sequence of n+n_+n+​ destabilizers and n−n_-n−​ stabilizers applied over interval [0,T][0, T][0,T], the cumulative gain is:

∏k=1n++n−ρk=ρOZn+⋅ρILn−\prod_{k=1}^{n_+ + n_-} \rho_k = \rho_{\text{OZ}}^{n_+} \cdot \rho_{\text{IL}}^{n_-}∏k=1n+​+n

U2 requires n−≥1n_- \geq 1n−​≥1 whenever n+≥1n_+ \geq 1n+​≥1. In the minimal case n−=, the net factor per destabilizer–stabilizer pair is:

ρOZ⋅ρIL=2.0⋅0.75=1.5\rho_{\text{OZ}} \cdot \rho_{\text{IL}} = 2.0 \cdot 0.75 = 1.5ρOZ​⋅ρIL​=2.0⋅0.75=

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:

∫0T∣νf⋅ΔNFR(τ)∣ dτ<∞(U2 convergence)\int_0^T |\nu_f \cdot \Delta\text{NFR}(\tau)| \, d\tau < \infty \quad \text{(U2 convergence)}∫0T​∣νf​⋅ΔNFR

This holds because U6 independently confines ∣Φs∣<π/2|\Phi_s| < \pi/2∣Φs​∣<π/2, which bounds the aggregate ∑j∣ΔNFRj∣\sum_j |\Delta\text{NFR}_j|∑j​ (since is a weighted sum of values). Therefore:

∣∂Φs(i)∂t∣=∣∑j≠i∂ΔNFRj/∂td(i,j)α∣≤MU2dmin⁡α\left|\frac{\partial \Phi_s(i)}{\partial t}\right| = \left|\sum_{j \neq i} \frac{\partial\Delta\text{NFR}_j/\partial t}{d(i,j)^\alpha}\right| \leq \frac{M_{\text{U2}}}{d_{\min}^\alpha}​

where MU2:=sup⁡t∑j∣∂ΔNFRj/∂t∣<∞M_{\text{U2}} := \sup_t \sum_j |\partial\Delta\text{NFR}_j/\partial t| < \inftyMU2​:=supt​∑ is guaranteed by U2+U6.

Step 2. Bound on ∂Kϕ/∂t\partial K_\phi/\partial t∂Kϕ​/∂t (from U3).

Phase evolves as ∂ϕi/∂t=νf,i⋅hi\partial\phi_i/\partial t = \nu_{f,i} \cdot h_i∂ϕi​/∂t=νf,i​⋅h where is the phase coupling function. From §4.2:

∣∂Kϕ(i)∂t∣=∣ϕ˙i−∑jwjϕ˙j∣\left|\frac{\partial K_\phi(i)}{\partial t}\right| = \left|\dot{\phi}_i - \sum_j w_j \dot{\phi}_j\right|​∂t∂

U3 requires ∣ϕi−ϕj∣≤Δϕmax⁡|\phi_i - \phi_j| \leq \Delta\phi_{\max}∣ϕi​−ϕj​∣≤Δϕ for coupled pairs. For Kuramoto-type coupling , this gives . With bounded (finite network, bounded frequencies), each phase velocity satisfies:

∣ϕ˙i∣≤νf,max⁡⋅∣N(i)∣−1∑j∈N(i)∣sin⁡(ϕj−ϕi)∣≤νf,max⁡|\dot{\phi}_i| \leq \nu_{f,\max} \cdot |\mathcal{N}(i)|^{-1} \sum_{j \in \mathcal{N}(i)} |\sin(\phi_j - \phi_i)| \leq \nu_{f,\max}∣ϕ˙​i​

Therefore:

∣∂Kϕ(i)∂t∣≤2νf,max⁡=:MU3\left|\frac{\partial K_\phi(i)}{\partial t}\right| \leq 2\nu_{f,\max} =: M_{\text{U3}}​∂t∂K

Step 3. Current divergence tracks charge variation (balance identity).

The current components are defined from the same fields that define charge:

  • JΔNFR(i)=∣N(i)∣−1∑j∈N(i)(ΔNFRj−ΔNFRi)J_{\Delta\text{NFR}}(i) = |\mathcal{N}(i)|^{-1} \sum_{j \in \mathcal{N}(i)} (\Delta\text{NFR}_j - \Delta\text{NFR}_i)JΔNFR​(i)=∣N(i)∣ is the discrete Laplacian of , which approximates on graphs.

The graph divergence ∇⋅J\nabla \cdot \mathbf{J}∇⋅J applies the graph Laplacian LLL again. For any function fff on a connected graph with NNN nodes and average degree dˉ\bar{d}d, the Laplacian satisfies .

When charge ρ=Φs+Kϕ\rho = \Phi_s + K_\phiρ=Φs​+Kϕ​ changes at node iii, 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:

∂Φs(i)∂t=−∑j≠iJΔNFR,jd(i,j)α+Rpot(i)\frac{\partial \Phi_s(i)}{\partial t} = -\sum_{j \neq i} \frac{J_{\Delta\text{NFR},j}}{d(i,j)^\alpha} + R_{\text{pot}}(i)∂t∂Φs​

∂Kϕ(i)∂t=−(∇⋅Jϕ)(i)+Rgeo(i)\frac{\partial K_\phi(i)}{\partial t} = -(\nabla \cdot J_\phi)(i) + R_{\text{geo}}(i)∂t∂Kϕ​(i)​

where the residuals RpotR_{\text{pot}}Rpot​ and RgeoR_{\text{geo}}Rgeo​ arise from: (a) the discrete graph approximation to continuous operators, and (b) nonlinear terms (sin⁡\sinsin vs. linear, wrap-around vs. linear difference).

The source term is therefore:

S(i)=Rpot(i)+Rgeo(i)\mathcal{S}(i) = R_{\text{pot}}(i) + R_{\text{geo}}(i)S(i)=Rpot​(i)+Rgeo​

Step 4. Residual vanishes under grammar constraints.

We bound each residual:

(a) Potential residual RpotR_{\text{pot}}Rpot​: The mismatch between ∂Φs/∂t\partial\Phi_s/\partial t∂Φs​/∂t and −∇⋅JΔ arises because uses inverse-distance weighting () while uses neighbor averaging. On a graph with diameter and minimum degree :

∣Rpot(i)∣≤MU2δmin⁡⋅O ⁣(1D)|R_{\text{pot}}(i)| \leq \frac{M_{\text{U2}}}{\delta_{\min}} \cdot \mathcal{O}\!\left(\frac{1}{D}\right)∣Rpot​(i)∣≤δ

U6 ensures MU2M_{\text{U2}}MU2​ is bounded (confinement prevents unbounded Φs\Phi_sΦs​). As N→∞N \to \inftyN→ with fixed average degree, for small-world topologies, giving .

(b) Geometric residual RgeoR_{\text{geo}}Rgeo​: The mismatch between ∂Kϕ/∂t\partial K_\phi/\partial t∂Kϕ​/∂t and −∇⋅Jϕ arises from the nonlinearity of and the wrap-around in . Linearizing for small phase differences:

∣Rgeo(i)∣≤O(Δϕmax⁡3)|R_{\text{geo}}(i)| \leq \mathcal{O}(\Delta\phi_{\max}^3)∣Rgeo​(i)∣≤O(Δϕmax3​

U3 constrains Δϕmax⁡≤π/2\Delta\phi_{\max} \leq \pi/2Δϕmax​≤π/2, giving ∣Rgeo∣≤O(1)|R_{\text{geo}}| \leq \mathcal{O}(1)∣R. In practice, grammar-compliant sequences maintain (typical rad), yielding .

Step 5. Aggregate bound and scaling.

Combining the per-node residual bound:

∥S∥ℓ22=∑i=1NS(i)2≤N⋅(∣Rpot∣max⁡2+∣Rgeo∣max⁡2)\|\mathcal{S}\|_{\ell^2}^2 = \sum_{i=1}^{N} \mathcal{S}(i)^2 \leq N \cdot \left(|R_{\text{pot}}|_{\max}^2 + |R_{\text{geo}}|_{\max}^2\right)∥S∥ℓ22​

∥S∥rms=∥S∥ℓ2N≤∣Rpot∣max⁡2+∣Rgeo∣max⁡2\|\mathcal{S}\|_{\text{rms}} = \frac{\|\mathcal{S}\|_{\ell^2}}{\sqrt{N}} \leq \sqrt{|R_{\text{pot}}|_{\max}^2 + |R_{\text{geo}}|_{\max}^2}∥S∥rms​=

The RMS residual is bounded independently of NNN, while the per-node residual decreases as the network grows (denser graph →\to→ better discrete approximation). This yields the scaling law:

q(N)=11+∥S∥rms∼1−CNq(N) = \frac{1}{1 + \|\mathcal{S}\|_{\text{rms}}} \sim 1 - \frac{C}{\sqrt{N}}q(N)=1+∥S∥rms​

validated numerically with C≈2.1C \approx 2.1C≈2.1 across topologies (§10.4).

Step 6. Grammar violation detection.

When a grammar rule is violated, the corresponding bound fails:

ViolationEffect on S\mathcal{S}SDetection
U2 (no stabilizer after OZ)MU2→∞M_{\text{U2}} \to \inftyMU2​→∞, RpotR_{\text{pot}}R diverges

Thus S≠0\mathcal{S} \neq 0S=0 is a computable diagnostic that identifies which grammar rule was broken. □\square□

Remark. The proof is constructive: all bounds are computable from network parameters (NNN, DDD, dˉ\bar{d}dˉ, δmin⁡\delta_{\min}δmi) and operator constants (, , , ). The function in implements these bounds numerically.


5. Two-Sector Decomposition

The full conservation law decomposes into two coupled sub-equations:

5.1 Potential Sector

∂Φs∂t+∇⋅JΔNFR=Spot\frac{\partial \Phi_s}{\partial t} + \nabla \cdot J_{\Delta\text{NFR}} = \mathcal{S}_{\text{pot}}∂t∂Φs​​+∇

  • Physics: Global ΔNFR landscape evolves via operator-driven redistribution
  • Grammar coupling: U2 (convergence) bounds Spot\mathcal{S}_{\text{pot}}Spot​; U6 (confinement) prevents escape
  • Monitoring: Track via ∣ΔΦs∣<π/2|\Delta\Phi_s| < \pi/2∣ΔΦs​∣< per U6

5.2 Geometric Sector

∂Kϕ∂t+∇⋅Jϕ=Sgeo\frac{\partial K_\phi}{\partial t} + \nabla \cdot J_\phi = \mathcal{S}_{\text{geo}}∂t∂Kϕ​​+∇⋅

  • Physics: Local phase curvature evolves via synchronization dynamics
  • Grammar coupling: U3 (resonant coupling) ensures coherent transport; U4 (bifurcation) controls curvature jumps
  • Monitoring: Track via ∣Kϕ∣<2.8274|K_\phi| < 2.8274∣Kϕ​∣<2.8274 (hotspot threshold)

5.3 Cross-Sector Coupling

The two sectors are not independent. The coupling strength is:

κ=corr ⁣(Spot,Sgeo)\kappa = \text{corr}\!\left(\mathcal{S}_{\text{pot}}, \mathcal{S}_{\text{geo}}\right)κ=corr(Spot​,Sgeo​)

Numerical experiments show κ≈0.6\kappa \approx 0.6κ≈0.6–0.70.70.7, confirming significant cross-sector coupling. This coupling is the physical manifestation of the complex field unification Ψ=Kϕ+iJϕ\Psi = K_\phi + i J_\phiΨ=Kϕ​+.


6. Noether Correspondence: Grammar ↔ Conservation

6.1 The Correspondence Table

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 RuleSymmetry TypeConserved QuantityAnalogy
U2 (Convergence)Temporal translationTotal Noether charge Q=∑iρ(i)Q = \sum_i \rho(i)Q=∑i​ρ(i)Energy conservation
U3 (Phase coupling)Phase rotationPhase current ∑iJϕ(i)\sum_i J_\phi(i)∑

6.2 Conservation Hierarchy

The conserved quantities form a hierarchy:

  1. Exact (zero residual): Total charge QQQ under adiabatic (infinitely slow) evolution
  2. Approximate (small residual): QQQ under finite-rate grammar-compliant evolution
  3. Statistical (bounded variance): Charge fluctuations under repeated operator applications

6.3 Symmetry Breaking

When grammar is violated, specific conserved quantities break:

  • U2 violation (no stabilizer after destabilizer): Total energy EEE increases without bound — energy non-conservation
  • U3 violation (coupling without phase check): Phase current becomes incoherent — current non-conservation
  • U6 violation (Φs\Phi_sΦs​ escapes confinement): Charge accumulates at nodes — charge non-conservation

This provides a diagnostic tool: measuring which conservation law is violated reveals which grammar rule was broken.


7. Ward Identities for Operator Sequences

7.1 Definition

A Ward identity constrains the expectation value of observables between operator applications. For a TNFR operator Ok\mathcal{O}_kOk​ applied at step kkk:

⟨Δρ⟩k+⟨∇⋅J⟩k=⟨Sk⟩\langle \Delta \rho \rangle_k + \langle \nabla \cdot \mathbf{J} \rangle_k = \langle \mathcal{S}_k \rangle⟨Δρ⟩k​+⟨∇⋅J⟩k​=

where ⟨⋅⟩k\langle \cdot \rangle_k⟨⋅⟩k​ denotes the network average at step kkk.

7.2 Operator-Specific Identities

Each of the 13 canonical operators has a characteristic conservation signature:

OperatorΔρ\Delta \rhoΔρΔE\Delta EΔEConservation Character
Emission (AL)>0> 0>0>0> 0>0Charge source (creation)
Reception (EN)≶0\lessgtr 0

7.3 Sequence Ward Identity

For a complete grammar-valid sequence σ=[O1,…,ON]\sigma = [\mathcal{O}_1, \ldots, \mathcal{O}_N]σ=[O1​,…,ON​]:

∑k=1N⟨Sk⟩≈0\sum_{k=1}^{N} \langle \mathcal{S}_k \rangle \approx 0∑k=1N​⟨Sk​⟩≈0

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.


8. Lyapunov Stability from the Energy Functional

8.1 Energy Functional

Define the structural energy functional from the five canonical fields:

E[G]=12∑i∈V[Φs(i)2+∣∇ϕ∣(i)2+Kϕ(i)2+Jϕ(i)2+JΔNFR(i)2]E[G] = \frac{1}{2} \sum_{i \in V} \left[\Phi_s(i)^2 + |\nabla\phi|(i)^2 + K_\phi(i)^2 + J_\phi(i)^2 + J_{\Delta\text{NFR}}(i)^2\right]E[G]=2

This is the half-sum of the energy density invariant E\mathcal{E}E defined in AGENTS.md §Tensor Invariants. All five tetrad fields contribute — omitting ∣∇ϕ∣2|\nabla\phi|^2∣∇ϕ∣2 would break the Noether correspondence because phase gradient stress is the local driver of K_φ transport.

E≥0E \geq 0E≥0 always (sum of squares).

8.2 Lyapunov Proposition for Grammar-Compliant Evolution

Proposition: Under grammar-compliant evolution (U2 satisfied):

dEdt≤0\frac{dE}{dt} \leq 0dtdE​≤0

Proof sketch (not a complete formal proof):

  1. Coherence operators (IL) reduce ∣ΔNFR∣|\Delta\text{NFR}|∣ΔNFR∣, hence reduce Φs2\Phi_s^2Φs2​ and JΔNFR2J_{\Delta\text{NFR}}^2J

Therefore EEE 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 (Π<1\Pi < 1Π<1) is sufficient but not necessary for energy descent. Experimental evidence (example 38) shows sequences with Π≈1.288\Pi \approx 1.288Π≈1.288 (non-contractive) that still achieve net energy descent (ΔE=−9.59\Delta E = -9.59ΔE=−9.59). 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.

8.3 Energy Dissipation Rate

The dissipation rate E˙\dot{E}E˙ has physical meaning:

−dEdt=D[G]≥0-\frac{dE}{dt} = \mathcal{D}[G] \geq 0−dtdE​=D[G]≥0

where D\mathcal{D}D is the structural dissipation function. This quantifies how quickly the network approaches its coherent attractor.

High D\mathcal{D}D → fast convergence to coherence (heavy stabilization)
Low D\mathcal{D}D → slow convergence (exploration phase)
D<0\mathcal{D} < 0D<0 → grammar violation (energy injection without control)

8.4 Per-Operator Formal Lyapunov Bounds

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

ClassDefinitionBound Form
StabiliserEafter≤(1−ρ) EbeforeE_{\text{after}} \leq (1 - \rho)\,E_{\text{before}}Eafter​≤(1−ρ)Ebefore​

Per-Operator Bounds

OperatorGlyphClassRateGlyph FactorDerivation
CoherenceILStabiliserρ=0.438\rho = 0.438ρ=0.438IL_DNFR = 0.75ρ=1−f2\rho = 1 - f^2ρ=1−f2; IL multiplies Δ\DeltaNFR by → energy component scales as

U2 Grammar Consequence (Sequence Contractiveness)

For a grammar-compliant sequence {O1,O2,…,On}\{O_1, O_2, \ldots, O_n\}{O1​,O2​,…,On​, 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`
grammar
​
J=(Jϕ​,JΔNFR​)
structural current
Sgrammar→0\mathcal{S}_{\text{grammar}} \to 0Sgrammar​→0
νf,i​
⋅
ΔNFRi​(t)(NE)
∈
R+
  • ΔNFRi(t)\Delta\text{NFR}_i(t)ΔNFRi​(t) is the nodal reorganization gradient
  • ​
    =
    νf,i​⋅
    h(ΔNFRi​,ϕi​,{ϕj​}j∈N(i)​)
    i​
    )
    t
    <
    ∞
  • U3 (Coupling): ∣ϕi−ϕj∣≤Δϕmax⁡|\phi_i - \phi_j| \leq \Delta\phi_{\max}∣ϕi​−ϕj​∣≤Δϕmax​ for interactions
  • U6 (Confinement): ∣Φs∣<π/2≈1.571|\Phi_s| < \pi/2 \approx 1.571∣Φs​∣<π/2≈1.571
  • ϕ
    ​
    (
    i
    ,
    t
    )
    
    =
    i
    ​
    d(i,j)αΔNFRj​​
    ,
    α
    =
    2
    −
    circmeanj∈N(i)​
    ϕj​
    )
    i
  • Their sum represents the total structural stress at node iii
  • ΔNFR​
    (
    i
    ,
    t
    )
    )
    )
    ∣
    1
    ​
    ∑j∈N(i)​
    sin
    (
    ϕj​
    −
    ϕi​)
    ∣N(i)∣
    1
    ​
    ∑j∈N(i)​
    (
    Δ
    NFRj​
    −
    ΔNFRi​)
    ϕK_\phi
    Kϕ​
    JϕJ_\phiJϕ​
    Phase dynamics & curvature transport
    r(Kϕ​,Jϕ​)≈−0.997
    AGENTS.md
    (
    i
    )
    ​
    =
    ∑j=i​d(i,j)α1​∂t∂ΔNFRj​​
    i
    ,
    j
    )α
    ∣∂ΔNFRj​/∂t∣
    ​
    <
    ∞
    (
    i
    )
    ​
    =
    ∂t∂ϕi​​−
    ∑j∈N(i)​wj​∂t∂ϕj​​
    i​
    ​
    −
    ∑j​
    wj​
    ∂t∂ϕj​​
    ​
    ≤
    CU3​
    ∣N(i)∣1​∑j∈N(i)​[(Jϕ​(j)−
    Jϕ​(i))+
    (JΔNFR​(j)−
    JΔNFR​(i))]
    ΔtΔΦs​(i)​
    +
    ΔtΔKϕ​(i)​
    ∇
    ⋅
    J)(i)
    N
    ​
    Cnet​
    ​
    2
    ​
    →
    0
    N→∞N \to \inftyN→∞
    q=1/(1+∥S∥rms)→1q = 1/(1 + \|\mathcal{S}\|_{\text{rms}}) \to 1q=1/(1+∥S∥rms​)→1
    i
    ​
    ρIL=0.75<1\rho_{\text{IL}} = 0.75 < 1ρIL​=0.75<1
    ρ<1\rho < 1ρ<1
  • Destabilizers (OZ): ΔNFRi↦ρOZ⋅ΔNFRi\Delta\text{NFR}_i \mapsto \rho_{\text{OZ}} \cdot \Delta\text{NFR}_iΔNFRi​↦ρOZ​⋅ΔNFRi​, where ρOZ=2.0>1\rho_{\text{OZ}} = 2.0 > 1ρOZ​=2.0>1 (operational destabiliser gain; the contract fixes the sign ρ>1\rho > 1ρ>1).
  • −
    ​
    ​
    ρk​
    =
    ρOZn+​​⋅
    ρILn−​​
    n+n_- = n_+
    n−​=n+​
    1.5
    (
    τ
    )
    ∣
    d
    τ
    <
    ∞(U2 convergence)
    ∣Δ
    NFRj​
    ∣
    Φs\Phi_sΦs​
    ΔNFRj\Delta\text{NFR}_jΔNFRj​
    ∂t
    ∂Φs​(i)
    ​
    ​
    =
    ​∑j=i​d(i,j)α∂ΔNFRj​/∂t​​≤
    dminα​MU2​​
    j
    ​
    ∣
    ∂
    Δ
    NFRj​
    /
    ∂
    t
    ∣
    <
    ∞
    i​
    hih_ihi​
    Kϕ​
    (
    i
    )
    ​
    ​
    =
    ​ϕ˙​i​−∑j​wj​ϕ˙​j​​
    max
    ​
    h∼sin⁡(ϕj−ϕi)h \sim \sin(\phi_j - \phi_i)h∼sin(ϕj​−ϕi​)
    ∣hi∣≤sin⁡(Δϕmax⁡)≤1|h_i| \leq \sin(\Delta\phi_{\max}) \leq 1∣hi​∣≤sin(Δϕmax​)≤1
    νf\nu_fνf​
    ∣
    ≤
    νf,max​⋅
    ∣N(i)∣−1∑j∈N(i)​∣sin(ϕj​−
    ϕi​)∣≤
    νf,max​
    ϕ​
    (
    i
    )
    ​
    ​
    ≤
    2νf,max​=:
    MU3​
    −1
    ∑j∈N(i)​
    (
    Δ
    NFRj​
    −
    ΔNFRi​)
    ΔNFR\Delta\text{NFR}ΔNFR
    ∇2(ΔNFR)\nabla^2(\Delta\text{NFR})∇2(ΔNFR)
  • Jϕ(i)=∣N(i)∣−1∑j∈N(i)sin⁡(ϕj−ϕi)J_\phi(i) = |\mathcal{N}(i)|^{-1} \sum_{j \in \mathcal{N}(i)} \sin(\phi_j - \phi_i)Jϕ​(i)=∣N(i)∣−1∑j∈N(i)​sin(ϕj​−ϕi​) approximates the divergence of phase transport.
  • ˉ
    ∥Lf∥2≤2dˉ⋅∥f∥∞\|Lf\|_2 \leq 2\bar{d} \cdot \|f\|_\infty∥Lf∥2​≤2dˉ⋅∥f∥∞​
    ΔNFR\Delta\text{NFR}
    ΔNFR
    Φs\Phi_sΦs​
    KϕK_\phiKϕ​
    JΔNFRJ_{\Delta\text{NFR}}JΔNFR​
    JϕJ_\phiJϕ​
    ∂EPI/∂t=νf⋅ΔNFR\partial\text{EPI}/\partial t = \nu_f \cdot \Delta\text{NFR}∂EPI/∂t=νf​⋅ΔNFR
    (
    i
    )
    ​
    =
    −∑j=i​d(i,j)αJΔNFR,j​​+
    Rpot​(i)
    =
    −(∇⋅
    Jϕ​)(i)+
    Rgeo​(i)
    (
    i
    )
    NFR-\nabla \cdot J_{\Delta\text{NFR}}
    −∇⋅JΔNFR​
    Φs\Phi_sΦs​
    d−αd^{-\alpha}d−α
    JΔNFRJ_{\Delta\text{NFR}}JΔNFR​
    DDD
    δmin⁡\delta_{\min}δmin​
    min
    ​
    MU2​
    ​
    ⋅
    O(D1​)
    ∞
    D∼log⁡ND \sim \log ND∼logN
    ∣Rpot∣∼O(1/log⁡N)|R_{\text{pot}}| \sim \mathcal{O}(1/\log N)∣Rpot​∣∼O(1/logN)
    -\nabla \cdot J_\phi
    −∇⋅Jϕ​
    sin⁡(⋅)\sin(\cdot)sin(⋅)
    Kϕ=wrap(ϕi−circmean(ϕj))K_\phi = \text{wrap}(\phi_i - \text{circmean}(\phi_j))Kϕ​=wrap(ϕi​−circmean(ϕj​))
    sin⁡(Δϕ)≈Δϕ\sin(\Delta\phi) \approx \Delta\phisin(Δϕ)≈Δϕ
    )
    geo
    ​
    ∣
    ≤
    O(1)
    ∣ϕi−ϕj∣≪π/2|\phi_i - \phi_j| \ll \pi/2∣ϕi​−ϕj​∣≪π/2
    ≈0.3\approx 0.3≈0.3
    ∣Rgeo∣≪1|R_{\text{geo}}| \ll 1∣Rgeo​∣≪1
    =
    ∑i=1N​S(i)2≤
    N⋅
    (∣Rpot​∣max2​+∣Rgeo​∣max2​)
    N​
    ∥S∥ℓ2​
    ​
    ≤
    ∣Rpot​∣max2​+∣Rgeo​∣max2​​
    1
    ​
    ∼
    1−
    N​C​
    pot
    ​
    ∥Spot∥>Φsthresh\|\mathcal{S}_{\text{pot}}\| > \Phi_s^{\text{thresh}}∥Spot​∥>Φsthresh​
    U3 (coupling without phase check)Δϕ→π\Delta\phi \to \piΔϕ→π, Rgeo∼O(1)R_{\text{geo}} \sim \mathcal{O}(1)Rgeo​∼O(1)∥Sgeo∥>Kϕthresh\|\mathcal{S}_{\text{geo}}\| > K_\phi^{\text{thresh}}∥Sgeo​∥>Kϕthresh​
    U6 (Φs\Phi_sΦs​ escapes confinement)Φs>π/2\Phi_s > \pi/2Φs​>π/2, charge accumulates$
    n
    ​
    ρIL\rho_{\text{IL}}ρIL​
    ρOZ\rho_{\text{OZ}}ρOZ​
    νf,max⁡\nu_{f,\max}νf,max​
    Δϕmax⁡\Delta\phi_{\max}Δϕmax​
    compute_grammar_conservation_bounds(G)
    src/tnfr/physics/conservation.py
    ⋅
    JΔNFR​=
    Spot​
    π
    /2
    Jϕ​=
    Sgeo​
    i
    Jϕ​
    i​
    Jϕ​
    (
    i
    )
    Electric charge
    U6 (Confinement)Potential boundednessStructural energy EEEMass-energy bound
    U1 (Initiation/Closure)Sequence completenessCharge creation/annihilation balanceBaryon number
    U4 (Bifurcation control)Curvature stabilityTopological charge Q\mathcal{Q}QWinding number
    U5 (Multi-scale)Scale invarianceHierarchical charge Qparent≥α∑QchildQ_{\text{parent}} \geq \alpha \sum Q_{\text{child}}Qparent​≥α∑Qchild​Fractal dimension
    ⟨Sk​⟩
    ≶0
    ≤0\leq 0≤0
    Charge neutral (redistribution)
    Coherence (IL)≤0\leq 0≤0≤0\leq 0≤0Charge sink (stabilization)
    Dissonance (OZ)>0> 0>0>0> 0>0Charge source (destabilization)
    Coupling (UM)≈0\approx 0≈0≈0\approx 0≈0Charge transport (no creation)
    Resonance (RA)≈0\approx 0≈0≤0\leq 0≤0Charge transport + dissipation
    Silence (SHA)=0= 0=0=0= 0=0Exactly conserved
    Expansion (VAL)>0> 0>0>0> 0>0Charge source
    Contraction (NUL)<0< 0<0<0< 0<0Charge sink
    Self-org (THOL)≤0\leq 0≤0≤0\leq 0≤0Internal redistribution
    Mutation (ZHIR)≶0\lessgtr 0≶0≶0\lessgtr 0≶0Phase-dependent
    Transition (NAV)≶0\lessgtr 0≶0≶0\lessgtr 0≶0Trajectory-dependent
    Recursivity (REMESH)≤0\leq 0≤0≤0\leq 0≤0Scale redistribution
    1
    ​
    ∑i∈V​
    [Φs​(i)2+∣∇ϕ∣(i)2+Kϕ​(i)2+Jϕ​(i)2+JΔNFR​(i)2]
    ΔNFR
    2
    ​
  • Self-organization (THOL) redistributes without increasing total energy
  • Destabilizers (OZ, ZHIR, VAL) increase energy locally, but U2 mandates compensating stabilizers that absorb the excess
  • Net effect over a complete grammar sequence: energy is non-increasing
  • Multiplicative contraction, ρ>0\rho > 0ρ>0
    DestabiliserΔE≤κ Ebefore\Delta E \leq \kappa\,E_{\text{before}}ΔE≤κEbefore​Multiplicative expansion, κ>0\kappa > 0κ>0
    Neutral$\Delta E
    MixedCompeting stabilising and destabilising componentsWorst-case bound
    Δ
    fff
    f2f^2f2
    ReceptionENStabiliserρ=0.183\rho = 0.183ρ=0.183EN_MIX = 0.2413Jensen inequality on convex combination: Emix≤(1−m) EE_{\text{mix}} \leq (1-m)\,EEmix​≤(1−m)E
    CouplingUMStabiliserρ=0.150\rho = 0.150ρ=0.150UM_DNFR = 0.15Phase-synchronisation reduces Δ\DeltaΔNFR by factor (1−f)(1-f)(1−f)
    Self-organisationTHOLStabiliserρ=0.100\rho = 0.100ρ=0.100THOL_ACCEL = 0.10Autopoietic redistribution: global form preserved, local energy absorbed
    TransitionNAVStabiliserρ=0.499\rho = 0.499ρ=0.499NAV_ETA = 0.5Regime shift mixes EPI with target at ratio η\etaη → contraction by 1−η21 - \eta^21−η2
    DissonanceOZDestabiliserκ=3.0\kappa = 3.0κ=3.0OZ_DNFR = 2.0Multiplicative amplification: ΔE≤(f2−1) E\Delta E \leq (f^2 - 1)\,EΔE≤(f2−1)E
    ExpansionVALDestabiliserκ=0.103\kappa = 0.103κ=0.103VAL_SCALE = 1.05Scaling f>1f > 1f>1: ΔE≤(f2−1) E\Delta E \leq (f^2 - 1)\,EΔE≤(f2−1)E
    EmissionALDestabiliserκ=0.010/node\kappa = 0.010/\text{node}κ=0.010/nodeAL_BOOST = 0.10Additive: ΔE≤f2 N\Delta E \leq f^2\,NΔE≤f2N
    ResonanceRADestabiliserκ=0.103\kappa = 0.103κ=0.103RA_VF = 0.05Amplification (1+f)2−1(1+f)^2 - 1(1+f)2−1 on frequency component
    SilenceSHANeutralε=0.190\varepsilon = 0.190ε=0.190SHA_VF = 0.9Near-isometric: $
    MutationZHIRNeutralε=0.056/node\varepsilon = 0.056/\text{node}ε=0.056/nodeZHIR_SHIFT = 0.3Phase shift: $
    RecursivityREMESHNeutralε=0\varepsilon = 0ε=0REMESH_ALPHA = 0.5Advisory operator: no field modification → exact isometry
    ContractionNULMixedκ=0.234\kappa = 0.234κ=0.234NUL_DENS = 1.111EPI shrinks (fs=0.9f_s = 0.9fs​=0.9) but Δ\DeltaΔNFR densifies (fd=1.111f_d = 1.111fd​=1.111)
    }