{
  "schema_version": "ocme-reviewed-question-reader-v1",
  "question_id": "q-20261011-advance-20261015-r03-domain-codomain-range-0063",
  "pilot_number": "R0013-07238",
  "number": 7238,
  "family_id": "qf-density15-typed-mapping-output-replacement",
  "title": {
    "zh-Hant": "第 7238 題：單格替換與值域增刪",
    "en": "Question 7238: One Output Replacement and Range Additions/Removals"
  },
  "original_question": {
    "schema_version": "ocme-question-v0.1",
    "id": "q-20261011-advance-20261015-r03-domain-codomain-range-0063",
    "batch_id": "batch-20261011-advance-20261015-r03-domain-codomain-range-foundations",
    "language": "zh-Hant",
    "source_mko_ids": [
      "mko-domain-codomain-range"
    ],
    "title_zh": "單格替換與值域增刪",
    "stem_zh": "Fin型別從0起，Fin(3)=[0, 1, 2]，Fin(8)=[0, 1, 2, 3, 4, 5, 6, 7]。原完整合型images=[4, 1, 5]，at=0，新value=7。原表全格先合法，再作替換。求 (舊值, 新表, 新值域, 消失值, 新增值, m)。",
    "answer": {
      "kind": "expression",
      "value": "(4, [7, 1, 5], [1, 5, 7], [4], [7], 8)",
      "explanation_zh": "替換映射表與值域增刪=(4, [7, 1, 5], [1, 5, 7], [4], [7], 8)。保留其餘表格列；新舊值域分別列集合差，同值替換不造新增值。完整總表非部分程式函數，有限表非一般無限集合證明。"
    },
    "difficulty": {
      "band": "upper_secondary",
      "level": 2,
      "skills": [
        "單格替換與值域增刪"
      ]
    },
    "variant": {
      "family_id": "qf-density15-typed-mapping-output-replacement",
      "seed": 202610153063,
      "parameters": {
        "n": 3,
        "m": 8,
        "images": [
          4,
          1,
          5
        ],
        "at": 0,
        "value": 7,
        "domain": "finite_typed_function_data",
        "operation": "density15_typed_mapping_output_replacement",
        "semantic_template": "qf-density15-typed-mapping-output-replacement/[4,[7,1,5],8,[4],[7]]"
      }
    },
    "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-11",
      "contract_version": "ocme-question-factory-v0.1"
    }
  },
  "original_english_edition": {
    "schema_version": "ocme-question-localization-v0.1",
    "question_id": "q-20261011-advance-20261015-r03-domain-codomain-range-0063",
    "batch_id": "batch-20261011-advance-20261015-r03-domain-codomain-range-foundations",
    "locale": "en",
    "translation_state": "ai_candidate",
    "source": {
      "question_sha256": "d7d5be843ae2a6fec1811105abd1e49bcfe830ed5dfd88faf68a1cf1d9ac8a3b",
      "family_id": "qf-density15-typed-mapping-output-replacement",
      "seed": 202610153063,
      "semantic_template": "qf-density15-typed-mapping-output-replacement/[4,[7,1,5],8,[4],[7]]"
    },
    "fields": {
      "title": "One Output Replacement and Range Additions/Removals",
      "stem": "Fin(3)={0,…,2} is the source and Fin(8)={0,…,7} the codomain; complete typed images=[4, 1, 5] are indexed from 0. All entries must be typed, even unused ones. Replace at=0 by new value=7, after checking the whole original table. Give (old output, new table, new range, disappeared values, added values, m).",
      "answer": {
        "kind": "expression",
        "value": "(4, [7, 1, 5], [1, 5, 7], [4], [7], 8)",
        "explanation": "Retain other table entries and compute both directional range differences; replacing by the same value does not manufacture an addition. The exact result, retaining the requested order, is (4, [7, 1, 5], [1, 5, 7], [4], [7], 8)."
      },
      "skills": [
        "One Output Replacement and Range Additions/Removals"
      ],
      "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": "Fin型別從0起，Fin(3)=[0, 1, 2]，Fin(8)=[0, 1, 2, 3, 4, 5, 6, 7]。原完整合型images=[4, 1, 5]，at=0，新value=7。原表全格先合法，再作替換。求 (舊值, 新表, 新值域, 消失值, 新增值, m)。",
        "en": "Fin(3)={0,…,2} is the source and Fin(8)={0,…,7} the codomain; complete typed images=[4, 1, 5] are indexed from 0. All entries must be typed, even unused ones. Replace at=0 by new value=7, after checking the whole original table. Give (old output, new table, new range, disappeared values, added values, m)."
      }
    }
  ],
  "steps": [
    {
      "id": "S001",
      "uses": [
        "G001"
      ],
      "before": "declared types Fin(3)→Fin(8);0-based source labels",
      "after": "domain,codomain and actual range remain distinct",
      "relation": "implies",
      "rule_id": "typed_domain_codomain_data_scope",
      "conditions": [],
      "explanation": {
        "zh-Hant": "Fin(0)是空型別；完整總表不是部分程式函數，實際值域也不自動等於宣告陪域。此處核對有限資料，不冒稱一般無限集合定理。",
        "en": "Fin(0) is empty;a complete total table is not a partial program function,and its actual range need not equal its declared codomain.This audits finite data,not general infinite-set theorems."
      },
      "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": "source index=0∈Fin(3)",
      "after": "image[0]=4∈Fin(8)",
      "relation": "implies",
      "rule_id": "typed_complete_original_table_row",
      "conditions": [],
      "explanation": {
        "zh-Hant": "完整原表的每格都先合型，不只核對稍後會查詢的格。",
        "en": "First type-check every cell of the complete original table,not only cells queried later."
      },
      "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": "S003",
      "uses": [
        "G001",
        "S002"
      ],
      "before": "source index=1∈Fin(3)",
      "after": "image[1]=1∈Fin(8)",
      "relation": "implies",
      "rule_id": "typed_complete_original_table_row",
      "conditions": [],
      "explanation": {
        "zh-Hant": "完整原表的每格都先合型，不只核對稍後會查詢的格。",
        "en": "First type-check every cell of the complete original table,not only cells queried later."
      },
      "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": "S004",
      "uses": [
        "G001",
        "S003"
      ],
      "before": "source index=2∈Fin(3)",
      "after": "image[2]=5∈Fin(8)",
      "relation": "implies",
      "rule_id": "typed_complete_original_table_row",
      "conditions": [],
      "explanation": {
        "zh-Hant": "完整原表的每格都先合型，不只核對稍後會查詢的格。",
        "en": "First type-check every cell of the complete original table,not only cells queried later."
      },
      "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": "S005",
      "uses": [
        "G001",
        "S004"
      ],
      "before": "old table=[4, 1, 5];at=0;new value=7",
      "after": "old output=4;new table=[7, 1, 5]",
      "relation": "implies",
      "rule_id": "typed_single_output_replacement",
      "conditions": [],
      "explanation": {
        "zh-Hant": "只替換指定原格，其餘原表格列保留；同值替換不會改表，原來源資料不就地修改。",
        "en": "Replace only the designated original cell and retain all others.An identical replacement changes nothing;the original source data are not mutated in place."
      },
      "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": "S006",
      "uses": [
        "G001",
        "S005"
      ],
      "before": "old range=[1, 4, 5];new range=[1, 5, 7]",
      "after": "lost=[4];added=[7];declared m=8",
      "relation": "implies",
      "rule_id": "typed_replacement_range_difference",
      "conditions": [],
      "explanation": {
        "zh-Hant": "舊值若仍被其他輸入命中就沒有消失；新增值若早已命中就不新，陪域m永不隨替換而改。",
        "en": "An old value remains if another input still hits it;a replacement value already hit is not new.The declared codomain size m does not change."
      },
      "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": [
      4,
      [
        7,
        1,
        5
      ],
      [
        1,
        5,
        7
      ],
      [
        4
      ],
      [
        7
      ],
      8
    ]
  },
  "conclusion": {
    "canonical_value": "(4, [7, 1, 5], [1, 5, 7], [4], [7], 8)",
    "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-20261011-advance-20261015-r03-domain-codomain-range-foundations",
      "batch_path": "public/data/questions/batches/batch-20261011-advance-20261015-r03-domain-codomain-range-foundations/questions.jsonl",
      "batch_sha256": "4c652a7166afbd0ec4ff7932d1aedd85130eb2e1c5b132fd1a6d51ee0824c47e",
      "original_line": 63,
      "original_line_sha256": "9cf9583b5e098f5f455a5275ec1cf0610b3368c4db5ef09d67055a1f1c3f74d9",
      "question_compact_sha256": "d7d5be843ae2a6fec1811105abd1e49bcfe830ed5dfd88faf68a1cf1d9ac8a3b",
      "english_row_compact_sha256": "7ea50cd919884e93488247313bba815a915d6186d5d52a8fb72c9f435d1a3de7",
      "english_manifest_path": "public/data/i18n/editions/batch-20261011-advance-20261015-r03-domain-codomain-range-foundations.en.json",
      "english_rows_path": "public/data/i18n/questions/batch-20261011-advance-20261015-r03-domain-codomain-range-foundations.en.jsonl"
    },
    "mko_bindings": {
      "mko-domain-codomain-range": {
        "sha256": "94e55c31535caafd763f4e1f805a7da15848c153c844351ec087944dea68d451",
        "english_sha256": "1e8e497051747d1f535313e0ce98ad171f6ab459c72f0d46af1d1592c667bb58",
        "original_path": "public/data/mko/domain-codomain-range.json",
        "english_path": "public/data/i18n/editions/mko-domain-codomain-range.en.json"
      }
    },
    "selected_manifest_sha256": "5233edba9654a6cffd8b6b2d83c932f82ded15f9c0b7c733bd049943e672acff",
    "selected_part_sha256": "944e5a6e7ddc77eb28f9280c1b90da6c7083069b4790cbeb7488d009328efce8",
    "original_candidate_sha256": "91876f1b839bc399c7d5d0350870dc2864c383ae50036811ef1f8a0159199fbb",
    "original_candidate_line_sha256": "91876f1b839bc399c7d5d0350870dc2864c383ae50036811ef1f8a0159199fbb"
  },
  "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-005-p14",
    "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": "e89fc6d4a50a4a7fc942c6c8939a92f835e30105a9a5850e37dd198f31c1ed59",
      "question_first_witness_sha256": "0e1039f4cf022bf35af4e5531651c9a2b7ca7a5fdacac34fb1e4bcd9a81f6299"
    },
    "status": "second_context_reviewed",
    "mathematical_semantics": true,
    "bilingual_semantics": true,
    "steps_reviewed": 6,
    "method": "family_template_semantic_review_plus_independent_per_instance_reconstruction",
    "exact_question_first_check": {
      "model_sha256": "2edff0c9a518c5d09d6dc37155ee59e91f587c558ad619d6911d9ef7b5884afd",
      "arithmetic_steps": 0
    },
    "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."
  }
}
