{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-euler-theorem-number-theory-01",
  "mko_id": "mko-euler-theorem-number-theory",
  "title": {
    "zh-Hant": "模10的完整unit排列",
    "en": "The full unit permutation modulo 10"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-euler-theorem-number-theory-01",
    "source": {
      "mko_id": "mko-euler-theorem-number-theory",
      "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
      "sha256": "d14018a9950716ffce9bc6bf1d38d0e4ef8a78193dee493ebaa0d0dda1a573b6",
      "english_sha256": "4a4904aebdd6ce063f9ed8f56abef3819408119eb8e3af341233be6c26c5b990"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "calc"
    ],
    "goal": {
      "zh-Hant": "對a=−3,n=10，φ(10)=4且a⁴≡1 mod10。",
      "en": "For a=-3,n=10, phi(10)=4 and a^4=1 modulo 10."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "n=10，a=−3；代表1至10，全部gcd精確。",
          "en": "n=10,a=-3; representatives are 1 through 10 with exact gcds."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1"
        ],
        "before_tex": "n=10,\\quad a=-3",
        "after_tex": "n\\ge2,\\quad a\\equiv7\\pmod{10},\\quad\\gcd(7,10)=1",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "先核正模數與unit前提，負base正規化為7。",
          "en": "Check modulus and unit hypotheses first, normalizing the negative base to 7."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "gcd(7,10)=1由10=7+3、7=2·3+1確證。",
            "en": "10=7+3 and 7=2*3+1 certify gcd 1."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S02",
        "uses": [
          "G1",
          "S01"
        ],
        "before_tex": "k=1,2,3,4,5,6,7,8,9,10",
        "after_tex": "\\gcd(k,10)=1,2,1,2,5,2,1,2,1,10",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "完整十項gcd清單，不漏偶數或終點。",
          "en": "A complete ten-entry gcd list omits neither even entries nor the endpoint."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01"
          ],
          "explanation": {
            "zh-Hant": "只將gcd=1者選為units。",
            "en": "Select only entries with gcd one as units."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S03",
        "uses": [
          "G1",
          "S02"
        ],
        "before_tex": "U_{10}=\\{1,3,7,9\\}",
        "after_tex": "\\varphi(10)=4,\\quad7U_{10}\\pmod{10}=(7,1,9,3)",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "四個units各被命中一次，乘7為完整排列。",
          "en": "Each of the four units is hit once, so multiplication by 7 is a full permutation."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S02"
          ],
          "explanation": {
            "zh-Hant": "這裡核對的排列是同一個 unit 載體上的排列；本證書沒有枚舉全部十個 residues 的排列。",
            "en": "The permutation audited here is on the same set of units; this certificate does not enumerate the permutation on all ten residues."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S04",
        "uses": [
          "G1",
          "S03"
        ],
        "before_tex": "P=1\\cdot3\\cdot7\\cdot9=189",
        "after_tex": "7^4P\\equiv P\\pmod{10},\\quad P\\equiv9,\\quad9^{-1}\\equiv9\\pmod{10}",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "排列乘積不變，P的逆9由9²≡1直接驗證。",
          "en": "Permutation preserves the product, and P's inverse 9 is verified by 9^2=1 modulo 10."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S03"
          ],
          "explanation": {
            "zh-Hant": "乘積可逆才可消去，不能把非units一併乘入。",
            "en": "Cancellation needs an invertible product; nonunits cannot be included indiscriminately."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S05",
        "uses": [
          "G1",
          "S01",
          "S04"
        ],
        "before_tex": "7^4\\cdot9\\equiv9\\pmod{10}",
        "after_tex": "7^4\\equiv1\\pmod{10}\\Rightarrow(-3)^4\\equiv1\\pmod{10}",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "乘逆9消去P，回到原負代表a。",
          "en": "Cancel P by multiplying its inverse 9, then return to original negative representative a."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "S04"
          ],
          "explanation": {
            "zh-Hant": "得到mod10同餘，不是整數81=1。",
            "en": "This is congruence modulo 10, not integer equality 81=1."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S06",
        "uses": [
          "G1",
          "S03",
          "S05"
        ],
        "before_tex": "7^2=49",
        "after_tex": "7^2\\equiv9,\\quad7^4\\equiv9^2\\equiv1\\pmod{10}",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "獨立平方乘法核Euler結果。",
          "en": "Independent repeated squaring checks the Euler congruence."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S03",
            "S05"
          ],
          "explanation": {
            "zh-Hant": "φ值由完整S02取得，不用指數測試反推φ。",
            "en": "The totient comes from complete S02, not inferred backward from this power test."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S07",
        "uses": [
          "G1",
          "S03"
        ],
        "before_tex": "a=2,\\quad\\gcd(2,10)=2",
        "after_tex": "2^{\\varphi(10)}=16\\equiv6\\not\\equiv1\\pmod{10}",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "nonunit不符合假設，明示同餘失敗，不能無條件套公式。",
          "en": "The nonunit violates the hypothesis and explicitly fails the congruence, so the formula is not unconditional."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S03"
          ],
          "explanation": {
            "zh-Hant": "此例不反駁Euler，因unit門檻未過。",
            "en": "This does not refute Euler because the unit hypothesis fails."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S08",
        "uses": [
          "G1",
          "S03",
          "S05",
          "S06",
          "S07"
        ],
        "before_tex": "10=2\\cdot5\\text{ composite},\\quad(-3)^4\\equiv1\\pmod{10}",
        "after_tex": "\\text{Euler congruence holds for this composite modulus}",
        "relation": "implies",
        "rule": "mko_definition",
        "conditions": [],
        "explanation": {
          "zh-Hant": "正例本就使用合數10，足以說明通過Euler不代表prime。",
          "en": "The positive example already uses composite 10, showing that an Euler pass does not imply primality."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S03",
            "S05",
            "S06",
            "S07"
          ],
          "explanation": {
            "zh-Hant": "Fermat是prime模數時φ(p)=p−1的特例，不是反向判質數。",
            "en": "Fermat is the prime-modulus specialization phi(p)=p-1, not a converse primality test."
          }
        },
        "leaf_basis": "mko_definition"
      }
    ],
    "result": {
      "zh-Hant": "對a=−3,n=10，φ(10)=4且a⁴≡1 mod10。",
      "en": "For a=-3,n=10, phi(10)=4 and a^4=1 modulo 10."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "對任何a都可套Euler。",
          "en": "Euler applies to every a."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "2模10非unit且2⁴≡6。",
          "en": "2 modulo 10 is a nonunit and 2^4=6 modulo 10."
        }
      },
      {
        "claim": {
          "zh-Hant": "a⁴≡1證10質數。",
          "en": "a^4=1 proves 10 prime."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "10=2·5。",
          "en": "10=2*5."
        }
      },
      {
        "claim": {
          "zh-Hant": "φ(10)=10。",
          "en": "phi(10)=10."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "完整units只有1、3、7、9。",
          "en": "The complete units are only 1,3,7,9."
        }
      }
    ],
    "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": "exact列舉reduced residue system並核乘a造成permutation，或用safe modular exponentiation核a^phi(n) mod n=1。負a先正規化。nonunit不適用，單次congruence沒有primality converse；Fermat小定理是prime modulus特例。",
          "en": "Enumerate the complete reduced residue system and check multiplication by a permutes it, or compute a^phi(n) modulo n exactly. Normalize a negative base first. Nonunits cannot use this theorem, and one passing congruence has no primality converse; Fermat is the prime-modulus special case."
        },
        "source": {
          "mko_id": "mko-euler-theorem-number-theory",
          "sha256": "d14018a9950716ffce9bc6bf1d38d0e4ef8a78193dee493ebaa0d0dda1a573b6",
          "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f"
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "power",
        "lhs": "7**4%10",
        "rhs": "1",
        "step": "S06"
      },
      {
        "id": "nonunit",
        "lhs": "2**4%10",
        "rhs": "6",
        "step": "S07"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "指定unit base的完整reduced代表系證書與獨立powmod；不作primality test。",
      "en": "A complete reduced-residue certificate and independent modular powers for one unit base; no primality test."
    },
    "md_symbols": [
      [
        "U_{10}",
        "完整unit代表系",
        "complete unit representatives"
      ],
      [
        "P",
        "unit乘積",
        "product of units"
      ]
    ],
    "md_error_controls": [
      {
        "title": "unit前提 / Unit premise",
        "zh": "必先gcd(a,n)=1，再做排列或消去。",
        "en": "Check gcd(a,n)=1 before permutation or cancellation."
      },
      {
        "title": "範圍 / Scope",
        "zh": "這裡n≥2，n=1慣例不延伸到此定理。",
        "en": "This theorem requires n≥2; a totient convention at n=1 does not extend its domain."
      }
    ],
    "md_open_items": []
  },
  "revision": {
    "id": "ocme-new142-reader-adoption-20261021",
    "collection": "coverage-20261021",
    "source_commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
    "adopted_source_sha256": "977d1dd55d45a5003a9f4880a149b3a8e21831959802a95451cfcdc9712cf56d",
    "original_source_sha256": "e86f8dc2f3762aa9623aba948725f0429f19ae3a77d5522ab19d3138d2124453",
    "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-P045",
      "BR142-P044"
    ],
    "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.",
    "english_binding_revision": {
      "id": "edition-symbol-bindings-20261101",
      "path": "content/edition-symbol-bindings-20261101/revision.json",
      "sha256": "e9b4c69f2c4732074c37abb624c8ab8a70afc3645c12bf9df2268ef650ad7b6c"
    }
  }
}
