{
  "schema_version": "ocme-reviewed-question-reader-v1",
  "question_id": "q-20261008-advance-20261011-r03-variable-expression-0030",
  "pilot_number": "R0008-04755",
  "number": 4755,
  "family_id": "qf-density11-expression-simultaneous-swap",
  "title": {
    "zh-Hant": "第 4755 題：兩變數同時交換的有序值",
    "en": "Question 4755: Simultaneous Variable Swap"
  },
  "original_question": {
    "schema_version": "ocme-question-v0.1",
    "id": "q-20261008-advance-20261011-r03-variable-expression-0030",
    "batch_id": "batch-20261008-advance-20261011-r03-variable-expression-foundations",
    "language": "zh-Hant",
    "source_mko_ids": [
      "mko-variable-expression"
    ],
    "title_zh": "兩變數同時交換的有序值",
    "stem_zh": "有理數Q；表達式非方程式，E(x,y)=5x+(-4)y，x=2、y=7。以同時代換交換x與y，依序求原值與交換值的整數對。",
    "answer": {
      "kind": "expression",
      "value": "(-18, 27)",
      "explanation_zh": "同時交換有序值=(-18, 27)。兩個新環境同時從原環境取得，不逐步覆寫；先後代換不能冒充同時交換。"
    },
    "difficulty": {
      "band": "upper_secondary",
      "level": 1,
      "skills": [
        "兩變數同時交換的有序值"
      ]
    },
    "variant": {
      "family_id": "qf-density11-expression-simultaneous-swap",
      "seed": 202610113030,
      "parameters": {
        "a": 5,
        "b": -4,
        "x": 2,
        "y": 7,
        "operation": "density11_expression_simultaneous_swap",
        "domain": "typed_Q_two_variable_slice",
        "semantic_template": "qf-density11-expression-simultaneous-swap/[-4,5,7,2]"
      }
    },
    "verification": {
      "status": "candidate",
      "checks": [
        "producer_exact_integer_rational_arithmetic",
        "producer_finite_enumeration",
        "producer_source_snapshot_check",
        "producer_substantive_template_deduplication",
        "producer_json_schema"
      ],
      "warning_zh": "僅為產生端候選及自檢；主端須另做獨立驗收，不構成人工審定、普遍證明或形式 Evidence。"
    },
    "provenance": {
      "generator_role": "question_producer",
      "generator_model": "model_unknown",
      "generated_at": "2026-10-08",
      "contract_version": "ocme-question-factory-v0.1"
    }
  },
  "original_english_edition": {
    "schema_version": "ocme-question-localization-v0.1",
    "question_id": "q-20261008-advance-20261011-r03-variable-expression-0030",
    "batch_id": "batch-20261008-advance-20261011-r03-variable-expression-foundations",
    "locale": "en",
    "translation_state": "ai_candidate",
    "source": {
      "question_sha256": "f8e11a68b5d4bb11cd6422677ff3a1a9341670d056b66004c10faf679198d928",
      "family_id": "qf-density11-expression-simultaneous-swap",
      "seed": 202610113030,
      "semantic_template": "qf-density11-expression-simultaneous-swap/[-4,5,7,2]"
    },
    "fields": {
      "title": "Simultaneous Variable Swap",
      "stem": "All operations and evaluations are exact in Q, not truncated natural-number arithmetic. E(x,y)=(5)x+(-4)y, x=2, y=7. Swap x and y simultaneously; give (original value, swapped value) as integers.",
      "answer": {
        "kind": "expression",
        "value": "(-18, 27)",
        "explanation": "Both new bindings come from the original environment; sequential overwriting is not simultaneous substitution. The exact result, retaining the requested order, is (-18, 27)."
      },
      "skills": [
        "Simultaneous Variable Swap"
      ],
      "verification_warning": "This is a candidate exercise. Mechanical recomputation checks only the stated conditions and this instance; it is neither a formal proof nor human review."
    }
  },
  "givens": [
    {
      "id": "G001",
      "text": {
        "zh-Hant": "有理數Q；表達式非方程式，E(x,y)=5x+(-4)y，x=2、y=7。以同時代換交換x與y，依序求原值與交換值的整數對。",
        "en": "All operations and evaluations are exact in Q, not truncated natural-number arithmetic. E(x,y)=(5)x+(-4)y, x=2, y=7. Swap x and y simultaneously; give (original value, swapped value) as integers."
      }
    }
  ],
  "steps": [
    {
      "id": "S001",
      "uses": [
        "G001"
      ],
      "before": "typed rational expression and explicitly given environment",
      "after": "evaluation,not solving an equation",
      "relation": "implies",
      "rule_id": "expression_environment_scope",
      "conditions": [],
      "explanation": {
        "zh-Hant": "表達式求值不是求解方程式；只把明示環境代入，不反推未知根或擅改綁定。",
        "en": "Evaluating an expression is not solving an equation;substitute only the supplied environment without inventing roots or changing bindings."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "回到原始資料與本步條件核對，不把單向推論誤稱等價。",
          "en": "Check against the original data and this step's premises; a one-way implication is not an equivalence."
        }
      },
      "arithmetic": null
    },
    {
      "id": "S002",
      "uses": [
        "G001",
        "S001"
      ],
      "before": "original first term := mul(5, 2)",
      "after": "original first term = 10",
      "relation": "calculation",
      "rule_id": "exact_rational_arithmetic",
      "conditions": [],
      "explanation": {
        "zh-Hant": "第一係數乘目前環境的第一分量。",
        "en": "Multiply the first coefficient by the current environment's first component."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "以精確有理數重算 original first term，不以小數近似替代。",
          "en": "Recompute original first term with exact rational arithmetic, not rounded decimals."
        }
      },
      "arithmetic": {
        "operation": "mul",
        "inputs": [
          "5",
          "2"
        ],
        "output": "10",
        "label": "original first term"
      }
    },
    {
      "id": "S003",
      "uses": [
        "G001",
        "S002"
      ],
      "before": "original second term := mul(-4, 7)",
      "after": "original second term = -28",
      "relation": "calculation",
      "rule_id": "exact_rational_arithmetic",
      "conditions": [],
      "explanation": {
        "zh-Hant": "第二係數乘同一環境的第二分量。",
        "en": "Multiply the second coefficient by the second component of that same environment."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "以精確有理數重算 original second term，不以小數近似替代。",
          "en": "Recompute original second term with exact rational arithmetic, not rounded decimals."
        }
      },
      "arithmetic": {
        "operation": "mul",
        "inputs": [
          "-4",
          "7"
        ],
        "output": "-28",
        "label": "original second term"
      }
    },
    {
      "id": "S004",
      "uses": [
        "G001",
        "S003"
      ],
      "before": "original full value := sum(10, -28)",
      "after": "original full value = -18",
      "relation": "calculation",
      "rule_id": "exact_rational_arithmetic",
      "conditions": [],
      "explanation": {
        "zh-Hant": "兩項相加得到此環境值。",
        "en": "Add the two terms to evaluate this environment."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "以精確有理數重算 original full value，不以小數近似替代。",
          "en": "Recompute original full value with exact rational arithmetic, not rounded decimals."
        }
      },
      "arithmetic": {
        "operation": "sum",
        "inputs": [
          "10",
          "-28"
        ],
        "output": "-18",
        "label": "original full value"
      }
    },
    {
      "id": "S005",
      "uses": [
        "G001",
        "S004"
      ],
      "before": "simultaneously swapped first term := mul(5, 7)",
      "after": "simultaneously swapped first term = 35",
      "relation": "calculation",
      "rule_id": "exact_rational_arithmetic",
      "conditions": [],
      "explanation": {
        "zh-Hant": "第一係數乘目前環境的第一分量。",
        "en": "Multiply the first coefficient by the current environment's first component."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "以精確有理數重算 simultaneously swapped first term，不以小數近似替代。",
          "en": "Recompute simultaneously swapped first term with exact rational arithmetic, not rounded decimals."
        }
      },
      "arithmetic": {
        "operation": "mul",
        "inputs": [
          "5",
          "7"
        ],
        "output": "35",
        "label": "simultaneously swapped first term"
      }
    },
    {
      "id": "S006",
      "uses": [
        "G001",
        "S005"
      ],
      "before": "simultaneously swapped second term := mul(-4, 2)",
      "after": "simultaneously swapped second term = -8",
      "relation": "calculation",
      "rule_id": "exact_rational_arithmetic",
      "conditions": [],
      "explanation": {
        "zh-Hant": "第二係數乘同一環境的第二分量。",
        "en": "Multiply the second coefficient by the second component of that same environment."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "以精確有理數重算 simultaneously swapped second term，不以小數近似替代。",
          "en": "Recompute simultaneously swapped second term with exact rational arithmetic, not rounded decimals."
        }
      },
      "arithmetic": {
        "operation": "mul",
        "inputs": [
          "-4",
          "2"
        ],
        "output": "-8",
        "label": "simultaneously swapped second term"
      }
    },
    {
      "id": "S007",
      "uses": [
        "G001",
        "S006"
      ],
      "before": "simultaneously swapped full value := sum(35, -8)",
      "after": "simultaneously swapped full value = 27",
      "relation": "calculation",
      "rule_id": "exact_rational_arithmetic",
      "conditions": [],
      "explanation": {
        "zh-Hant": "兩項相加得到此環境值。",
        "en": "Add the two terms to evaluate this environment."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "以精確有理數重算 simultaneously swapped full value，不以小數近似替代。",
          "en": "Recompute simultaneously swapped full value with exact rational arithmetic, not rounded decimals."
        }
      },
      "arithmetic": {
        "operation": "sum",
        "inputs": [
          "35",
          "-8"
        ],
        "output": "27",
        "label": "simultaneously swapped full value"
      }
    },
    {
      "id": "S008",
      "uses": [
        "G001",
        "S007"
      ],
      "before": "old environment=(x=2,y=7)",
      "after": "new environment=(x=7,y=2);old unchanged",
      "relation": "implies",
      "rule_id": "simultaneous_substitution_snapshot",
      "conditions": [],
      "explanation": {
        "zh-Hant": "兩個新分量同時讀舊環境；不可先寫x←y再令y讀取已改的x，否則不是真交換。",
        "en": "Both new components read the old environment;assigning x←y before letting y read the modified x would not be a genuine swap."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "回到原始資料與本步條件核對，不把單向推論誤稱等價。",
          "en": "Check against the original data and this step's premises; a one-way implication is not an equivalence."
        }
      },
      "arithmetic": null
    }
  ],
  "math_model": {
    "result": [
      "-18",
      "27"
    ],
    "new_environment": [
      7,
      2
    ]
  },
  "conclusion": {
    "canonical_value": "(-18, 27)",
    "explanation": {
      "zh-Hant": "依上列完整代值及條件核對得到原題答案；原題編號、格式與狀態保持不變。",
      "en": "The full substitutions and premise checks give the original answer; source identity,format and status are unchanged."
    }
  },
  "definition_note": {
    "zh-Hant": "沿用原題明示的論域、假設與來源 MKO 定義。本題已完成第二對話數理與中英語義覆核，並由原始參數逐題獨立重算模型、答案與每個算術步驟；原題仍為 candidate。",
    "en": "Use the original question domain, assumptions and cited MKO definitions. This item has second-context mathematical and bilingual review, with the model, answer and every arithmetic step independently recomputed from the original parameters; the source question remains a candidate."
  },
  "source": {
    "input_commit": "0f7be61e2c22317a4075561dc822c87d881a50db",
    "question_binding": {
      "batch_id": "batch-20261008-advance-20261011-r03-variable-expression-foundations",
      "batch_path": "public/data/questions/batches/batch-20261008-advance-20261011-r03-variable-expression-foundations/questions.jsonl",
      "batch_sha256": "62cfe30aaffc9d75ac212c2a5a4338aa58a8acb9aa7a328ac228475f96d02fb6",
      "original_line": 30,
      "original_line_sha256": "1a5ccf96991fdeb52ae32f7ad55fd8505b92fb66e10c8f1ed9846cd99470928b",
      "question_compact_sha256": "f8e11a68b5d4bb11cd6422677ff3a1a9341670d056b66004c10faf679198d928",
      "english_row_compact_sha256": "cba05ace8a48e2d1f4b2919238d1bef5788391e5cf7cc12399068e408c9b3245",
      "english_manifest_path": "public/data/i18n/editions/batch-20261008-advance-20261011-r03-variable-expression-foundations.en.json",
      "english_rows_path": "public/data/i18n/questions/batch-20261008-advance-20261011-r03-variable-expression-foundations.en.jsonl"
    },
    "mko_bindings": {
      "mko-variable-expression": {
        "sha256": "da4b6e4a4edfd379a38b6535fd3030cc5c552e2b549572c0d4733d68974a292c",
        "english_sha256": "4a8cfbcc1fa5d73c360d18a95f35f69578250d0104baf76036f4efc8de9d7e81",
        "original_path": "public/data/mko/variable-expression.json",
        "english_path": "public/data/i18n/editions/mko-variable-expression.en.json"
      }
    },
    "selected_manifest_sha256": "5233edba9654a6cffd8b6b2d83c932f82ded15f9c0b7c733bd049943e672acff",
    "selected_part_sha256": "6dc34e24b0f43c50e49365ca1a1153175f8661d5290c9236df5527bb047157eb",
    "original_candidate_sha256": "c4bf8f3991c7701613356d3bc99a7b95769f512ba81b1965a6ea63147b4f5889",
    "original_candidate_line_sha256": "c4bf8f3991c7701613356d3bc99a7b95769f512ba81b1965a6ea63147b4f5889"
  },
  "historical_source_state": {
    "review_state": {
      "derivation": "candidate_authored_and_locally_checked",
      "source_question_state": "candidate",
      "independent_AI_or_human_review": "NOT_PERFORMED",
      "formalization": "not_formalized",
      "Lean": "NOT_RUN"
    },
    "scope_note": {
      "zh-Hant": "來源綁定教學推導候選；精確核對不等於獨立AI／人工審查或一般形式證明。原題、答案、MKO、公式、AST與歷史不變。",
      "en": "Source-bound pedagogical derivation candidate.Exact checking is not independent AI/human review or general formal proof.Original questions,answers,MKOs,formulas,ASTs and history remain unchanged."
    },
    "label": "Frozen producer metadata; current per-question review is separate below."
  },
  "revision": {
    "id": "review-20261026-004-p9",
    "review_date": "2026-10-26",
    "owner_authorized_reader_publication": true,
    "scope": "One hundred sixty family prototypes and their mathematical/bilingual reasoning variants, stems, boundary statements and every distinct explanation shape were reviewed in a context independent of the producer; parameter substitutions, source bindings, full math models, both answer strings and every arithmetic step were independently reconstructed per question from the original parameters only, with negative controls. This grouped method does not claim a separate literal AI reading of every repeated sentence or an extra AI voter.",
    "review_receipts": {
      "semantic_review_sha256": "b6e05a3e8193a93db505dbf337528fca72e2e41528b1e92b698a3f0683d74289",
      "question_first_witness_sha256": "caa8693baf0b91acd09a20215d1aa6954ae513fc0b0814f26ac1c8c834b60d67"
    },
    "status": "second_context_reviewed",
    "mathematical_semantics": true,
    "bilingual_semantics": true,
    "steps_reviewed": 8,
    "method": "family_template_semantic_review_plus_independent_per_instance_reconstruction",
    "exact_question_first_check": {
      "model_sha256": "72baae7170920b2d6d12207ca6f6ec5643bbaa6a9c938e02abd0904d1343a7bf",
      "arithmetic_steps": 6
    },
    "uses_answer_as_premise": false,
    "human_review": "NOT_PERFORMED",
    "formalization": "not_formalized",
    "Lean": "NOT_RUN",
    "Canonical_truth_promotion": false,
    "authority": "Owner-authorized reviewed reader publication; original question/candidate states remain historical and unchanged."
  }
}
