{
  "$schema": "../../../schemas/mko-v0.4.schema.json",
  "schema_version": "mko-v0.4",
  "id": "mko-euler-totient-function",
  "semantic_family_id": "sf-euler-totient-function",
  "type": "definition",
  "version": "0.10.0",
  "language": "zh-Hant",
  "titles": {
    "zh-Hant": "Euler φ函數"
  },
  "summary": {
    "zh-Hant": "Euler φ(n)計數一個完整剩餘代表系中與n互質的代表；約定φ(1)=1。"
  },
  "statement": {
    "zh-Hant": "本輪一致使用1≤k≤n的完整代表範圍，以gcd(k,n)=1計數。乘法性只核gcd(m,n)=1的明示實例，不由非互質實例外推。"
  },
  "formula": {
    "tex": "P(n)",
    "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mrow><mi>P</mi><mo>(</mo><mi>n</mi><mo>)</mo></mrow></math>",
    "semantic_ast": {
      "type": "function_call",
      "callee": {
        "type": "symbol",
        "name": "P",
        "glyph": "P"
      },
      "arguments": [
        {
          "type": "symbol",
          "name": "n",
          "glyph": "n"
        }
      ]
    },
    "compiler": {
      "id": "ocme-formula-core",
      "version": "0.4.0",
      "source_sha256": "23873bf1e83a235dc436cf72a904024d9de43c846340842fd0f63b746ebe3777"
    }
  },
  "assumptions": [
    {
      "id": "a1",
      "zh-Hant": "n為正整數。"
    },
    {
      "id": "a2",
      "zh-Hant": "使用1到n代表系；n=1時唯一代表1與1互質。"
    }
  ],
  "symbols": [
    {
      "token": "P",
      "role": "euler_totient",
      "role_zh": "Euler φ函數",
      "scope": "representative_formula"
    },
    {
      "token": "n",
      "role": "positive_integer",
      "role_zh": "正整數模數",
      "scope": "representative_formula"
    }
  ],
  "dependencies": [
    {
      "id": "mko-prime-number",
      "title_zh": "質數",
      "reason_zh": "質數特例。"
    },
    {
      "id": "mko-gcd-coprime",
      "title_zh": "最大公因數與互質",
      "reason_zh": "篩選互質代表。"
    },
    {
      "id": "mko-counting-principle",
      "title_zh": "計數原理",
      "reason_zh": "計數完整代表。"
    },
    {
      "id": "mko-function-mapping",
      "title_zh": "函數映射",
      "reason_zh": "φ為正整數函數。"
    }
  ],
  "explanation": {
    "paragraphs_zh": [
      "完整枚舉代表並精確核gcd。",
      "φ(1)=1按本代表約定保留。",
      "φ(mn)=φ(m)φ(n)只在m,n互質時使用。"
    ],
    "common_misconception_zh": "漏掉n=1、混用0到n減1與1到n卻重複計數，或忽略乘法性的互質前提。"
  },
  "proofs": [],
  "computational_companions": [],
  "verification": {
    "computational_status": "not_evaluated_no_computational_claim",
    "warning_zh": "有限枚舉證指定值；乘法題只證指定互質實例。",
    "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": "加入模反元素、中國剩餘定理與Fermat小定理。"
  },
  "provenance": {
    "origin": "ocme_local_ai_materialization_candidate",
    "note_zh": "依 research/atlas-euler-totient-function.md 整理；2026-10-14 脈衝 R06（使用者手動接續 2026-11-01 工作序列；實際日期仍為 2026-10-14），英文及 Lean 依使用者指示延後。",
    "content_license": "CC-BY-SA-4.0",
    "code_license": "MIT",
    "created_at": "2026-10-14"
  }
}
