{
  "protocol": {
    "name": "CVP",
    "version": "1.0.0-proposed",
    "revision": "2026-09-13",
    "spec_sha256": "f62725968356c92930531cd6085db76e216da06e95be53d636b0d2cf3218b148",
    "spec": "https://www.calculatorx.com/developers/cvp/spec/1.0"
  },
  "document_status": "proposed",
  "calculator": {
    "id": "subtraction",
    "version": "1.0.2",
    "title": "Subtraction Calculator",
    "formula_family": "subtraction",
    "capability_id": "math.subtraction",
    "verification_revision": "2026-10-22.subtraction-complete-contract-v3"
  },
  "profile": "core",
  "status": "VERIFIED",
  "verification_status": "VERIFIED",
  "production_freshness": "CURRENT",
  "overall_trust": "VERIFIED",
  "runner": {
    "name": "cvp-runner",
    "version": "1.0.0"
  },
  "environment": {
    "runtime": "node",
    "runtime_version": "22.20.0",
    "numeric_model": "exact_integer",
    "os": "darwin"
  },
  "suite": {
    "id": "subtraction",
    "version": "1.0.2",
    "uri": "https://www.calculatorx.com/evidence/math.subtraction/1.0.2.json",
    "verification_revision": "2026-10-22.subtraction-complete-contract-v3"
  },
  "obligation_set": [
    "CVP-PROV-01",
    "CVP-MODEL-01",
    "CVP-SCOPE-01",
    "CVP-UNIT-01",
    "CVP-REF-01",
    "CVP-GOLD-01",
    "CVP-BND-01",
    "CVP-INV-01",
    "CVP-NUM-01",
    "CVP-COV-01",
    "CVP-CONTRACT-01",
    "CVP-DEP-01",
    "CVP-ART-01",
    "CVP-PROD-01",
    "CVP-PROP-01",
    "CVP-META-01",
    "CVP-ROUND-01",
    "CVP-IFACE-01"
  ],
  "provenance": {
    "mode": "direct",
    "sources": [
      {
        "label": "CalculatorX mathematical conventions",
        "kind": "other",
        "reference": "Long subtraction with regrouping"
      },
      {
        "label": "Margaret Stevens — The Maths Workbook (University of Oxford)",
        "kind": "other",
        "reference": "Chapter 1, §1: Algebraic Expressions and Fractions; §3: Equations",
        "url": "https://www.some.ox.ac.uk/wp-content/uploads/2024/08/Maths-Workbook.pdf"
      }
    ]
  },
  "controls": {
    "CVP-PROV-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "Sources present on evidence"
    },
    "CVP-MODEL-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "a − b = d"
    },
    "CVP-SCOPE-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "Declared partitions are difference, solve-for-minuend, solve-for-subtrahend, long-normal, long-negative-result, invalid-domain — aligned with published capability modes. CPython independently checks full packs, exact scaled-integer differences and column borrowing, including negative-result sign."
    },
    "CVP-UNIT-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "dimensionless"
    },
    "CVP-REF-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "O1 subtraction model + independent CPython O2 complete expected values / numerical behavior"
    },
    "CVP-GOLD-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "6/6 legacy golden; 82/82 oracle-backed numeric"
    },
    "CVP-BND-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "1/1 CVP boundary · 1/1 legacy Evidence boundary"
    },
    "CVP-INV-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "1 Evidence illegal-input + 4/4 oracle-backed error-code (exact_error_match, not ULP)"
    },
    "CVP-NUM-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "82 independent complete packs across binary64 missing-term and exact bounded decimal Long branches; no exhaustive-domain proof. Legacy Evidence `tol` is not this policy."
    },
    "CVP-COV-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "6/6 declared partitions (difference, solve-for-minuend, solve-for-subtrahend, long-normal, long-negative-result, invalid-domain) · 6 legacy golden / 1 CVP boundary unique cases · 1 Evidence invalid-input (may overlap boundary)"
    },
    "CVP-CONTRACT-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "6/6 CVP contract · release-artifacts-aligned=PASS · schema-output-required-declared=PASS · schema-valid-input-executes=PASS · engine-success-output-validates-schema=PASS · schema-rejects-incomplete-input=PASS · rest-success-payload-validates-schema=PASS"
    },
    "CVP-DEP-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "engine subtraction; Node binary64"
    },
    "CVP-ART-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "release_integrity.status=verified · digests: artifact_evidence_sha256=Evidence core (Trust freshness) · cvp_evidence_digest=artifacts.evidence_digest (fingerprint v2) · evidence_bundle_sha256=legacy Evidence JSON bytes · evidence_catalog_digest=attested_catalog_sha256 · production_sha256=bound production report · see artifacts.digest_registry"
    },
    "CVP-PROD-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "this calculator CURRENT · bound snapshot pass @ 2026-10-23T02:35:45.524Z · live site-wide report stale @ 2026-10-23T02:36:37.348Z (5 other capabilities) · local checks pass · attestation_id=dca9793f9ed1f599a644097852f8f6d70c130711c521e71af00409d440f71bfc · This calculator CURRENT · This calculator is not affected · Bound attestation PASS @ 2026-10-23T02:35:45.524Z · Live production status STALE (5 capabilities; 371 remain CURRENT) @ 2026-10-23T02:36:37.348Z · Public schema 1.0.2 matches · Semantic contract ✓ · Production attested · Public/cache ✓ · Origin ✓ · schema_const=1.0.2 · report output-const=pass · evidence-sha256=pass · semantic-contract=pass · capability-html-public-origin-agree=pass · cvp-manifest-public-origin-agree=pass · cvp-latest-alias-agrees=pass · cvp-immutable-manifest-fetch=pass · cvp-immutable-manifest-sha256=pass · cvp-latest-alias-matches-immutable=pass · calculator-html-cvp-projection=pass · evidence-html-cvp-projection=pass · attested_evidence_sha256=5b662e4f79c2491b18c6059302ce20dc20428d229bda79ad0572e086ebd9b39e · verified_at=2026-10-22T10:11:38.122Z · evidence_attested_at=2026-10-22T10:11:38.122Z · last_confirmed_current_at=2026-10-23T02:35:45.524Z · rendered_at=2026-10-23T02:36:37.717Z · binds=cvp_core_sha256",
      "check_result": "PASS",
      "production_state": "CURRENT",
      "binding_current": true
    },
    "CVP-DIM-01": {
      "result": "SKIP",
      "applicability": "not_applicable",
      "notes": "Unitless core calculator — no physical dimension algebra"
    },
    "CVP-PROP-01": {
      "result": "PASS",
      "applicability": "applicable",
      "notes": "2/2 property"
    },
    "CVP-META-01": {
      "result": "PASS",
      "applicability": "applicable",
      "notes": "1/1 metamorphic"
    },
    "CVP-ROUND-01": {
      "result": "PASS",
      "applicability": "applicable",
      "notes": "2/2 round-trips"
    },
    "CVP-XCAL-01": {
      "result": "SKIP",
      "applicability": "not_applicable",
      "notes": "No related calculator in the same formula family / no related-identity peers declared — control not in obligation set"
    },
    "CVP-IFACE-01": {
      "result": "PASS",
      "applicability": "applicable",
      "notes": "UI (SSR) · REST · MCP equivalent (MCP uses calc API handler). ui-ssr is query-result HTML, not a live browser session. Error-path engine·REST·MCP 1/1 (status, code, calculation_version). SSR compared on URL-canonical requested calculations; empty query is idle (not an error) and JSON-typed object/array inputs are REST/MCP-only."
    },
    "CVP-ORACLE-01": {
      "result": "SKIP",
      "applicability": "higher_assurance",
      "notes": "O2 present; O3 not required this wave"
    },
    "CVP-EXP-01": {
      "result": "SKIP",
      "applicability": "optional",
      "notes": "named expert review not performed"
    }
  },
  "interfaces": {
    "compared": [
      "ui-ssr",
      "rest",
      "mcp"
    ],
    "result": "PASS",
    "notes": "UI (SSR) · REST · MCP equivalent (MCP uses calc API handler). ui-ssr is query-result HTML, not a live browser session. Error-path engine·REST·MCP 1/1 (status, code, calculation_version). SSR compared on URL-canonical requested calculations; empty query is idle (not an error) and JSON-typed object/array inputs are REST/MCP-only."
  },
  "artifacts": {
    "evidence_bundle_sha256": "b66bc62ece446e1a76284ab971b49ae6a10be16a3caa6545173a6a576e124934",
    "evidence_digest": "a0f1f4f1c566736c7966eb0769d9d016e4e060ed8723971afcc591accac5bc83",
    "production_sha256": "5b662e4f79c2491b18c6059302ce20dc20428d229bda79ad0572e086ebd9b39e",
    "attested_catalog_sha256": "6378a203c9eb2e133d6b2592bf9741363d732d352c9bd3212fed3a1a50e00af6",
    "production_checks": [
      {
        "id": "math.subtraction:output-const",
        "status": "pass",
        "detail": "output const 1.0.2 vs capability 1.0.2",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-10-22T10:11:38.122Z"
      },
      {
        "id": "math.subtraction:evidence-sha256",
        "status": "pass",
        "detail": "73cea6764fb8",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-10-22T10:11:38.122Z"
      },
      {
        "id": "math.subtraction:semantic-contract",
        "status": "pass",
        "detail": "7/7",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-10-22T10:11:38.122Z"
      },
      {
        "id": "math.subtraction:capability-html-public-origin-agree",
        "status": "pass",
        "detail": "public 1.0.2 vs origin 1.0.2",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-10-22T10:11:38.122Z"
      },
      {
        "id": "math.subtraction:cvp-manifest-public-origin-agree",
        "status": "pass",
        "detail": "math.subtraction/1.0.2/2026-10-22.subtraction-complete-contract-v3/core/a0f1f4f1c566",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-10-22T10:11:38.122Z",
        "projection_compared": false
      },
      {
        "id": "math.subtraction:cvp-latest-alias-agrees",
        "status": "pass",
        "detail": "math.subtraction/1.0.2/2026-10-22.subtraction-complete-contract-v3/core/a0f1f4f1c566",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-10-22T10:11:38.122Z",
        "projection_compared": false
      },
      {
        "id": "math.subtraction:cvp-immutable-manifest-fetch",
        "status": "pass",
        "detail": "public=200 origin=200",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-10-22T10:11:38.122Z"
      },
      {
        "id": "math.subtraction:cvp-immutable-manifest-sha256",
        "status": "pass",
        "detail": "a0f1f4f1c566",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-10-22T10:11:38.122Z"
      },
      {
        "id": "math.subtraction:cvp-latest-alias-matches-immutable",
        "status": "pass",
        "detail": "math.subtraction/1.0.2/2026-10-22.subtraction-complete-contract-v3/core/a0f1f4f1c566",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-10-22T10:11:38.122Z",
        "projection_compared": false
      },
      {
        "id": "math.subtraction:calculator-html-cvp-projection",
        "status": "pass",
        "detail": "matches Trust display",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-10-22T10:11:38.122Z"
      },
      {
        "id": "math.subtraction:evidence-html-cvp-projection",
        "status": "pass",
        "detail": "matches Trust display",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-10-22T10:11:38.122Z"
      }
    ],
    "digest_registry": {
      "digest_algorithm": "sha256",
      "canonicalization": "json-sorted-keys-utf8",
      "entries": [
        {
          "name": "cvp_core_sha256",
          "field": "artifacts.cvp_core_sha256",
          "digest_scope": "cvp_verification_fingerprint_v2",
          "value": "a0f1f4f1c566736c7966eb0769d9d016e4e060ed8723971afcc591accac5bc83",
          "note": "Immutable verification core; excludes attestation/live-status and Evidence contract counts"
        },
        {
          "name": "cvp_evidence_digest",
          "field": "artifacts.evidence_digest",
          "digest_scope": "cvp_verification_fingerprint_v2",
          "value": "a0f1f4f1c566736c7966eb0769d9d016e4e060ed8723971afcc591accac5bc83",
          "note": "Alias of cvp_core_sha256 (historical field name)"
        },
        {
          "name": "artifact_evidence_sha256",
          "field": "release_integrity.digests.evidence_core_sha256",
          "digest_scope": "evidence_artifact_core",
          "value": "73cea6764fb8fb66701c44192bac87dc249e5690978ae6b9e7d3064d0fe4fb18",
          "note": "Published Evidence JSON core — Trust freshness / production bind subject"
        },
        {
          "name": "evidence_catalog_digest",
          "field": "artifacts.attested_catalog_sha256",
          "digest_scope": "capability_catalog",
          "value": "6378a203c9eb2e133d6b2592bf9741363d732d352c9bd3212fed3a1a50e00af6",
          "note": "Capability catalog integrity; site-wide, not per-suite fingerprint"
        }
      ]
    },
    "cvp_core_sha256": "a0f1f4f1c566736c7966eb0769d9d016e4e060ed8723971afcc591accac5bc83"
  },
  "dependencies": [
    {
      "name": "subtraction-engine",
      "version": "1.0.2"
    },
    {
      "name": "subtraction-reference-oracle",
      "version": "1.0.0"
    },
    {
      "name": "node",
      "version": "22.20.0"
    }
  ],
  "attestation": {
    "status": "CURRENT",
    "href": "/.well-known/calculatorx-production-attestation.json",
    "id": "dca9793f9ed1f599a644097852f8f6d70c130711c521e71af00409d440f71bfc",
    "attested_at": "2026-10-22T10:11:38.122Z",
    "last_confirmed_current_at": "2026-10-23T02:35:45.524Z",
    "site_attestation_current": false,
    "capability_attestation_current": true,
    "bound_snapshot_status": "pass",
    "live_report_status": "stale",
    "bound_attested_at": "2026-10-23T02:35:45.524Z",
    "live_updated_at": "2026-10-23T02:36:37.348Z",
    "bound_snapshot": {
      "status": "pass",
      "attested_at": "2026-10-23T02:35:45.524Z",
      "site_stale_count": 5
    },
    "live_site_status": {
      "href": "/.well-known/calculatorx-production-attestation.json"
    },
    "bound_snapshot_site_stale_count": 5,
    "site_stale_capability_count": 5,
    "evidence_attested_at": "2026-10-22T10:11:38.122Z"
  },
  "domain_review": {
    "status": "ABSENT",
    "spec_version": "1.0.2",
    "external_third_party": false,
    "note": "Named expert review not performed"
  },
  "timestamps": {
    "verified_at": "2026-10-22T10:11:38.122Z",
    "generated_at": "2026-10-22T10:11:38.122Z",
    "rendered_at": "2026-10-23T02:36:37.717Z",
    "notes": "verified_at/generated_at mark the first publication of this cvp_core_sha256 (artifacts.evidence_digest alias) for suite verification. evidence_attested_at/attested_at is the first production bind of that core digest. last_confirmed_current_at is the latest site-wide report that still confirms CURRENT. rendered_at is this JSON serialization and is not part of cvp_core_sha256 / evidence_digest. Production attestation binds cvp_core_sha256 (binds evidence_digest). Causal order: verified_at ≤ evidence_attested_at ≤ last_confirmed_current_at. attestation.bound_snapshot.site_stale_count is the site-wide stale capability count at Manifest bind time — not a live value. Fetch attestation.live_site_status.href for the current site report."
  },
  "tests": {
    "golden": {
      "passed": 82,
      "total": 82,
      "failed": 0
    },
    "boundary": {
      "passed": 1,
      "total": 1,
      "failed": 0
    },
    "invalid": {
      "passed": 5,
      "total": 5,
      "failed": 0,
      "comparison": "exact_error_match"
    },
    "property": {
      "passed": 2,
      "total": 2,
      "failed": 0
    },
    "round_trip": {
      "passed": 2,
      "total": 2,
      "failed": 0
    },
    "metamorphic": {
      "passed": 1,
      "total": 1,
      "failed": 0
    },
    "contract": {
      "passed": 6,
      "total": 6,
      "failed": 0
    },
    "cross_interface": {
      "passed": 7,
      "total": 7,
      "failed": 0
    }
  },
  "numerical": {
    "representation": "binary64 Difference; exact scaled-decimal Long display/exact_value; numeric fields approximate",
    "tolerance": {
      "type": "exact",
      "value": 0,
      "declared_before_evaluation": true,
      "rationale": "Complete output packs vs independent CPython Fraction/Decimal/scaled integers; sampled domain, not exhaustive."
    },
    "claim_scope": "82 independent complete packs across binary64 missing-term and exact bounded decimal Long branches; no exhaustive-domain proof.",
    "ulp_applicable": false,
    "exact_mismatches": 0
  },
  "coverage": {
    "partitions": [
      {
        "id": "difference",
        "description": "Difference mode: minuend and subtrahend given, solve a − b",
        "exercised": true,
        "case_count": 45
      },
      {
        "id": "solve-for-minuend",
        "description": "Difference mode: solve minuend from subtrahend and difference",
        "exercised": true,
        "case_count": 8
      },
      {
        "id": "solve-for-subtrahend",
        "description": "Difference mode: solve subtrahend from minuend and difference",
        "exercised": true,
        "case_count": 7
      },
      {
        "id": "long-normal",
        "description": "Long subtraction with non-negative inputs and minuend ≥ subtrahend",
        "exercised": true,
        "case_count": 21
      },
      {
        "id": "long-negative-result",
        "description": "Long subtraction with minuend on top when minuend < subtrahend (negative difference)",
        "exercised": true,
        "case_count": 12
      },
      {
        "id": "invalid-domain",
        "description": "Missing terms, long-mode negatives / scientific notation, invalid mode",
        "exercised": true,
        "case_count": 5
      }
    ]
  },
  "reference": {
    "items": [
      {
        "class": "O1",
        "reference_scope": "model",
        "scope": "model",
        "label": "Subtraction as inverse of addition"
      },
      {
        "class": "O2",
        "reference_scope": "expected_values",
        "scope": "expected_values",
        "label": "Independent CPython Fraction / Decimal / scaled integers",
        "engine": {
          "name": "CPython",
          "precision_bits": 53,
          "independent_of_iut": true,
          "same_runtime_as_iut": false,
          "generator_sha256": "e3c7fe89cbcb5b62ae9874860bd3ed753dd691787a81bc869cf6cf958d2ef546"
        }
      },
      {
        "class": "O2",
        "reference_scope": "numerical_behavior",
        "scope": "numerical_behavior",
        "label": "Independent CPython Fraction / Decimal / scaled integers",
        "engine": {
          "name": "CPython",
          "precision_bits": 53,
          "independent_of_iut": true,
          "same_runtime_as_iut": false,
          "generator_sha256": "e3c7fe89cbcb5b62ae9874860bd3ed753dd691787a81bc869cf6cf958d2ef546"
        }
      }
    ]
  },
  "links": {
    "legacy_evidence": "https://www.calculatorx.com/evidence/math.subtraction/1.0.2.json",
    "evidence_page": "https://www.calculatorx.com/evidence/math.subtraction/1.0.2",
    "calculator": "https://www.calculatorx.com/calc/math/subtraction",
    "schema": "https://www.calculatorx.com/developers/cvp/schema/cvp-evidence-1.0.json",
    "protocol": "https://www.calculatorx.com/developers/cvp/spec/1.0",
    "manifest": "https://www.calculatorx.com/evidence/math.subtraction/1.0.2.cvp.json",
    "manifest_immutable": "https://www.calculatorx.com/evidence/math.subtraction/1.0.2/2026-10-22.subtraction-complete-contract-v3.cvp.json",
    "manifest_core": "https://www.calculatorx.com/evidence/math.subtraction/1.0.2/2026-10-22.subtraction-complete-contract-v3.a0f1f4f1c566.cvp.json"
  },
  "disclosure": {
    "policy": "calculatorx-public-evidence-v1",
    "full_validation": "private",
    "representation": "summary"
  }
}
