{
  "$schema": "../../../schemas/mko-v0.4.schema.json",
  "schema_version": "mko-v0.4",
  "id": "mko-conditional-probability",
  "semantic_family_id": "sf-conditional-probability",
  "type": "definition",
  "version": "0.10.0",
  "language": "zh-Hant",
  "titles": {
    "zh-Hant": "有限模型的條件機率"
  },
  "summary": {
    "zh-Hant": "條件事件必須有正機率；有限模型中 P(A|B)=P(A∩B)/P(B)，方向不能任意交換。"
  },
  "statement": {
    "zh-Hant": "在非空有限樣本空間 S、全冪集事件族 F=𝒫(S) 與已歸一化非負有理權重下，對 A、B⊆S 且 P(B)>0，定義 C(A,B)=P(A|B)=P(A∩B)/P(B)。若 P(B)=0，本條目不定義這個條件機率，即使 B 非空。"
  },
  "formula": {
    "tex": "C(A,B)",
    "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mrow><mi>C</mi><mo>(</mo><mi>A</mi><mo>,</mo><mi>B</mi><mo>)</mo></mrow></math>",
    "semantic_ast": {
      "type": "function_call",
      "callee": {
        "type": "symbol",
        "name": "C",
        "glyph": "C"
      },
      "arguments": [
        {
          "type": "symbol",
          "name": "A",
          "glyph": "A"
        },
        {
          "type": "symbol",
          "name": "B",
          "glyph": "B"
        }
      ]
    },
    "compiler": {
      "id": "ocme-formula-core",
      "version": "0.4.0",
      "source_sha256": "1b0cba0c4e560067f331e0c6fcd8cfa4344f70f4c8b983a9ccb9b52f42693388"
    }
  },
  "assumptions": [
    {
      "id": "a1",
      "zh-Hant": "有限權重模型合法，A、B 均為 S 的子集合。"
    },
    {
      "id": "a2",
      "zh-Hant": "條件機率分母 P(B) 必須嚴格大於零；等可能模型須另明示。"
    }
  ],
  "symbols": [
    {
      "token": "C",
      "role": "conditional_probability",
      "role_zh": "有順序的條件機率",
      "scope": "representative_formula"
    },
    {
      "token": "A",
      "role": "queried_event",
      "role_zh": "待衡量事件",
      "scope": "representative_formula"
    },
    {
      "token": "B",
      "role": "conditioning_event",
      "role_zh": "正機率的條件事件",
      "scope": "representative_formula"
    }
  ],
  "dependencies": [
    {
      "id": "mko-probability",
      "title_zh": "有限樣本空間上的機率",
      "reason_zh": "先指定歸一化權重與事件機率。"
    },
    {
      "id": "mko-set-operations",
      "title_zh": "集合運算",
      "reason_zh": "交集 A∩B 與限制事件須明示集合語義。"
    }
  ],
  "explanation": {
    "paragraphs_zh": [
      "先算 B 中的機率質量，再算 A∩B 中的質量，最後相除。共同正分母可以約掉，但前提是權重模型和事件資格都已驗證。",
      "B 非空不保證 P(B)>0：若其中權重都為零，仍不能條件化。等可能有限模型才可將比例化成 |A∩B|/|B|，且 B 必須非空。",
      "P(A|B) 與 P(B|A) 一般不同；兩方向比較都須各自有正分母。數值相等或不同本身不建立事件獨立性，條件機率也不是把 P(A) 乘上 P(B)。"
    ],
    "common_misconception_zh": "把非空當正機率、對零機率條件給零答案，或把兩方向條件機率混同。"
  },
  "proofs": [],
  "computational_companions": [],
  "verification": {
    "computational_status": "not_evaluated_no_computational_claim",
    "warning_zh": "有限有理模型可以精確重算；一般正則條件機率、零機率條件與 Bayes／獨立性定理不屬於本輪。",
    "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": "綁定有限事件交集、正分母條件化與有理質量比；零機率條件另有語義義務。"
  },
  "provenance": {
    "origin": "ocme_local_ai_materialization_candidate",
    "note_zh": "依 research/atlas-conditional-probability.md 整理；2026-10-03 脈衝 R07（依使用者要求提前完成 2026-10-04 的流程），英文及 Lean 依使用者指示延後。",
    "content_license": "CC-BY-SA-4.0",
    "code_license": "MIT",
    "created_at": "2026-10-03"
  }
}
