SHEET-005 // sovereign-stack
aprender-contracts (pv) — Numerical & SHACL Verification
Quick-reference guide to authoring YAML contracts, running SHACL Core conformance gates, and binding .apr model tolerances.
Verified Companion Code
pub fn check_simplex(probs: &[f64]) -> bool {
let sum: f64 = probs.iter().sum();
probs.iter().all(|&p| (0.0..=1.0).contains(&p)) && (sum - 1.0).abs() <= 1e-6
}
sheet.contract.toml
[sheet] id = "SHEET-005" topic = "aprender-contracts" tool = "pv" max_tolerance = 1e-6
Verified Output & SHA-256 Receipt
$ pv verify sheets/aprender-contracts/simplex.yaml pv: SHEET-005 CONFORMS (simplex invariant verified <= 1e-6)