Shunyaya Symbolic Mathematical Chemistry – Invariants & Scale/Weight Robustness (3.5, 3.6)

This page collects the non-negotiables that keep everything bounded, collapse-safe, and numerically sane, then shows what never changes under sensible rescalings. Use it as your quick audit anchor: do the outputs stay inside (−1, +1)? do classical balances remain intact? do benign unit/slope/weight changes preserve direction?

Invariants (what must always hold)

  • Boundedness: the stability channel is strictly inside (−1, +1); the preference index stays bounded too.
  • Collapse: classical magnitudes and balances are unchanged by symbolic machinery.
  • Closure: covalent combine, ionic combine, pooling, priors, and the calm gate all map bounded inputs to bounded outputs under the standard clamps.
  • Study-level clamp policy: apply the same alignment clamp everywhere before any inverse map or combine; publish the clamp margin in the manifest.

Scale/weight robustness (what never changes)

  • Sign invariance: the sign of preference is unchanged by positive rescalings of energy units, the global slope, or the weight exponent (with non-negative weights).
  • Order invariance: for fixed stoichiometry/weights, multiplying the contrast by any positive factor preserves the ranking (tanh is odd and strictly increasing).
  • Stoichiometric scaling invariance: multiplying all coefficients by any k > 0 leaves the index unchanged for any non-negative weight exponent.
  • Monotonicity reminder: for fixed stoichiometry/weights, the index is strictly increasing in the contrast.

Robustness grid (how to audit quickly)

Run a small grid over scale and weighting knobs and accept only if there are zero sign flips across the grid. Optionally, check that rankings match contrast rankings for a fixed weight exponent. Publish grid values, tolerance bands, and outcomes.


Plain ASCII formulas (copy-ready)

Boundedness, collapse, closure

# bounded inputs/outputs
|a| < 1   =>   |RSI| < 1

# collapse
phi(m, a) = m

# closure of operations
# M2 (covalent): rapidity-additive
a' = tanh( atanh(a1) + atanh(a2) )            # => a' in (-1, 1)

# M1 (ionic): multiplicative (then clamp)
a' = a1 * a2                                   # |a'| <= |a1||a2| < 1 -> clamp

# pooling (rapidity sums)
# inputs clamped: |a| <= 1 - eps_a  => atanh(a) finite
# U_r, V_p, W_r finite; outer tanh keeps RSI in (-1, 1)

# priors (rapidity nudges)
a' = tanh( atanh(a) + delta_u )                # |delta_u| <= alpha_max => a' in (-1, 1)

# gate scaling
RSI_env = g_t * RSI                            # 0 <= g_t <= 1  =>  |RSI_env| <= |RSI| < 1

Clamp policy (study-level)

# apply before any atanh or combine
if abs(a) >= 1 - eps_a:
  a := sign(a) * (1 - eps_a)    # eps_a > 0 (e.g., 1e-12 .. 1e-6)
# publish eps_a and apply uniformly across the study

Scale/weight robustness (invariants)

# Sign invariance
# sign(RSI) unchanged under positive rescaling of:
#   - E_unit (contrast scale)
#   - c (global slope)
#   - gamma (non-negative, so w = |m|^gamma >= 0 and W_r > 0)

# Order invariance (fixed stoichiometry/weights)
# e -> alpha * e with alpha > 0 preserves RSI ordering (RSI = tanh(k * e), k > 0)

# Monotonicity (reminder)
# For fixed stoichiometry/weights: RSI strictly increases with e

# Stoichiometric scaling invariance
# Multiply all coefficients by k > 0 -> RSI unchanged for any gamma >= 0

Recommended robustness grid (audit)

E_unit in {50, 100, 200}
c      in {0.25, 0.5, 1.0}
gamma  in {0, 1, 2}

Acceptance: zero sign flips across the full grid for each worked example.
Optional ranking check: for fixed gamma, RSI ranking == e ranking (Spearman rho = 1.0).

Minimal audit pseudocode (ASCII)

input:
  cases     = {case_k}                 # each has fixed stoichiometry/weights
  grid_E    = [50, 100, 200]
  grid_c    = [0.25, 0.5, 1.0]
  grid_g    = [0, 1, 2]
  eps_a > 0, eps_w > 0
  tau_zero  = 1e-12                    # tie tolerance for near-zero RSI

for each case in cases:
  signs = []
  for E_unit in grid_E:
    for c in grid_c:
      for gamma in grid_g:
        # compute e with the chosen lens and canonical assignment (§3.2)
        # compute RSI using guarded pools (§3.1): atanh_safe, W_r_safe = max(W_r, eps_w)
        rsi = RSI(case, E_unit, c, gamma, eps_a, eps_w)

        # robust sign with zero-tolerance band
        s = 0 if abs(rsi) <= tau_zero else (1 if rsi > 0 else -1)
        signs.append(s)

  # acceptance criterion:
  baseline = signs[0]                  # first grid point
  assert all(s == baseline for s in signs)

  # optional: ranking audit for fixed gamma values
  for gamma in grid_g:
    arr_e   = []   # per-candidate contrasts (fixed lens)
    arr_rsi = []   # RSI at (E_unit=100, c=0.5, this gamma)
    for each candidate r in case.candidates:
      e_r   = contrast_of(r)                     # from the chosen lens
      rsi_r = RSI(r, 100, 0.5, gamma, eps_a, eps_w)
      arr_e.append(e_r)
      arr_rsi.append(rsi_r)
    assert rank(arr_rsi) == rank(arr_e)          # Spearman rho = 1.0

Publish note (manifest)

Record the exact grid values used, tau_zero, and pass/fail per example.
If any failure occurs, publish the offending (E_unit, c, gamma) tuple and the computed RSI with its sign, plus corrective action (typically a data/guard issue).


Navigation
Previous – Sign Lemma & Monotonicity (3.3, 3.4)
Next – Multi-step and Pooled Pathways (3.7)