{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-covariance-01",
  "mko_id": "mko-covariance",
  "title": {
    "zh-Hant": "協方差：對稱性、仿射規則與「零協方差不蘊含獨立」",
    "en": "Covariance: symmetry, the affine rule, and why zero covariance does not imply independence"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-covariance-01",
    "source": {
      "mko_id": "mko-covariance",
      "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
      "sha256": "3b0480b894efd088fcbcb2c9c856fb6e46bc8b62a223285723b060bf0070143d",
      "english_sha256": "df82b21fa123d4f51a7320f03eab21717099356a4a1b8959e5cec7b86c26e42a"
    },
    "mode": "theorem_proof",
    "audience_prerequisites": [
      "distributive",
      "finite_sum_rules",
      "mul_comm",
      "numeric_evaluation",
      "marginal_def",
      "finite_sum_regroup"
    ],
    "goal": {
      "zh-Hant": "在同一個精確有限 joint law 上：(1) 證明 Cov(Y,X)=Cov(X,Y)；(2) 證明 Cov(aX+b,cY+d)=ac·Cov(X,Y)；(3) 證明 X、Y 獨立時 Cov(X,Y)=0，因此非零協方差可否證獨立；(4) 對 X 均勻取 −1、0、1 且 Y=X² 的 joint law，算出 E[X]、E[Y]、E[XY] 與 Cov(X,Y)=0，並證明 X、Y 不獨立。",
      "en": "On one exact finite joint law: (1) prove Cov(Y,X)=Cov(X,Y); (2) prove Cov(aX+b,cY+d)=ac·Cov(X,Y); (3) prove that independence of X and Y gives Cov(X,Y)=0, so a nonzero covariance refutes independence; (4) for the joint law with X uniform on −1, 0, 1 and Y=X², compute E[X], E[Y], E[XY] and Cov(X,Y)=0, and prove that X and Y are not independent."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "(S,p) 是有限 joint law：S 為互異整數對，p(s)≥0 為精確有理數且 Σ_{s∈S} p(s)=1。X、Y 是座標：在 s=(x,y) 上 X=x、Y=y。所有期望都是 E[g]=Σ_{s∈S} p(s)g(s)，用同一個 (S,p)。",
          "en": "(S,p) is a finite joint law: S consists of distinct integer pairs, each p(s)≥0 is an exact rational and Σ_{s∈S} p(s)=1. X and Y are the coordinates: at s=(x,y), X=x and Y=y. Every expectation is E[g]=Σ_{s∈S} p(s)g(s) with this one (S,p)."
        }
      },
      {
        "id": "G2",
        "statement": {
          "zh-Hant": "a、b、c、d 是實數常數。",
          "en": "a, b, c, d are real constants."
        }
      },
      {
        "id": "G3",
        "statement": {
          "zh-Hant": "例子：S={(−1,1),(0,0),(1,1)}，每個值對質量 1/3。",
          "en": "Example: S={(−1,1),(0,0),(1,1)}, each pair with mass 1/3."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1",
          "mko_expectation_def"
        ],
        "before_tex": "X,\\ Y\\ \\text{on one law}\\ (S,p)",
        "after_tex": "\\operatorname{Cov}(X,Y)=E[XY]-E[X]E[Y],\\quad E[g]=\\sum_{s\\in S}p(s)\\,g(s)",
        "relation": "definition",
        "rule": "mko_cov_def",
        "conditions": [
          "\\text{all expectations use the same }(S,p)"
        ],
        "explanation": {
          "zh-Hant": "依 MKO 定義協方差：先算 E[X]、E[Y]、E[XY]，再相減。三個期望都用 G1 的同一個 joint law，樣本空間是 S、權重是 p（p 非負且總和恰為 1，正是期望定義要求的歸一化權重）。",
          "en": "Define covariance by the MKO: compute E[X], E[Y] and E[XY], then subtract. All three expectations use the one joint law of G1, with sample space S and weights p (p is nonnegative and sums exactly to 1, the normalized weights the definition of expectation requires)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "mko_cov_def",
            "mko_expectation_def"
          ],
          "explanation": {
            "zh-Hant": "此步只寫出定義，不推出新事實；它要求三個期望來自同一個 (S,p)。",
            "en": "This step only states the definition and derives no new fact; it requires the three expectations to come from the same (S,p)."
          }
        },
        "leaf_basis": "mko_cov_def + mko_expectation_def + def_unfold"
      },
      {
        "id": "S02",
        "uses": [
          "S01"
        ],
        "before_tex": "\\operatorname{Cov}(Y,X)=E[YX]-E[Y]E[X]",
        "after_tex": "\\operatorname{Cov}(Y,X)=E[XY]-E[X]E[Y]=\\operatorname{Cov}(X,Y)",
        "relation": "equivalent",
        "rule": "mul_comm",
        "conditions": [],
        "explanation": {
          "zh-Hant": "在每個 s∈S 上 Y(s)X(s)=X(s)Y(s)（實數乘法交換），所以 YX 與 XY 是同一個函數，期望相同；E[Y]E[X]=E[X]E[Y] 也是乘法交換。因此交換兩個變數不改變協方差。",
          "en": "At every s∈S, Y(s)X(s)=X(s)Y(s) (real multiplication commutes), so YX and XY are the same function with the same expectation; E[Y]E[X]=E[X]E[Y] is also commutativity. So swapping the two variables does not change the covariance."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "mul_comm",
            "eq_replace"
          ],
          "explanation": {
            "zh-Hant": "兩邊只差乘法順序，同一改寫倒過來就回到原式，雙向成立。",
            "en": "The two sides differ only in the order of multiplication; the same rewrite read backwards returns the original, so it holds both ways."
          }
        },
        "leaf_basis": "mul_comm + eq_replace + def_unfold"
      },
      {
        "id": "S03",
        "uses": [
          "S01",
          "G1"
        ],
        "before_tex": "E\\Big[\\sum_{k=1}^{m}c_kU_k\\Big]",
        "after_tex": "\\sum_{k=1}^{m}c_k\\,E[U_k],\\quad E[c]=c",
        "relation": "theorem_application",
        "rule": "L_lin_exp",
        "conditions": [
          "U_k\\ \\text{functions of}\\ (X,Y)\\ \\text{on the same}\\ (S,p)"
        ],
        "explanation": {
          "zh-Hant": "協方差的計算需要期望的線性。引理 L_lin_exp 在 S03.1、S03.2 證明；它只需要所有 U_k 都定義在同一個 (S,p) 上，不需要任何獨立性。",
          "en": "Computing covariance needs linearity of expectation. Lemma L_lin_exp is proved in S03.1 and S03.2; it needs only that every U_k lives on the same (S,p), and no independence."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "L_lin_exp"
          ],
          "explanation": {
            "zh-Hant": "引理的前提是同一個有限 joint law 與總和為 1 的權重；兩者都由 G1 提供。",
            "en": "The lemma's hypotheses are one finite joint law and weights summing to 1, both supplied by G1."
          }
        },
        "leaf_basis": "L_lin_exp"
      },
      {
        "id": "S03.1",
        "uses": [
          "G1",
          "distributive",
          "finite_sum_rules"
        ],
        "before_tex": "\\sum_{s\\in S}p(s)\\sum_{k=1}^{m}c_kU_k(s)",
        "after_tex": "\\sum_{k=1}^{m}c_k\\sum_{s\\in S}p(s)\\,U_k(s)=\\sum_{k=1}^{m}c_k\\,E[U_k]",
        "relation": "equivalent",
        "rule": "finite_sum_rules",
        "conditions": [
          "S\\ \\text{finite}"
        ],
        "explanation": {
          "zh-Hant": "把 p(s) 分配進內層和，得到兩個有限和的雙重和；有限和可交換求和次序（反覆使用 Σ(a_i+b_i)=Σa_i+Σb_i），再把常數 c_k 提出（Σ c·a_i=c·Σa_i）。每個 Σ_s p(s)U_k(s) 依定義就是 E[U_k]。全部是有限和，沒有收斂問題。",
          "en": "Distribute p(s) into the inner sum to get a double finite sum; the order of finite summation may be exchanged (repeated use of Σ(a_i+b_i)=Σa_i+Σb_i), and the constant c_k comes out (Σ c·a_i=c·Σa_i). Each Σ_s p(s)U_k(s) is E[U_k] by definition. All sums are finite, so there is no convergence issue."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "distributive",
            "finite_sum_rules"
          ],
          "explanation": {
            "zh-Hant": "分配律與有限和的重排都是等值改寫，可逐步倒推。此子步不使用 L_lin_exp。",
            "en": "Distributivity and rearranging finite sums are rewrites of equal values and can be reversed step by step. This sub-step does not use L_lin_exp."
          }
        },
        "leaf_basis": "distributive + finite_sum_rules + mul_comm + mul_assoc"
      },
      {
        "id": "S03.2",
        "uses": [
          "G1",
          "finite_sum_rules"
        ],
        "before_tex": "E[c]=\\sum_{s\\in S}p(s)\\,c",
        "after_tex": "E[c]=c\\sum_{s\\in S}p(s)=c",
        "relation": "equivalent",
        "rule": "finite_sum_rules",
        "conditions": [
          "\\sum_{s\\in S}p(s)=1"
        ],
        "explanation": {
          "zh-Hant": "常數函數 c 的期望：提出 c 後剩下 Σ_s p(s)，由 G1 恰為 1，所以 E[c]=c。若質量只近似和為 1，這一步就不成立。S03.1 與 S03.2 合起來證得引理 L_lin_exp。",
          "en": "The expectation of the constant function c: pulling out c leaves Σ_s p(s), which is exactly 1 by G1, so E[c]=c. If the masses only approximately summed to 1, this step would fail. S03.1 and S03.2 together prove Lemma L_lin_exp."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "finite_sum_rules",
            "mul_one"
          ],
          "explanation": {
            "zh-Hant": "提出常數與乘以 1 都可倒推；所用條件是 Σp=1。此子步不使用 L_lin_exp。",
            "en": "Pulling out a constant and multiplying by 1 can both be reversed; the condition used is Σp=1. This sub-step does not use L_lin_exp."
          }
        },
        "leaf_basis": "finite_sum_rules + mul_one + mul_comm"
      },
      {
        "id": "S04",
        "uses": [
          "S03",
          "G2"
        ],
        "before_tex": "E[aX+b],\\ E[cY+d]",
        "after_tex": "E[aX+b]=a\\,E[X]+b,\\quad E[cY+d]=c\\,E[Y]+d",
        "relation": "theorem_application",
        "rule": "L_lin_exp",
        "conditions": [],
        "explanation": {
          "zh-Hant": "取 m=2、U_1=X、U_2=1（常數函數）、c_1=a、c_2=b：E[aX+b]=aE[X]+bE[1]=aE[X]+b。對 Y 以 c、d 同理。",
          "en": "Take m=2, U_1=X, U_2=1 (the constant function), c_1=a and c_2=b: E[aX+b]=aE[X]+bE[1]=aE[X]+b. The same with c and d for Y."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S03",
            "G2",
            "L_lin_exp"
          ],
          "explanation": {
            "zh-Hant": "只需引理與 a、b、c、d 為常數；aX+b 與 cY+d 都定義在同一個 (S,p) 上。",
            "en": "It needs only the lemma and that a, b, c, d are constants; aX+b and cY+d both live on the same (S,p)."
          }
        },
        "leaf_basis": "L_lin_exp"
      },
      {
        "id": "S05",
        "uses": [
          "G2",
          "distributive"
        ],
        "before_tex": "(aX+b)(cY+d)",
        "after_tex": "ac\\,XY+ad\\,X+bc\\,Y+bd",
        "relation": "equivalent",
        "rule": "distributive",
        "conditions": [],
        "explanation": {
          "zh-Hant": "在每個 s∈S 上逐點展開乘積：(aX(s)+b)(cY(s)+d)=acX(s)Y(s)+adX(s)+bcY(s)+bd。這是實數的分配律與交換律，對所有 s 成立，所以兩個函數相等（N1 是四次多線性恆等式的格點核對）。",
          "en": "Expand the product pointwise at every s∈S: (aX(s)+b)(cY(s)+d)=acX(s)Y(s)+adX(s)+bcY(s)+bd. This is distributivity and commutativity of real numbers, valid for every s, so the two functions are equal (N1 checks this degree-four multilinear identity on a grid)."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "distributive",
            "mul_comm"
          ],
          "explanation": {
            "zh-Hant": "因式分解是展開的反向，兩式在每個 s 上相等，雙向成立。",
            "en": "Factoring is the reverse of expanding; the two expressions agree at every s, so the step holds both ways."
          }
        },
        "leaf_basis": "distributive + mul_comm + mul_assoc"
      },
      {
        "id": "S06",
        "uses": [
          "S03",
          "S05"
        ],
        "before_tex": "E[(aX+b)(cY+d)]",
        "after_tex": "ac\\,E[XY]+ad\\,E[X]+bc\\,E[Y]+bd",
        "relation": "theorem_application",
        "rule": "L_lin_exp",
        "conditions": [],
        "explanation": {
          "zh-Hant": "把 S05 的展開代入期望，再用引理（m=4，U 依序為 XY、X、Y、1，係數 ac、ad、bc、bd）。這裡 E[XY] 必須用同一 joint law 計算，不能用兩個邊際相乘代替。",
          "en": "Substitute the expansion of S05 into the expectation and apply the lemma (m=4, with U equal to XY, X, Y, 1 and coefficients ac, ad, bc, bd). Here E[XY] must be computed on the same joint law and must not be assumed to equal E[X]E[Y] merely from the marginals."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S03",
            "S05",
            "L_lin_exp"
          ],
          "explanation": {
            "zh-Hant": "需要 S05 的逐點等式（相等的函數有相等的期望）與引理；線性不需要獨立性。",
            "en": "It needs the pointwise identity of S05 (equal functions have equal expectations) and the lemma; linearity needs no independence."
          }
        },
        "leaf_basis": "L_lin_exp + eq_replace"
      },
      {
        "id": "S07",
        "uses": [
          "S04"
        ],
        "before_tex": "E[aX+b]\\,E[cY+d]=(a\\,E[X]+b)(c\\,E[Y]+d)",
        "after_tex": "ac\\,E[X]E[Y]+ad\\,E[X]+bc\\,E[Y]+bd",
        "relation": "equivalent",
        "rule": "distributive",
        "conditions": [],
        "explanation": {
          "zh-Hant": "對兩個實數 aE[X]+b 與 cE[Y]+d 的乘積用分配律展開，結構與 S05 相同。",
          "en": "Expand the product of the two reals aE[X]+b and cE[Y]+d by distributivity, with the same pattern as S05."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "distributive",
            "mul_comm"
          ],
          "explanation": {
            "zh-Hant": "實數的展開與因式分解互逆，雙向成立。",
            "en": "Expanding and factoring reals are inverse rewrites, so it holds both ways."
          }
        },
        "leaf_basis": "distributive + mul_comm + mul_assoc"
      },
      {
        "id": "S08",
        "uses": [
          "S01",
          "S06",
          "S07"
        ],
        "before_tex": "\\operatorname{Cov}(aX+b,cY+d)=E[(aX+b)(cY+d)]-E[aX+b]\\,E[cY+d]",
        "after_tex": "\\operatorname{Cov}(aX+b,cY+d)=ac\\,(E[XY]-E[X]E[Y])=ac\\operatorname{Cov}(X,Y)",
        "relation": "equivalent",
        "rule": "eq_replace",
        "conditions": [],
        "explanation": {
          "zh-Hant": "把 S06 與 S07 代入定義後相減：adE[X]、bcE[Y]、bd 三項互相抵消，剩下 acE[XY]−acE[X]E[Y]=ac(E[XY]−E[X]E[Y])=ac·Cov(X,Y)。常數 b、d 消失，係數 a、c 相乘（含正負號）。N2 是這個代數恆等式的核對。",
          "en": "Substitute S06 and S07 into the definition and subtract: the terms adE[X], bcE[Y] and bd cancel, leaving acE[XY]−acE[X]E[Y]=ac(E[XY]−E[X]E[Y])=ac·Cov(X,Y). The constants b and d disappear and the coefficients a and c multiply, signs included. N2 checks this algebraic identity."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "S06",
            "S07",
            "distributive",
            "add_inverse"
          ],
          "explanation": {
            "zh-Hant": "每一步都是等值代換與加減同項，可倒推；兩邊是同一個實數。",
            "en": "Every move replaces equals or adds and removes the same term, so it can be reversed; both sides are the same real number."
          }
        },
        "leaf_basis": "eq_replace + add_inverse + distributive + add_comm"
      },
      {
        "id": "S09",
        "uses": [
          "G3",
          "mko_joint_def"
        ],
        "before_tex": "S=\\{(-1,1),(0,0),(1,1)\\},\\ p\\equiv\\tfrac13",
        "after_tex": "\\text{a finite joint law with}\\ Y=X^2\\ \\text{on}\\ S",
        "relation": "implies",
        "rule": "mko_joint_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "三個值對的第一座標 −1、0、1 互異，所以值對互異；質量 1/3>0；總和 3·(1/3)=1。故它是有限 joint law。每個值對的第二座標等於第一座標的平方：(−1)²=1、0²=0、1²=1，所以在這個 law 上 Y=X²。",
          "en": "The first coordinates −1, 0, 1 are distinct, so the pairs are distinct; each mass 1/3>0; the total is 3·(1/3)=1. So it is a finite joint law. In each pair the second coordinate is the square of the first, (−1)²=1, 0²=0, 1²=1, so Y=X² on this law."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G3",
            "mko_joint_def"
          ],
          "explanation": {
            "zh-Hant": "逐項核了三項資格與 Y=X² 的三個值對；不宣稱反向。",
            "en": "The three requirements and Y=X² were checked on each of the three pairs; no converse is claimed."
          }
        },
        "leaf_basis": "mko_joint_def + cartesian_product_def + numeric_evaluation"
      },
      {
        "id": "S10",
        "uses": [
          "S01",
          "S09"
        ],
        "before_tex": "E[X]=\\tfrac13(-1)+\\tfrac13(0)+\\tfrac13(1)",
        "after_tex": "E[X]=0",
        "relation": "equivalent",
        "rule": "numeric_evaluation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依定義 E[X]=Σ p(s)X(s)，三個值對的 X 值是 −1、0、1，各乘 1/3 相加得 0。",
          "en": "By definition E[X]=Σ p(s)X(s); the X values of the three pairs are −1, 0, 1, each times 1/3, adding to 0."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "精確有理數求值，兩邊是同一個數。",
            "en": "Exact rational evaluation; both sides are the same number."
          }
        },
        "leaf_basis": "numeric_evaluation + frac_rules"
      },
      {
        "id": "S11",
        "uses": [
          "S01",
          "S09"
        ],
        "before_tex": "E[Y]=\\tfrac13(1)+\\tfrac13(0)+\\tfrac13(1)",
        "after_tex": "E[Y]=\\tfrac23",
        "relation": "equivalent",
        "rule": "numeric_evaluation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "三個值對的 Y 值是 1、0、1，加權和為 2/3。",
          "en": "The Y values of the three pairs are 1, 0, 1, with weighted sum 2/3."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "精確有理數求值，兩邊是同一個數。",
            "en": "Exact rational evaluation; both sides are the same number."
          }
        },
        "leaf_basis": "numeric_evaluation + frac_rules"
      },
      {
        "id": "S12",
        "uses": [
          "S01",
          "S09"
        ],
        "before_tex": "E[XY]=\\tfrac13(-1)(1)+\\tfrac13(0)(0)+\\tfrac13(1)(1)",
        "after_tex": "E[XY]=0",
        "relation": "equivalent",
        "rule": "numeric_evaluation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "XY 在三個值對上的值是 −1、0、1（就是 X³），加權和為 0。E[XY] 是在同一個 joint law 上逐值對計算的，不是 E[X]E[Y]。",
          "en": "XY takes the values −1, 0, 1 on the three pairs (it equals X³), with weighted sum 0. E[XY] is computed pair by pair on the same joint law, not as E[X]E[Y]."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "精確有理數求值，兩邊是同一個數。",
            "en": "Exact rational evaluation; both sides are the same number."
          }
        },
        "leaf_basis": "numeric_evaluation + frac_rules"
      },
      {
        "id": "S13",
        "uses": [
          "S01",
          "S10",
          "S11",
          "S12"
        ],
        "before_tex": "\\operatorname{Cov}(X,Y)=E[XY]-E[X]E[Y]",
        "after_tex": "\\operatorname{Cov}(X,Y)=0-0\\cdot\\tfrac23=0",
        "relation": "equivalent",
        "rule": "eq_replace",
        "conditions": [],
        "explanation": {
          "zh-Hant": "代入 S10 到 S12 的三個值：0−0·(2/3)=0。這個例子的協方差為零。",
          "en": "Substitute the three values of S10 to S12: 0−0·(2/3)=0. The covariance of this example is zero."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "S10",
            "S11",
            "S12",
            "eq_replace"
          ],
          "explanation": {
            "zh-Hant": "等值代入可倒推，兩邊是同一個數。",
            "en": "Substituting equals can be reversed; both sides are the same number."
          }
        },
        "leaf_basis": "eq_replace + numeric_evaluation"
      },
      {
        "id": "S14",
        "uses": [
          "S01",
          "G1"
        ],
        "before_tex": "X,\\ Y\\ \\text{independent on}\\ (S,p)",
        "after_tex": "E[XY]=E[X]E[Y],\\ \\operatorname{Cov}(X,Y)=0",
        "relation": "implies",
        "rule": "L_indep_prod",
        "conditions": [
          "P(X=x,Y=y)=p_X(x)p_Y(y)\\ \\text{for all}\\ (x,y)\\in S_X\\times S_Y"
        ],
        "explanation": {
          "zh-Hant": "引理 L_indep_prod（S14.1 到 S14.3 證明）給出 E[XY]=E[X]E[Y]，代入 S01 得 Cov(X,Y)=0。這是 MKO 假設 a2 前半句的依據。",
          "en": "Lemma L_indep_prod (proved in S14.1 to S14.3) gives E[XY]=E[X]E[Y], and S01 then gives Cov(X,Y)=0. This is the basis of the first half of MKO assumption a2."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S01",
            "L_indep_prod"
          ],
          "explanation": {
            "zh-Hant": "只證「獨立 ⇒ 協方差為零」；反向「協方差為零 ⇒ 獨立」不宣稱，而且 S16、S17 會證明它一般是錯的。",
            "en": "Only 'independent ⇒ zero covariance' is proved; the converse 'zero covariance ⇒ independent' is not claimed, and S16 and S17 show it is false in general."
          }
        },
        "leaf_basis": "L_indep_prod + eq_replace + add_inverse"
      },
      {
        "id": "S14.1",
        "uses": [
          "G1",
          "marginal_def",
          "finite_sum_regroup"
        ],
        "before_tex": "E[XY]=\\sum_{(x,y)\\in S}xy\\,p(x,y)",
        "after_tex": "E[XY]=\\sum_{x\\in S_X}\\sum_{y\\in S_Y}xy\\,P(X=x,Y=y)",
        "relation": "equivalent",
        "rule": "finite_sum_regroup",
        "conditions": [
          "S\\subseteq S_X\\times S_Y"
        ],
        "explanation": {
          "zh-Hant": "S_X、S_Y 是 S 中出現的第一、第二座標，所以 S⊆S_X×S_Y。在 S 上 P(X=x,Y=y)=p(x,y)，在 S_X×S_Y 中不屬於 S 的格點上 P(X=x,Y=y)=0，這些項是 0。加入值為 0 的項並依第一座標重組，有限和不變。",
          "en": "S_X and S_Y are the first and second coordinates occurring in S, so S⊆S_X×S_Y. On S, P(X=x,Y=y)=p(x,y); at grid points of S_X×S_Y outside S, P(X=x,Y=y)=0 and those terms are 0. Adding zero terms and regrouping by first coordinate leaves the finite sum unchanged."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "finite_sum_regroup",
            "marginal_def"
          ],
          "explanation": {
            "zh-Hant": "刪去值為 0 的項就回到原和，雙向成立。此子步不使用 L_indep_prod。",
            "en": "Deleting the zero terms returns the original sum, so it holds both ways. This sub-step does not use L_indep_prod."
          }
        },
        "leaf_basis": "finite_sum_regroup + mul_zero + add_zero"
      },
      {
        "id": "S14.2",
        "uses": [
          "S14.1",
          "mko_indep_def"
        ],
        "before_tex": "\\sum_{x\\in S_X}\\sum_{y\\in S_Y}xy\\,P(X=x,Y=y)",
        "after_tex": "\\sum_{x\\in S_X}\\sum_{y\\in S_Y}x\\,p_X(x)\\,y\\,p_Y(y)",
        "relation": "implies",
        "rule": "mko_indep_def",
        "conditions": [
          "X,\\ Y\\ \\text{independent}"
        ],
        "explanation": {
          "zh-Hant": "在獨立的假設下，對每一個格點 (x,y)（包括不在 S 中的格點）都有 P(X=x,Y=y)=p_X(x)p_Y(y)，逐項代入，再用乘法交換重排各因子。",
          "en": "Under the independence hypothesis every grid point (x,y), including points outside S, satisfies P(X=x,Y=y)=p_X(x)p_Y(y); substitute term by term and reorder the factors by commutativity."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S14.1",
            "mko_indep_def"
          ],
          "explanation": {
            "zh-Hant": "這一步依賴獨立假設對「每個」值對成立；只對部分值對成立不夠。沒有獨立假設時不能做此代換。此子步不使用 L_indep_prod。",
            "en": "This step depends on the independence hypothesis holding for every pair; holding for some pairs is not enough. Without independence the substitution cannot be made. This sub-step does not use L_indep_prod."
          }
        },
        "leaf_basis": "mko_indep_def + eq_replace + mul_comm"
      },
      {
        "id": "S14.3",
        "uses": [
          "S14.2",
          "distributive",
          "finite_sum_rules",
          "finite_sum_regroup"
        ],
        "before_tex": "\\sum_{x\\in S_X}\\sum_{y\\in S_Y}x\\,p_X(x)\\,y\\,p_Y(y)",
        "after_tex": "\\Big(\\sum_{x}x\\,p_X(x)\\Big)\\Big(\\sum_{y}y\\,p_Y(y)\\Big)=E[X]\\,E[Y]",
        "relation": "equivalent",
        "rule": "distributive",
        "conditions": [],
        "explanation": {
          "zh-Hant": "內層對 y 求和時 x p_X(x) 是常數，提出後得 x p_X(x)·Σ_y y p_Y(y)；外層再把常數 Σ_y y p_Y(y) 提出，得到兩個和的乘積。最後 Σ_x x p_X(x)=Σ_x Σ_y x p(x,y)=Σ_{s∈S} X(s)p(s)=E[X]（依第一座標重組），E[Y] 同理。S14.1 到 S14.3 合起來證得引理 L_indep_prod。",
          "en": "In the inner sum over y the factor x p_X(x) is constant and comes out, giving x p_X(x)·Σ_y y p_Y(y); the outer sum then pulls out the constant Σ_y y p_Y(y), giving a product of two sums. Finally Σ_x x p_X(x)=Σ_x Σ_y x p(x,y)=Σ_{s∈S} X(s)p(s)=E[X] by regrouping by first coordinate, and likewise for E[Y]. S14.1 to S14.3 together prove Lemma L_indep_prod."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "distributive",
            "finite_sum_rules",
            "finite_sum_regroup"
          ],
          "explanation": {
            "zh-Hant": "提出常數與重組有限和都是等值改寫，可倒推。此子步不使用 L_indep_prod。",
            "en": "Pulling out constants and regrouping finite sums are rewrites of equal values and can be reversed. This sub-step does not use L_indep_prod."
          }
        },
        "leaf_basis": "distributive + finite_sum_rules + finite_sum_regroup + mul_comm"
      },
      {
        "id": "S15",
        "uses": [
          "S14"
        ],
        "before_tex": "X,Y\\ \\text{independent}\\Rightarrow\\operatorname{Cov}(X,Y)=0",
        "after_tex": "\\operatorname{Cov}(X,Y)\\neq 0\\Rightarrow X,Y\\ \\text{not independent}",
        "relation": "equivalent",
        "rule": "contrapositive",
        "conditions": [],
        "explanation": {
          "zh-Hant": "取 S14 的逆否命題：只要算出非零協方差，就能否證獨立。這是 MKO 假設 a2 的前半句。",
          "en": "Take the contrapositive of S14: computing a nonzero covariance refutes independence. This is the first half of MKO assumption a2."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "contrapositive"
          ],
          "explanation": {
            "zh-Hant": "命題與其逆否命題邏輯等價，雙向成立；但這與「逆命題」不同，逆命題沒有被證明。",
            "en": "A statement and its contrapositive are logically equivalent, so the step is two-way; this is different from the converse, which is not proved."
          }
        },
        "leaf_basis": "contrapositive"
      },
      {
        "id": "S16",
        "uses": [
          "S09",
          "marginal_def",
          "mko_indep_def"
        ],
        "before_tex": "P(X=0,Y=1)\\ \\text{vs}\\ P(X=0)\\,P(Y=1)",
        "after_tex": "0\\neq\\tfrac13\\cdot\\tfrac23=\\tfrac29",
        "relation": "implies",
        "rule": "mko_indep_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "(0,1)∉S，所以 P(X=0,Y=1)=0。P(X=0)=p(0,0)=1/3；P(Y=1)=p(−1,1)+p(1,1)=2/3；乘積 2/9≠0。獨立的定義要求每個值對都相等，這個值對不相等，所以 X、Y 不獨立。",
          "en": "(0,1)∉S, so P(X=0,Y=1)=0. P(X=0)=p(0,0)=1/3 and P(Y=1)=p(−1,1)+p(1,1)=2/3, with product 2/9≠0. Independence requires equality at every pair; it fails at this pair, so X and Y are not independent."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S09",
            "marginal_def",
            "mko_indep_def"
          ],
          "explanation": {
            "zh-Hant": "否證只需一個值對不相等；需要支撐列表完整，才能確定 (0,1) 的質量是 0。",
            "en": "Refutation needs only one pair where equality fails; the support list must be complete to know that the mass of (0,1) is 0."
          }
        },
        "leaf_basis": "mko_indep_def + marginal_def + numeric_evaluation"
      },
      {
        "id": "S17",
        "uses": [
          "S13",
          "S16",
          "S14"
        ],
        "before_tex": "\\operatorname{Cov}(X,Y)=0\\ \\text{and}\\ X,Y\\ \\text{dependent}",
        "after_tex": "\\operatorname{Cov}(X,Y)=0\\not\\Rightarrow X,Y\\ \\text{independent}",
        "relation": "implies",
        "rule": "exists_intro",
        "conditions": [],
        "explanation": {
          "zh-Hant": "同一個 joint law 上 Cov(X,Y)=0（S13）而 X、Y 不獨立（S16）。所以「每個有限 joint law 上，協方差為零就獨立」這個全稱命題為假；S14 的逆命題不成立。這是 MKO 假設 a2 的後半句。",
          "en": "On one joint law, Cov(X,Y)=0 (S13) while X and Y are not independent (S16). So the universal claim 'on every finite joint law, zero covariance gives independence' is false; the converse of S14 fails. This is the second half of MKO assumption a2."
        },
        "reverse_audit": {
          "kind": "sufficient_goal_reduction",
          "required_ids": [
            "S13",
            "S16",
            "exists_intro"
          ],
          "explanation": {
            "zh-Hant": "目標 G：零協方差一般不能證獨立。足夠條件 H：存在一個協方差為零但不獨立的有限 joint law；H⇒G 因為一個反例就否定全稱命題。H 由 S09 到 S16 正向證成。",
            "en": "Goal G: zero covariance does not in general prove independence. Sufficient condition H: some finite joint law has zero covariance but is not independent; H⇒G because one counterexample refutes a universal claim. H is proved forwards in S09 to S16."
          }
        },
        "leaf_basis": "exists_intro + quantifier_negation"
      }
    ],
    "result": {
      "zh-Hant": "在同一有限 joint law 上，Cov(Y,X)=Cov(X,Y)，Cov(aX+b,cY+d)=ac·Cov(X,Y)；獨立蘊含 Cov=0，所以非零協方差可否證獨立。對 X 均勻取 −1、0、1 且 Y=X² 的 law，E[X]=0、E[Y]=2/3、E[XY]=0、Cov(X,Y)=0，但 P(X=0,Y=1)=0≠2/9=P(X=0)P(Y=1)，X、Y 不獨立：零協方差不蘊含獨立。",
      "en": "On one finite joint law, Cov(Y,X)=Cov(X,Y) and Cov(aX+b,cY+d)=ac·Cov(X,Y); independence implies Cov=0, so a nonzero covariance refutes independence. For the law with X uniform on −1, 0, 1 and Y=X², E[X]=0, E[Y]=2/3, E[XY]=0 and Cov(X,Y)=0, but P(X=0,Y=1)=0≠2/9=P(X=0)P(Y=1), so X and Y are dependent: zero covariance does not imply independence."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "例子中 Cov(X,Y)=0，所以 X、Y 獨立",
          "en": "In the example Cov(X,Y)=0, so X and Y are independent"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "P(X=0,Y=1)=0，但 P(X=0)P(Y=1)=2/9。",
          "en": "P(X=0,Y=1)=0 but P(X=0)P(Y=1)=2/9."
        }
      },
      {
        "claim": {
          "zh-Hant": "Cov(2X+1,−3Y+5)=6·Cov(X,Y)+5",
          "en": "Cov(2X+1,−3Y+5)=6·Cov(X,Y)+5"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "依 S08 等於 2·(−3)·Cov(X,Y)=−6·Cov(X,Y)；常數 1、5 不出現。",
          "en": "By S08 it equals 2·(−3)·Cov(X,Y)=−6·Cov(X,Y); the constants 1 and 5 do not appear."
        }
      },
      {
        "claim": {
          "zh-Hant": "只要知道 X 與 Y 的兩個邊際表，就能算出 Cov(X,Y)",
          "en": "Knowing the two marginal tables of X and Y suffices to compute Cov(X,Y)"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "L1 與 L2 的邊際相同，協方差卻分別是 1/4 與 0。",
          "en": "L1 and L2 have the same marginals but covariances 1/4 and 0."
        }
      },
      {
        "claim": {
          "zh-Hant": "X、Y 獨立而 Cov(X,Y)=1/5 是可能的",
          "en": "It is possible that X and Y are independent while Cov(X,Y)=1/5"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "S14：在有限 joint law 上獨立蘊含 Cov(X,Y)=0。",
          "en": "S14: on a finite joint law, independence implies Cov(X,Y)=0."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "distributive",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "分配律：u(v+w)=uv+uw；配合乘法交換律也有 (v+w)u=vu+wu。",
          "en": "Distributivity: u(v+w)=uv+uw; with commutativity also (v+w)u=vu+wu."
        }
      },
      {
        "id": "finite_sum_rules",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "有限和：Σ_{i=1}^{0} a_i=0、Σ_{i=1}^{n+1} a_i=Σ_{i=1}^{n} a_i + a_{n+1}；Σ(a_i+b_i)=Σa_i+Σb_i；Σ c·a_i=c·Σa_i。",
          "en": "Finite sums: Σ_{i=1}^{0} a_i=0 and Σ_{i=1}^{n+1} a_i=Σ_{i=1}^{n} a_i + a_{n+1}; Σ(a_i+b_i)=Σa_i+Σb_i; Σ c·a_i=c·Σa_i."
        }
      },
      {
        "id": "mul_comm",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "乘法交換律：uv=vu（在交換的數系中，例如 ℤ、ℚ、ℝ、ℂ）。",
          "en": "Commutativity of multiplication: uv=vu (in commutative number systems such as ℤ, ℚ, ℝ, ℂ)."
        }
      },
      {
        "id": "numeric_evaluation",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "明確整數或有理數算式的精確求值；可以獨立重算。",
          "en": "Exact evaluation of an explicit integer or rational expression; independently recomputable."
        }
      },
      {
        "id": "def_unfold",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "展開定義：把一個已定義的詞換成它的定義內容（或反向收回），命題的真假不變。",
          "en": "Unfolding a definition: replacing a defined term by its definition (or folding it back) does not change whether a statement is true."
        }
      },
      {
        "id": "eq_replace",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "等值代換：命題中的一個式子可換成與它相等的式子，命題的真假不變。",
          "en": "Replacement of equals: an expression inside a statement may be replaced by an equal expression without changing whether the statement is true."
        }
      },
      {
        "id": "mul_assoc",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "乘法結合律：(uv)w=u(vw)。",
          "en": "Associativity of multiplication: (uv)w=u(vw)."
        }
      },
      {
        "id": "mul_one",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "乘法單位元：1·u=u。",
          "en": "Multiplicative identity: 1·u=u."
        }
      },
      {
        "id": "add_inverse",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "加法反元素：每個 u 都有 −u，使 u+(−u)=0；u−v 定義為 u+(−v)。",
          "en": "Additive inverse: every u has −u with u+(−u)=0; u−v means u+(−v)."
        }
      },
      {
        "id": "add_comm",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "加法交換律：u+v=v+u。",
          "en": "Commutativity of addition: u+v=v+u."
        }
      },
      {
        "id": "cartesian_product_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "笛卡兒積：A×B 是所有有序對 (a,b)（a∈A、b∈B）的集合；(a,b)=(c,d) ⇔ a=c 且 b=d。",
          "en": "Cartesian product: A×B is the set of ordered pairs (a,b) with a∈A and b∈B; (a,b)=(c,d) ⇔ a=c and b=d."
        }
      },
      {
        "id": "frac_rules",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "分數運算（分母皆非零）：a/c+b/c=(a+b)/c；(a/b)(c/d)=(ac)/(bd)；(a/b)/(c/d)=(ad)/(bc)（另需 c≠0）；a/b=(ak)/(bk)（k≠0）。",
          "en": "Fraction rules (all denominators nonzero): a/c+b/c=(a+b)/c; (a/b)(c/d)=(ac)/(bd); (a/b)/(c/d)=(ad)/(bc) (also needing c≠0); a/b=(ak)/(bk) for k≠0."
        }
      },
      {
        "id": "mul_zero",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "乘以零：u·0=0。理由：u·0=u·(0+0)=u·0+u·0，兩邊同減 u·0 得 0=u·0。",
          "en": "Multiplying by zero: u·0=0. Reason: u·0=u·(0+0)=u·0+u·0; subtracting u·0 from both sides gives 0=u·0."
        }
      },
      {
        "id": "add_zero",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "加法單位元：u+0=u。",
          "en": "Additive identity: u+0=u."
        }
      },
      {
        "id": "contrapositive",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "逆否命題：P⇒Q 與 ¬Q⇒¬P 等價。逆命題 Q⇒P 一般不與 P⇒Q 等價。",
          "en": "Contrapositive: P⇒Q is equivalent to ¬Q⇒¬P. The converse Q⇒P is in general not equivalent to P⇒Q."
        }
      },
      {
        "id": "exists_intro",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "∃引入：若找到 a∈D 使 P(a) 成立，則 ∃x∈D, P(x)。",
          "en": "∃-introduction: if some a∈D satisfies P(a), then ∃x∈D, P(x)."
        }
      },
      {
        "id": "quantifier_negation",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "量詞否定：¬(∀x, P(x)) 等價於 ∃x, ¬P(x)；¬(∃x, P(x)) 等價於 ∀x, ¬P(x)。",
          "en": "Negating quantifiers: ¬(∀x, P(x)) is equivalent to ∃x, ¬P(x), and ¬(∃x, P(x)) is equivalent to ∀x, ¬P(x)."
        }
      },
      {
        "id": "mko_cov_def",
        "kind": "cited",
        "source": {
          "mko_id": "mko-covariance",
          "sha256": "3b0480b894efd088fcbcb2c9c856fb6e46bc8b62a223285723b060bf0070143d",
          "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f"
        },
        "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)。",
          "en": "For X,Y on the same finite joint law, Cov(X,Y)=E[XY]−E[X]E[Y]. Covariance is symmetric in the two variables, and affine transformations satisfy Cov(aX+b,cY+d)=ac Cov(X,Y)."
        }
      },
      {
        "id": "mko_expectation_def",
        "kind": "cited",
        "source": {
          "mko_id": "mko-expectation",
          "sha256": "71bc68faf69ca0df9cdd11d093055262aa277d07abd77982d0aa1afd849daf3c",
          "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f"
        },
        "statement": {
          "zh-Hant": "對非空有限 S、歸一化非負權重 w_s 與實值隨機變數 X，定義 E[X]=Σ_(s∈S)w_s X(s)。",
          "en": "For nonempty finite S, normalized nonnegative weights w_s, and a real random variable X, define E[X]=Σ_(s∈S)w_s X(s)."
        }
      },
      {
        "id": "mko_joint_def",
        "kind": "cited",
        "source": {
          "mko_id": "mko-finite-joint-distribution",
          "sha256": "d04aa2266aeda810e9e7e400220d366a61da23cdc33192e7286eac1d0fed0340",
          "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f"
        },
        "statement": {
          "zh-Hant": "二維有限聯合分布列出互異值對(x,y)及非負精確質量，總和恰為1。邊際、矩形事件及單點質量都從同一joint law聚合。",
          "en": "A two-dimensional finite joint distribution lists distinct pairs (x,y) and nonnegative exact masses summing exactly to 1. Marginals, rectangle events and single-pair masses all aggregate from that same joint law."
        }
      },
      {
        "id": "mko_indep_def",
        "kind": "cited",
        "source": {
          "mko_id": "mko-random-variable-independence",
          "sha256": "e8f6e97a13cd93c4cf37384ba6ab187d3ad4ca22c8f56260ed3707df0b8cc94e",
          "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f"
        },
        "statement": {
          "zh-Hant": "有限值隨機變數X,Y獨立，若對每個值對(x,y)皆有P(X=x,Y=y)=P(X=x)P(Y=y)。",
          "en": "Finite-valued X,Y are independent if every pair (x,y) satisfies P(X=x,Y=y)=P(X=x)P(Y=y)."
        }
      },
      {
        "id": "marginal_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "邊際：p_X(x)=P(X=x)=Σ_{y:(x,y)∈S} p(x,y)，p_Y(y)=P(Y=y)=Σ_{x:(x,y)∈S} p(x,y)；P(X=x,Y=y) 在 (x,y)∈S 時是 p(x,y)，否則是 0。",
          "en": "Marginals: p_X(x)=P(X=x)=Σ_{y:(x,y)∈S} p(x,y) and p_Y(y)=P(Y=y)=Σ_{x:(x,y)∈S} p(x,y); P(X=x,Y=y) is p(x,y) when (x,y)∈S and 0 otherwise."
        }
      },
      {
        "id": "finite_sum_regroup",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "有限和重組：若有限集合分割成兩兩不交的子集（每個元素恰屬其中一個），則全體的和等於各子集上的和再相加；加入值為 0 的項不改變有限和。",
          "en": "Regrouping a finite sum: if a finite set is split into pairwise disjoint pieces (each element in exactly one), the sum over the whole set equals the total of the sums over the pieces; adding terms equal to 0 does not change a finite sum."
        }
      },
      {
        "id": "L_lin_exp",
        "kind": "lemma",
        "proved_in": [
          "S03.1",
          "S03.2"
        ],
        "statement": {
          "zh-Hant": "在同一有限 joint law 上，對 (X,Y) 的實值函數 U_1 到 U_m 與實數 c_1 到 c_m：E[Σ_{k=1}^{m} c_k U_k]=Σ_{k=1}^{m} c_k E[U_k]；常數 c 的期望為 c。",
          "en": "On one finite joint law, for real functions U_1 to U_m of (X,Y) and reals c_1 to c_m: E[Σ_{k=1}^{m} c_k U_k]=Σ_{k=1}^{m} c_k E[U_k]; a constant c has expectation c."
        }
      },
      {
        "id": "L_indep_prod",
        "kind": "lemma",
        "proved_in": [
          "S14.1",
          "S14.2",
          "S14.3"
        ],
        "statement": {
          "zh-Hant": "若 X、Y 在有限 joint law 上獨立，則 E[XY]=E[X]E[Y]。",
          "en": "If X and Y are independent on a finite joint law, then E[XY]=E[X]E[Y]."
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "N1",
        "step": "S05",
        "vars": [
          "a",
          "b",
          "c",
          "d",
          "x",
          "y"
        ],
        "degree": 1,
        "lhs": "(a*x+b)*(c*y+d)",
        "rhs": "a*c*x*y+a*d*x+b*c*y+b*d"
      },
      {
        "id": "N2",
        "step": "S08",
        "vars": [
          "a",
          "b",
          "c",
          "d",
          "m",
          "u",
          "v"
        ],
        "degree": 1,
        "lhs": "(a*c*m+a*d*u+b*c*v+b*d)-(a*u+b)*(c*v+d)",
        "rhs": "a*c*(m-u*v)"
      },
      {
        "id": "N3",
        "step": "S09",
        "lhs": "1/3+1/3+1/3",
        "rhs": "1"
      },
      {
        "id": "N4",
        "step": "S10",
        "lhs": "(-1)*(1/3)+0*(1/3)+1*(1/3)",
        "rhs": "0"
      },
      {
        "id": "N5",
        "step": "S11",
        "lhs": "1*(1/3)+0*(1/3)+1*(1/3)",
        "rhs": "2/3"
      },
      {
        "id": "N6",
        "step": "S12",
        "lhs": "(-1)*1*(1/3)+0*0*(1/3)+1*1*(1/3)",
        "rhs": "0"
      },
      {
        "id": "N7",
        "step": "S13",
        "lhs": "0-0*(2/3)",
        "rhs": "0"
      },
      {
        "id": "N8",
        "step": "S16",
        "lhs": "(1/3)*(2/3)",
        "rhs": "2/9"
      },
      {
        "id": "N9",
        "step": "S16",
        "lhs": "2/9",
        "relation": "!=",
        "rhs": "0"
      },
      {
        "id": "N10",
        "step": "S08",
        "lhs": "((-1)*8+1*5+3*2)/3-((-1+1+3)/3)*((8+5+2)/3)",
        "rhs": "-4"
      },
      {
        "id": "N11",
        "step": "S08",
        "lhs": "2*(-3)*((-1)**2*(1/3)+0*(1/3)+1**2*(1/3))",
        "rhs": "-4"
      },
      {
        "id": "N12",
        "lhs": "1/2-(1/2)*(1/2)",
        "rhs": "1/4"
      },
      {
        "id": "N13",
        "lhs": "1/4-(1/2)*(1/2)",
        "rhs": "0"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "只在 MKO 的範圍內：所有期望都由同一個精確有限 joint law 計算（假設 a1）；非零協方差可否證獨立，零協方差一般不能證獨立（假設 a2）。不處理相關係數、條件期望或無限樣本空間；不改動 canonical MKO 或英文 edition。",
      "en": "Stays inside the MKO: every expectation is computed from one exact finite joint law (assumption a1); nonzero covariance can refute independence, while zero covariance cannot in general prove it (assumption a2). Correlation coefficients, conditional expectation and infinite sample spaces are not treated; the canonical MKO and its English edition are not changed."
    },
    "md_symbols": [
      [
        "(S,p)",
        "有限 joint law：互異整數值對與精確質量",
        "finite joint law: distinct integer pairs with exact masses"
      ],
      [
        "E[g]",
        "在同一 joint law 上的期望 Σ_{s∈S} p(s)g(s)",
        "expectation on the same joint law, Σ_{s∈S} p(s)g(s)"
      ],
      [
        "\\operatorname{Cov}(X,Y)",
        "協方差 E[XY]−E[X]E[Y]",
        "covariance E[XY]−E[X]E[Y]"
      ],
      [
        "a,\\ b,\\ c,\\ d",
        "仿射變換的實數係數",
        "real coefficients of the affine maps"
      ],
      [
        "S_X,\\ S_Y",
        "S 中出現的第一座標與第二座標的集合",
        "the sets of first and of second coordinates occurring in S"
      ],
      [
        "p_X,\\ p_Y",
        "X 與 Y 的邊際質量",
        "marginal masses of X and Y"
      ]
    ],
    "md_error_controls": [
      {
        "title": "零協方差不等於獨立 / Zero covariance is not independence",
        "zh": "MKO 指出的常見誤解是看到 Cov=0 就宣稱獨立。本稿的例子 Y=X² 完全由 X 決定，卻有 Cov(X,Y)=0（S13）；而 (0,1) 這一個值對就否證了獨立（S16）。S14 只給「獨立 ⇒ Cov=0」這一個方向。",
        "en": "The common mistake named by the MKO is to declare independence on seeing Cov=0. In this guide Y=X² is completely determined by X, yet Cov(X,Y)=0 (S13); the single pair (0,1) refutes independence (S16). S14 gives only the direction 'independent ⇒ Cov=0'."
      },
      {
        "title": "所有期望必須來自同一 joint law / All expectations must come from one joint law",
        "zh": "考慮 L1：(0,0)、(1,1) 各 1/2；L2：(0,0)、(0,1)、(1,0)、(1,1) 各 1/4。兩者的邊際都是 P(X=1)=P(Y=1)=1/2，但 L1 上 Cov=1/2−1/4=1/4，L2 上 Cov=1/4−1/4=0。所以協方差由 joint law 決定，不由邊際決定；把 L2 的 E[XY] 與 L1 的 E[X]、E[Y] 混用，會得到與 L1 無關的數。",
        "en": "Take L1: (0,0) and (1,1) with 1/2 each; and L2: (0,0), (0,1), (1,0), (1,1) with 1/4 each. Both have marginals P(X=1)=P(Y=1)=1/2, but Cov=1/2−1/4=1/4 on L1 and Cov=1/4−1/4=0 on L2. So covariance is fixed by the joint law, not by the marginals; mixing E[XY] from L2 with E[X], E[Y] from L1 gives a number unrelated to L1."
      },
      {
        "title": "仿射規則：常數消失，係數相乘 / The affine rule: constants vanish, coefficients multiply",
        "zh": "S08 中 b、d 完全消失，a、c 以乘積 ac 出現，正負號保留。例如 Cov(2X+1,−3Y+5)=−6·Cov(X,Y)，不是 6·Cov(X,Y)，也不是 −6·Cov(X,Y)+5。N10、N11 在例子中以 U=2X+1、V=−3X+5 核對：直接計算與 2·(−3)·Cov(X,X)=−4 一致。",
        "en": "In S08, b and d vanish completely and a, c appear as the product ac with the sign kept. For example Cov(2X+1,−3Y+5)=−6·Cov(X,Y), not 6·Cov(X,Y) and not −6·Cov(X,Y)+5. N10 and N11 check this on the example with U=2X+1 and V=−3X+5: the direct computation agrees with 2·(−3)·Cov(X,X)=−4."
      }
    ],
    "md_open_items": [
      {
        "zh-Hant": "有限和重組（finite_sum_regroup）與 marginal_def 是本稿的前提，不在本稿中由更基本的公理推出。",
        "en": "Regrouping of finite sums (finite_sum_regroup) and marginal_def are premises of this guide; they are not derived here from more basic axioms."
      },
      {
        "zh-Hant": "N10、N11 只在例子的 joint law 上以 U=2X+1、V=−3X+5 交叉核對 S08，不能取代 S08 的一般證明；N12、N13 是錯誤控制中 L1、L2 的數值。",
        "en": "N10 and N11 cross-check S08 only on the example law with U=2X+1 and V=−3X+5 and cannot replace the general proof of S08; N12 and N13 are the numbers of L1 and L2 in the error controls."
      }
    ]
  },
  "revision": {
    "id": "production-20261019-adopted-96",
    "source_commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
    "adopted_source_sha256": "66770666a1625742c7623b7027ec9998c2e93b136060117940329d5723701fbc",
    "original_source_sha256": "66770666a1625742c7623b7027ec9998c2e93b136060117940329d5723701fbc",
    "owner_adopted": true,
    "bilingual_sync": "complete_source_bound",
    "formal_Lean": "NOT_RUN",
    "independent_AI_concurrence": "NOT_MEASURED",
    "issue_ids": [],
    "scope": "Owner-adopted natural-language teaching guide; not a formal proof, canonical MKO rewrite or evidence-status promotion."
  }
}
