{
  "schema_version": "ocme-reviewed-question-reader-v1",
  "question_id": "q-20261014-advance-20261103-r07-modular-inverse-0051",
  "pilot_number": "P250-0051",
  "number": 51,
  "family_id": "qf-mod34-modinv-normalized-inverse",
  "title": {
    "zh-Hant": "第 51 題：模反元素",
    "en": "Question 51: Normalize the Inverse Representative, Not the Bezout Coefficients"
  },
  "original_question": {
    "schema_version": "ocme-question-v0.1",
    "id": "q-20261014-advance-20261103-r07-modular-inverse-0051",
    "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-normalized-inverse；資料={\"a\":2,\"n\":27}。請依 [a,n,inverse,product_mod_n,valid,uniqueness] 欄序回答。",
    "answer": {
      "kind": "expression",
      "value": "(2, 27, 14, 1, 是, unique_modulo_n)",
      "explanation_zh": "Wave5第三層核對=(2, 27, 14, 1, 是, unique_modulo_n)；依完整明示資料重算；存在等價gcd等於1且extended Euclid給Bezout證書；輸出normalized residue且唯一只在mod n；nonunit無inverse。"
    },
    "difficulty": {
      "band": "undergraduate_core",
      "level": 1,
      "skills": [
        "模反元素"
      ]
    },
    "variant": {
      "family_id": "qf-mod34-modinv-normalized-inverse",
      "seed": 202611037051,
      "parameters": {
        "a": 2,
        "n": 27,
        "domain": "Exact_extended_Euclid_modular_inverse",
        "operation": "modinv-normalized-inverse",
        "semantic_template": "qf-mod34-modinv-normalized-inverse/{\"a\":2,\"n\":27}"
      }
    },
    "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-0051",
    "batch_id": "batch-20261014-advance-20261103-r07-modular-inverse-foundations",
    "locale": "en",
    "translation_state": "ai_candidate",
    "source": {
      "question_sha256": "6420a4f5105c6d8509d1940678d52996eb4016b94d647897bf09ba0969f8cdc9",
      "family_id": "qf-mod34-modinv-normalized-inverse",
      "seed": 202611037051,
      "semantic_template": "qf-mod34-modinv-normalized-inverse/{\"a\":2,\"n\":27}"
    },
    "fields": {
      "title": "Normalize the Inverse Representative, Not the Bezout Coefficients",
      "stem": "Use the original signed integer a=2 and modulus n=27≥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. Require gcd(a,n)=1. Give (a,n,inverse,product_mod_n,valid?,unique_modulo_n).",
      "answer": {
        "kind": "expression",
        "value": "(2, 27, 14, 1, Yes, unique_modulo_n)",
        "explanation": "Reduce the exact Bezout x modulo n and check a*inverse≡1 mod n. The normalized representative is unique in [0,n), while infinitely many congruent integer representatives exist. The exact result, retaining the requested order, is (2, 27, 14, 1, Yes, unique_modulo_n)."
      },
      "skills": [
        "Normalize the Inverse Representative, Not the Bezout Coefficients"
      ],
      "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-normalized-inverse；資料={\"a\":2,\"n\":27}。請依 [a,n,inverse,product_mod_n,valid,uniqueness] 欄序回答。",
        "en": "Use the original signed integer a=2 and modulus n=27≥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. Require gcd(a,n)=1. Give (a,n,inverse,product_mod_n,valid?,unique_modulo_n)."
      }
    }
  ],
  "steps": [
    {
      "id": "S001",
      "uses": [
        "G001"
      ],
      "before": "a=2, modulus=27",
      "after": "n=27≥2; seek u with 2u≡1 (mod 27)",
      "relation": "implies",
      "rule_id": "inverse_definition",
      "conditions": [],
      "explanation": {
        "zh-Hant": "先固定模數與逆元條件，目標不是整數乘積恰等於 1。",
        "en": "Fix the modulus and inverse condition; the integer product need not equal 1."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "必須先確認 gcd(a,n)=1，才有此模反元素。",
          "en": "A modular inverse requires gcd(a,n)=1."
        }
      },
      "arithmetic": null
    },
    {
      "id": "S002",
      "uses": [
        "G001",
        "S001"
      ],
      "before": "divide 2 by 27",
      "after": "2=0·27+2",
      "relation": "implies",
      "rule_id": "euclidean_division",
      "conditions": [
        "0≤2<27"
      ],
      "explanation": {
        "zh-Hant": "商為 0、餘數為 2；每次用前一除數與餘數繼續。",
        "en": "The quotient is 0 and remainder 2; continue with the preceding divisor and remainder."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "除法等式與 0≤餘數<除數都須成立。",
          "en": "Check both the division identity and 0≤remainder<divisor."
        }
      },
      "arithmetic": {
        "operation": "euclidean_division",
        "inputs": [
          "2",
          "27",
          "0"
        ],
        "output": "2",
        "label": "remainder"
      }
    },
    {
      "id": "S003",
      "uses": [
        "G001",
        "S002"
      ],
      "before": "divide 27 by 2",
      "after": "27=13·2+1",
      "relation": "implies",
      "rule_id": "euclidean_division",
      "conditions": [
        "0≤1<2"
      ],
      "explanation": {
        "zh-Hant": "商為 13、餘數為 1；每次用前一除數與餘數繼續。",
        "en": "The quotient is 13 and remainder 1; continue with the preceding divisor and remainder."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "除法等式與 0≤餘數<除數都須成立。",
          "en": "Check both the division identity and 0≤remainder<divisor."
        }
      },
      "arithmetic": {
        "operation": "euclidean_division",
        "inputs": [
          "27",
          "2",
          "13"
        ],
        "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": [
        "0≤0<1"
      ],
      "explanation": {
        "zh-Hant": "商為 2、餘數為 0；每次用前一除數與餘數繼續。",
        "en": "The quotient is 2 and remainder 0; continue with the preceding divisor and remainder."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "除法等式與 0≤餘數<除數都須成立。",
          "en": "Check both the division identity and 0≤remainder<divisor."
        }
      },
      "arithmetic": {
        "operation": "euclidean_division",
        "inputs": [
          "2",
          "1",
          "2"
        ],
        "output": "0",
        "label": "remainder"
      }
    },
    {
      "id": "S005",
      "uses": [
        "G001",
        "S004"
      ],
      "before": "last nonzero Euclidean remainder",
      "after": "gcd(2,27)=1; 2·(-13)+27·(1)=1",
      "relation": "implies",
      "rule_id": "bezout_identity",
      "conditions": [],
      "explanation": {
        "zh-Hant": "沿除法鏈保留整數線性組合，得到實際的 Bézout 等式。",
        "en": "Track integer linear combinations along the division chain to obtain this explicit Bezout identity."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "直接乘開等式兩邊核對，不只相信 gcd 標記。",
          "en": "Multiply out the identity directly rather than trusting a gcd label."
        }
      },
      "arithmetic": null
    },
    {
      "id": "S006",
      "uses": [
        "G001",
        "S005"
      ],
      "before": "2·(-13)+27·(1)=1",
      "after": "-13 mod 27=14; 0≤14<27",
      "relation": "implies",
      "rule_id": "normalize_residue",
      "conditions": [],
      "explanation": {
        "zh-Hant": "Bézout 的 a 係數已代表逆元類，再取指定區間內的代表元。",
        "en": "The coefficient of a represents the inverse class; reduce it to the required representative interval."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "只正規化逆元代表，不要求 Bézout 的兩個係數都在該區間。",
          "en": "Normalize the inverse representative, not both Bezout coefficients."
        }
      },
      "arithmetic": null
    },
    {
      "id": "S007",
      "uses": [
        "G001",
        "S006"
      ],
      "before": "a·u := mul(2, 14)",
      "after": "a·u = 28",
      "relation": "calculation",
      "rule_id": "exact_rational_arithmetic",
      "conditions": [],
      "explanation": {
        "zh-Hant": "將原 a 與正規化逆元相乘。",
        "en": "Multiply the original a by the normalized inverse."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "以精確有理數重算 a·u，不以小數近似替代。",
          "en": "Recompute a·u with exact rational arithmetic, not rounded decimals."
        }
      },
      "arithmetic": {
        "operation": "mul",
        "inputs": [
          "2",
          "14"
        ],
        "output": "28",
        "label": "a·u"
      }
    },
    {
      "id": "S008",
      "uses": [
        "G001",
        "S007"
      ],
      "before": "a·u=28",
      "after": "28=1·27+1 ⇒ a·u mod n=1",
      "relation": "implies",
      "rule_id": "congruence_check",
      "conditions": [],
      "explanation": {
        "zh-Hant": "乘積與 1 的差是模數的整數倍，故逆元條件成立。",
        "en": "The product minus 1 is an integer multiple of the modulus, verifying the inverse condition."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "商數為整數，且餘數確實為 1。",
          "en": "The quotient is an integer and the remainder really is 1."
        }
      },
      "arithmetic": null
    },
    {
      "id": "S009",
      "uses": [
        "G001",
        "S008"
      ],
      "before": "a·v≡a·u≡1 (mod n), gcd(a,n)=1",
      "after": "n divides v−u; if 0≤u,v<n then u=v",
      "relation": "implies",
      "rule_id": "inverse_uniqueness",
      "conditions": [],
      "explanation": {
        "zh-Hant": "由 n|a(v−u)，再把 Bézout 等式乘以 v−u，可知 n|(v−u)。正規化後差的絕對值小於 n，只能為零。",
        "en": "From n|a(v−u), multiply the Bezout identity by v−u to get n|(v−u). Two normalized representatives differ by less than n in absolute value, so their difference is zero."
      },
      "reverse_audit": {
        "kind": "premise_and_result_audit",
        "explanation": {
          "zh-Hant": "唯一的是模類及指定區間的代表；u+kn 仍是其他整數代表。",
          "en": "The class and its normalized representative are unique; u+kn gives other integer representatives."
        }
      },
      "arithmetic": null
    }
  ],
  "math_model": {
    "a": 2,
    "n": 27,
    "divisions": [
      [
        2,
        27,
        0,
        2
      ],
      [
        27,
        2,
        13,
        1
      ],
      [
        2,
        1,
        2,
        0
      ]
    ],
    "bezout": [
      -13,
      1
    ],
    "inverse": 14,
    "remainder": 1
  },
  "conclusion": {
    "canonical_value": "(2, 27, 14, 1, 是, unique_modulo_n)",
    "explanation": {
      "zh-Hant": "逆元代表是 14，唯一性以模 27 解讀。",
      "en": "The inverse representative is 14, unique modulo 27."
    }
  },
  "definition_note": {
    "zh-Hant": "整數模數 n≥2 且 gcd(a,n)=1；唯一性指模類及指定區間的代表元。",
    "en": "Use integer modulus n≥2 with gcd(a,n)=1. Uniqueness concerns the residue class and its representative in the declared interval."
  },
  "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": 51,
      "original_line_sha256": "821d459578a3299d498492bb6760f3a555017e6fbc74310856b318dfa602037e",
      "question_compact_sha256": "6420a4f5105c6d8509d1940678d52996eb4016b94d647897bf09ba0969f8cdc9",
      "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": "97a661927bd693701b14355b87c585857b2e9ec53487fa92be3c9df050a51704"
    },
    "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": "fb325b42cfcaa25ddbae992459c2684afd767fe218028bc0b9c0823e67c83b7c",
    "original_candidate_sha256": "2a59a7696ed155962394253bd10b993a7138bd20c2b3d4dfc753419c739bb3d3",
    "original_candidate_line_sha256": "2a59a7696ed155962394253bd10b993a7138bd20c2b3d4dfc753419c739bb3d3"
  },
  "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": "本稿是來源綁定的教學推導候選；精確重算不等於獨立數學審查或形式化證明。原題、答案、公式、AST 與歷史未被修改。",
      "en": "This is a source-bound pedagogical derivation candidate. Exact recomputation is not independent mathematical review or formal proof. Original questions, answers, formulas, ASTs and history are unchanged."
    },
    "label": "Frozen producer metadata; current per-question review is separate below."
  },
  "revision": {
    "id": "review-20261024-002",
    "review_date": "2026-10-24",
    "owner_authorized_reader_publication": true,
    "scope": "Family prototypes and mathematical/bilingual reasoning variants reviewed in this existing context; parameter substitutions, all original/source bindings, full answer tuples and arithmetic ASTs independently reconstructed per question. Numeric binomial text slots are validated against independently regenerated n,k,C(n,k),n-k values. 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": "4727d1bd957a9b7f6cadb7972ddb5ab80a31f5259dc5394c1dff2b71944ed36b",
      "question_first_witness_sha256": "51e18649133238ac992229f6e16542a5f3af53ca73b2262ab0524508ea937dee"
    },
    "status": "second_context_reviewed",
    "mathematical_semantics": true,
    "bilingual_semantics": true,
    "steps_reviewed": 9,
    "method": "family_template_semantic_review_plus_independent_per_instance_reconstruction",
    "exact_question_first_check": {
      "model_sha256": "543b86aaa2e606ebc8e049991aa4c297b0faca4ca1dd72c4c5687bcaa3de64f8",
      "arithmetic_steps": 4
    },
    "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."
  }
}
