{
  "schema_version": "ocme-reviewed-question-reader-v1",
  "question_id": "q-20261014-advance-20261103-r07-modular-inverse-0032",
  "pilot_number": "P1000-0357",
  "number": 357,
  "family_id": "qf-mod34-modinv-extended-euclid",
  "title": {
    "zh-Hant": "第 357 題：模反元素",
    "en": "Question 357: Keep Signed Bezout Coefficients and Verify the Integer Identity"
  },
  "original_question": {
    "schema_version": "ocme-question-v0.1",
    "id": "q-20261014-advance-20261103-r07-modular-inverse-0032",
    "batch_id": "batch-20261014-advance-20261103-r07-modular-inverse-foundations",
    "language": "zh-Hant",
    "source_mko_ids": [
      "mko-modular-inverse"
    ],
    "title_zh": "模反元素",
    "stem_zh": "整數a與模數n大於等於2的exact Euclidean arithmetic。操作=modinv-extended-euclid；資料={\"a\":2,\"n\":33}。請依 [a,n,gcd,x,y,bezout_value,classification] 欄序回答。",
    "answer": {
      "kind": "expression",
      "value": "(2, 33, 1, -16, 1, 1, Bezout_equals_one)",
      "explanation_zh": "Wave5第三層核對=(2, 33, 1, -16, 1, 1, Bezout_equals_one)；依完整明示資料重算；存在等價gcd等於1且extended Euclid給Bezout證書；輸出normalized residue且唯一只在mod n；nonunit無inverse。"
    },
    "difficulty": {
      "band": "undergraduate_core",
      "level": 1,
      "skills": [
        "模反元素"
      ]
    },
    "variant": {
      "family_id": "qf-mod34-modinv-extended-euclid",
      "seed": 202611037032,
      "parameters": {
        "a": 2,
        "n": 33,
        "domain": "Exact_extended_Euclid_modular_inverse",
        "operation": "modinv-extended-euclid",
        "semantic_template": "qf-mod34-modinv-extended-euclid/{\"a\":2,\"n\":33}"
      }
    },
    "verification": {
      "status": "candidate",
      "checks": [
        "producer_exact_finite_or_symbolic_model",
        "producer_source_snapshot_check",
        "producer_substantive_template_deduplication",
        "producer_json_schema"
      ],
      "warning_zh": "候選須由主端獨立重算；不構成人工審定、sampled rank upper bound、infinite-domain uniformity、finite-prefix series proof、posterior/identifiability、graph connectivity、nonexhaustive maximum、Lean或形式Evidence。"
    },
    "provenance": {
      "generator_role": "question_producer",
      "generator_model": "model_unknown",
      "generated_at": "2026-10-14",
      "contract_version": "ocme-question-factory-v0.1"
    }
  },
  "original_english_edition": {
    "schema_version": "ocme-question-localization-v0.1",
    "question_id": "q-20261014-advance-20261103-r07-modular-inverse-0032",
    "batch_id": "batch-20261014-advance-20261103-r07-modular-inverse-foundations",
    "locale": "en",
    "translation_state": "ai_candidate",
    "source": {
      "question_sha256": "2c43ff812a7a95c996c34a33866d5d27919f305a7da4a7e84032896acffa4138",
      "family_id": "qf-mod34-modinv-extended-euclid",
      "seed": 202611037032,
      "semantic_template": "qf-mod34-modinv-extended-euclid/{\"a\":2,\"n\":33}"
    },
    "fields": {
      "title": "Keep Signed Bezout Coefficients and Verify the Integer Identity",
      "stem": "Use the original signed integer a=2 and modulus n=33≥2. Exact extended Euclid gives nonnegative g=gcd(a,n) and signed coefficients x,y satisfying a*x+n*y=g. An inverse exists exactly when g=1; normalize its representative to 0≤inverse<n. Uniqueness means one residue class modulo n, not a unique integer representative. This family excludes moduli 0 and 1 and does not use approximate division. Give (a,n,gcd,x,y,bezout_value,classification), retaining the coefficients returned by exact Euclidean steps on |a| and n, with the sign of a restored in x.",
      "answer": {
        "kind": "expression",
        "value": "(2, 33, 1, -16, 1, 1, Bezout_equals_one)",
        "explanation": "Substitute the signed coefficients into a*x+n*y. The value is the nonnegative gcd. Classification is Bezout_equals_one or nonunit_Bezout_gcd; the coefficients are witnesses, not a unique pair of integers. The exact result, retaining the requested order, is (2, 33, 1, -16, 1, 1, Bezout_equals_one)."
      },
      "skills": [
        "Keep Signed Bezout Coefficients and Verify the Integer Identity"
      ],
      "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": "整數a與模數n大於等於2的exact Euclidean arithmetic。操作=modinv-extended-euclid；資料={\"a\":2,\"n\":33}。請依 [a,n,gcd,x,y,bezout_value,classification] 欄序回答。",
        "en": "Use the original signed integer a=2 and modulus n=33≥2. Exact extended Euclid gives nonnegative g=gcd(a,n) and signed coefficients x,y satisfying a*x+n*y=g. An inverse exists exactly when g=1; normalize its representative to 0≤inverse<n. Uniqueness means one residue class modulo n, not a unique integer representative. This family excludes moduli 0 and 1 and does not use approximate division. Give (a,n,gcd,x,y,bezout_value,classification), retaining the coefficients returned by exact Euclidean steps on |a| and n, with the sign of a restored in x."
      }
    }
  ],
  "steps": [
    {
      "id": "S001",
      "uses": [
        "G001"
      ],
      "before": "a=2; n=33≥2",
      "after": "compute gcd and a Bezout certificate before inversion",
      "relation": "implies",
      "rule_id": "modular_domain",
      "conditions": [],
      "explanation": {
        "zh-Hant": "逆元存在性需要互質；先保留模數條件。",
        "en": "Invertibility requires coprimality, after qualifying the modulus."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "核對整數等式、餘數範圍與 gcd 條件，不把同餘當整數相等。",
          "en": "Check integer identities, remainder bounds and gcd conditions; congruence is not integer equality."
        }
      },
      "arithmetic": null
    },
    {
      "id": "S002",
      "uses": [
        "G001",
        "S001"
      ],
      "before": "divide 2 by 33",
      "after": "2=0·33+2",
      "relation": "implies",
      "rule_id": "euclidean_division",
      "conditions": [],
      "explanation": {
        "zh-Hant": "下一步改用除數與餘數，非零餘數嚴格下降。",
        "en": "Continue with divisor and remainder; nonzero remainders decrease strictly."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "核對整數等式、餘數範圍與 gcd 條件，不把同餘當整數相等。",
          "en": "Check integer identities, remainder bounds and gcd conditions; congruence is not integer equality."
        }
      },
      "arithmetic": {
        "operation": "euclidean_division",
        "inputs": [
          "2",
          "33",
          "0"
        ],
        "output": "2",
        "label": "remainder"
      }
    },
    {
      "id": "S003",
      "uses": [
        "G001",
        "S002"
      ],
      "before": "divide 33 by 2",
      "after": "33=16·2+1",
      "relation": "implies",
      "rule_id": "euclidean_division",
      "conditions": [],
      "explanation": {
        "zh-Hant": "下一步改用除數與餘數，非零餘數嚴格下降。",
        "en": "Continue with divisor and remainder; nonzero remainders decrease strictly."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "核對整數等式、餘數範圍與 gcd 條件，不把同餘當整數相等。",
          "en": "Check integer identities, remainder bounds and gcd conditions; congruence is not integer equality."
        }
      },
      "arithmetic": {
        "operation": "euclidean_division",
        "inputs": [
          "33",
          "2",
          "16"
        ],
        "output": "1",
        "label": "remainder"
      }
    },
    {
      "id": "S004",
      "uses": [
        "G001",
        "S003"
      ],
      "before": "divide 2 by 1",
      "after": "2=2·1+0",
      "relation": "implies",
      "rule_id": "euclidean_division",
      "conditions": [],
      "explanation": {
        "zh-Hant": "下一步改用除數與餘數，非零餘數嚴格下降。",
        "en": "Continue with divisor and remainder; nonzero remainders decrease strictly."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "核對整數等式、餘數範圍與 gcd 條件，不把同餘當整數相等。",
          "en": "Check integer identities, remainder bounds and gcd conditions; congruence is not integer equality."
        }
      },
      "arithmetic": {
        "operation": "euclidean_division",
        "inputs": [
          "2",
          "1",
          "2"
        ],
        "output": "0",
        "label": "remainder"
      }
    },
    {
      "id": "S005",
      "uses": [
        "G001",
        "S004"
      ],
      "before": "a·x := mul(2, -16)",
      "after": "a·x = -32",
      "relation": "calculation",
      "rule_id": "exact_rational_arithmetic",
      "conditions": [],
      "explanation": {
        "zh-Hant": "乘回原本帶符號的 a。",
        "en": "Multiply by the original signed a."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "以精確有理數重算 a·x，不以小數近似替代。",
          "en": "Recompute a·x with exact rational arithmetic, not rounded decimals."
        }
      },
      "arithmetic": {
        "operation": "mul",
        "inputs": [
          "2",
          "-16"
        ],
        "output": "-32",
        "label": "a·x"
      }
    },
    {
      "id": "S006",
      "uses": [
        "G001",
        "S005"
      ],
      "before": "n·y := mul(33, 1)",
      "after": "n·y = 33",
      "relation": "calculation",
      "rule_id": "exact_rational_arithmetic",
      "conditions": [],
      "explanation": {
        "zh-Hant": "同時保留模數係數。",
        "en": "Retain the modulus coefficient as well."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "以精確有理數重算 n·y，不以小數近似替代。",
          "en": "Recompute n·y with exact rational arithmetic, not rounded decimals."
        }
      },
      "arithmetic": {
        "operation": "mul",
        "inputs": [
          "33",
          "1"
        ],
        "output": "33",
        "label": "n·y"
      }
    },
    {
      "id": "S007",
      "uses": [
        "G001",
        "S006"
      ],
      "before": "Bezout value := sum(-32, 33)",
      "after": "Bezout value = 1",
      "relation": "calculation",
      "rule_id": "exact_rational_arithmetic",
      "conditions": [],
      "explanation": {
        "zh-Hant": "兩項相加應等於最後非零餘數 gcd。",
        "en": "The two terms must sum to the final nonzero remainder, the gcd."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "以精確有理數重算 Bezout value，不以小數近似替代。",
          "en": "Recompute Bezout value with exact rational arithmetic, not rounded decimals."
        }
      },
      "arithmetic": {
        "operation": "sum",
        "inputs": [
          "-32",
          "33"
        ],
        "output": "1",
        "label": "Bezout value"
      }
    },
    {
      "id": "S008",
      "uses": [
        "G001",
        "S007"
      ],
      "before": "2·(-16)+33·(1)=1",
      "after": "inverse representative=17; 2·17≡1 (mod 33)",
      "relation": "implies",
      "rule_id": "reduce_bezout",
      "conditions": [],
      "explanation": {
        "zh-Hant": "模 n 下模數項消失，a 的係數就是逆元類，再正規化到[0,n)。",
        "en": "Modulo n the modulus term vanishes; normalize the coefficient of a into[0,n)."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "核對整數等式、餘數範圍與 gcd 條件，不把同餘當整數相等。",
          "en": "Check integer identities, remainder bounds and gcd conditions; congruence is not integer equality."
        }
      },
      "arithmetic": null
    }
  ],
  "math_model": {
    "result": [
      2,
      33,
      1,
      -16,
      1,
      "1",
      "Bezout_equals_one"
    ]
  },
  "conclusion": {
    "canonical_value": "(2, 33, 1, -16, 1, 1, Bezout_equals_one)",
    "explanation": {
      "zh-Hant": "上述完整代值與條件核對得到原題答案；欄位次序及真假標記保持原始合約。",
      "en": "The full substitutions and premise audits recover the original answer, retaining its field order and verdict meanings."
    }
  },
  "definition_note": {
    "zh-Hant": "在 |a| 與 n 上執行擴展歐幾里得並還原 a 的符號；係數只是 Bezout 證書，不唯一。",
    "en": "Run extended Euclid on |a| and n and restore the sign of a. The coefficients are one Bezout witness, not a unique pair."
  },
  "source": {
    "input_commit": "0f7be61e2c22317a4075561dc822c87d881a50db",
    "question_binding": {
      "batch_id": "batch-20261014-advance-20261103-r07-modular-inverse-foundations",
      "batch_path": "public/data/questions/batches/batch-20261014-advance-20261103-r07-modular-inverse-foundations/questions.jsonl",
      "batch_sha256": "6f8b1a188424712b3dea0297748d5fd301e16f3efee3dc899d1ddc19ef02403b",
      "original_line": 32,
      "original_line_sha256": "8fc355acd463bab72c136ecb9811d022024203dfc82746428d6ea87710749a4c",
      "question_compact_sha256": "2c43ff812a7a95c996c34a33866d5d27919f305a7da4a7e84032896acffa4138",
      "english_manifest_path": "public/data/i18n/editions/batch-20261014-advance-20261103-r07-modular-inverse-foundations.en.json",
      "english_rows_path": "public/data/i18n/questions/batch-20261014-advance-20261103-r07-modular-inverse-foundations.en.jsonl",
      "english_row_compact_sha256": "3bd14aa0657f798d20043c54978419b6815afe97542e48d8bb1d5a0ab28c26af"
    },
    "mko_bindings": {
      "mko-modular-inverse": {
        "sha256": "d16e0773143022c00ff50dad2cd84ef53e2d8a9078f64c2d785413c676b002ab",
        "english_sha256": "6d3e8307627ef6fae92d80afb7cdf3347e4ca67f4f12e28c68a96a7465d52732",
        "original_path": "public/data/mko/modular-inverse.json",
        "english_path": "public/data/i18n/editions/mko-modular-inverse.en.json"
      }
    },
    "selected_manifest_sha256": "5233edba9654a6cffd8b6b2d83c932f82ded15f9c0b7c733bd049943e672acff",
    "selected_part_sha256": "afa7c0e9f7084cc5929124dcffe9929d5db7def32e40047056d19ea25535873e",
    "original_candidate_sha256": "eb1abf548b90cc4a94853292094c67037dde6d6e8ce3c0bd5ce830d572b8599a",
    "original_candidate_line_sha256": "eb1abf548b90cc4a94853292094c67037dde6d6e8ce3c0bd5ce830d572b8599a"
  },
  "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 arithmetic and finite enumeration are not independent AI 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-003-01",
    "review_date": "2026-10-26",
    "owner_authorized_reader_publication": true,
    "scope": "Thirty family prototypes and their mathematical/bilingual reasoning variants, stems, boundary statements and every distinct sentence shape were reviewed in a context independent of the producer; parameter substitutions, source bindings, full answer tuples, model results 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": "6c2c6d46aded7582a11ac41a8c0b3bdde2669a53bdb6e796eea2039994a02772",
      "question_first_witness_sha256": "77e43898df9efdbf8094ad81fe4ab91cf4b4bd82f481eb9b4699b73cb4da612b"
    },
    "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": "5a44d723f6ad32a2220de5308940b8225b8122316ae49c8343f925f5454a7058",
      "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."
  }
}
