{
  "$schema": "../../../schemas/mko-v0.4.schema.json",
  "schema_version": "mko-v0.4",
  "id": "mko-covariance",
  "semantic_family_id": "sf-covariance",
  "type": "definition",
  "version": "0.10.0",
  "language": "zh-Hant",
  "titles": {
    "zh-Hant": "協方差"
  },
  "summary": {
    "zh-Hant": "同一有限聯合分布下協方差為E[XY]-E[X]E[Y]；零協方差通常不推出獨立。"
  },
  "statement": {
    "zh-Hant": "給同一有限joint law上的X,Y，Cov(X,Y)=E[XY]-E[X]E[Y]。協方差對兩變數對稱，仿射變換滿足Cov(aX+b,cY+d)=ac Cov(X,Y)。"
  },
  "formula": {
    "tex": "Cov(X,Y)",
    "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mrow><mi>Cov</mi><mo>(</mo><mi>X</mi><mo>,</mo><mi>Y</mi><mo>)</mo></mrow></math>",
    "semantic_ast": {
      "type": "function_call",
      "callee": {
        "type": "symbol",
        "name": "Cov",
        "glyph": "Cov"
      },
      "arguments": [
        {
          "type": "symbol",
          "name": "X",
          "glyph": "X"
        },
        {
          "type": "symbol",
          "name": "Y",
          "glyph": "Y"
        }
      ]
    },
    "compiler": {
      "id": "ocme-formula-core",
      "version": "0.4.0",
      "source_sha256": "510c44b2be9befa5c3ac34d97d18797eb2100a16a7b1d8baf87504b962e196f5"
    }
  },
  "assumptions": [
    {
      "id": "a1",
      "zh-Hant": "所有期望都從同一精確有限joint law計算。"
    },
    {
      "id": "a2",
      "zh-Hant": "非零協方差可否證獨立；零協方差一般不能證獨立。"
    }
  ],
  "symbols": [
    {
      "token": "Cov",
      "role": "covariance",
      "role_zh": "協方差",
      "scope": "representative_formula"
    },
    {
      "token": "X",
      "role": "random_variable",
      "role_zh": "第一變數",
      "scope": "representative_formula"
    },
    {
      "token": "Y",
      "role": "random_variable",
      "role_zh": "第二變數",
      "scope": "representative_formula"
    }
  ],
  "dependencies": [
    {
      "id": "mko-finite-joint-distribution",
      "title_zh": "有限聯合分布",
      "reason_zh": "協方差需要共同law。"
    },
    {
      "id": "mko-expectation",
      "title_zh": "期望值",
      "reason_zh": "公式含三個期望。"
    },
    {
      "id": "mko-variance",
      "title_zh": "變異數",
      "reason_zh": "協方差與變異數共享中心化二階量。"
    },
    {
      "id": "mko-random-variable",
      "title_zh": "隨機變數",
      "reason_zh": "X與Y位於共同機率空間。"
    }
  ],
  "explanation": {
    "paragraphs_zh": [
      "先算EX、EY、EXY再相減。",
      "交換X與Y不改協方差。",
      "X取-1,0,1且Y=X²可給零協方差但依賴的有限反例。"
    ],
    "common_misconception_zh": "看到Cov=0就宣稱獨立，或混用不同joint models的期望。"
  },
  "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": "加入隨機變數獨立、條件期望與相關係數。"
  },
  "provenance": {
    "origin": "ocme_local_ai_materialization_candidate",
    "note_zh": "依 research/atlas-covariance.md 整理；2026-10-13 脈衝 R05（使用者手動接續 2026-10-26 工作序列；實際日期仍為 2026-10-13），英文及 Lean 依使用者指示延後。",
    "content_license": "CC-BY-SA-4.0",
    "code_license": "MIT",
    "created_at": "2026-10-13"
  }
}
