{
  "id": "KL-FCS-003",
  "version": "1.0.0",
  "domain": "Programming-language semantics",
  "kind": "semantics",
  "title": "Replay an arithmetic reduction",
  "problem": "Evaluate (2 × 3) + 4 using left-to-right small-step reduction on integer literals, addition, and multiplication.",
  "specification": {
    "term": [
      "add",
      [
        "mul",
        2,
        3
      ],
      4
    ],
    "rules": "Reduce the left non-literal operand first, then the right; combine two integer literals."
  },
  "claim": {
    "normal_form": 10
  },
  "witness": {
    "trace": [
      [
        "add",
        [
          "mul",
          2,
          3
        ],
        4
      ],
      [
        "add",
        6,
        4
      ],
      10
    ]
  },
  "verification_scope": "Exact reduction replay · 2 steps",
  "explanation": "Every adjacent term must follow the declared reduction rule. The final term is the literal 10 and cannot reduce further.",
  "limitations": "One ground term in a deliberately small language; no general termination or confluence theorem.",
  "verification_status": "mechanically-checked",
  "review_status": "awaiting-independent-review",
  "provenance": {
    "origin": "Original Kenton Labs reference instance, authored with Codex assistance on 2026-10-11.",
    "external_dataset": null,
    "model_run": null
  },
  "references": [
    "https://softwarefoundations.cis.upenn.edu/plf-current/Smallstep.html"
  ],
  "license_status": "not-yet-selected",
  "dataset": {
    "family": "semantics",
    "task": "Evaluate (2 × 3) + 4 using left-to-right small-step reduction on integer literals, addition, and multiplication.",
    "input_encoding": "Structured JSON; field meanings are stated in the specification.",
    "coverage": "Exact reduction replay · 2 steps",
    "acceptance": [
      "Check that the trace begins with the declared syntax tree.",
      "Reduce the left non-literal operand before the right operand.",
      "Apply arithmetic only when both operands are integer literals.",
      "Check each adjacent trace pair and require a terminal integer."
    ],
    "generation": "Deterministic finite fixture; full enumeration or witness replay as stated.",
    "split_policy": "Reference corpus for exposition and reproduction; no train/test evaluation split is claimed."
  },
  "lesson": {
    "motivation": "Turn an expression’s meaning into an inspectable sequence of rule applications. Evaluation order belongs to the specification.",
    "definitions": [
      {
        "term": "Term",
        "definition": "An integer literal or an add/mul syntax node."
      },
      {
        "term": "Small step",
        "definition": "One permitted local reduction, under an explicitly chosen evaluation context."
      },
      {
        "term": "Normal form",
        "definition": "A term with no further reduction; here it is an integer literal."
      }
    ],
    "reasoning": [
      "Check that the trace begins with the declared syntax tree.",
      "Reduce the left non-literal operand before the right operand.",
      "Apply arithmetic only when both operands are integer literals.",
      "Check each adjacent trace pair and require a terminal integer."
    ],
    "worked_example": "Every adjacent term must follow the declared reduction rule. The final term is the literal 10 and cannot reduce further.",
    "complexity": "Replay costs one reduction per arithmetic node, plus traversal to find the next reducible node.",
    "common_error": "A final number alone does not certify the declared evaluation sequence.",
    "further_work": "Introduce variables, environments, conditionals, and explicit stuck-state outcomes."
  },
  "related_ids": [
    "KL-FCS-016",
    "KL-FCS-017"
  ]
}
