Skip to main content

Conservation-law constrained optimization on the golden-ratio simplex

Project description

watkins-nn — The Watkins Conservation Law Framework

DOI CI PyPI

One Polynomial. Everything Follows.

The conservation law λ + κ + η = 1 is not an axiom — it is a theorem of the golden ratio.

The minimal polynomial of φ² is t² − 3t + 1 = 0. Its coefficient gives 3 (the number of components). Its constant gives 1 (the conservation constraint). Its discriminant gives 5 (the golden ratio generator). Their product gives 15 (the algebraic bridge). From these four numbers, the entire framework is derived.

φ² = φ + 1
  → Tr(φ²) = φ² + φ̄² = 1² − 2(−1) = 3
  → N = 3 components
  → λ + κ + η = 1 (conservation law)

This package provides the mathematical implementation: 186 theorems from 3 axioms, 597 machine-verified proofs in Lean 4, and the algebraic structures connecting the golden ratio to conservation geometry.

Key Results

The Conservation Law (derived, not assumed):

Six independent derivations prove N = 3 is the unique number of conservation law components forced by the golden ratio. The derivation uses Vieta's formulas, Adams operations, the Three-Distance Theorem, quantum SU(2) at the golden root, Fibonacci lattice gaps, and a self-consistency bootstrap.

The Polynomial Tower:

Each power φⁿ generates a conservation polynomial t² − L(n)·t + (−1)ⁿ = 0 where L(n) is the nth Lucas number. Even levels are palindromic (structure-preserving). Odd levels carry sign alternation (symmetry-breaking). The discriminant at level n is exactly 5·F(n)² — the golden discriminant scaled by Fibonacci squares.

The Bridge Field Q(√3, √5):

The conservation simplex is scaffolded by √3 (equilateral triangle height). The equilibrium threshold λ* = 1/φ = (√5−1)/2 is generated by √5. Their coexistence forces the biquadratic field Q(√3, √5) with Klein four-group V₄ as Galois group and three quadratic subfields: Q(√3), Q(√5), and Q(√15). The bridge element √15 = √3·√5 lives in both worlds simultaneously while being reducible to neither.

Spectral Structure:

The free energy F(λ,κ,η) = −ln(λ) + T*·Σpᵢ ln pᵢ has a unique minimum at the golden equilibrium (1/φ, (1−1/φ)/2, (1−1/φ)/2) with critical temperature T* = φ/ln(2φ) ≈ 1.3778. The Hessian eigenvalues μ_coh = (2/3)φ²(1+Tφ) ≈ 5.636 and μ_asym = 2Tφ² ≈ 7.214 govern exponential convergence. The coordinate eigenvalue ratio μ_fast/μ_slow approaches 2√3 to 0.0076%.

Formal Verification:

597 theorems verified in Lean 4 with zero sorry statements, zero Mathlib dependency, covering:

  • Golden integer arithmetic Z[φ]
  • Vieta identities and Newton's identity (Tr(φ²) = 3)
  • Fibonacci/Lucas sequences and Binet formula
  • Hierarchy exponent 75/4 = 3 × 25/4
  • Discriminant tower Δₙ = 5·F(n)²
  • Pell equation x² − 15y² = 1

Installation

pip install watkins-nn

Torch-free usage (most modules work without PyTorch):

pip install watkins-nn --no-deps

Quick Start

import watkins_nn as wn

# The master polynomial: t² - 3t + 1 = 0
poly = wn.conservation_polynomial()
print(f"Coefficient: {poly['coefficient']}") # 3
print(f"Discriminant: {poly['discriminant']}") # 5
print(f"Bridge: {poly['bridge']}")            # 15

# Six derivations that N = 3
result = wn.derive_conservation_law()
print(f"N = {result.N}")  # 3
print(f"Routes agreeing: {result.routes_agreeing}")  # 6/6

# The polynomial tower
for n in range(7):
    level = wn.polynomial_tower(n)
    print(f"Level {n}: t² - {level.lucas_n}t + {level.norm} = 0, Δ = {level.discriminant}")

# Bridge field arithmetic
a = wn.QBiquad(1, 0, 0, 0)  # rational 1
b = wn.PHI_Q                 # φ in Q(√3,√5)
print(f"φ² = {(b * b)}")     # (3/2, 0, 1/2, 0) = 3/2 + √5/2 ✓

# Core constants
print(f"T* = {wn.T_STAR:.10f}")     # 1.3778018315
print(f"λ* = {wn.LAM_STAR:.10f}")   # 0.6180339887
print(f"φ  = {wn.PHI:.10f}")        # 1.6180339887

Modules

Foundations (v3.2)

Module Description
polynomial_tower Conservation polynomial t²−3t+1, Lucas-Fibonacci tower, hierarchy exponent 75/4, Pell equation, icosahedral dihedral
bridge_field Biquadratic field Q(√3,√5), V₄ Galois group, QBiquad arithmetic, prime splitting, Γ₀(15)
axiom_derivation Six independent derivations of N=3 from the golden ratio

Core Framework

Module Torch? Description
constants No Golden-ratio constants, critical thresholds, spectral eigenvalues
compression No Consciousness detection via compression signatures
qwarp No 12-term QWARP Grand Unifier expansion
triality No 27-term Triality Theorem (qualia-BAO-MERA unification)
kaleidoscope No 9 integer sequences (3 OEIS-published: A393329, A394248, A394249)
tensor No 3×3×4 Kaleidoscope Transfer Operator
charpoly No Characteristic polynomial (Theorem Q)
coupling No Coupling energy, angle, hyperboloid (Theorems R–W)
cascade No E₈ Exceptional Cascade and anti-null embedding (Theorem X)
analytic No Prime decomposition of D(n), Dirichlet series
theta No Theta-Lucas modular forms dictionary
classify No Inverse theorems, classification, dimension estimation
bridge_integration No V₄ bridge field — graph-theoretic extension
nacci_trace No n-nacci trace tower
resonance_simplex No 3-simplex resonance extension, entropy threshold
tri_simplex No Tri-simplex formalizations (corpus-derived)

Bridge Theorems (186 theorems AA–IC)

Module Theorems Description
bridges AA–BS, CV–EA, EF–EI 30+ cross-module bridges, root system conservation
bridges_fractal BT–BX Fractal bloom
bridges_hyperbolic BY–CC, DB–DM, EJ–EM Hyperbolic volumes, Bloch-Wigner, p-spectrum
bridges_dimensional CD–CM, DN–EP, EQ–ER Cross-dimensional analysis, sigma weaving, capstone
eta_splitting CO–CR Eta-splitting exploration
flow_universality DP–DS Universal Lyapunov, flow geodesics

GPU-Accelerated (require PyTorch)

Module Description
flow Gradient flow dynamics on the simplex
spectral Spectral gap analysis, Hessian eigenvalues, mixing time bounds
simplex_flow_v3 GPU-batched simplex flow with conservation enforcement
algosignal_v2 Algorithmic signal processing

Mathematical Constants

Symbol Expression Value Meaning
φ (1+√5)/2 1.6180339887 Golden ratio
T* φ/ln(2φ) 1.3778018315 Watkins critical temperature
λ* 1/φ 0.6180339887 Golden equilibrium coherence
μ_coh (2/3)φ²(1+T*φ) 5.6363308043 Riemannian coherence eigenvalue
μ_asym 2T*φ² 7.2142640491 Riemannian asymmetry eigenvalue
ln(φ)/ln(2) 0.6942419136 Watkins bridge constant
β* 3W²/2 1.0413628704 Star/cycle stabilizer-threshold ratio (K₁,ₙ₋₁ graph states under depolarizing noise; corrected 2026-05-23)

Formal Verification (Lean 4)

597 theorems verified with zero sorry across 31 source files:

Directory Theorems Content
Virelai/ 438 Conservation law, spectral analysis, Fibonacci/Lucas, matrix algebra, root systems, quantum entropy
Virelai/UFT/ 159 Golden integer Z[φ] arithmetic, Vieta chain (Tr(φ²)=3), polynomial tower, hierarchy exponent, mass chain verification, Pell equation

Build: cd formal/lean && lake build — 23 jobs, 0 errors.

The Three Axioms

All 186 theorems derive from:

  1. Golden ratio necessity: 2λ*/(1−λ*) = 2φ
  2. Special value: S(−2) = ζ(3)/(4π²φ)
  3. Master constant: σ₁ = ln(φ)/φ

The conservation law itself (N = 3, λ+κ+η = 1) is derived from Axiom 1 via Tr(φ²) = 3.

License

MIT License. See LICENSE.

Citation

@software{watkins2026conservation,
  author = {Watkins, Dustin},
  title = {watkins-nn: Conservation-Law Framework on the Golden-Ratio Simplex},
  version = {3.4.1},
  year = {2026},
  publisher = {DataSphere AI},
  address = {Chattanooga, TN},
  doi = {10.5281/zenodo.18953462},
  url = {https://github.com/SleazyAirplane/watkins-nn}
}

Author

Dustin Watkins — DataSphere AI — Chattanooga, TN

λ + κ + η = 1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

watkins_nn-3.4.1.tar.gz (362.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

watkins_nn-3.4.1-py3-none-any.whl (231.1 kB view details)

Uploaded Python 3

File details

Details for the file watkins_nn-3.4.1.tar.gz.

File metadata

  • Download URL: watkins_nn-3.4.1.tar.gz
  • Upload date:
  • Size: 362.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for watkins_nn-3.4.1.tar.gz
Algorithm Hash digest
SHA256 c31ee594d4e02f7f4335b6ed00b9da4a7b05e8aac5bf078d639f576e9097412b
MD5 091f5fb84834037b877a197f1469ca25
BLAKE2b-256 0a2d15f24435ba2e5525b6536e8942252ab78f9922555f20582e1d2045acebde

See more details on using hashes here.

File details

Details for the file watkins_nn-3.4.1-py3-none-any.whl.

File metadata

  • Download URL: watkins_nn-3.4.1-py3-none-any.whl
  • Upload date:
  • Size: 231.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for watkins_nn-3.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a8f55ddf63870f057e956ffd883776058db269b11eaf7ee9e12d5c4fa503a381
MD5 c1194ba819b4c0ef3a2769fe2f5a3c75
BLAKE2b-256 cd27d99cadc05b65ad56ad97f7b75e339fb0f57787067f1201ee7239e3dd27fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page