{
  "$schema": "../../../schemas/mko-v0.4.schema.json",
  "schema_version": "mko-v0.4",
  "id": "mko-inclusion-exclusion-principle",
  "semantic_family_id": "sf-inclusion-exclusion-principle",
  "type": "theorem",
  "version": "0.10.0",
  "language": "zh-Hant",
  "titles": {
    "zh-Hant": "容斥原理"
  },
  "summary": {
    "zh-Hant": "有限indexed set family的union cardinality是全部非空index subsets交集大小的交替和。"
  },
  "statement": {
    "zh-Hant": "對每個非空I⊆[n]使用(-1)^(|I|+1)|intersection_i in I A_i|；odd-order正、even-order負。重複sets仍按indices處理，empty intersections可為0，n=0約定union與sum皆0。只用singles/pairs對n>=3不是exact inclusion-exclusion，截斷只能另稱Bonferroni bound。"
  },
  "formula": {
    "tex": "I(A)",
    "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mrow><mi>I</mi><mo>(</mo><mi>A</mi><mo>)</mo></mrow></math>",
    "semantic_ast": {
      "type": "function_call",
      "callee": {
        "type": "symbol",
        "name": "I",
        "glyph": "I"
      },
      "arguments": [
        {
          "type": "symbol",
          "name": "A",
          "glyph": "A"
        }
      ]
    },
    "compiler": {
      "id": "ocme-formula-core",
      "version": "0.4.0",
      "source_sha256": "6e7f668e41e985ed827b83de5b77d1d9e92784b775f94205c8bf12dd2560f3ae"
    }
  },
  "assumptions": [
    {
      "id": "a1",
      "zh-Hant": "完整有限indexed family，每個set是明示有限整數set。"
    },
    {
      "id": "a2",
      "zh-Hant": "general family枚舉全部2^n-1個nonempty index subsets。"
    }
  ],
  "symbols": [
    {
      "token": "I",
      "role": "inclusion_exclusion_sum",
      "role_zh": "容斥交替和",
      "scope": "representative_formula"
    },
    {
      "token": "A",
      "role": "indexed_set_family",
      "role_zh": "有限集合族",
      "scope": "representative_formula"
    }
  ],
  "dependencies": [
    {
      "id": "mko-set-operations",
      "title_zh": "集合運算",
      "reason_zh": "union與intersections。"
    },
    {
      "id": "mko-counting-principle",
      "title_zh": "基本計數原理",
      "reason_zh": "cardinalities。"
    },
    {
      "id": "mko-cardinality-comparison",
      "title_zh": "集合基數比較",
      "reason_zh": "有限大小。"
    },
    {
      "id": "mko-mathematical-induction",
      "title_zh": "數學歸納法",
      "reason_zh": "一般有限家族定理。"
    }
  ],
  "explanation": {
    "paragraphs_zh": [
      "全部nonempty index subsets缺一不可。",
      "交替符號由intersection order決定。",
      "pairwise truncation不是一般exact formula。"
    ],
    "common_misconception_zh": "三集合以上仍只減pairwise intersections而遺漏higher intersections。"
  },
  "proofs": [],
  "computational_companions": [],
  "verification": {
    "computational_status": "not_evaluated_no_computational_claim",
    "warning_zh": "只處理有限families；Bonferroni bounds須另行標示。",
    "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": "加入generating functions與Catalan counting。"
  },
  "provenance": {
    "origin": "ocme_local_ai_materialization_candidate",
    "note_zh": "依 research/atlas-inclusion-exclusion-principle.md 整理；2026-10-14 脈衝 R05（使用者手動接續 2026-11-08 工作序列；實際日期仍為 2026-10-14），英文及 Lean 依使用者指示延後。",
    "content_license": "CC-BY-SA-4.0",
    "code_license": "MIT",
    "created_at": "2026-10-14"
  }
}
