import mpmath as mp
mp.mp.dps=30

# Is "16" tied to the superseded 19, or independent?
# Route 1 (gravitational-production paper, sec 5.2): 16 = dim(16_S) SO(10) spinor.
#   Also 16 = 12 (gauge SU3xSU2xU1) + 3 (chi CP2) + 1 (tau CP2). NO 19 anywhere.
# Route 2 (retired, via appendix_J:399): 16 = 19 - 3 where 19 = 3+6+10 FS-ladder block.
#   THIS uses the superseded split.

# Are they the same 16? Yes numerically, but provenance differs.
print("Route 1 (SO(10) spinor / index): 16 = 12+3+1 =", 12+3+1, " -- NO 19")
print("Route 2 (retired):               16 = 19-3 =", 19-3, " -- USES 19=3+6+10")
print()

# The denominator 3 = Ngen = chi(CP2) is LIVE and unambiguous (used everywhere incl AO).
# So 16/3 only depends on the superseded 19 IF you can only get 16 via 19-3.
# Route 1 gets 16 WITHOUT 19. So 16/3 = 5.333 is NOT necessarily on the retired split.

# BUT: is 16/3 the ENERGY-DENSITY partition (physically correct) or just a label?
# The gravitational-production theorem (thm:partition) claims rho_chi/rho_b = N_dark/N_vis
# = Tr_chi(1)/Tr_B(1) = 16/3 via EQUIPARTITION at decoupling. That step (Step 3, "equal
# energy per channel") is the ASSUMED, NOT DERIVED, piece (paper itself: "requires a formal
# derivation from the DFD path integral that has not yet been completed", line 591).

# Numerics: does 16/3 land at 0.12?
Ob = 0.02237
print(f"(16/3)*Ob_h2 = {16/3*Ob:.5f}  (target 0.12)")
print(f"Planck Omega_c h2 = 0.1200; Omega_c/Omega_b = {0.1200/0.02237:.4f}")
print(f"16/3 = {16/3:.4f}  -> off by {(16/3-0.1200/0.02237)/(0.1200/0.02237)*100:.2f}%")
