Replay an arithmetic reductionExact reduction replay · 2 steps
The problem
Evaluate (2 × 3) + 4 using left-to-right small-step reduction on integer literals, addition, and multiplication.
The checked result
Normal form: 10.
Every adjacent term must follow the declared reduction rule. The final term is the literal 10 and cannot reduce further.
Why the checker accepts it
- 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.
Formal specification
{
"term": [
"add",
[
"mul",
2,
3
],
4
],
"rules": "Reduce the left non-literal operand first, then the right; combine two integer literals."
}Claim and evidence
{
"claim": {
"normal_form": 10
},
"witness": {
"trace": [
[
"add",
[
"mul",
2,
3
],
4
],
[
"add",
6,
4
],
10
]
}
}Dataset construction
Deterministic finite fixture; full enumeration or witness replay as stated. Structured JSON; field meanings are stated in the specification. Acceptance covers 2 checker units for this record; the unit type is stated in its verification scope.
Complexity and limits
Replay costs one reduction per arithmetic node, plus traversal to find the next reducible node.
One ground term in a deliberately small language; no general termination or confluence theorem.
A boundary to investigate
A final number alone does not certify the declared evaluation sequence. Introduce variables, environments, conditionals, and explicit stuck-state outcomes.