signedValenceCost
plain-language theorem explainer
The definition signedValenceCost assigns an integer measuring ledger imbalance to each atomic number Z. Chemists modeling RS periodicity cite it when tracking valence contributions to shell closures under the eight-tick mapping. The computation retrieves valence electrons and period length then applies a direct conditional that returns the valence count or subtracts the period length.
Claim. Let $v(Z)$ be the number of valence electrons of element $Z$ and $p(Z)$ its period length. The signed valence cost is $v(Z)$ if $2v(Z) ≤ p(Z)$, else $v(Z) - p(Z)$.
background
The Periodic Table Engine maps the eight-tick octave to chemical periods via phi-tier rails and fixed block offsets without per-element tuning. Valence electrons for Z equal Z minus the previous closure point, while period length equals the difference between next and previous closures. The module states that noble gases occur exactly at 8-window neutrality points under this deterministic valence proxy.
proof idea
The definition is a direct computation. It calls valenceElectrons Z and periodLength Z, then applies the conditional: return v cast to Z if twice v is at most periodLen, otherwise return v minus periodLen cast to Z.
why it matters
This definition supplies the valence imbalance term required by the Noble Gas Closure Theorem (P0-A0). It realizes the chemical side of the eight-tick ledger balance from the RS scheduler. The explicit remark that the sum over a complete period is nonzero explains why a separate neutrality proxy appears later in the module.
Switch to Lean above to see the machine-checked source, dependencies, and usage graph.