Shunyaya Symbolic Mathematical Chemistry — Ksp-driven precipitation check (AgCl); Esterification (organic synthesis) (6.7, 6.8)

Why this page. Two plain ASCII, sign-oriented worked examples using equilibrium and bond lenses. They demonstrate bounded RSI and the sign-preserving realization RSI_env = g_t * RSI. Numbers are illustrative; sign is the invariant. Use clamps and guards throughout.


6.7 Ksp-driven precipitation check (AgCl) — Ag+(aq) + Cl-(aq) -> AgCl(s)

(sign-only, equilibrium lens, 298.15 K)

Equilibrium-constant lens

K_sp(AgCl) ~ 1.8e-10
DeltaG0 = -R*T*ln(K_sp) = +R*T*ln(1/K_sp)
R*T ~ 2.47896 kJ/mol, ln(1/K_sp) ~ 22.438
DeltaG0 ~ +55.623 kJ/mol

Contrast (Gibbs lens, normalized)

# dissolution: AgCl(s) -> Ag+ + Cl-
e_diss   = (-DeltaG0) / G_unit = -(+55.623) / 100 = -0.55622997

# precipitation (reverse direction)
e_precip = +0.55622997

Alignment assignment (symmetric, bounded; c = 0.5)

ce  = 0.5 * 0.55622997 = 0.27811499
a_r = tanh(-ce)            = tanh(-0.27811499) = -0.27115956
a_p = tanh(+ce)            = tanh(+0.27811499) = +0.27115956

# clamp before any atanh:
|a| <= 1 - eps_a

RSI computation (stoichiometric weights, gamma = 1)

Reactants: Ag+ (1), Cl- (1) -> W_r = |1| + |1| = 2

U_r = 2 * atanh_safe(a_r, eps_a) = 2 * (-0.27811499) = -0.55622999
V_p = 1 * atanh_safe(a_p, eps_a) = +0.27811499

s   = (V_p - U_r) / max(W_r, eps_w) = (0.27811499 - (-0.55622999)) / 2 = 0.41717248
RSI = tanh(s) = tanh(0.41717248) = +0.39454573

Verdict
Precipitation is favored at standard state: e > 0 -> RSI > 0. Boundedness holds (|RSI| < 1); sign matches the inequality.

Optional gate (illustrative)

If g_t = 0.75 -> RSI_env = 0.75 * 0.39454573 = 0.29590930

Data reference
See Appendix D for dataset identifiers, versions, and licence terms relevant to this example.


6.8 Esterification (organic synthesis, sign-only with data-light bond lens)

Reaction
CH3COOH + C2H5OH -> CH3COOC2H5 + H2O

Bond basis (kJ/mol, illustrative)
B_O-H = 463, B_C-O = 358

Inputs (study constants for this example)
E_unit = 100, c = 0.5, gamma = 1

Tally (contrast)

E_broken = 2 * B_O-H
         = 2 * 463
         = 926

E_formed = 1 * B_O-H + 1 * B_C-O
         = 463 + 358
         = 821

e = (E_formed - E_broken) / E_unit
  = (821 - 926) / 100
  = -1.05

Alignment assignment (symmetric, bounded)

a_r = tanh(-c * e) = tanh(-0.5 * -1.05) = tanh(+0.525)  ~ +0.48154980
a_p = tanh(+c * e) = tanh(+0.5 * -1.05) = tanh(-0.525)  ~ -0.48154980

# clamp before any atanh: enforce |a| <= 1 - eps_a
a_r = clamp_a(a_r, eps_a)
a_p = clamp_a(a_p, eps_a)

RSI computation (stoichiometric weights)

W_r = |1| + |1| = 2
U_r = sum_r( |m_r|^gamma * atanh_safe(a_r, eps_a) ) = 2 * 0.52500000  = +1.05000000
V_p = sum_p( |m_p|^gamma * atanh_safe(a_p, eps_a) ) = 2 * (-0.52500000) = -1.05000000

RSI = tanh( (V_p - U_r) / max(W_r, eps_w) )
    = tanh( (-1.05 - 1.05) / 2 )
    = tanh( -1.05 )
    ~ -0.78180636

Optional prior (transparent nudge, e.g., water-removal or phase-separation prior on the ester product)

delta_u = alpha * Index = 0.25 * 0.80 = +0.20, applied to the ester term only.

V_p' = (-0.52500000) [water] + (-0.52500000 + 0.20) [ester] = -0.85000000
s'   = (V_p' - U_r) / W_r = (-0.85 - 1.05) / 2 = -0.95
RSI' = tanh(-0.95) ~ -0.73978305

Verdict
Disfavored at these table-light settings (sign only): e < 0 -> RSI < 0. A small, declared prior nudges magnitude but does not flip sign (as intended).

Gate note (illustrative)

If g_t = 0.70 -> RSI_env ~ 0.70 * (-0.78180636) = -0.54726445
If g_t = 0.30 -> RSI_env ~ 0.30 * (-0.78180636) = -0.23454191

Data posture
This is a data-light, sign-oriented check using generic bonds; real equilibria depend on solvent, water removal, and catalysis. Publish any priors and lens choices in the manifest.


Navigation
Previous — Thermal NO formation (disfavored); Weak-acid dissociation (6.5, 6.6)
Next — Catalytic hydrogenation (6.9)

Disclaimer (observation-only). All formulas and results are observation-only—not predictive or operational—and require peer validation and governance before any deployment.