{
  "$schema": "../../../schemas/mko-v0.4.schema.json",
  "schema_version": "mko-v0.4",
  "id": "mko-euler-theorem-number-theory",
  "semantic_family_id": "sf-euler-theorem-number-theory",
  "type": "theorem",
  "version": "0.10.0",
  "language": "zh-Hant",
  "titles": {
    "zh-Hant": "Euler定理"
  },
  "summary": {
    "zh-Hant": "n>=2且gcd(a,n)=1時，a的phi(n)次方模n同餘於1。"
  },
  "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特例。"
  },
  "formula": {
    "tex": "E(a,n)=1",
    "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mrow><mrow><mi>E</mi><mo>(</mo><mi>a</mi><mo>,</mo><mi>n</mi><mo>)</mo></mrow><mo>=</mo><mn>1</mn></mrow></math>",
    "semantic_ast": {
      "type": "equation",
      "lhs": {
        "type": "function_call",
        "callee": {
          "type": "symbol",
          "name": "E",
          "glyph": "E"
        },
        "arguments": [
          {
            "type": "symbol",
            "name": "a",
            "glyph": "a"
          },
          {
            "type": "symbol",
            "name": "n",
            "glyph": "n"
          }
        ]
      },
      "rhs": {
        "type": "number",
        "value": 1
      }
    },
    "compiler": {
      "id": "ocme-formula-core",
      "version": "0.4.0",
      "source_sha256": "0c608960eac7302a80312790da1668f7558cc0c19934dd3e48f6bf8dd22a4581"
    }
  },
  "assumptions": [
    {
      "id": "a1",
      "zh-Hant": "n為至少2的正整數且gcd(a,n)=1。"
    },
    {
      "id": "a2",
      "zh-Hant": "phi(n)與modular powers以exact integer arithmetic計算。"
    }
  ],
  "symbols": [
    {
      "token": "phi",
      "role": "euler_totient",
      "role_zh": "Euler phi函數",
      "scope": "representative_formula"
    },
    {
      "token": "a",
      "role": "unit_residue",
      "role_zh": "可逆剩餘類",
      "scope": "representative_formula"
    }
  ],
  "dependencies": [
    {
      "id": "mko-euler-totient-function",
      "title_zh": "Euler φ函數",
      "reason_zh": "exponent與reduced residues。"
    },
    {
      "id": "mko-gcd-coprime",
      "title_zh": "最大公因數與互質",
      "reason_zh": "unit hypothesis。"
    },
    {
      "id": "mko-modular-congruence",
      "title_zh": "自然數模同餘",
      "reason_zh": "結論語義。"
    },
    {
      "id": "mko-power-root",
      "title_zh": "自然數冪與主平方根",
      "reason_zh": "整數冪。"
    }
  ],
  "explanation": {
    "paragraphs_zh": [
      "unit hypothesis不可省略。",
      "乘法在reduced residue system上為permutation。",
      "single passing congruence不證prime。"
    ],
    "common_misconception_zh": "對gcd(a,n)>1仍套Euler定理，或把結果反推n為質數。"
  },
  "proofs": [],
  "computational_companions": [],
  "verification": {
    "computational_status": "not_evaluated_no_computational_claim",
    "warning_zh": "本輪不把Euler congruence當primality test。",
    "evidence_refs": [],
    "producers": [
      {
        "id": "lean-mathlib",
        "adapter": "formal_system",
        "config_path": "formal/lean/lakefile.toml",
        "status": "configured"
      }
    ]
  },
  "formalization": {
    "status": "not_formalized",
    "target_systems": [
      "Lean 4",
      "Mathlib"
    ],
    "next_obligation_zh": "加入multiplicative order與Euler criterion。"
  },
  "provenance": {
    "origin": "ocme_local_ai_materialization_candidate",
    "note_zh": "依 research/atlas-euler-theorem-number-theory.md 整理；2026-10-14 脈衝 R06（使用者手動接續 2026-11-07 工作序列；實際日期仍為 2026-10-14），英文及 Lean 依使用者指示延後。",
    "content_license": "CC-BY-SA-4.0",
    "code_license": "MIT",
    "created_at": "2026-10-14"
  }
}
