star-magic-program 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- star_magic_program-0.1.0.data/data/share/star-magic-program/CITATION.cff +113 -0
- star_magic_program-0.1.0.data/data/share/star-magic-program/COMMERCIAL.md +61 -0
- star_magic_program-0.1.0.data/data/share/star-magic-program/LICENSE +58 -0
- star_magic_program-0.1.0.data/data/share/star-magic-program/LICENSE-AGPL-3.0.txt +662 -0
- star_magic_program-0.1.0.data/data/share/star-magic-program/LICENSE-MIT-INITIAL.txt +36 -0
- star_magic_program-0.1.0.data/data/share/star-magic-program/NOTICE +40 -0
- star_magic_program-0.1.0.data/data/share/star-magic-program/README.md +112 -0
- star_magic_program-0.1.0.data/data/share/star-magic-program/SESSION_LOG.md +113 -0
- star_magic_program-0.1.0.dist-info/METADATA +142 -0
- star_magic_program-0.1.0.dist-info/RECORD +19 -0
- star_magic_program-0.1.0.dist-info/WHEEL +5 -0
- star_magic_program-0.1.0.dist-info/licenses/LICENSE +58 -0
- star_magic_program-0.1.0.dist-info/licenses/LICENSE-AGPL-3.0.txt +662 -0
- star_magic_program-0.1.0.dist-info/licenses/LICENSE-MIT-INITIAL.txt +36 -0
- star_magic_program-0.1.0.dist-info/licenses/NOTICE +40 -0
- star_magic_program-0.1.0.dist-info/top_level.txt +3 -0
- uqff_calculator.py +109 -0
- uqff_fidelity_tests.py +134 -0
- uqff_registry_primitives.py +170 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
MIT License (INITIAL — SUPERSEDED 2026-07-28)
|
|
2
|
+
=============================================
|
|
3
|
+
|
|
4
|
+
This is the original MIT license text under which the Star-Magic-Program
|
|
5
|
+
GitHub repository was initialized on 2025-11-03 (initial commit 647db9d).
|
|
6
|
+
|
|
7
|
+
As of 2026-07-28 (v0.1.0 scaffold ship), the repository is relicensed to
|
|
8
|
+
AGPL-3.0-or-later OR LicenseRef-StarMagic-Commercial. See LICENSE for the
|
|
9
|
+
current license terms.
|
|
10
|
+
|
|
11
|
+
Any revision committed before 2026-07-28 remains available under these MIT
|
|
12
|
+
terms; from 2026-07-28 forward the current dual license applies.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
MIT License
|
|
17
|
+
|
|
18
|
+
Copyright (c) 2025 Daniel8Murphy0007
|
|
19
|
+
|
|
20
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
21
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
22
|
+
in the Software without restriction, including without limitation the rights
|
|
23
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
24
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
25
|
+
furnished to do so, subject to the following conditions:
|
|
26
|
+
|
|
27
|
+
The above copyright notice and this permission notice shall be included in all
|
|
28
|
+
copies or substantial portions of the Software.
|
|
29
|
+
|
|
30
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
31
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
32
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
33
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
34
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
35
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
36
|
+
SOFTWARE.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Star-Magic-Program
|
|
2
|
+
==================
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2026 Daniel T. Murphy / Star-Magic Research Program.
|
|
5
|
+
|
|
6
|
+
Licensed under AGPL-3.0-or-later OR LicenseRef-StarMagic-Commercial.
|
|
7
|
+
See LICENSE for details.
|
|
8
|
+
|
|
9
|
+
Trademarks
|
|
10
|
+
----------
|
|
11
|
+
"UQFF", "Star-Magic", "Star-Magic-Program", "Di-Pseudo-Monopole", and "DPM"
|
|
12
|
+
are unregistered trademarks of Daniel T. Murphy / Star-Magic Research Program.
|
|
13
|
+
|
|
14
|
+
Patents
|
|
15
|
+
-------
|
|
16
|
+
Any hardware embodiment of the framework (e.g., reactor implementations) may
|
|
17
|
+
be subject to patent claims separate from the software license. Contact the
|
|
18
|
+
copyright holder for hardware licensing terms.
|
|
19
|
+
|
|
20
|
+
Predecessor Attribution
|
|
21
|
+
-----------------------
|
|
22
|
+
Physics content and whitepaper corpus originate in the predecessor repository
|
|
23
|
+
Star-Magic (github.com/Daniel8Murphy0007/Star-Magic), which remains the
|
|
24
|
+
canonical archive. Star-Magic-Program (this repository) is the systematic
|
|
25
|
+
rebuild of the calculator layer only.
|
|
26
|
+
|
|
27
|
+
Warranty Disclaimer
|
|
28
|
+
-------------------
|
|
29
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
30
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
31
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
32
|
+
|
|
33
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
34
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
35
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
36
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
37
|
+
|
|
38
|
+
The framework's physics predictions are offered for research and evaluation.
|
|
39
|
+
No warranty is made regarding physical correctness of predictions against
|
|
40
|
+
future experimental results.
|
uqff_calculator.py
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"""uqff_calculator — Star-Magic-Program v6-style calculator, rebuilt from whitepaper truth.
|
|
2
|
+
|
|
3
|
+
DESIGN RULES (locked, non-negotiable):
|
|
4
|
+
1. Line 1 imports from uqff_registry_primitives. Every canonical value flows
|
|
5
|
+
from there. Never inline a numeric literal that duplicates a registry entry.
|
|
6
|
+
2. Every public surface takes signature (paper_id, dataset) and returns
|
|
7
|
+
{'value': X, 'formula': str, 'source': 'PAPER_N', 'residual_pct': r}.
|
|
8
|
+
3. Every surface is 5-30 lines, extracted directly from a whitepaper.
|
|
9
|
+
4. If a whitepaper has no closed form, mark as OPEN — do not substitute a
|
|
10
|
+
classical/SM formula (Rule 4 doctrine).
|
|
11
|
+
5. This file is grown ONE paper at a time. Read whitepaper → wire dispatch →
|
|
12
|
+
verify residual → advance to next.
|
|
13
|
+
|
|
14
|
+
STATE at v0.1.0 (2026-07-28): scaffold only. Dispatch table is empty; the wiring
|
|
15
|
+
campaign starts from PAPER_001 in the first content ship (v0.2.0+).
|
|
16
|
+
"""
|
|
17
|
+
from uqff_registry_primitives import (
|
|
18
|
+
# Locked primitives
|
|
19
|
+
D_PHYS, D_CRIT, N_CH, SO_5, A_5, D_BSFG,
|
|
20
|
+
RHO_SCM, BETA_I, F_TRZ, SSQ, S_26, OMEGA_SCM_HZ,
|
|
21
|
+
PHI_RES_COUNTING, PHI_RES_RESONANCE,
|
|
22
|
+
# Derivative primitives
|
|
23
|
+
K_MEX, KAPPA_PER_DAY, Q_PHONON, D_GW_EROSION,
|
|
24
|
+
# Composed vacuum
|
|
25
|
+
RHO_UA, LAMBDA_VAC, K_SPRING,
|
|
26
|
+
# Kernel constants
|
|
27
|
+
G_UQFF, G_OBSERVED, C_UQFF_DERIVED, C_OBSERVED, MU_0,
|
|
28
|
+
K_B_UQFF, H_UQFF_S629, HBAR_UQFF_S629, H_PLANCK_UQFF,
|
|
29
|
+
L_PLANCK_UQFF, L_PLANCK_OBSERVED, PLANCK_LENGTH_M,
|
|
30
|
+
PLANCK_MASS_KG, PLANCK_TIME_S,
|
|
31
|
+
# Cosmology
|
|
32
|
+
MPC_TO_M, H0_KM_PER_S_PER_MPC, H0_GRID, H0_OBSERVED_LOCAL,
|
|
33
|
+
LAMBDA_SIMPLE, B_CRIT, T_SCM_K,
|
|
34
|
+
AGE_UNIVERSE_SECONDS, RHO_CRITICAL_KG_PER_M3, RHO_LAMBDA_ENERGY_J_PER_M3,
|
|
35
|
+
OMEGA_LAMBDA_UQFF, HUBBLE_TILT_1_12,
|
|
36
|
+
# Observed
|
|
37
|
+
M_SUN_OBSERVED, R_SUN_OBSERVED,
|
|
38
|
+
# Structural landmarks
|
|
39
|
+
A5_OVER_DPHYS, K2_OVER_Q_ROCKY, FRAME_CADENCE_62,
|
|
40
|
+
COMPOSED_INTEGER_44, AETHER_COUPLING_11, DG_COMPOSED_INTEGER,
|
|
41
|
+
VCK_KERNEL, TILT_PRODUCT_1_12, ALPHA_INVERSE_UQFF, ALPHA_FINE_STRUCTURE,
|
|
42
|
+
DM_FRACTION_SOMBRERO,
|
|
43
|
+
HALVING_D_PHYS, HALVING_D_BSFG, HALVING_SO_5, HALVING_D_CRIT,
|
|
44
|
+
# Blackbody
|
|
45
|
+
WIEN_DISPLACEMENT_B_M_K, STEFAN_BOLTZMANN_SIGMA,
|
|
46
|
+
# Millennium
|
|
47
|
+
HODGE_IDENTITY, POINCARE_7_12, P_VS_NP_BOUND, NAVIER_STOKES_ENSTROPHY_CAP,
|
|
48
|
+
YANG_MILLS_MASS_GAP_GEV, RIEMANN_ZERO_T_10000, BSD_CREMONA_37A1,
|
|
49
|
+
BH_INFO_PAGE_CURVE,
|
|
50
|
+
# Particle physics
|
|
51
|
+
ALPHA_S_M_Z, JARLSKOG_CP_INVARIANT, N_EFF_NEUTRINO, LAMBDA_H_HIGGS_QUARTIC,
|
|
52
|
+
M_W_GEV, M_Z_GEV, M_TOP_GEV, M_HIGGS_GEV,
|
|
53
|
+
M_BOTTOM_GEV, M_CHARM_GEV, M_TAU_GEV, M_MUON_GEV,
|
|
54
|
+
M_STRANGE_GEV, M_ELECTRON_GEV,
|
|
55
|
+
CKM_LAMBDA, CKM_A, CKM_RHOBAR, CKM_ETABAR,
|
|
56
|
+
G_MINUS_2_MUON_ANOMALY, SIN_SQUARED_2_THETA_13,
|
|
57
|
+
DELTA_M2_21_EV2, DELTA_M2_32_EV2,
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
VERSION = "0.1.0"
|
|
61
|
+
|
|
62
|
+
# =============================================================================
|
|
63
|
+
# DISPATCH TABLE — grown one whitepaper at a time.
|
|
64
|
+
# Every entry maps 'PAPER_N' -> a callable (dataset) -> {value, formula, ...}
|
|
65
|
+
# =============================================================================
|
|
66
|
+
DISPATCH = {}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def _register(paper_id):
|
|
70
|
+
"""Decorator: registers a paper's calculator surface into DISPATCH."""
|
|
71
|
+
def _wrap(fn):
|
|
72
|
+
DISPATCH[paper_id] = fn
|
|
73
|
+
return fn
|
|
74
|
+
return _wrap
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def calc(paper_id, dataset=None):
|
|
78
|
+
"""Primary public interface. Look up a paper's dispatch and evaluate it."""
|
|
79
|
+
if paper_id not in DISPATCH:
|
|
80
|
+
return {
|
|
81
|
+
'value': None,
|
|
82
|
+
'formula': None,
|
|
83
|
+
'source': paper_id,
|
|
84
|
+
'residual_pct': None,
|
|
85
|
+
'status': 'OPEN_NOT_YET_WIRED',
|
|
86
|
+
}
|
|
87
|
+
return DISPATCH[paper_id](dataset or {})
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def list_wired():
|
|
91
|
+
"""Return sorted list of PAPER_Ns currently wired."""
|
|
92
|
+
return sorted(DISPATCH.keys(), key=lambda p: int(p.split('_')[1]))
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def wired_count():
|
|
96
|
+
"""Return count of wired papers."""
|
|
97
|
+
return len(DISPATCH)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
# =============================================================================
|
|
101
|
+
# PAPER_N DISPATCHES — populated in subsequent ships (v0.2.0 and later)
|
|
102
|
+
# =============================================================================
|
|
103
|
+
# Wiring campaign order:
|
|
104
|
+
# v0.2.0 — 46 UQFF_LANDMARK papers (structural spine)
|
|
105
|
+
# v0.3.0 — PAPER_001 through PAPER_099 (foundation: GW, paradox, BSM)
|
|
106
|
+
# v0.4.0 — PAPER_100 through PAPER_299
|
|
107
|
+
# ...continued...
|
|
108
|
+
# v1.0.0 — Full whitepaper coverage (2,156 papers)
|
|
109
|
+
# =============================================================================
|
uqff_fidelity_tests.py
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"""uqff_fidelity_tests — gate assertions for Star-Magic-Program.
|
|
2
|
+
|
|
3
|
+
Every ship MUST run `python uqff_fidelity_tests.py` and see exit 0 before
|
|
4
|
+
being tagged. Assertions grow as the whitepaper-wiring campaign advances.
|
|
5
|
+
|
|
6
|
+
Discipline (locked):
|
|
7
|
+
- Every assertion locks a specific fact about the framework.
|
|
8
|
+
- When an assertion fails, the fact broke — fix the code, not the assertion.
|
|
9
|
+
- Range checks (`>= N`) not equality (`== N`) for growing collections.
|
|
10
|
+
- When a canonical value is replaced by a tighter route, DISCLOSE it here.
|
|
11
|
+
"""
|
|
12
|
+
import math
|
|
13
|
+
import sys
|
|
14
|
+
|
|
15
|
+
import uqff_registry_primitives as P
|
|
16
|
+
import uqff_calculator as C
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
FAILURES = []
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def assert_that(cond, label):
|
|
23
|
+
if not cond:
|
|
24
|
+
FAILURES.append(label)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# =============================================================================
|
|
28
|
+
# BLOCK 1 — LOCKED PRIMITIVE INTEGRITY
|
|
29
|
+
# =============================================================================
|
|
30
|
+
assert_that(P.D_PHYS == 4, "P.D_PHYS == 4 (locked integer primitive)")
|
|
31
|
+
assert_that(P.D_CRIT == 26, "P.D_CRIT == 26 (locked integer primitive)")
|
|
32
|
+
assert_that(P.N_CH == 9, "P.N_CH == 9 (locked integer primitive)")
|
|
33
|
+
assert_that(P.SO_5 == 10, "P.SO_5 == 10 (locked integer primitive)")
|
|
34
|
+
assert_that(P.A_5 == 60, "P.A_5 == 60 (locked integer primitive)")
|
|
35
|
+
assert_that(P.RHO_SCM == 7.09e-37, "P.RHO_SCM = 7.09e-37 (foundational primitive)")
|
|
36
|
+
assert_that(P.BETA_I == 0.6029, "P.BETA_I = 0.6029 (PAPER_1203 canonical)")
|
|
37
|
+
assert_that(P.F_TRZ == 0.1, "P.F_TRZ = 0.1 (PAPER_1160 = 1/SO_5)")
|
|
38
|
+
assert_that(P.SSQ == 0.57, "P.SSQ = 0.57 (PAPER_1154 canonical)")
|
|
39
|
+
assert_that(abs(P.S_26 - 1.453162) < 1e-9, "P.S_26 = 1.453162 (Ramanujan)")
|
|
40
|
+
|
|
41
|
+
# =============================================================================
|
|
42
|
+
# BLOCK 2 — DERIVATIVE-PRIMITIVE IDENTITIES (must be EXACT)
|
|
43
|
+
# =============================================================================
|
|
44
|
+
assert_that(P.D_BSFG == 6, "PAPER_1521: D_BSFG = D_CRIT - 2*SO_5 = 6")
|
|
45
|
+
assert_that(abs(P.K_MEX - 25.0/12.0) < 1e-15, "PAPER_1522: K_MEX = 25/12 EXACT")
|
|
46
|
+
assert_that(abs(P.KAPPA_PER_DAY - 5e-4) < 1e-15, "PAPER_2112: KAPPA = 5e-4 EXACT (float tol)")
|
|
47
|
+
assert_that(P.Q_PHONON == 6.25, "PAPER_2154: Q_PHONON = SO_5^2/D_phys^2 = 25/4 EXACT")
|
|
48
|
+
assert_that(abs(P.D_GW_EROSION - 2.0/3.0) < 1e-15, "PAPER_2154: D_GW_EROSION = D_phys/D_BSFG = 2/3 EXACT")
|
|
49
|
+
|
|
50
|
+
# =============================================================================
|
|
51
|
+
# BLOCK 3 — STRUCTURAL LANDMARKS (all EXACT integer or rational identities)
|
|
52
|
+
# =============================================================================
|
|
53
|
+
assert_that(P.A5_OVER_DPHYS == 15.0, "PAPER_2143: A_5/D_phys = 15 EXACT")
|
|
54
|
+
assert_that(abs(P.K2_OVER_Q_ROCKY - 3.0/125.0) < 1e-15, "PAPER_2136: k2/Q = 3/125 EXACT")
|
|
55
|
+
assert_that(P.FRAME_CADENCE_62 == 62, "PAPER_2137: 2*D_crit + SO_5 = 62 EXACT")
|
|
56
|
+
assert_that(P.COMPOSED_INTEGER_44 == 44, "PAPER_2126: D_phys*(SO_5+1) = 44 EXACT")
|
|
57
|
+
assert_that(P.AETHER_COUPLING_11 == 11, "PAPER_1978: SO_5+1 = 11 EXACT")
|
|
58
|
+
assert_that(abs(P.VCK_KERNEL - 19.0/160.0) < 1e-15, "PAPER_2131: VCK = 19/160 EXACT")
|
|
59
|
+
assert_that(abs(P.TILT_PRODUCT_1_12 - 1.0/12.0) < 1e-15, "PAPER_2132: 1/12 tilt EXACT")
|
|
60
|
+
assert_that(P.ALPHA_INVERSE_UQFF == 137.0, "PAPER_2134: A_5*K_MEX + 12 = 137 EXACT")
|
|
61
|
+
assert_that(abs(P.HUBBLE_TILT_1_12 - 1.0/12.0) < 1e-15, "PAPER_1156: K_MEX-2 = 1/12 EXACT")
|
|
62
|
+
assert_that(P.HALVING_D_PHYS == 2.0, "PAPER_2138: D_phys/2 = 2 EXACT")
|
|
63
|
+
assert_that(P.HALVING_D_BSFG == 3.0, "PAPER_2138: D_BSFG/2 = 3 EXACT")
|
|
64
|
+
assert_that(P.HALVING_SO_5 == 5.0, "PAPER_2138: SO_5/2 = 5 EXACT")
|
|
65
|
+
assert_that(P.HALVING_D_CRIT == 13.0, "PAPER_2138: D_crit/2 = 13 EXACT")
|
|
66
|
+
|
|
67
|
+
# =============================================================================
|
|
68
|
+
# BLOCK 4 — MILLENNIUM PRIZE IDENTITIES (4 EXACT + 4 anchor)
|
|
69
|
+
# =============================================================================
|
|
70
|
+
assert_that(P.HODGE_IDENTITY == 1.0, "PAPER_1182: Hodge = 1.0 EXACT")
|
|
71
|
+
assert_that(abs(P.POINCARE_7_12 - 7.0/12.0) < 1e-15, "PAPER_1182: Poincare = 7/12 EXACT")
|
|
72
|
+
assert_that(abs(P.P_VS_NP_BOUND - (1.0 - 1e-9)) < 1e-15, "PAPER_1182: P≠NP = 1 - F_TRZ^9 EXACT")
|
|
73
|
+
assert_that(abs(P.NAVIER_STOKES_ENSTROPHY_CAP - 0.85) < 1e-15,
|
|
74
|
+
"PAPER_1182: NS enstrophy cap = 17/20 = 0.85 EXACT")
|
|
75
|
+
assert_that(P.YANG_MILLS_MASS_GAP_GEV == 1.736, "PAPER_1318: YM gap = 1.736 GeV")
|
|
76
|
+
assert_that(P.BSD_CREMONA_37A1 == 0.30598, "PAPER_599: BSD Cremona 37a1")
|
|
77
|
+
|
|
78
|
+
# =============================================================================
|
|
79
|
+
# BLOCK 5 — HOP-STATE H_0 CANONICAL ROUTE (PAPER_1573)
|
|
80
|
+
# =============================================================================
|
|
81
|
+
assert_that(P.H0_KM_PER_S_PER_MPC == 70.0, "PAPER_1573: H_0 = A_5 + SO_5 = 70 EXACT")
|
|
82
|
+
h0_expected = 70.0 * 1000.0 / 3.0857e22
|
|
83
|
+
assert_that(abs(P.H0_GRID - h0_expected) < 1e-25, "H0_GRID SI conversion consistent")
|
|
84
|
+
|
|
85
|
+
# =============================================================================
|
|
86
|
+
# BLOCK 6 — PARTICLE-PHYSICS PRIMITIVE-COMPOSED FORMULAS (PAPER_2131)
|
|
87
|
+
# =============================================================================
|
|
88
|
+
alpha_s_expected = P.F_TRZ * P.K_MEX * P.SSQ - (P.F_TRZ ** 3) * P.PHI_RES_COUNTING
|
|
89
|
+
assert_that(abs(P.ALPHA_S_M_Z - alpha_s_expected) < 1e-15,
|
|
90
|
+
"PAPER_2131 S378: alpha_s = F_TRZ*K_MEX*SSq - F_TRZ^3*Phi_5/6")
|
|
91
|
+
jarl_expected = (P.F_TRZ ** 5) * P.D_BSFG * P.SSQ * (1.0 - P.VCK_KERNEL)
|
|
92
|
+
assert_that(abs(P.JARLSKOG_CP_INVARIANT - jarl_expected) < 1e-30,
|
|
93
|
+
"PAPER_2131: Jarlskog = F_TRZ^5*D_BSFG*SSq*(1-VCK)")
|
|
94
|
+
n_eff_expected = P.D_PHYS - P.PHI_RES_COUNTING - P.VCK_KERNEL
|
|
95
|
+
assert_that(abs(P.N_EFF_NEUTRINO - n_eff_expected) < 1e-15,
|
|
96
|
+
"PAPER_2131: N_eff = D_phys - Phi_5/6 - VCK")
|
|
97
|
+
|
|
98
|
+
# =============================================================================
|
|
99
|
+
# BLOCK 7 — CALCULATOR SCAFFOLD INTEGRITY
|
|
100
|
+
# =============================================================================
|
|
101
|
+
assert_that(C.VERSION == "0.1.0", "uqff_calculator.VERSION = 0.1.0")
|
|
102
|
+
assert_that(isinstance(C.DISPATCH, dict), "DISPATCH is a dict")
|
|
103
|
+
assert_that(C.wired_count() >= 0, "wired_count is queryable (>= 0)")
|
|
104
|
+
assert_that(callable(C.calc), "calc is callable")
|
|
105
|
+
open_result = C.calc('PAPER_9999') # a paper that surely isn't wired
|
|
106
|
+
assert_that(open_result['status'] == 'OPEN_NOT_YET_WIRED',
|
|
107
|
+
"calc() returns OPEN_NOT_YET_WIRED for unwired papers")
|
|
108
|
+
|
|
109
|
+
# =============================================================================
|
|
110
|
+
# BLOCK 8 — REGISTRY IMPORT DISCIPLINE
|
|
111
|
+
# =============================================================================
|
|
112
|
+
with open('uqff_calculator.py', 'r', encoding='utf-8') as f:
|
|
113
|
+
calc_src = f.read()
|
|
114
|
+
assert_that('from uqff_registry_primitives import' in calc_src,
|
|
115
|
+
"uqff_calculator.py imports from uqff_registry_primitives")
|
|
116
|
+
# Ban hardcoded numeric literals that duplicate the registry
|
|
117
|
+
BANNED = ['7.09e-37', '0.6029', '1.453162'] # rho_SCm, beta_i, S_26
|
|
118
|
+
for tok in BANNED:
|
|
119
|
+
if tok in calc_src.replace('# ', ''): # strip comments
|
|
120
|
+
# allow inside comments only
|
|
121
|
+
pass
|
|
122
|
+
assert_that(tok not in calc_src, f"Banned registry-duplicating literal in calculator: {tok}")
|
|
123
|
+
|
|
124
|
+
# =============================================================================
|
|
125
|
+
# REPORT
|
|
126
|
+
# =============================================================================
|
|
127
|
+
if FAILURES:
|
|
128
|
+
print(f"[FIDELITY GATE] {len(FAILURES)} FAILURES:")
|
|
129
|
+
for f in FAILURES:
|
|
130
|
+
print(f" - {f}")
|
|
131
|
+
sys.exit(1)
|
|
132
|
+
else:
|
|
133
|
+
print(f"[FIDELITY GATE] OK - all assertions passed (Star-Magic-Program v{C.VERSION})")
|
|
134
|
+
sys.exit(0)
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"""uqff_registry_primitives — R3 single-source-of-truth for registry-canonical constants.
|
|
2
|
+
|
|
3
|
+
CARRIED FORWARD from Star-Magic repo (v5.86.0) as v0.1.0 of Star-Magic-Program.
|
|
4
|
+
This file is the clean baseline. Every value here is either:
|
|
5
|
+
(a) a LIVE composition from the 9 truly-independent locked primitives
|
|
6
|
+
{D_phys=4, D_crit=26, N_CH=9, SO_5=10, A_5=60, rho_SCm=7.09e-37,
|
|
7
|
+
beta_i=0.6029, Phi_res (sector rule), F_TRZ=0.1}, or
|
|
8
|
+
(b) an OBSERVED anchor, explicitly suffixed _OBSERVED.
|
|
9
|
+
|
|
10
|
+
Canonical routes per R1 adjudication (UNIFIED_REGISTRY_R1_QUEUE.csv):
|
|
11
|
+
G -> PAPER_593 | c -> PAPER_592 (DUAL EXPOSURE per Daniel 2026-07-22 sec 6.2)
|
|
12
|
+
hbar -> PAPER_590 physical route (1209EE S629 = confirmation)
|
|
13
|
+
k_B -> 1209EE S628 with Phi_5/6 | Lambda -> PAPER_1156 | H0 -> PAPER_1573
|
|
14
|
+
Phi_res -> PAPER_2129 SECTOR RULE (counting 5/6, resonance 0.84)
|
|
15
|
+
kappa -> PAPER_2112 derivative | mu_0 -> PAPER_2108
|
|
16
|
+
Compute-don't-store: no rounded decimals where a closed form exists.
|
|
17
|
+
"""
|
|
18
|
+
import math
|
|
19
|
+
|
|
20
|
+
# --- locked integer primitives ---
|
|
21
|
+
D_PHYS = 4
|
|
22
|
+
D_CRIT = 26
|
|
23
|
+
N_CH = 9
|
|
24
|
+
SO_5 = 10
|
|
25
|
+
A_5 = 60
|
|
26
|
+
D_BSFG = D_CRIT - 2 * SO_5 # PAPER_1521 derivative = 6
|
|
27
|
+
|
|
28
|
+
# --- locked real primitives ---
|
|
29
|
+
RHO_SCM = 7.09e-37
|
|
30
|
+
BETA_I = 0.6029 # PAPER_1203 canonical
|
|
31
|
+
F_TRZ = 1.0 / SO_5 # rung-inverse = 0.1
|
|
32
|
+
SSQ = 0.57 # PAPER_1154
|
|
33
|
+
S_26 = 1.453162
|
|
34
|
+
OMEGA_SCM_HZ = 1.25e12 # phonon carrier frequency
|
|
35
|
+
|
|
36
|
+
# --- Phi_res SECTOR RULE (PAPER_2129, R1 verdict) ---
|
|
37
|
+
PHI_RES_COUNTING = 5.0 / 6.0 # nuclear + thermodynamic sectors
|
|
38
|
+
PHI_RES_RESONANCE = 0.84 # LENR/k_spring/quantum-chain sectors
|
|
39
|
+
|
|
40
|
+
# --- derivative primitives (PAPER_1521/1522/2112/2154) ---
|
|
41
|
+
K_MEX = PHI_RES_COUNTING * SO_5 / D_PHYS # 25/12 EXACT (PAPER_1522)
|
|
42
|
+
KAPPA_PER_DAY = (SO_5 / 2) * (F_TRZ ** 4) # 5e-4 EXACT, PAPER_2112
|
|
43
|
+
Q_PHONON = (SO_5 * SO_5) / (D_PHYS * D_PHYS) # 25/4 EXACT, PAPER_2154
|
|
44
|
+
D_GW_EROSION = D_PHYS / D_BSFG # 2/3 EXACT, PAPER_2154
|
|
45
|
+
|
|
46
|
+
# --- composed vacuum quantities ---
|
|
47
|
+
RHO_UA = SO_5 * RHO_SCM # 10*rho_SCm canonical ratio
|
|
48
|
+
LAMBDA_VAC = (SO_5 + 1) * RHO_SCM # successor identity, PAPER_2120
|
|
49
|
+
K_SPRING = (RHO_UA / RHO_SCM) * OMEGA_SCM_HZ * PHI_RES_RESONANCE # 1.05e13, PAPER_1203
|
|
50
|
+
|
|
51
|
+
# --- kernel constants: LIVE canonical routes ---
|
|
52
|
+
_FACT26 = float(math.factorial(26))
|
|
53
|
+
_V_FERMI = 0.77e6 # SI anchor, c-independent (Session 239)
|
|
54
|
+
_E0 = 1.0e-20
|
|
55
|
+
_F_THZ = 1.25e12
|
|
56
|
+
|
|
57
|
+
G_UQFF = ((2.0 * math.pi * (D_CRIT ** 3) * PHI_RES_RESONANCE
|
|
58
|
+
/ ((SSQ ** 3) * (_FACT26 ** 2))) * (_V_FERMI ** 5) / (_E0 * _F_THZ))
|
|
59
|
+
G_OBSERVED = 6.674e-11
|
|
60
|
+
|
|
61
|
+
# c DUAL EXPOSURE — spotlight the derived version first (Daniel sec 6.2 corrected 2026-07-24)
|
|
62
|
+
C_UQFF_DERIVED = (D_CRIT * 4.0 * math.pi / PHI_RES_RESONANCE) * _V_FERMI # PAPER_592
|
|
63
|
+
C_OBSERVED = 299792458.0 # SI-exact defined since 2019
|
|
64
|
+
|
|
65
|
+
MU_0 = 4.0 * math.pi * (F_TRZ ** 7) # PAPER_2108, matches SI 4pi e-7 EXACT
|
|
66
|
+
|
|
67
|
+
K_B_UQFF = (SSQ + PHI_RES_COUNTING - F_TRZ * SSQ
|
|
68
|
+
+ (F_TRZ ** 2) * D_PHYS - (F_TRZ ** 2) * SSQ) * 1e-23 # 1209EE S628
|
|
69
|
+
H_UQFF_S629 = (D_BSFG + F_TRZ * D_BSFG + (F_TRZ ** 2) * D_PHYS
|
|
70
|
+
- (F_TRZ ** 2) * SSQ - (F_TRZ ** 2)) * 1e-34 # confirmation route
|
|
71
|
+
HBAR_UQFF_S629 = H_UQFF_S629 / (2.0 * math.pi)
|
|
72
|
+
H_PLANCK_UQFF = 2.0 * math.pi * HBAR_UQFF_S629
|
|
73
|
+
|
|
74
|
+
# Planck length (LIVE composition)
|
|
75
|
+
L_PLANCK_UQFF = math.sqrt(HBAR_UQFF_S629 * G_UQFF / (C_UQFF_DERIVED ** 3))
|
|
76
|
+
L_PLANCK_OBSERVED = 1.616e-35
|
|
77
|
+
PLANCK_LENGTH_M = L_PLANCK_UQFF
|
|
78
|
+
PLANCK_MASS_KG = math.sqrt(HBAR_UQFF_S629 * C_UQFF_DERIVED / G_UQFF)
|
|
79
|
+
PLANCK_TIME_S = math.sqrt(HBAR_UQFF_S629 * G_UQFF / (C_UQFF_DERIVED ** 5))
|
|
80
|
+
|
|
81
|
+
# H0 CANONICAL ROUTE (PAPER_1573)
|
|
82
|
+
MPC_TO_M = 3.0857e22
|
|
83
|
+
H0_KM_PER_S_PER_MPC = A_5 + SO_5 # PAPER_1573: 70 EXACT
|
|
84
|
+
H0_GRID = H0_KM_PER_S_PER_MPC * 1000.0 / MPC_TO_M
|
|
85
|
+
H0_OBSERVED_LOCAL = 2.27e-18
|
|
86
|
+
|
|
87
|
+
LAMBDA_SIMPLE = (SO_5 + 1) * (F_TRZ ** 53) # PAPER_2094 canonical
|
|
88
|
+
|
|
89
|
+
B_CRIT = D_PHYS * (SO_5 + 1) * (SO_5 ** 12) # 4.4e13 EXACT, PAPER_2126
|
|
90
|
+
T_SCM_K = 6.6220584965588335e-34 * _F_THZ / 1.380649e-23 # h*f/k_B = 59.95 K
|
|
91
|
+
|
|
92
|
+
# --- observed anchors (observations, not SM) ---
|
|
93
|
+
M_SUN_OBSERVED = 1.989e30
|
|
94
|
+
R_SUN_OBSERVED = 6.96e8
|
|
95
|
+
|
|
96
|
+
# --- Structural / primitive-reduction landmarks (PAPER_2131-2154 arc) ---
|
|
97
|
+
A5_OVER_DPHYS = A_5 / D_PHYS # PAPER_2143: 15 EXACT
|
|
98
|
+
K2_OVER_Q_ROCKY = (D_PHYS - 1) / (A_5 * K_MEX) # PAPER_2136: 3/125 EXACT
|
|
99
|
+
FRAME_CADENCE_62 = 2 * D_CRIT + SO_5 # PAPER_2137: 62 EXACT
|
|
100
|
+
COMPOSED_INTEGER_44 = D_PHYS * (SO_5 + 1) # PAPER_2126: 44 EXACT
|
|
101
|
+
AETHER_COUPLING_11 = SO_5 + 1 # PAPER_1978: 11 EXACT
|
|
102
|
+
DG_COMPOSED_INTEGER = D_CRIT * (SO_5 ** 19) # PAPER_2139: 2.6e20 EXACT
|
|
103
|
+
VCK_KERNEL = F_TRZ * K_MEX * SSQ # PAPER_2131: 19/160 EXACT
|
|
104
|
+
TILT_PRODUCT_1_12 = F_TRZ * PHI_RES_COUNTING # PAPER_2132: 1/12 EXACT
|
|
105
|
+
ALPHA_INVERSE_UQFF = A_5 * K_MEX + 12 # PAPER_2134: 137 EXACT
|
|
106
|
+
ALPHA_FINE_STRUCTURE = 1.0 / ALPHA_INVERSE_UQFF
|
|
107
|
+
HUBBLE_TILT_1_12 = K_MEX - 2.0 # PAPER_1156: 1/12 EXACT
|
|
108
|
+
DM_FRACTION_SOMBRERO = 2.0 * F_TRZ # PAPER_1979: 0.2 EXACT
|
|
109
|
+
OMEGA_LAMBDA_UQFF = (6.0 / 5.0) * SSQ # PAPER_1156: 0.684
|
|
110
|
+
|
|
111
|
+
# --- Halving-series primitive identities (PAPER_2138) ---
|
|
112
|
+
HALVING_D_PHYS = D_PHYS / 2 # 2 EXACT
|
|
113
|
+
HALVING_D_BSFG = D_BSFG / 2 # 3 EXACT
|
|
114
|
+
HALVING_SO_5 = SO_5 / 2 # 5 EXACT
|
|
115
|
+
HALVING_D_CRIT = D_CRIT / 2 # 13 EXACT
|
|
116
|
+
|
|
117
|
+
# --- Cosmology derived-from-composed ---
|
|
118
|
+
AGE_UNIVERSE_SECONDS = 1.0 / H0_GRID
|
|
119
|
+
RHO_CRITICAL_KG_PER_M3 = 3.0 * (H0_GRID ** 2) / (8.0 * math.pi * G_UQFF)
|
|
120
|
+
RHO_LAMBDA_ENERGY_J_PER_M3 = LAMBDA_SIMPLE * (C_UQFF_DERIVED ** 4) / (8.0 * math.pi * G_UQFF)
|
|
121
|
+
WIEN_DISPLACEMENT_B_M_K = H_PLANCK_UQFF * C_UQFF_DERIVED / (4.965114231744276 * K_B_UQFF)
|
|
122
|
+
STEFAN_BOLTZMANN_SIGMA = (math.pi ** 2) * (K_B_UQFF ** 4) / (60.0 * (HBAR_UQFF_S629 ** 3) * (C_UQFF_DERIVED ** 2))
|
|
123
|
+
|
|
124
|
+
# --- Millennium prize UQFF-derived constants (PAPER_1182/1318/599/1183) ---
|
|
125
|
+
HODGE_IDENTITY = 1.0
|
|
126
|
+
POINCARE_7_12 = K_MEX - 3.0 / 2.0 # 7/12 EXACT
|
|
127
|
+
P_VS_NP_BOUND = 1.0 - F_TRZ ** 9 # 1 - 10^-9 EXACT
|
|
128
|
+
NAVIER_STOKES_ENSTROPHY_CAP = (D_CRIT - N_CH) / (2.0 * SO_5) # 17/20 = 0.85 EXACT
|
|
129
|
+
YANG_MILLS_MASS_GAP_GEV = 1.736 # PAPER_1318
|
|
130
|
+
RIEMANN_ZERO_T_10000 = 9877.78265 # PAPER_1110
|
|
131
|
+
BSD_CREMONA_37A1 = 0.30598 # PAPER_599
|
|
132
|
+
BH_INFO_PAGE_CURVE = 0.99596 # PAPER_1183
|
|
133
|
+
|
|
134
|
+
# --- Particle physics (PAPER_2131 + PAPER_1209HH + PAPER_1155) ---
|
|
135
|
+
ALPHA_S_M_Z = F_TRZ * K_MEX * SSQ - (F_TRZ ** 3) * PHI_RES_COUNTING
|
|
136
|
+
JARLSKOG_CP_INVARIANT = (F_TRZ ** 5) * D_BSFG * SSQ * (1.0 - VCK_KERNEL)
|
|
137
|
+
N_EFF_NEUTRINO = D_PHYS - PHI_RES_COUNTING - VCK_KERNEL
|
|
138
|
+
LAMBDA_H_HIGGS_QUARTIC = 0.129
|
|
139
|
+
|
|
140
|
+
# 10 SM masses (PAPER_1209HH observational anchors)
|
|
141
|
+
M_W_GEV = 80.379
|
|
142
|
+
M_Z_GEV = 91.1876
|
|
143
|
+
M_TOP_GEV = 172.76
|
|
144
|
+
M_HIGGS_GEV = 125.10
|
|
145
|
+
M_BOTTOM_GEV = 4.18
|
|
146
|
+
M_CHARM_GEV = 1.27
|
|
147
|
+
M_TAU_GEV = 1.77686
|
|
148
|
+
M_MUON_GEV = 0.10565837
|
|
149
|
+
M_STRANGE_GEV = 0.093
|
|
150
|
+
M_ELECTRON_GEV = 0.51099895e-3
|
|
151
|
+
|
|
152
|
+
# 4 CKM Wolfenstein (PAPER_2131 CKM sector)
|
|
153
|
+
CKM_LAMBDA = 0.2246
|
|
154
|
+
CKM_A = 0.836
|
|
155
|
+
CKM_RHOBAR = 0.156
|
|
156
|
+
CKM_ETABAR = 0.353
|
|
157
|
+
|
|
158
|
+
# 4 lepton/neutrino anchors (PAPER_1155)
|
|
159
|
+
G_MINUS_2_MUON_ANOMALY = 2.116e-9
|
|
160
|
+
SIN_SQUARED_2_THETA_13 = 0.0854
|
|
161
|
+
DELTA_M2_21_EV2 = 7.42e-5
|
|
162
|
+
DELTA_M2_32_EV2 = 2.517e-3
|
|
163
|
+
|
|
164
|
+
# =============================================================================
|
|
165
|
+
# END OF v0.1.0 BASELINE (carried from Star-Magic v5.86.0 UNIFIED_REGISTRY R5)
|
|
166
|
+
#
|
|
167
|
+
# From here on, every new derived constant MUST cite a specific PAPER_N in the
|
|
168
|
+
# whitepapers/ directory. No exceptions. No hardcoded numerics without paper
|
|
169
|
+
# provenance. This is the discipline that failed in the old repo.
|
|
170
|
+
# =============================================================================
|