{
  "capability_id": "math.pythagorean",
  "tool_id": "pythagorean",
  "engine": "pythagorean",
  "calculation_version": "1.1.2",
  "generated_at": "2026-09-21T16:00:36.112Z",
  "engine_build": "2026-09-21",
  "test_count": 16,
  "passed": 16,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 6,
      "passed": 6
    },
    "boundary": {
      "total": 10,
      "passed": 10
    },
    "property": {
      "total": 0,
      "passed": 0
    }
  },
  "engine_tested": true,
  "expert_reviewed": false,
  "internally_reviewed": false,
  "review_kind": null,
  "source_checked": true,
  "reviewed_by": null,
  "reviewer_role": null,
  "last_reviewed": null,
  "expert_review": {
    "status": "optional_not_performed",
    "reviewer": null,
    "scope": [
      "formula",
      "input semantics",
      "assumptions",
      "limitations",
      "sources",
      "tests"
    ],
    "note": "Domain expert review is optional under CVP (CVP-EXP-01). Absence does not block CVP Verified. See Review policy for supplemental domain assurance."
  },
  "internal_review": {
    "status": "not_applicable",
    "reviewer": null
  },
  "page": "https://www.calculatorx.com/calc/math/pythagorean",
  "api": "https://www.calculatorx.com/api/v1/calc/pythagorean",
  "schema_input": "https://www.calculatorx.com/schemas/math.pythagorean.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/math.pythagorean.output.json",
  "assumptions": [
    "Right triangle; positive side lengths.",
    "c > a and c > b when solving for a leg.",
    "Exactly two fields are inputs when solving. Explicit solve_for selects the output. If all three are supplied without solve_for, they are verified rather than overwritten.",
    "Interactive evaluation, shared URLs, and REST use the same engine, solve_for contract, and error codes.",
    "Share URL is canonical: solve_for=a|b|c forces solve even if a leftover third side is present; mode=verify is required to stay in Verify after a tab change."
  ],
  "limitations": [
    "Sides must be positive → SIDE_NOT_POSITIVE",
    "Need two of a,b,c (or verify with three) → MISSING_REQUIRED_INPUT"
  ],
  "boundary_conditions": [
    "Need exactly two known sides to solve the third, or all three to verify",
    "Invalid solve_for → INVALID_SOLVE_FOR",
    "Fewer than two inputs → MISSING_REQUIRED_INPUT",
    "Non-positive side → SIDE_NOT_POSITIVE",
    "c ≤ a or c ≤ b when solving a leg → HYPOTENUSE_TOO_SHORT",
    "All three without solve_for that do not satisfy Pythagoras → status invalid (not overwritten)"
  ],
  "sources": [
    {
      "title": "Euclid, Elements, Book I, Proposition 47",
      "section": "In right-angled triangles the square on the side subtending the right angle is equal to the squares on the sides containing the right angle",
      "url": "https://mathcs.clarku.edu/~djoyce/elements/bookI/propI47.html",
      "supports": "Classical statement of the Pythagorean theorem used as the geometric identity a² + b² = c².",
      "kind": "reference",
      "accessed": "2026-08-28"
    },
    {
      "title": "Right-triangle area",
      "section": "A = ab/2",
      "supports": "Area of a right triangle is half the product of the legs that form the right angle. Perimeter is the sum of the three sides.",
      "kind": "definition"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:a40496b0892cba4f91d0d18120c44036050d53fa19d0629815fa70749cda2bc1",
  "tests": [
    {
      "id": "3-4-5",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 3,
        "b": 4
      },
      "expect": {
        "c": 5,
        "area": 6
      },
      "expectWarning": null,
      "actual": {
        "calculation_version": "1.1.2",
        "status": "success",
        "mode": "solve",
        "solve_for": "c",
        "mode_label": "Solve hypotenuse",
        "formula": "c=√(a²+b²)",
        "heading": "Hypotenuse c",
        "value": 5,
        "a": 3,
        "b": 4,
        "c": 5,
        "area": 6,
        "perimeter": 12,
        "valid": true,
        "message": null,
        "explainer": "c = √(3² + 4²) = 5",
        "inputs_summary": "a=3 · b=4",
        "steps": [
          "a² + b² = c²",
          "3² + 4² = c²",
          "9 + 16 = 25",
          "c = √25 = 5",
          "Area A = ab/2 = 3×4/2 = 6",
          "Perimeter P = a+b+c = 12"
        ],
        "radicand": 25,
        "exact": "5",
        "display": {
          "value": "5",
          "exact": null,
          "a": "3",
          "b": "4",
          "c": "5",
          "area": "6",
          "perimeter": "12"
        },
        "triangle": {
          "a": 3,
          "b": 4,
          "c": 5,
          "highlight": "c",
          "valid": true
        }
      },
      "tol": 1e-9
    },
    {
      "id": "5-13",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 5,
        "c": 13
      },
      "expect": {
        "b": 12
      },
      "expectWarning": null,
      "actual": {
        "calculation_version": "1.1.2",
        "status": "success",
        "mode": "solve",
        "solve_for": "b",
        "mode_label": "Solve leg b",
        "formula": "b=√(c²−a²)",
        "heading": "Leg b",
        "value": 12,
        "a": 5,
        "b": 12,
        "c": 13,
        "area": 30,
        "perimeter": 30,
        "valid": true,
        "message": null,
        "explainer": "b = √(13² − 5²) = 12",
        "inputs_summary": "a=5 · c=13",
        "steps": [
          "a² + b² = c² → b = √(c² − a²)",
          "b = √(13² − 5²) = √144 = 12",
          "Area A = ab/2 = 5×12/2 = 30",
          "Perimeter P = a+b+c = 30"
        ],
        "radicand": 144,
        "exact": "12",
        "display": {
          "value": "12",
          "exact": null,
          "a": "5",
          "b": "12",
          "c": "13",
          "area": "30",
          "perimeter": "30"
        },
        "triangle": {
          "a": 5,
          "b": 12,
          "c": 13,
          "highlight": "b",
          "valid": true
        }
      },
      "tol": 1e-9
    },
    {
      "id": "12-13",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "b": 12,
        "c": 13
      },
      "expect": {
        "a": 5
      },
      "expectWarning": null,
      "actual": {
        "calculation_version": "1.1.2",
        "status": "success",
        "mode": "solve",
        "solve_for": "a",
        "mode_label": "Solve leg a",
        "formula": "a=√(c²−b²)",
        "heading": "Leg a",
        "value": 5,
        "a": 5,
        "b": 12,
        "c": 13,
        "area": 30,
        "perimeter": 30,
        "valid": true,
        "message": null,
        "explainer": "a = √(13² − 12²) = 5",
        "inputs_summary": "b=12 · c=13",
        "steps": [
          "a² + b² = c² → a = √(c² − b²)",
          "a = √(13² − 12²) = √25 = 5",
          "Area A = ab/2 = 5×12/2 = 30",
          "Perimeter P = a+b+c = 30"
        ],
        "radicand": 25,
        "exact": "5",
        "display": {
          "value": "5",
          "exact": null,
          "a": "5",
          "b": "12",
          "c": "13",
          "area": "30",
          "perimeter": "30"
        },
        "triangle": {
          "a": 5,
          "b": 12,
          "c": 13,
          "highlight": "a",
          "valid": true
        }
      },
      "tol": 1e-9
    },
    {
      "id": "7-9",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 7,
        "b": 9
      },
      "expect": {
        "c": 11.40175425099138
      },
      "expectWarning": null,
      "actual": {
        "calculation_version": "1.1.2",
        "status": "success",
        "mode": "solve",
        "solve_for": "c",
        "mode_label": "Solve hypotenuse",
        "formula": "c=√(a²+b²)",
        "heading": "Hypotenuse c",
        "value": 11.40175425099138,
        "a": 7,
        "b": 9,
        "c": 11.40175425099138,
        "area": 31.5,
        "perimeter": 27.40175425099138,
        "valid": true,
        "message": null,
        "explainer": "c = √(7² + 9²) = √130 = 11.401754251",
        "inputs_summary": "a=7 · b=9",
        "steps": [
          "a² + b² = c²",
          "7² + 9² = c²",
          "49 + 81 = 130",
          "c = √130 ≈ 11.401754251",
          "Area A = ab/2 = 7×9/2 = 31.5",
          "Perimeter P = a+b+c = 27.401754251"
        ],
        "radicand": 130,
        "exact": "√130",
        "display": {
          "value": "11.401754251",
          "exact": "√130",
          "a": "7",
          "b": "9",
          "c": "11.401754251",
          "area": "31.5",
          "perimeter": "27.401754251"
        },
        "triangle": {
          "a": 7,
          "b": 9,
          "c": 11.40175425099138,
          "highlight": "c",
          "valid": true
        }
      },
      "tol": 1e-12,
      "tol_type": "absolute"
    },
    {
      "id": "verify-3-4-5",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 3,
        "b": 4,
        "c": 5
      },
      "expect": {
        "mode": "verify",
        "valid": true,
        "c": 5,
        "area": 6,
        "perimeter": 12
      },
      "expectWarning": null,
      "actual": {
        "calculation_version": "1.1.2",
        "status": "success",
        "mode": "verify",
        "solve_for": null,
        "mode_label": "Verify right triangle",
        "formula": "a²+b²=c²",
        "heading": "Valid right triangle",
        "value": 5,
        "a": 3,
        "b": 4,
        "c": 5,
        "area": 6,
        "perimeter": 12,
        "valid": true,
        "message": null,
        "explainer": "3² + 4² = 5²",
        "inputs_summary": "a=3 · b=4 · c=5",
        "steps": [
          "Check a² + b² ≟ c²",
          "3² + 4² = 25",
          "5² = 25",
          "Consistent ✓ (right triangle)",
          "|a²+b²−c²| = 0",
          "Relative error 0 · tolerance 1×10⁻⁶",
          "Area A = ab/2 = 3×4/2 = 6",
          "Perimeter P = a+b+c = 12"
        ],
        "radicand": null,
        "exact": null,
        "display": {
          "value": "5",
          "exact": null,
          "a": "3",
          "b": "4",
          "c": "5",
          "area": "6",
          "perimeter": "12"
        },
        "triangle": {
          "a": 3,
          "b": 4,
          "c": 5,
          "highlight": null,
          "valid": true
        },
        "verify_evidence": {
          "abs_diff": 0,
          "relative": 0,
          "tolerance": 0.000001
        }
      },
      "tol": 1e-9
    },
    {
      "id": "solve-for-c-ignores-extra",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "solve_for": "c",
        "a": 3,
        "b": 4,
        "c": 9
      },
      "expect": {
        "mode": "solve",
        "solve_for": "c",
        "c": 5
      },
      "expectWarning": null,
      "actual": {
        "calculation_version": "1.1.2",
        "status": "success",
        "mode": "solve",
        "solve_for": "c",
        "mode_label": "Solve hypotenuse",
        "formula": "c=√(a²+b²)",
        "heading": "Hypotenuse c",
        "value": 5,
        "a": 3,
        "b": 4,
        "c": 5,
        "area": 6,
        "perimeter": 12,
        "valid": true,
        "message": null,
        "explainer": "c = √(3² + 4²) = 5",
        "inputs_summary": "a=3 · b=4",
        "steps": [
          "a² + b² = c²",
          "3² + 4² = c²",
          "9 + 16 = 25",
          "c = √25 = 5",
          "Area A = ab/2 = 3×4/2 = 6",
          "Perimeter P = a+b+c = 12"
        ],
        "radicand": 25,
        "exact": "5",
        "display": {
          "value": "5",
          "exact": null,
          "a": "3",
          "b": "4",
          "c": "5",
          "area": "6",
          "perimeter": "12"
        },
        "triangle": {
          "a": 3,
          "b": 4,
          "c": 5,
          "highlight": "c",
          "valid": true
        }
      },
      "tol": 1e-9
    },
    {
      "id": "side-not-positive",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": -3,
        "b": 4
      },
      "expectError": "SIDE_NOT_POSITIVE",
      "code": "SIDE_NOT_POSITIVE",
      "error": "Side lengths must be positive."
    },
    {
      "id": "missing-inputs",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 3
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "Enter any two of legs a, b and hypotenuse c, or all three to verify."
    },
    {
      "id": "boundary-py-neg",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": -1,
        "b": 4
      },
      "expectError": "SIDE_NOT_POSITIVE",
      "code": "SIDE_NOT_POSITIVE",
      "error": "Side lengths must be positive."
    },
    {
      "id": "boundary-py-zero",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 0,
        "b": 4
      },
      "expectError": "SIDE_NOT_POSITIVE",
      "code": "SIDE_NOT_POSITIVE",
      "error": "Side lengths must be positive."
    },
    {
      "id": "boundary-py-hyp-eq-leg",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "solve_for": "a",
        "b": 4,
        "c": 4
      },
      "expectError": "HYPOTENUSE_TOO_SHORT",
      "code": "HYPOTENUSE_TOO_SHORT",
      "error": "Hypotenuse c must be longer than leg b."
    },
    {
      "id": "boundary-py-invalid-solve",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "solve_for": "x",
        "a": 3,
        "b": 4
      },
      "expectError": "INVALID_SOLVE_FOR",
      "code": "INVALID_SOLVE_FOR",
      "error": "solve_for must be a, b, or c."
    },
    {
      "id": "boundary-py-overflow",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 1.5e+308,
        "b": 1.5e+308
      },
      "expectError": "RESULT_OVERFLOW",
      "code": "RESULT_OVERFLOW",
      "error": "Result overflowed."
    },
    {
      "id": "boundary-py-huge",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 1e+200,
        "b": 1e+200
      },
      "expect": {
        "c": 1.414213562373095e+200
      },
      "expectWarning": null,
      "actual": {
        "calculation_version": "1.1.2",
        "status": "success",
        "mode": "solve",
        "solve_for": "c",
        "mode_label": "Solve hypotenuse",
        "formula": "c=√(a²+b²)",
        "heading": "Hypotenuse c",
        "value": 1.414213562373095e+200,
        "a": 1e+200,
        "b": 1e+200,
        "c": 1.414213562373095e+200,
        "area": null,
        "perimeter": 3.414213562373095e+200,
        "valid": true,
        "message": null,
        "explainer": "c = √((1e+200)² + (1e+200)²) = √2 × 10²⁰⁰ ≈ 1.414213562373095e+200",
        "inputs_summary": "a=1e+200 · b=1e+200",
        "steps": [
          "a² + b² = c²",
          "c = √((1e+200)² + (1e+200)²)",
          "Equal legs: c = √2 × 10²⁰⁰",
          "c ≈ 1.414213562373095e+200",
          "Area A = ab/2 = 1e+200×1e+200/2 exceeds numeric range",
          "Perimeter P = a+b+c = 3.414213562373095e+200"
        ],
        "radicand": null,
        "exact": "√2 × 10²⁰⁰",
        "display": {
          "value": "1.414213562373095e+200",
          "exact": "√2 × 10²⁰⁰",
          "a": "1e+200",
          "b": "1e+200",
          "c": "1.414213562373095e+200",
          "area": "exceeds numeric range",
          "perimeter": "3.414213562373095e+200"
        },
        "triangle": {
          "a": 1e+200,
          "b": 1e+200,
          "c": 1.414213562373095e+200,
          "highlight": "c",
          "valid": true
        }
      },
      "tol": 0,
      "tol_type": "relative"
    },
    {
      "id": "boundary-py-tiny",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 1e-200,
        "b": 1e-200
      },
      "expect": {
        "c": 1.414213562373095e-200
      },
      "expectWarning": null,
      "actual": {
        "calculation_version": "1.1.2",
        "status": "success",
        "mode": "solve",
        "solve_for": "c",
        "mode_label": "Solve hypotenuse",
        "formula": "c=√(a²+b²)",
        "heading": "Hypotenuse c",
        "value": 1.414213562373095e-200,
        "a": 1e-200,
        "b": 1e-200,
        "c": 1.414213562373095e-200,
        "area": null,
        "perimeter": 3.414213562373095e-200,
        "valid": true,
        "message": null,
        "explainer": "c = √((1e-200)² + (1e-200)²) = √2 × 10⁻²⁰⁰ ≈ 1.41421356e-200",
        "inputs_summary": "a=1e-200 · b=1e-200",
        "steps": [
          "a² + b² = c²",
          "c = √((1e-200)² + (1e-200)²)",
          "Equal legs: c = √2 × 10⁻²⁰⁰",
          "c ≈ 1.41421356e-200",
          "Area A = ab/2 = 1e-200×1e-200/2 exceeds numeric range",
          "Perimeter P = a+b+c = 3.41421356e-200"
        ],
        "radicand": null,
        "exact": "√2 × 10⁻²⁰⁰",
        "display": {
          "value": "1.41421356e-200",
          "exact": "√2 × 10⁻²⁰⁰",
          "a": "1e-200",
          "b": "1e-200",
          "c": "1.41421356e-200",
          "area": "exceeds numeric range",
          "perimeter": "3.41421356e-200"
        },
        "triangle": {
          "a": 1e-200,
          "b": 1e-200,
          "c": 1.414213562373095e-200,
          "highlight": "c",
          "valid": true
        }
      },
      "tol": 1e-12,
      "tol_type": "relative"
    },
    {
      "id": "boundary-py-cancel-leg",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "solve_for": "a",
        "b": 1,
        "c": 1.00000001
      },
      "expect": {
        "a": 0.0001414213561611208
      },
      "expectWarning": null,
      "actual": {
        "calculation_version": "1.1.2",
        "status": "success",
        "mode": "solve",
        "solve_for": "a",
        "mode_label": "Solve leg a",
        "formula": "a=√(c²−b²)",
        "heading": "Leg a",
        "value": 0.0001414213561611208,
        "a": 0.0001414213561611208,
        "b": 1,
        "c": 1.00000001,
        "area": 0.0000707106780805604,
        "perimeter": 2.0001414313561607,
        "valid": true,
        "message": null,
        "explainer": "a = √(1.00000001² − 1²) = √2e-8 = 0.000141421356161",
        "inputs_summary": "b=1 · c=1.00000001",
        "steps": [
          "a² + b² = c² → a = √(c² − b²)",
          "a = √(1.00000001² − 1²) = √2e-8 ≈ 0.000141421356161",
          "Area A = ab/2 = 0.000141421356161×1/2 = 0.0000707106780806",
          "Perimeter P = a+b+c = 2.00014143136"
        ],
        "radicand": 1.999999997845058e-8,
        "exact": "√2e-8",
        "display": {
          "value": "0.000141421356161",
          "exact": "√2e-8",
          "a": "0.000141421356161",
          "b": "1",
          "c": "1.00000001",
          "area": "0.0000707106780806",
          "perimeter": "2.00014143136"
        },
        "triangle": {
          "a": 0.0001414213561611208,
          "b": 1,
          "c": 1.00000001,
          "highlight": "a",
          "valid": true
        }
      },
      "tol": 1e-9,
      "tol_type": "relative"
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 16,
      "total": 16,
      "golden": 6,
      "boundary": 10,
      "property": 0
    },
    "contract_checks": {
      "passed": 6,
      "total": 6
    }
  },
  "evidence_core_generated_at": "2026-09-21T15:54:02.547Z",
  "rendered_at": "2026-09-21T16:00:36.112Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.1.2",
    "artifacts": {
      "engine": "1.1.2",
      "page": "1.1.2",
      "capability": "1.1.2",
      "evidence": "1.1.2",
      "input_schema": "1.1.2",
      "output_schema": "1.1.2",
      "mcp_contract": "1.1.2"
    },
    "digests": {
      "input_schema_sha256": "649f1060999b4745d0b5561292750c09cfe7706499d5aac9a640b1ddd3f27fb5",
      "output_schema_sha256": "8090cd31f6b9ccef124db3d56324b2dc84c07f739dc923e4c9aa2049ced56b94",
      "evidence_sha256": "198fbb91435352b8706d9881836fdbfe4ccf8a3a7713e0b4e62aaa04edb30943",
      "evidence_core_sha256": "198fbb91435352b8706d9881836fdbfe4ccf8a3a7713e0b4e62aaa04edb30943",
      "capability_sha256": "43831e8ef7b6c39e9bb1052528229e4e90b1e6c51ae1be3e0e42987a1869b537",
      "engine_sha256": "925bd3b9c373f747a10f30cedc6352b3f419cf91144ae6744c9c9adcd703033c",
      "mcp_contract_sha256": "2bb4bbc15ea3f9842a9a464e07efcc692dc31f3e830dee8553f3d7c4e81238d3"
    },
    "contract_checks": {
      "total": 6,
      "passed": 6,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.1.2"
        },
        {
          "id": "schema-output-required-declared",
          "status": "pass"
        },
        {
          "id": "schema-valid-input-executes",
          "status": "pass"
        },
        {
          "id": "engine-success-output-validates-schema",
          "status": "pass"
        },
        {
          "id": "schema-rejects-incomplete-input",
          "status": "pass"
        },
        {
          "id": "rest-success-payload-validates-schema",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
