{
  "protocol": {
    "name": "CVP",
    "version": "1.0.0-proposed"
  },
  "document_status": "proposed",
  "calculator": {
    "id": "factorial",
    "version": "1.0.2",
    "title": "Factorial Calculator",
    "formula_family": "factorial",
    "capability_id": "math.factorial",
    "verification_revision": "2026-09-08.exact-integer-profile"
  },
  "profile": "core",
  "status": "VERIFIED",
  "runner": {
    "name": "cvp-runner",
    "version": "1.0.0"
  },
  "environment": {
    "runtime": "node",
    "runtime_version": "20.19.2",
    "numeric_model": "exact_integer",
    "os": "darwin"
  },
  "suite": {
    "id": "factorial",
    "version": "1.0.2",
    "uri": "https://www.calculatorx.com/evidence/math.factorial/1.0.2.json",
    "verification_revision": "2026-09-08.exact-integer-profile"
  },
  "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-IFACE-01"
  ],
  "provenance": {
    "mode": "direct",
    "sources": [
      {
        "label": "NIST Digital Library of Mathematical Functions, Chapter 5",
        "kind": "other",
        "reference": "Gamma Function",
        "url": "https://dlmf.nist.gov/5"
      },
      {
        "label": "NIST DLMF §5.4",
        "kind": "other",
        "reference": "Special values and extrema",
        "url": "https://dlmf.nist.gov/5.4"
      },
      {
        "label": "CalculatorX mathematical conventions",
        "kind": "other",
        "reference": "Domain 0 ≤ n ≤ 5000; exact BigInt n!"
      }
    ]
  },
  "controls": {
    "CVP-PROV-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "Sources present on evidence"
    },
    "CVP-MODEL-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "n! exact BigInt product; acceptance is exact decimal-string identity"
    },
    "CVP-SCOPE-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "0 ≤ n ≤ 5000 ordinary factorial"
    },
    "CVP-UNIT-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "dimensionless integer"
    },
    "CVP-REF-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "O1 model + O3 Python math.factorial expected_values/numerical_behavior (exact decimal identity) + O2 Node BigInt live oracle (same_runtime_as_iut)"
    },
    "CVP-GOLD-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "8/8 legacy golden; 6/6 oracle-backed numeric"
    },
    "CVP-BND-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "7/7 boundary"
    },
    "CVP-INV-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "6 invalid-domain cases"
    },
    "CVP-NUM-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "exact_integer · BigInt · exact_equality (actual exact decimal string === independent oracle exact decimal string); mismatches=0; ULP not applicable"
    },
    "CVP-COV-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "2/2 declared partitions (factorial, invalid-domain) · 8 golden / 7 boundary unique cases · 6 Evidence invalid-input (may overlap boundary)"
    },
    "CVP-CONTRACT-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "1/1 contract checks"
    },
    "CVP-DEP-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "engine factorial; exact_integer BigInt (IUT/O2) · CPython int (O3). Node is a runtime dependency, not the numeric model"
    },
    "CVP-ART-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "release_integrity.status=verified · evidence_digest=CVP verification fingerprint v2 (canonical inputs, expected/actual/status, policy, versions; independent of generated_at) · evidence_bundle_sha256=legacy Evidence JSON bytes · production_sha256=bound production attestation report"
    },
    "CVP-PROD-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "CURRENT · site report pass · local checks pass · attestation_id=00c818a77ba026c2d6aa3f7402680cd2dac2a40a816209600bc3c3fcd0b8921c · CURRENT · 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-reproduce-manifest-agree=pass · calculator-html-cvp-projection=pass · evidence-html-cvp-projection=pass · attested_evidence_sha256=9424f31d3ca937ec4a453e41479201945df6495214f0a220ebb742e7fd1c3f20"
    },
    "CVP-DIM-01": {
      "result": "SKIP",
      "applicability": "not_applicable",
      "notes": "Unitless core calculator — no physical dimension algebra"
    },
    "CVP-PROP-01": {
      "result": "PASS",
      "applicability": "applicable",
      "notes": "19/19 property"
    },
    "CVP-META-01": {
      "result": "PASS",
      "applicability": "applicable",
      "notes": "5/5 metamorphic"
    },
    "CVP-ROUND-01": {
      "result": "SKIP",
      "applicability": "not_applicable",
      "notes": "No inverse / round-trip vectors in pack — control not in obligation set"
    },
    "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."
    },
    "CVP-ORACLE-01": {
      "result": "PASS",
      "applicability": "higher_assurance",
      "notes": "O3 23/23 tabulated vectors vs IUT · Exact decimal-string identity vs Python math.factorial on the 23 published tabulated vectors (named 0,1,5,10,20,100,5000 plus 16 seeded n in 0–4999). 5000! is verified as the full 16,326-digit value and as SHA-256 of those ASCII digits. This is not a whole-domain proof beyond the published table."
    },
    "CVP-EXP-01": {
      "result": "SKIP",
      "applicability": "optional",
      "notes": "expert_reviewed=false"
    }
  },
  "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."
  },
  "artifacts": {
    "evidence_bundle_sha256": "7ad8a59d00fff52fff82d15030018e2c54612f472d070f73f9cd7388fe13cf10",
    "evidence_digest": "b7065c58307c3477dc76583b92ad80a0fffcbe5c4ed3ec567d0cd56fa6edf1a6",
    "production_sha256": "9424f31d3ca937ec4a453e41479201945df6495214f0a220ebb742e7fd1c3f20",
    "attested_catalog_sha256": "e03ef81b30568018b171fd1fc4757c2abe9df7220d9ff35bbaf08038d7630cdb",
    "production_checks": [
      {
        "id": "math.factorial: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-09-10T02:52:51.379Z"
      },
      {
        "id": "math.factorial:evidence-sha256",
        "status": "pass",
        "detail": "dbb73a668bdd",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-09-10T02:52:51.379Z"
      },
      {
        "id": "math.factorial:semantic-contract",
        "status": "pass",
        "detail": "24/24",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-09-10T02:52:51.379Z"
      },
      {
        "id": "math.factorial: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-09-10T02:52:51.379Z"
      },
      {
        "id": "math.factorial:cvp-manifest-public-origin-agree",
        "status": "pass",
        "detail": "math.factorial/1.0.2/2026-09-08.exact-integer-profile/core/b7065c58307c",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-09-10T02:52:51.379Z",
        "projection_compared": false,
        "observed_live_projection_at_attestation": "VERIFIED"
      },
      {
        "id": "math.factorial:cvp-reproduce-manifest-agree",
        "status": "pass",
        "detail": "2026-09-08.exact-integer-profile · f96ef604c13d",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-09-10T02:52:51.379Z"
      },
      {
        "id": "math.factorial:calculator-html-cvp-projection",
        "status": "pass",
        "detail": "matches Manifest",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-09-10T02:52:51.379Z"
      },
      {
        "id": "math.factorial:evidence-html-cvp-projection",
        "status": "pass",
        "detail": "matches Manifest",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-09-10T02:52:51.379Z"
      }
    ]
  },
  "dependencies": [
    {
      "name": "factorial-engine",
      "version": "1.0.2"
    },
    {
      "name": "factorial-reference-oracle",
      "version": "1.0.0"
    },
    {
      "name": "factorial-python-math-o3",
      "version": "factorial-python-math-o3"
    },
    {
      "name": "node",
      "version": "20.19.2"
    }
  ],
  "attestation": {
    "status": "CURRENT",
    "href": "/.well-known/calculatorx-production-attestation.json",
    "id": "00c818a77ba026c2d6aa3f7402680cd2dac2a40a816209600bc3c3fcd0b8921c",
    "attested_at": "2026-09-10T02:52:51.379Z"
  },
  "domain_review": {
    "status": "ABSENT",
    "spec_version": "1.0.2"
  },
  "timestamps": {
    "verified_at": "2026-09-10T03:41:46.760Z",
    "generated_at": "2026-09-10T03:41:46.760Z"
  },
  "tests": {
    "golden": {
      "passed": 6,
      "total": 6,
      "failed": 0
    },
    "boundary": {
      "passed": 7,
      "total": 7,
      "failed": 0
    },
    "invalid": {
      "passed": 6,
      "total": 6,
      "failed": 0
    },
    "property": {
      "passed": 19,
      "total": 19,
      "failed": 0
    },
    "round_trip": {
      "passed": 0,
      "total": 0,
      "failed": 0
    },
    "metamorphic": {
      "passed": 5,
      "total": 5,
      "failed": 0
    },
    "contract": {
      "passed": 1,
      "total": 1,
      "failed": 0
    },
    "cross_interface": {
      "passed": 1,
      "total": 1,
      "failed": 0
    },
    "o3": {
      "passed": 23,
      "total": 23,
      "failed": 0,
      "claim_scope": "Exact decimal-string identity vs Python math.factorial on the 23 published tabulated vectors (named 0,1,5,10,20,100,5000 plus 16 seeded n in 0–4999). 5000! is verified as the full 16,326-digit value and as SHA-256 of those ASCII digits. This is not a whole-domain proof beyond the published table.",
      "table_sha256": "f96ef604c13d8e4da222c3e1e5347cb80273ab2b4b5f794c5a23cb956ba4a9a6",
      "exact_mismatches": 0,
      "criterion": "actual exact decimal string === independent oracle exact decimal string"
    }
  },
  "numerical": {
    "representation": "exact_integer",
    "tolerance": {
      "type": "exact",
      "value": 0,
      "declared_before_evaluation": true,
      "rationale": "Ordinary n! is an exact integer. Acceptance is exact decimal-string identity vs independent oracles (O2 Node BigInt product; O3 Python math.factorial). Comparison is exact_equality; ULP is not applicable. Node/V8 is a runtime dependency, not the numeric model. Declared a priori."
    },
    "claim_scope": "Exact decimal-string identity vs Python math.factorial on the 23 published tabulated vectors (named 0,1,5,10,20,100,5000 plus 16 seeded n in 0–4999). 5000! is verified as the full 16,326-digit value and as SHA-256 of those ASCII digits. This is not a whole-domain proof beyond the published table.",
    "profile": "exact_integer",
    "arithmetic": "BigInt",
    "comparison": "exact_equality",
    "criterion": "actual exact decimal string === independent oracle exact decimal string",
    "exact_policy": true,
    "ulp_applicable": false,
    "exact_mismatches": 0
  },
  "coverage": {
    "partitions": [
      {
        "id": "factorial",
        "description": "n! compute",
        "exercised": true,
        "case_count": 71
      },
      {
        "id": "invalid-domain",
        "description": "Invalid inputs",
        "exercised": true,
        "case_count": 6
      }
    ]
  },
  "reference": {
    "items": [
      {
        "class": "O1",
        "reference_scope": "model",
        "scope": "model",
        "label": "Ordinary nonnegative integer factorial"
      },
      {
        "class": "O3",
        "reference_scope": "expected_values",
        "scope": "expected_values",
        "label": "Precomputed Python math.factorial table — CPython arbitrary-precision int, not Node BigInt and not IEEE-754 binary64",
        "engine": {
          "name": "factorial-python-math-o3",
          "library": "Python 3.13.5 math.factorial",
          "numeric_model": "CPython arbitrary-precision int — not IEEE-754 binary64",
          "criterion": "actual exact decimal string === independent oracle exact decimal string",
          "independent_of_iut": true,
          "same_runtime_as_iut": false,
          "generator_version": "1.0.0",
          "generator_sha256": "de8c1b59ea29ed21ee36376627208b80872710dfa87b27bb367a39fdc609a782",
          "table_sha256": "f96ef604c13d8e4da222c3e1e5347cb80273ab2b4b5f794c5a23cb956ba4a9a6"
        }
      },
      {
        "class": "O3",
        "reference_scope": "numerical_behavior",
        "scope": "numerical_behavior",
        "label": "Same O3 table vs IUT exact decimal string; identity match (not ULP). 5000! is the published domain maximum.",
        "engine": {
          "name": "factorial-python-math-o3",
          "library": "Python 3.13.5 math.factorial",
          "numeric_model": "CPython arbitrary-precision int — not IEEE-754 binary64",
          "criterion": "actual exact decimal string === independent oracle exact decimal string",
          "independent_of_iut": true,
          "same_runtime_as_iut": false,
          "generator_version": "1.0.0",
          "generator_sha256": "de8c1b59ea29ed21ee36376627208b80872710dfa87b27bb367a39fdc609a782",
          "table_sha256": "f96ef604c13d8e4da222c3e1e5347cb80273ab2b4b5f794c5a23cb956ba4a9a6"
        }
      },
      {
        "class": "O2",
        "reference_scope": "expected_values",
        "scope": "expected_values",
        "label": "Separate-module factorial oracle — independent Node BigInt product (same runtime as IUT)",
        "engine": {
          "name": "factorial-reference",
          "numeric_model": "exact_integer",
          "criterion": "actual exact decimal string === independent oracle exact decimal string",
          "independent_of_iut": true,
          "same_runtime_as_iut": true
        }
      },
      {
        "class": "O2",
        "reference_scope": "numerical_behavior",
        "scope": "numerical_behavior",
        "label": "Same O2 module backs exact decimal-string identity vs IUT — exact_equality, ULP not applicable",
        "engine": {
          "name": "factorial-reference",
          "numeric_model": "exact_integer",
          "criterion": "actual exact decimal string === independent oracle exact decimal string",
          "independent_of_iut": true,
          "same_runtime_as_iut": true
        }
      }
    ]
  },
  "links": {
    "legacy_evidence": "https://www.calculatorx.com/evidence/math.factorial/1.0.2.json",
    "evidence_page": "https://www.calculatorx.com/evidence/math.factorial/1.0.2",
    "calculator": "https://www.calculatorx.com/calc/math/factorial",
    "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.factorial/1.0.2.cvp.json",
    "manifest_immutable": "https://www.calculatorx.com/evidence/math.factorial/1.0.2/2026-09-08.exact-integer-profile.cvp.json",
    "reproduce": "https://www.calculatorx.com/evidence/math.factorial/reproduce"
  },
  "disclosure": {
    "policy": "calculatorx-public-evidence-v1",
    "full_validation": "private",
    "representation": "summary"
  }
}
