{
  "schema_version": "ocme-reviewed-question-reader-v1",
  "question_id": "q-20261008-advance-20261012-r07-function-mapping-0061",
  "pilot_number": "R0010-05511",
  "number": 5511,
  "family_id": "qf-density12-mapping-candidate-evaluation",
  "title": {
    "zh-Hant": "第 5511 題：有序查詢的型別資格與值",
    "en": "Question 5511: Typed Candidate Evaluation of a Total Map"
  },
  "original_question": {
    "schema_version": "ocme-question-v0.1",
    "id": "q-20261008-advance-20261012-r07-function-mapping-0061",
    "batch_id": "batch-20261008-advance-20261012-r07-function-mapping-foundations",
    "language": "zh-Hant",
    "source_mko_ids": [
      "mko-function-mapping"
    ],
    "title_zh": "有序查詢的型別資格與值",
    "stem_zh": "完整有限總映射 f:Fin(2)→Fin(2)，索引從0；images=[0, 1]。queries=[100, 0, 0]。依序答 (合法來源型別資格列表, 合法者輸出值或不合型別)，型別外不求f值。",
    "answer": {
      "kind": "expression",
      "value": "([否, 是, 是], [不合型別, 0, 0])",
      "explanation_zh": "查詢型別資格與值=([否, 是, 是], [不合型別, 0, 0])。先核來源索引才讀表，不把域外查詢當未定義函數輸入；非部分程式函數。"
    },
    "difficulty": {
      "band": "upper_secondary",
      "level": 2,
      "skills": [
        "有序查詢的型別資格與值"
      ]
    },
    "variant": {
      "family_id": "qf-density12-mapping-candidate-evaluation",
      "seed": 202610127061,
      "parameters": {
        "n": 2,
        "m": 2,
        "images": [
          0,
          1
        ],
        "queries": [
          100,
          0,
          0
        ],
        "operation": "density12_mapping_candidate_evaluation",
        "domain": "finite_total_mapping_protocol",
        "semantic_template": "qf-density12-mapping-candidate-evaluation/[[\"untyped\"],[\"typed\",0],[\"typed\",0]]"
      }
    },
    "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-20261012-r07-function-mapping-0061",
    "batch_id": "batch-20261008-advance-20261012-r07-function-mapping-foundations",
    "locale": "en",
    "translation_state": "ai_candidate",
    "source": {
      "question_sha256": "79cb0ea9d71099da30f7cef091d50b26faf750ea1133b70244807fa0c5ece593",
      "family_id": "qf-density12-mapping-candidate-evaluation",
      "seed": 202610127061,
      "semantic_template": "qf-density12-mapping-candidate-evaluation/[[\"untyped\"],[\"typed\",0],[\"typed\",0]]"
    },
    "fields": {
      "title": "Typed Candidate Evaluation of a Total Map",
      "stem": "The complete total map f:Fin(2)→Fin(2) has images=[0, 1] indexed from 0; Fin(2)={0,…,1}. Every table entry must lie in the target type. Ordered queries=[100, 0, 0]. Give (legal-source-type mask, outputs for typed queries or ill-typed); do not evaluate f outside its source type.",
      "answer": {
        "kind": "expression",
        "value": "([No, Yes, Yes], [ill-typed, 0, 0])",
        "explanation": "Check the source index before reading the table; an outside-type candidate is not an undefined input of this total function. The exact result, retaining the requested order, is ([No, Yes, Yes], [ill-typed, 0, 0])."
      },
      "skills": [
        "Typed Candidate Evaluation of a Total Map"
      ],
      "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": "完整有限總映射 f:Fin(2)→Fin(2)，索引從0；images=[0, 1]。queries=[100, 0, 0]。依序答 (合法來源型別資格列表, 合法者輸出值或不合型別)，型別外不求f值。",
        "en": "The complete total map f:Fin(2)→Fin(2) has images=[0, 1] indexed from 0; Fin(2)={0,…,1}. Every table entry must lie in the target type. Ordered queries=[100, 0, 0]. Give (legal-source-type mask, outputs for typed queries or ill-typed); do not evaluate f outside its source type."
      }
    }
  ],
  "steps": [
    {
      "id": "S001",
      "uses": [
        "G001"
      ],
      "before": "f:Fin(2)→Fin(2);source indices start at0",
      "after": "complete total map,not a partial program function",
      "relation": "implies",
      "rule_id": "total_finite_mapping_scope",
      "conditions": [],
      "explanation": {
        "zh-Hant": "每個合法來源元素恰有一個陪域內值；Fin(0)是空型別，域外查詢不合型別，不是合法輸入的部分函數空洞。",
        "en": "Every legal source element has one codomain value.Fin(0) is empty;an outside query is ill-typed,not a hole of a partial function at a legal input."
      },
      "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": "f input=0∈Fin(2)",
      "after": "f(0)=0∈Fin(2)",
      "relation": "implies",
      "rule_id": "complete_mapping_entry",
      "conditions": [],
      "explanation": {
        "zh-Hant": "完整核對每個表項的來源及陪域資格，未查詢的項也不能非法。",
        "en": "Audit source and codomain eligibility for every entry;an unqueried entry may not be illegal."
      },
      "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": "f input=1∈Fin(2)",
      "after": "f(1)=1∈Fin(2)",
      "relation": "implies",
      "rule_id": "complete_mapping_entry",
      "conditions": [],
      "explanation": {
        "zh-Hant": "完整核對每個表項的來源及陪域資格，未查詢的項也不能非法。",
        "en": "Audit source and codomain eligibility for every entry;an unqueried entry may not be illegal."
      },
      "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": "query=100;0≤query<2=否",
      "after": "value=不合型別",
      "relation": "implies",
      "rule_id": "mapping_query_type_guard",
      "conditions": [],
      "explanation": {
        "zh-Hant": "先核來源型別才讀表；負索引不准讀最後一項，域外數也不准補造f值。",
        "en": "Check source typing before table access;a negative index may not read the last entry,and an outside index may not acquire an invented f-value."
      },
      "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": "query=0;0≤query<2=是",
      "after": "value=0",
      "relation": "implies",
      "rule_id": "mapping_query_type_guard",
      "conditions": [],
      "explanation": {
        "zh-Hant": "先核來源型別才讀表；負索引不准讀最後一項，域外數也不准補造f值。",
        "en": "Check source typing before table access;a negative index may not read the last entry,and an outside index may not acquire an invented f-value."
      },
      "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": "query=0;0≤query<2=是",
      "after": "value=0",
      "relation": "implies",
      "rule_id": "mapping_query_type_guard",
      "conditions": [],
      "explanation": {
        "zh-Hant": "先核來源型別才讀表；負索引不准讀最後一項，域外數也不准補造f值。",
        "en": "Check source typing before table access;a negative index may not read the last entry,and an outside index may not acquire an invented f-value."
      },
      "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": [
      [
        false,
        true,
        true
      ],
      [
        "不合型別",
        0,
        0
      ]
    ]
  },
  "conclusion": {
    "canonical_value": "([否, 是, 是], [不合型別, 0, 0])",
    "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-20261012-r07-function-mapping-foundations",
      "batch_path": "public/data/questions/batches/batch-20261008-advance-20261012-r07-function-mapping-foundations/questions.jsonl",
      "batch_sha256": "37b7f1f791b76c79f8565271927c13bc33d4c471e6c21c12196d8dfc284d099f",
      "original_line": 61,
      "original_line_sha256": "2a4e358008d427038b1764c84923f4c6999dc939b4ab4e94c29e6669a1ed93c0",
      "question_compact_sha256": "79cb0ea9d71099da30f7cef091d50b26faf750ea1133b70244807fa0c5ece593",
      "english_row_compact_sha256": "34c9dad9312275d990a9cbe7648dc9f9eee06623fcfcbcfb3803d1cd98c8c4be",
      "english_manifest_path": "public/data/i18n/editions/batch-20261008-advance-20261012-r07-function-mapping-foundations.en.json",
      "english_rows_path": "public/data/i18n/questions/batch-20261008-advance-20261012-r07-function-mapping-foundations.en.jsonl"
    },
    "mko_bindings": {
      "mko-function-mapping": {
        "sha256": "f103408037c3680d770316d998ec3b92d19797f2865d8c94fa74efaf38bbc2b0",
        "english_sha256": "d94512a955a174d5185733591c5b2d72ff09a0546f48e27a9024138e9275b64b",
        "original_path": "public/data/mko/function-mapping.json",
        "english_path": "public/data/i18n/editions/mko-function-mapping.en.json"
      }
    },
    "selected_manifest_sha256": "5233edba9654a6cffd8b6b2d83c932f82ded15f9c0b7c733bd049943e672acff",
    "selected_part_sha256": "aeab777a3897ae2c01315b86b5e9b9a43ffb59b075efae44fd95d447123d32f1",
    "original_candidate_sha256": "ca31ca6dd6bea75eb936864f15b1b9326de16e446b3c83dcf3a7f87bb7513c80",
    "original_candidate_line_sha256": "ca31ca6dd6bea75eb936864f15b1b9326de16e446b3c83dcf3a7f87bb7513c80"
  },
  "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-p11",
    "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": "0328166a2e335aac7a5fb34556e68c80ba7d16612e822b3999c8ac348a9ca06f",
      "question_first_witness_sha256": "0da18e4e6cf71ece5ec5f00dd0cd161217b6d251672bc0b46d79fe7e6253f5fc"
    },
    "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": "fbee5458ab90945c1fc5d493ff7c0d3b06500336d4c0b4e5b35c2ba490eb5264",
      "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."
  }
}
