{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-p-adic-valuation-integers-01",
  "mko_id": "mko-p-adic-valuation-integers",
  "title": {
    "zh-Hant": "帶符號整數的3進因子抽取",
    "en": "Extracting 3-adic factors of signed integers"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-p-adic-valuation-integers-01",
    "source": {
      "mko_id": "mko-p-adic-valuation-integers",
      "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
      "sha256": "9805aa95014a92e3ee82b127895171c719f8deb0548a932c13fb85c07d782a40",
      "english_sha256": "13f277e55f58c0bbb023895d24c591527ec1f4bd6f223d42e1a8f1070ec3facc"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "calc"
    ],
    "goal": {
      "zh-Hant": "v₃(−108)=3、v₃(18)=2、v₃(−1944)=5、v₃(−90)=2；零用infinity。",
      "en": "v3(-108)=3,v3(18)=2,v3(-1944)=5,v3(-90)=2; zero uses infinity."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "p=3為prime，a=−108,b=18；v_p(0)唯一序列化字串sentinel為infinity。",
          "en": "p=3 is prime, a=-108,b=18; v_p(0) uses the sole serializable string sentinel infinity."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1"
        ],
        "before_tex": "p=3,\\quad a=-108",
        "after_tex": "|a|=108=3^3\\cdot4,\\quad3\\nmid4\\Rightarrow v_3(a)=3",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "負號先取絕對值，連除3得到36、12、4，最後4不再被3整除。",
          "en": "Normalize the sign, then divide by 3 to obtain 36,12,4; the final 4 is not divisible by 3."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "若只除到12會低估valuation；最高次需最後unit檢查。",
            "en": "Stopping at 12 would underestimate the valuation; maximality needs the final nondivisibility check."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S02",
        "uses": [
          "G1",
          "S01"
        ],
        "before_tex": "b=18",
        "after_tex": "18=3^2\\cdot2,\\quad3\\nmid2\\Rightarrow v_3(b)=2",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "完整抽取18→6→2，得到另一個非零輸入的unit。",
          "en": "Complete extraction 18 to 6 to 2 gives the other nonzero input's unit part."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01"
          ],
          "explanation": {
            "zh-Hant": "兩個輸入均非零，有限整數valuation3、2可直接相加。",
            "en": "Both inputs are nonzero, so their finite valuations 3,2 can be added."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S03",
        "uses": [
          "G1",
          "S01",
          "S02"
        ],
        "before_tex": "ab=-1944",
        "after_tex": "|ab|=3^{3+2}(4\\cdot2)=3^5\\cdot8,\\quad3\\nmid8\\Rightarrow v_3(ab)=5",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "prime不整除兩unit的乘積，因此product的抽取指數恰為和5。",
          "en": "The prime does not divide the product of the two unit parts, so the extracted product exponent is exactly 5."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "S02"
          ],
          "explanation": {
            "zh-Hant": "這裡unit乘積8不被3整除；不是只驗3⁵整除就停止。",
            "en": "The unit product 8 is not divisible by 3; merely showing 3^5 divides would be insufficient."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S04",
        "uses": [
          "G1",
          "S01",
          "S02"
        ],
        "before_tex": "a+b=-90",
        "after_tex": "90=3^2\\cdot10,\\quad3\\nmid10\\Rightarrow v_3(a+b)=2=\\min(3,2)",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "和的直接抽取給不等valuation時的等號實例。",
          "en": "Direct extraction of the sum gives an equality instance for unequal valuations."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "S02"
          ],
          "explanation": {
            "zh-Hant": "−90先取絕對值；不以有理近似log計指數。",
            "en": "Normalize -90 by absolute value rather than approximate logarithms."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S05",
        "uses": [
          "G1",
          "S04"
        ],
        "before_tex": "a=p^ru,\\quad b=p^sv,\\quad r<s,\\quad p\\nmid u,v",
        "after_tex": "a+b=p^r(u+p^{s-r}v),\\quad u+p^{s-r}v\\equiv u\\not\\equiv0\\pmod p",
        "relation": "implies",
        "rule": "calc",
        "conditions": [
          "a and b are nonzero",
          "r<s",
          "p is prime"
        ],
        "explanation": {
          "zh-Hant": "一般unequal情形抽出較小指數，括號仍非零modp，所以和valuation恰為r。",
          "en": "In the general unequal case factor the smaller exponent; the bracket remains nonzero modulo p, so the sum valuation is exactly r."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S04"
          ],
          "explanation": {
            "zh-Hant": "a或b可負，u、v亦可負；nondivisibility仍成立。",
            "en": "a,b and their unit parts may be negative; nondivisibility still applies."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S06",
        "uses": [
          "G1",
          "S05"
        ],
        "before_tex": "v_3(3)=v_3(6)=1",
        "after_tex": "v_3(3+6)=v_3(9)=2>1",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "相等valuation不保證sum等於最小值，這裡因括號1+2被3整除而升高。",
          "en": "Equal summand valuations need not give equality; the bracket 1+2 is divisible by 3, raising the value."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S05"
          ],
          "explanation": {
            "zh-Hant": "反例只否證總有等號，仍符合sum inequality。",
            "en": "This refutes unconditional equality while respecting the sum inequality."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S07",
        "uses": [
          "G1",
          "S01",
          "S06"
        ],
        "before_tex": "-108+108=0",
        "after_tex": "v_3(0)=\\texttt{infinity},\\quad\\texttt{infinity}>k\\ (k\\in\\mathbb N_0)",
        "relation": "implies",
        "rule": "mko_definition",
        "conditions": [],
        "explanation": {
          "zh-Hant": "完全抵消時固定字串infinity；它大於每個非負整數，min(infinity,k)=k、infinity+k=infinity，並另定infinity+infinity=infinity及min(infinity,infinity)=infinity。",
          "en": "Exact cancellation uses the fixed string infinity; it exceeds every nonnegative integer, with min(infinity,k)=k and infinity+k=infinity, and separately infinity+infinity=infinity and min(infinity,infinity)=infinity."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "S06"
          ],
          "explanation": {
            "zh-Hant": "若一個輸入為零，乘積為零，其 valuation 為 infinity；和等於另一個輸入，因此和的 valuation 等於另一輸入的 valuation。若兩個輸入皆為零，和仍為零，其 valuation 為 infinity，皆符合這套約定。",
            "en": "If one input is zero, the product is zero and has valuation infinity; the sum equals the other input, so its valuation equals that input's valuation. If both inputs are zero, the sum is zero and its valuation is infinity, consistently with these conventions."
          }
        },
        "leaf_basis": "mko_definition"
      },
      {
        "id": "S08",
        "uses": [
          "G1",
          "S05",
          "S06",
          "S07"
        ],
        "before_tex": "v_p(a)=r,\\quad v_p(b)=s\\text{ finite}",
        "after_tex": "p^{\\min(r,s)}\\mid a+b\\Rightarrow v_p(a+b)\\ge\\min(r,s)",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "兩項皆被較低prime power整除，故和也被整除；和為零則infinity仍符合下界。",
          "en": "Both terms are divisible by the lower prime power, so is their sum; if zero, infinity still satisfies the lower bound."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S05",
            "S06",
            "S07"
          ],
          "explanation": {
            "zh-Hant": "只有r≠s由S05保證等號，r=s不可升格。",
            "en": "Only unequal r,s guarantee equality by S05; equal r,s cannot be upgraded."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S09",
        "uses": [
          "G1",
          "S03",
          "S08"
        ],
        "before_tex": "\\text{base }4,\\quad a=b=2",
        "after_tex": "v_4(2)=0,\\quad v_4(4)=1\\ne0+0",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "合數底的最高整除次數可能破product law，因此不能稱本定義的p-adic valuation。",
          "en": "The highest-power extraction at a composite base can violate the product law and is not this p-adic valuation."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S03",
            "S08"
          ],
          "explanation": {
            "zh-Hant": "這不否證prime3的證書，而是指出prime base不可省。",
            "en": "This does not refute prime-3 certificates; it shows the prime-base premise is essential."
          }
        },
        "leaf_basis": "calc"
      }
    ],
    "result": {
      "zh-Hant": "v₃(−108)=3、v₃(18)=2、v₃(−1944)=5、v₃(−90)=2；零用infinity。",
      "en": "v3(-108)=3,v3(18)=2,v3(-1944)=5,v3(-90)=2; zero uses infinity."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "負整數a無valuation。",
          "en": "Negative integers have no valuation."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "按絕對值抽取，−108值3。",
          "en": "Extraction uses absolute value, giving -108 value 3."
        }
      },
      {
        "claim": {
          "zh-Hant": "所有sum valuation都等於min。",
          "en": "Every sum valuation equals the minimum."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "3+6=9，2>1。",
          "en": "3+6=9 gives 2>1."
        }
      },
      {
        "claim": {
          "zh-Hant": "合數底4也保留product law。",
          "en": "Composite base 4 preserves the product law."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "2·2=4使1≠0+0。",
          "en": "2*2=4 gives 1 distinct from 0+0."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "calc",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "假設精確整數算術、帶餘除法、整除與gcd的定義；同餘等式始終綁定明示模數。假設整數唯一質因數分解與prime不整除兩個因子時也不整除乘積。",
          "en": "Assume exact integer arithmetic, division with remainder, and definitions of divisibility and gcd; every congruence has an explicit modulus. Assume unique prime factorization and that a prime not dividing either factor does not divide their product."
        }
      },
      {
        "id": "mko_definition",
        "kind": "cited",
        "statement": {
          "zh-Hant": "prime p≥2；a≠0時以|a|=p^k*u且p不整除u的唯一k定義v_p(a)，負a合法並先取絕對值。固定可序列化sentinel `infinity` 表示v_p(0)。exact families核factor extraction、v_p(ab)=v_p(a)+v_p(b)與v_p(a+b)≥min；只有v_p(a)≠v_p(b)時保證sum equality。nonprime base不屬p-adic valuation，含零identity依infinity convention分開。",
          "en": "Require prime p≥2. For a≠0 uniquely write |a|=p^k*u with p not dividing u, and define v_p(a)=k. Negative integers are valid and normalized by absolute value. Use the single serializable infinity sentinel for v_p(0). Exact families check factor extraction, v_p(ab)=v_p(a)+v_p(b), and v_p(a+b)≥min(v_p(a),v_p(b)). Unequal summand valuations guarantee equality in the sum inequality; equal valuations do not guarantee it and may cancel to zero. Composite bases are outside the p-adic valuation convention. Identities involving zero explicitly use the infinity convention."
        },
        "source": {
          "mko_id": "mko-p-adic-valuation-integers",
          "sha256": "9805aa95014a92e3ee82b127895171c719f8deb0548a932c13fb85c07d782a40",
          "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f"
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "extract_a",
        "lhs": "3**3*4",
        "rhs": "108",
        "step": "S01"
      },
      {
        "id": "product",
        "lhs": "3**5*8",
        "rhs": "1944",
        "step": "S03"
      },
      {
        "id": "sum",
        "lhs": "3**2*10",
        "rhs": "90",
        "step": "S04"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "prime3的exact extraction、product與sum laws實例及一般unequal-sum論證，不作completion。",
      "en": "Exact extraction at prime 3, product/sum instances and an unequal-sum argument; no completion."
    },
    "md_symbols": [
      [
        "u,v",
        "去prime後units，可負",
        "unit parts after extraction, possibly negative"
      ],
      [
        "v_p(0)",
        "infinity字串",
        "infinity string"
      ]
    ],
    "md_error_controls": [
      {
        "title": "最高次 / Highest power",
        "zh": "|a|=p^k u後必核p不整除u才定k。",
        "en": "After |a|=p^k*u, check p does not divide u before assigning k."
      },
      {
        "title": "零sentinel / Zero sentinel",
        "zh": "零唯一用字串infinity，不用0或未標記NaN。",
        "en": "Zero uses the string infinity only, not 0 or an unmarked NaN."
      }
    ],
    "md_open_items": []
  },
  "revision": {
    "id": "ocme-new142-reader-adoption-20261021",
    "collection": "coverage-20261021",
    "source_commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
    "adopted_source_sha256": "95c4e2650117d3d500f2fb521401fae53535c51db055a8d4462a820e89c80a8d",
    "original_source_sha256": "1baa04ecf21c750d6a25a649db9321d708caa5c1eac27fabb94edf46138ffe75",
    "owner_adopted": true,
    "bilingual_sync": "complete_source_bound",
    "formal_Lean": "NOT_RUN",
    "reader_review": "142_of_142_source_bound",
    "wording_review": "original_Lead_decisions_resolved",
    "glossary_reader_paraphrases": [],
    "independent_AI_concurrence": "SCOPED_LEAD_AND_BILINGUAL_CONTEXT_REVIEW",
    "issue_ids": [
      "BR142-P090",
      "BR142-P089"
    ],
    "parent_manifest_sha256": "d29f4cae8229ebd24f60d496cb1d3cd4ad8c0a4dca9d44daab0c3245c544283a",
    "scope": "Owner-adopted reader revision. Lead and bilingual review concern the recorded text and premises; no new universal or Lean proof, canonical promotion or historical-label rewrite."
  }
}
