val_sub
plain-language theorem explainer
Subtraction on RS-native quantities extracts to ordinary real subtraction. Researchers formalizing measurements in Recognition Science cite this simp lemma to simplify expressions involving differences of observables. The proof reduces immediately to reflexivity because subtraction is defined componentwise on the val field.
Claim. Let $U$ be a type. For quantities $a, b$ of type Quantity $U$, the value satisfies $val(a - b) = val(a) - val(b)$.
background
The module establishes a Lean-first measurement scaffold for Recognition Science where core theory uses RS-native units with $τ_0 = 1$. Quantities are real-valued observables tagged by a unit type $U$, equipped with instances for addition and subtraction that operate directly on their val components. The upstream definition of U in RSNativeUnits sets the gauge $τ_0 = 1$ tick, $ℓ_0 = 1$ voxel, $c = 1$.
proof idea
The proof is a direct reflexivity. It follows immediately from the definition of the Sub instance on Quantity, which constructs the difference by subtracting the val fields.
why it matters
This simp theorem provides the algebraic foundation for manipulating measurement differences within the RS-native framework. It supports the explicit protocols for observables described in the module documentation. No downstream uses are recorded yet, but it closes the basic arithmetic for the Quantity type.
Switch to Lean above to see the machine-checked source, dependencies, and usage graph.