{
  "capability_id": "math.lcm",
  "tool_id": "lcm",
  "engine": "lcm",
  "calculation_version": "1.0.3",
  "generated_at": "2026-09-16T22:03:43.771Z",
  "engine_build": "2026-09-16",
  "test_count": 20,
  "passed": 20,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 6,
      "passed": 6
    },
    "boundary": {
      "total": 7,
      "passed": 7
    },
    "property": {
      "total": 7,
      "passed": 7
    }
  },
  "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/lcm",
  "api": "https://www.calculatorx.com/api/v1/calc/lcm",
  "schema_input": "https://www.calculatorx.com/schemas/math.lcm.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/math.lcm.output.json",
  "assumptions": [
    "Integer inputs; negatives treated by absolute value.",
    "If any input is 0, LCM = 0. LCM(0,0)=0 is a CalculatorX/Python convention, not a GCF-identity derivation.",
    "For nonzero inputs the result is a positive integer."
  ],
  "limitations": [
    "Integers only; negatives treated by absolute value",
    "Each integer ≤ 48 decimal digits (product bound, not a mathematical bound)",
    "If any input is 0, LCM = 0. LCM(0,0)=0 is a CalculatorX/Python convention (not a GCF-identity derivation)",
    "Need at least two numbers → NEED_TWO_NUMBERS",
    "Non-integers → INVALID_NUMBER",
    "Integers beyond MAX_SAFE_INTEGER must be decimal strings in JSON"
  ],
  "boundary_conditions": [
    "Need at least two numbers → NEED_TWO_NUMBERS",
    "Missing list → MISSING_REQUIRED_INPUT",
    "Non-integers rejected → INVALID_NUMBER",
    "More than 48 digits → VALUE_ABOVE_MAX",
    "Any zero → LCM = 0"
  ],
  "sources": [
    {
      "title": "Encyclopedia of Mathematics — Least common multiple",
      "section": "Definition; pairwise fold; relation to GCD",
      "url": "https://encyclopediaofmath.org/wiki/Least_common_multiple",
      "supports": "LCM of n integers via pairwise fold; lcm(a,b)·gcd(a,b)=|ab| for nonzero a,b",
      "kind": "reference"
    },
    {
      "title": "Python math.lcm — zero convention",
      "section": "If any argument is zero, LCM = 0",
      "url": "https://docs.python.org/3/library/math.html#math.lcm",
      "supports": "Any zero argument → 0; LCM(0,0)=0 is that convention, not |a/GCF(a,b)×b| (GCF(0,0)=0)",
      "kind": "reference"
    },
    {
      "title": "CalculatorX integer convention",
      "section": "Absolute value; 48-digit BigInt domain; divide-first identity",
      "supports": "Negatives by |n|; exact BigInt with a product digit cap; LCM(a,b)=|a/GCF(a,b)×b|",
      "kind": "definition"
    }
  ],
  "methods": [
    "Pairwise GCF-identity fold (canonical engine; divide before multiply)",
    "Prime-factor LCM (cross-check when every |n| ≤ 1,000,000 and none is 0)",
    "Listing multiples (cross-check when LCM ≤ 5,000 and every |n| ≤ 500)"
  ],
  "fingerprint": "sha256:62a0e9019643f335db75c98d5c88ecee0126aa9f73cf7bf254e05ebe0a8df03d",
  "tests": [
    {
      "id": "pair",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "values": [
          8,
          12
        ]
      },
      "expect": {
        "value": 24,
        "exact": "24"
      },
      "expectWarning": null,
      "actual": {
        "values": [
          8,
          12
        ],
        "value": 24,
        "exact": "24",
        "count": 2,
        "formula": "LCM(a,b,c,…) = LCM(LCM(a,b),c,…)",
        "binary_formula": "LCM(a,b)=|a/GCF(a,b)×b|",
        "zero_formula": "If any input is 0, LCM = 0",
        "methods": {
          "listing": {
            "available": true,
            "result": 24,
            "matches": true
          },
          "prime": {
            "available": true,
            "result": 24,
            "matches": true
          },
          "gcf": {
            "available": true,
            "result": 24,
            "matches": true
          },
          "agree": true,
          "independent_count": 3
        },
        "work": {
          "listing": [
            "--- Listing multiples ---",
            "8: 8, 16, [24]",
            "12: 12, [24]",
            "First common multiple: 24"
          ],
          "primes": [
            "--- Prime factorization ---",
            "8 = 2 × 2 × 2 = 2^3",
            "12 = 2 × 2 × 3 = 2^2 × 3",
            "Highest powers: 2^3 × 3 = 24"
          ],
          "gcf": [
            "--- GCF method ---",
            "GCF(8, 12) = 4",
            "LCM = (8 / 4) × 12 = 24"
          ]
        },
        "max_digits": 48
      },
      "tol": 0
    },
    {
      "id": "via-gcf",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "values": [
          6,
          10
        ]
      },
      "expect": {
        "value": 30
      },
      "expectWarning": null,
      "actual": {
        "values": [
          6,
          10
        ],
        "value": 30,
        "exact": "30",
        "count": 2,
        "formula": "LCM(a,b,c,…) = LCM(LCM(a,b),c,…)",
        "binary_formula": "LCM(a,b)=|a/GCF(a,b)×b|",
        "zero_formula": "If any input is 0, LCM = 0",
        "methods": {
          "listing": {
            "available": true,
            "result": 30,
            "matches": true
          },
          "prime": {
            "available": true,
            "result": 30,
            "matches": true
          },
          "gcf": {
            "available": true,
            "result": 30,
            "matches": true
          },
          "agree": true,
          "independent_count": 3
        },
        "work": {
          "listing": [
            "--- Listing multiples ---",
            "6: 6, 12, 18, 24, [30]",
            "10: 10, 20, [30]",
            "First common multiple: 30"
          ],
          "primes": [
            "--- Prime factorization ---",
            "6 = 2 × 3 = 2 × 3",
            "10 = 2 × 5 = 2 × 5",
            "Highest powers: 2 × 3 × 5 = 30"
          ],
          "gcf": [
            "--- GCF method ---",
            "GCF(6, 10) = 2",
            "LCM = (6 / 2) × 10 = 30"
          ]
        },
        "max_digits": 48
      },
      "tol": 0
    },
    {
      "id": "triple",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "values": [
          12,
          18,
          30
        ]
      },
      "expect": {
        "value": 180
      },
      "expectWarning": null,
      "actual": {
        "values": [
          12,
          18,
          30
        ],
        "value": 180,
        "exact": "180",
        "count": 3,
        "formula": "LCM(a,b,c,…) = LCM(LCM(a,b),c,…)",
        "binary_formula": "LCM(a,b)=|a/GCF(a,b)×b|",
        "zero_formula": "If any input is 0, LCM = 0",
        "methods": {
          "listing": {
            "available": true,
            "result": 180,
            "matches": true
          },
          "prime": {
            "available": true,
            "result": 180,
            "matches": true
          },
          "gcf": {
            "available": true,
            "result": 180,
            "matches": true
          },
          "agree": true,
          "independent_count": 3
        },
        "work": {
          "listing": [
            "--- Listing multiples ---",
            "12: 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, 168, [180]",
            "18: 18, 36, 54, 72, 90, 108, 126, 144, 162, [180]",
            "30: 30, 60, 90, 120, 150, [180]",
            "First common multiple: 180"
          ],
          "primes": [
            "--- Prime factorization ---",
            "12 = 2 × 2 × 3 = 2^2 × 3",
            "18 = 2 × 3 × 3 = 2 × 3^2",
            "30 = 2 × 3 × 5 = 2 × 3 × 5",
            "Highest powers: 2^2 × 3^2 × 5 = 180"
          ],
          "gcf": [
            "--- GCF method ---",
            "Fold pairwise: LCM(LCM(…), next)",
            "GCF(12, 18) = 6",
            "LCM(12, 18) = (12 / 6) × 18 = 36",
            "GCF(36, 30) = 6",
            "LCM(36, 30) = (36 / 6) × 30 = 180"
          ]
        },
        "max_digits": 48
      },
      "tol": 0
    },
    {
      "id": "with-zero",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "values": [
          0,
          5
        ]
      },
      "expect": {
        "value": 0
      },
      "expectWarning": null,
      "actual": {
        "values": [
          0,
          5
        ],
        "value": 0,
        "exact": "0",
        "count": 2,
        "formula": "LCM(a,b,c,…) = LCM(LCM(a,b),c,…)",
        "binary_formula": "LCM(a,b)=|a/GCF(a,b)×b|",
        "zero_formula": "If any input is 0, LCM = 0",
        "methods": {
          "listing": {
            "available": false,
            "result": null
          },
          "prime": {
            "available": false,
            "result": null
          },
          "gcf": {
            "available": true,
            "result": 0,
            "matches": true
          },
          "agree": true,
          "independent_count": 1
        },
        "work": {
          "listing": [],
          "primes": [],
          "gcf": [
            "--- GCF method ---",
            "If any input is 0, LCM = 0",
            "LCM(0, 5) = 0"
          ]
        },
        "max_digits": 48
      },
      "tol": 0
    },
    {
      "id": "bigint-unsafe",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "values": [
          "9007199254740993",
          3
        ]
      },
      "expect": {
        "value": "9007199254740993"
      },
      "expectWarning": null,
      "actual": {
        "values": [
          "9007199254740993",
          3
        ],
        "value": "9007199254740993",
        "exact": "9007199254740993",
        "count": 2,
        "formula": "LCM(a,b,c,…) = LCM(LCM(a,b),c,…)",
        "binary_formula": "LCM(a,b)=|a/GCF(a,b)×b|",
        "zero_formula": "If any input is 0, LCM = 0",
        "methods": {
          "listing": {
            "available": false,
            "result": null
          },
          "prime": {
            "available": false,
            "result": null
          },
          "gcf": {
            "available": true,
            "result": "9007199254740993",
            "matches": true
          },
          "agree": true,
          "independent_count": 1
        },
        "work": {
          "listing": [],
          "primes": [],
          "gcf": [
            "--- GCF method ---",
            "GCF(9007199254740993, 3) = 3",
            "LCM = (9007199254740993 / 3) × 3 = 9007199254740993"
          ]
        },
        "max_digits": 48
      },
      "tol": 0
    },
    {
      "id": "numsInput",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "numsInput": "8, 12"
      },
      "expect": {
        "value": 24
      },
      "expectWarning": null,
      "actual": {
        "values": [
          8,
          12
        ],
        "value": 24,
        "exact": "24",
        "count": 2,
        "formula": "LCM(a,b,c,…) = LCM(LCM(a,b),c,…)",
        "binary_formula": "LCM(a,b)=|a/GCF(a,b)×b|",
        "zero_formula": "If any input is 0, LCM = 0",
        "methods": {
          "listing": {
            "available": true,
            "result": 24,
            "matches": true
          },
          "prime": {
            "available": true,
            "result": 24,
            "matches": true
          },
          "gcf": {
            "available": true,
            "result": 24,
            "matches": true
          },
          "agree": true,
          "independent_count": 3
        },
        "work": {
          "listing": [
            "--- Listing multiples ---",
            "8: 8, 16, [24]",
            "12: 12, [24]",
            "First common multiple: 24"
          ],
          "primes": [
            "--- Prime factorization ---",
            "8 = 2 × 2 × 2 = 2^3",
            "12 = 2 × 2 × 3 = 2^2 × 3",
            "Highest powers: 2^3 × 3 = 24"
          ],
          "gcf": [
            "--- GCF method ---",
            "GCF(8, 12) = 4",
            "LCM = (8 / 4) × 12 = 24"
          ]
        },
        "max_digits": 48
      },
      "tol": 0
    },
    {
      "id": "boundary-one-number",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "values": [
          8
        ]
      },
      "expectError": "NEED_TWO_NUMBERS",
      "code": "NEED_TWO_NUMBERS",
      "error": "Enter at least two integers."
    },
    {
      "id": "boundary-missing",
      "ok": true,
      "kind": "boundary",
      "inputs": {},
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "Enter at least two integers, separated by commas or spaces."
    },
    {
      "id": "boundary-non-integer",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "values": [
          8.5,
          12
        ]
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "Non-integers are rejected."
    },
    {
      "id": "boundary-alias-numsInput",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "numsInput": "8, 12"
      },
      "expect": {
        "value": 24,
        "exact": "24"
      },
      "expectWarning": null,
      "actual": {
        "values": [
          8,
          12
        ],
        "value": 24,
        "exact": "24",
        "count": 2,
        "formula": "LCM(a,b,c,…) = LCM(LCM(a,b),c,…)",
        "binary_formula": "LCM(a,b)=|a/GCF(a,b)×b|",
        "zero_formula": "If any input is 0, LCM = 0",
        "methods": {
          "listing": {
            "available": true,
            "result": 24,
            "matches": true
          },
          "prime": {
            "available": true,
            "result": 24,
            "matches": true
          },
          "gcf": {
            "available": true,
            "result": 24,
            "matches": true
          },
          "agree": true,
          "independent_count": 3
        },
        "work": {
          "listing": [
            "--- Listing multiples ---",
            "8: 8, 16, [24]",
            "12: 12, [24]",
            "First common multiple: 24"
          ],
          "primes": [
            "--- Prime factorization ---",
            "8 = 2 × 2 × 2 = 2^3",
            "12 = 2 × 2 × 3 = 2^2 × 3",
            "Highest powers: 2^3 × 3 = 24"
          ],
          "gcf": [
            "--- GCF method ---",
            "GCF(8, 12) = 4",
            "LCM = (8 / 4) × 12 = 24"
          ]
        },
        "max_digits": 48
      },
      "tol": null
    },
    {
      "id": "boundary-all-zero",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "values": [
          0,
          0
        ]
      },
      "expect": {
        "value": 0
      },
      "expectWarning": null,
      "actual": {
        "values": [
          0,
          0
        ],
        "value": 0,
        "exact": "0",
        "count": 2,
        "formula": "LCM(a,b,c,…) = LCM(LCM(a,b),c,…)",
        "binary_formula": "LCM(a,b)=|a/GCF(a,b)×b|",
        "zero_formula": "If any input is 0, LCM = 0",
        "methods": {
          "listing": {
            "available": false,
            "result": null
          },
          "prime": {
            "available": false,
            "result": null
          },
          "gcf": {
            "available": true,
            "result": 0,
            "matches": true
          },
          "agree": true,
          "independent_count": 1
        },
        "work": {
          "listing": [],
          "primes": [],
          "gcf": [
            "--- GCF method ---",
            "If any input is 0, LCM = 0",
            "LCM(0, 0) = 0"
          ]
        },
        "max_digits": 48
      },
      "tol": null
    },
    {
      "id": "boundary-bigint-unsafe",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "values": [
          "9007199254740993",
          "3"
        ]
      },
      "expect": {
        "value": "9007199254740993"
      },
      "expectWarning": null,
      "actual": {
        "values": [
          "9007199254740993",
          3
        ],
        "value": "9007199254740993",
        "exact": "9007199254740993",
        "count": 2,
        "formula": "LCM(a,b,c,…) = LCM(LCM(a,b),c,…)",
        "binary_formula": "LCM(a,b)=|a/GCF(a,b)×b|",
        "zero_formula": "If any input is 0, LCM = 0",
        "methods": {
          "listing": {
            "available": false,
            "result": null
          },
          "prime": {
            "available": false,
            "result": null
          },
          "gcf": {
            "available": true,
            "result": "9007199254740993",
            "matches": true
          },
          "agree": true,
          "independent_count": 1
        },
        "work": {
          "listing": [],
          "primes": [],
          "gcf": [
            "--- GCF method ---",
            "GCF(9007199254740993, 3) = 3",
            "LCM = (9007199254740993 / 3) × 3 = 9007199254740993"
          ]
        },
        "max_digits": 48
      },
      "tol": null
    },
    {
      "id": "boundary-negatives",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "values": [
          -8,
          12
        ]
      },
      "expect": {
        "value": 24
      },
      "expectWarning": null,
      "actual": {
        "values": [
          -8,
          12
        ],
        "value": 24,
        "exact": "24",
        "count": 2,
        "formula": "LCM(a,b,c,…) = LCM(LCM(a,b),c,…)",
        "binary_formula": "LCM(a,b)=|a/GCF(a,b)×b|",
        "zero_formula": "If any input is 0, LCM = 0",
        "methods": {
          "listing": {
            "available": true,
            "result": 24,
            "matches": true
          },
          "prime": {
            "available": true,
            "result": 24,
            "matches": true
          },
          "gcf": {
            "available": true,
            "result": 24,
            "matches": true
          },
          "agree": true,
          "independent_count": 3
        },
        "work": {
          "listing": [
            "--- Listing multiples ---",
            "8: 8, 16, [24]",
            "12: 12, [24]",
            "First common multiple: 24"
          ],
          "primes": [
            "--- Prime factorization ---",
            "8 = 2 × 2 × 2 = 2^3",
            "12 = 2 × 2 × 3 = 2^2 × 3",
            "Highest powers: 2^3 × 3 = 24"
          ],
          "gcf": [
            "--- GCF method ---",
            "GCF(8, 12) = 4",
            "LCM = (8 / 4) × 12 = 24"
          ]
        },
        "max_digits": 48
      },
      "tol": null
    },
    {
      "id": "property-commutative-fold",
      "ok": true,
      "kind": "property",
      "detail": "LCM(8,12) = LCM(12,8) = 24",
      "expect": 24,
      "actual": 24
    },
    {
      "id": "property-three-methods-agree",
      "ok": true,
      "kind": "property",
      "detail": "listing, prime, and GCF identity all return 24",
      "expect": 24,
      "actual": 24
    },
    {
      "id": "property-zero-annihilates",
      "ok": true,
      "kind": "property",
      "detail": "LCM(0,12,18) = 0",
      "expect": 0,
      "actual": 0
    },
    {
      "id": "property-gcf-identity",
      "ok": true,
      "kind": "property",
      "detail": "LCM(8,12)×GCF(8,12) = |8×12|",
      "expect": 96,
      "actual": 96
    },
    {
      "id": "property-bigint-beyond-safe-integer",
      "ok": true,
      "kind": "property",
      "detail": "LCM(9007199254740993, 3) = 9007199254740993 (BigInt; IEEE-754 Number would round)",
      "expect": "9007199254740993",
      "actual": "9007199254740993"
    },
    {
      "id": "property-pairwise-associative",
      "ok": true,
      "kind": "property",
      "detail": "LCM(LCM(12,18),30) = LCM(12,18,30)",
      "expect": 180,
      "actual": 180
    },
    {
      "id": "property-multiple-of-each",
      "ok": true,
      "kind": "property",
      "detail": "24 is a multiple of 8 and 12",
      "expect": 0,
      "actual": 0
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 20,
      "total": 20,
      "golden": 6,
      "boundary": 7,
      "property": 7
    },
    "contract_checks": {
      "passed": 3,
      "total": 3
    }
  },
  "evidence_core_generated_at": "2026-09-16T06:41:00.884Z",
  "rendered_at": "2026-09-16T22:03:43.771Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.0.3",
    "artifacts": {
      "engine": "1.0.3",
      "page": "1.0.3",
      "capability": "1.0.3",
      "evidence": "1.0.3",
      "input_schema": "1.0.3",
      "output_schema": "1.0.3",
      "mcp_contract": "1.0.3"
    },
    "digests": {
      "input_schema_sha256": "406a5bb31353872aa4fe85e38681683b0888c28cf55e160479c44d913b2e2676",
      "output_schema_sha256": "f1ed2b6e695a6cfece646896e9d9bedd8a4f1bb989bcbf17c38ca66e061106cf",
      "evidence_sha256": "7b50edb47d98b007d36e4b83a73a2c05fcad714bb6a79303c600193beba90cfb",
      "evidence_core_sha256": "7b50edb47d98b007d36e4b83a73a2c05fcad714bb6a79303c600193beba90cfb",
      "capability_sha256": "8dd6d1fb2f3bf27c50a82956cef5943cca3edddc3cf20a5283dfa0b0f77e61c3",
      "engine_sha256": "c8d4ccdbfeaf61d7b024d4e1babb0c2ba3b324c1b37bd0cb456a526d8d2b1bd1",
      "mcp_contract_sha256": "863098b311a7b17dc4b229a6302b90b3545b175f716e5d84772c7be8e9716b86"
    },
    "contract_checks": {
      "total": 3,
      "passed": 3,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.0.3"
        },
        {
          "id": "schema-valid-input-executes",
          "status": "pass"
        },
        {
          "id": "engine-success-output-validates-schema",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
