{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-euler-totient-function-01",
  "mko_id": "mko-euler-totient-function",
  "title": {
    "zh-Hant": "逐代表計算φ(12)",
    "en": "Counting phi(12) representative by representative"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-euler-totient-function-01",
    "source": {
      "mko_id": "mko-euler-totient-function",
      "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
      "sha256": "2f96ece219d918a70b350ee38d51917541627e34c40240cf2b2cfa6d4ab48c31",
      "english_sha256": "55a6b7b7404726164058c3d62e026bd28463e20a31eabb18f1a001b38bc4907d"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "calc"
    ],
    "goal": {
      "zh-Hant": "φ(12)=4，φ(1)=1，且本例φ(3·4)=φ(3)φ(4)。",
      "en": "phi(12)=4, phi(1)=1, and here phi(3*4)=phi(3)*phi(4)."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "n=12，以gcd(k,12)=1計數，代表恰為1、2、3、4、5、6、7、8、9、10、11、12。",
          "en": "n=12; count gcd(k,12)=1 over exactly 1,2,3,4,5,6,7,8,9,10,11,12."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1"
        ],
        "before_tex": "1\\le k\\le12",
        "after_tex": "K=\\{1,2,3,4,5,6,7,8,9,10,11,12\\}",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "先完整列12個代表，無0也沒有重複終點。",
          "en": "List all twelve representatives first, with neither zero nor a duplicated endpoint."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "本輪採1到n，不得另加0再計一次同類。",
            "en": "This slice uses 1 through n; adding zero would duplicate a residue."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S02",
        "uses": [
          "G1",
          "S01"
        ],
        "before_tex": "k=1,2,3,4,5,6",
        "after_tex": "\\gcd(k,12)=1,2,3,4,1,6\\text{ respectively}",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "完整前六項以整除計gcd；只有1與5互質。",
          "en": "Exact gcds for the first six entries leave only 1 and 5 coprime."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01"
          ],
          "explanation": {
            "zh-Hant": "例如gcd(5,12)=1因12=2·5+2且5=2·2+1。",
            "en": "For example gcd(5,12)=1 since 12=2*5+2 and 5=2*2+1."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S03",
        "uses": [
          "G1",
          "S01"
        ],
        "before_tex": "k=7,8,9,10,11,12",
        "after_tex": "\\gcd(k,12)=1,4,3,2,1,12\\text{ respectively}",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "後六項全部核完，互質者為7與11。",
          "en": "Checking all remaining six entries leaves 7 and 11 coprime."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01"
          ],
          "explanation": {
            "zh-Hant": "12在代表系中但gcd(12,12)=12，不能誤算為unit。",
            "en": "12 is in the representative range but gcd(12,12)=12, not a unit."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S04",
        "uses": [
          "G1",
          "S02",
          "S03"
        ],
        "before_tex": "U_{12}=\\{1,5,7,11\\}",
        "after_tex": "\\varphi(12)=|U_{12}|=4",
        "relation": "implies",
        "rule": "mko_definition",
        "conditions": [],
        "explanation": {
          "zh-Hant": "兩段完整gcd清單給所有且只有四個互質代表。",
          "en": "The two complete gcd lists give all and only the four coprime representatives."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S02",
            "S03"
          ],
          "explanation": {
            "zh-Hant": "未計互質數對或proper divisors；φ只數此代表集合。",
            "en": "This counts neither coprime pairs nor proper divisors, only this representative set."
          }
        },
        "leaf_basis": "mko_definition"
      },
      {
        "id": "S05",
        "uses": [
          "G1"
        ],
        "before_tex": "n=1,\\quad K_1=\\{1\\}",
        "after_tex": "\\gcd(1,1)=1\\Rightarrow\\varphi(1)=1",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "按同一1到n慣例，n=1有一個合法且互質的代表。",
          "en": "Under the same 1-through-n convention, n=1 has one valid coprime representative."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "不能套n≥2時n不互質的觀察到n=1。",
            "en": "The observation that n is noncoprime for n≥2 does not apply to n=1."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S06",
        "uses": [
          "G1"
        ],
        "before_tex": "K_3=\\{1,2,3\\},\\quad K_4=\\{1,2,3,4\\}",
        "after_tex": "U_3=\\{1,2\\},\\quad U_4=\\{1,3\\},\\quad\\varphi(3)=2,\\ \\varphi(4)=2",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "分別完整gcd清單為(1,1,3)與(1,2,1,4)，得到兩個值。",
          "en": "The complete gcd lists (1,1,3) and (1,2,1,4) give both values."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "兩個小代表系皆含自己的終點，但終點不互質。",
            "en": "Each small representative range includes its endpoint, which is not coprime here."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S07",
        "uses": [
          "G1",
          "S04",
          "S06"
        ],
        "before_tex": "\\gcd(3,4)=1,\\quad12=3\\cdot4",
        "after_tex": "\\varphi(12)=4=2\\cdot2=\\varphi(3)\\varphi(4)",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "互質前提成立，再以已算值核本次乘法性實例。",
          "en": "After checking coprimality, the computed values verify this multiplicativity instance."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S04",
            "S06"
          ],
          "explanation": {
            "zh-Hant": "只是指定互質實例，不由此推一般乘法性定理。",
            "en": "This is the specified coprime instance, not a proof of general multiplicativity."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S08",
        "uses": [
          "G1",
          "S06",
          "S07"
        ],
        "before_tex": "U_2=\\{1\\},\\quad U_8=\\{1,3,5,7\\}",
        "after_tex": "\\varphi(2)\\varphi(4)=1\\cdot2=2\\ne4=\\varphi(8)",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "完整模8 gcd清單(1,2,1,4,1,2,1,8)顯示非互質乘數2、4不能無條件相乘。",
          "en": "The full modulo-8 gcd list (1,2,1,4,1,2,1,8) shows noncoprime factors 2,4 cannot be used unconditionally."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S06",
            "S07"
          ],
          "explanation": {
            "zh-Hant": "此反例否證省略互質假設，不否證S07。",
            "en": "This refutes dropping coprimality, not S07."
          }
        },
        "leaf_basis": "calc"
      }
    ],
    "result": {
      "zh-Hant": "φ(12)=4，φ(1)=1，且本例φ(3·4)=φ(3)φ(4)。",
      "en": "phi(12)=4, phi(1)=1, and here phi(3*4)=phi(3)*phi(4)."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "φ(12)=5因0也互質。",
          "en": "phi(12)=5 because zero is coprime too."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "0不在1到12，且gcd(0,12)=12。",
          "en": "Zero is outside 1 through 12 and gcd(0,12)=12."
        }
      },
      {
        "claim": {
          "zh-Hant": "φ(1)=0。",
          "en": "phi(1)=0."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "唯一代表1與1互質。",
          "en": "Its sole representative 1 is coprime to 1."
        }
      },
      {
        "claim": {
          "zh-Hant": "任意m,n均有φ(mn)=φ(m)φ(n)。",
          "en": "phi(mn)=phi(m)phi(n) for every m,n."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "m=2,n=4給4≠2。",
          "en": "m=2,n=4 gives 4 distinct from 2."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "calc",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "假設精確整數算術、帶餘除法、整除與gcd的定義；同餘等式始終綁定明示模數。",
          "en": "Assume exact integer arithmetic, division with remainder, and definitions of divisibility and gcd; every congruence has an explicit modulus."
        }
      },
      {
        "id": "mko_definition",
        "kind": "cited",
        "statement": {
          "zh-Hant": "本輪一致使用1≤k≤n的完整代表範圍，以gcd(k,n)=1計數。乘法性只核gcd(m,n)=1的明示實例，不由非互質實例外推。",
          "en": "This slice consistently uses the complete range 1≤k≤n and counts gcd(k,n)=1. Multiplicativity is checked only for explicit instances with gcd(m,n)=1, not extrapolated from noncoprime inputs."
        },
        "source": {
          "mko_id": "mko-euler-totient-function",
          "sha256": "2f96ece219d918a70b350ee38d51917541627e34c40240cf2b2cfa6d4ab48c31",
          "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f"
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "phi12gcds",
        "lhs": "gcd(1,12)+gcd(5,12)+gcd(7,12)+gcd(11,12)",
        "rhs": "4",
        "step": "S04"
      },
      {
        "id": "mult",
        "lhs": "2*2",
        "rhs": "4",
        "step": "S07"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "固定1≤k≤n的完整有限代表系；乘法性只核互質實例。",
      "en": "Complete representative ranges 1≤k≤n; multiplicativity is checked for a coprime instance only."
    },
    "md_symbols": [
      [
        "\\varphi(n)",
        "互質代表數",
        "number of coprime representatives"
      ],
      [
        "U_n",
        "完整reduced代表系",
        "complete reduced representatives"
      ]
    ],
    "md_error_controls": [
      {
        "title": "代表系 / Representative range",
        "zh": "全稿使用1至n，不混用0至n−1。",
        "en": "Use 1 through n consistently, not a mixture with 0 through n-1."
      },
      {
        "title": "互質門檻 / Coprimality gate",
        "zh": "乘法性題先核gcd(m,n)=1。",
        "en": "Check gcd(m,n)=1 before multiplicativity."
      }
    ],
    "md_open_items": []
  },
  "revision": {
    "id": "ocme-new142-reader-adoption-20261021",
    "collection": "coverage-20261021",
    "source_commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
    "adopted_source_sha256": "ca0b196e2434f2d382e24c3145852b45b5cf3005501150b6d891d5af24fa9d03",
    "original_source_sha256": "ca0b196e2434f2d382e24c3145852b45b5cf3005501150b6d891d5af24fa9d03",
    "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": [],
    "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."
  }
}
