oxidationStateCost
plain-language theorem explainer
Defines the recognition cost of a measured oxidation state relative to an expected one as the J-cost of their ratio. Chemists and RS auditors cite it when quantifying how far an observed state sits from the canonical prediction. The body is a one-line application of the standard J-cost to measured/expected.
Claim. For real numbers $m$ (measured oxidation state) and $e$ (expected oxidation state), the oxidation-state cost is $J(m/e)$, where $J(x) = \frac{1}{2}(x + x^{-1}) - 1$ is the recognition cost of a positive ratio.
background
The module treats oxidation-state multiplicity of d-block metals as a ConfigDim count law. At spatial dimension $D = 3$, the Count Law gives $2^3 - 1 = 7$ canonical oxidation states, matching the common span for Mn, Cr, Fe and the IUPAC "golden-7" set. Three binary axes are charged: sign of charge, d-count relative to half-fill, and ligand-field above/below.
The cost functional used here is the standard RS J-cost $J(x) = (x + x^{-1})/2 - 1$, also written $\cosh(\log x) - 1$. Upstream definitions (Cost.Jcost and its aliases) fix $J$ as the unique nonnegative cost of a positive ratio, vanishing only at $x = 1$. The Measurement.RSNative.Core.Cost abbreviation packages quantities in RS-native units; the chemistry layer simply feeds the ratio of measured to expected oxidation number into that same $J$.
Locally, the definition sits beside the structural claim that the canonical count equals 7, and beside nonnegativity and zero-at-match lemmas that certify the cost behaves as a genuine deviation measure.
proof idea
One-line definitional wrapper: unfold to Cost.Jcost applied to the quotient measured/expected. No tactics, no lemmas inside the body itself. Downstream proofs (zero when measured equals expected; nonnegativity for positive arguments) unfold this def and invoke Cost.Jcost_unit0 and Cost.Jcost_nonneg on the ratio.
why it matters
Gives the quantitative deviation measure that OxidationStateCert packages together with the count-equals-7 claim. The certificate structure requires cost_at_expected (cost vanishes on the diagonal) and cost_nonneg (cost is nonnegative for positive measured and expected), both proved by unfolding this definition. Those lemmas feed the inhabited certificate cert used to close the structural theorem of the module.
In the broader RS chain this is chemistry-side use of the T5 J-uniqueness cost: the same $J$ forced by the Recognition Composition Law now scores oxidation-state mismatch against the $D = 3$ Count Law prediction $2^3 - 1 = 7$. It does not itself prove the count; it supplies the cost side of the certificate so auditors can treat "wrong oxidation state" as positive recognition cost rather than an ad-hoc residual.
Switch to Lean above to see the machine-checked source, dependencies, and usage graph.