{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-linear-program-duality-01",
  "mko_id": "mko-linear-program-duality",
  "title": {
    "zh-Hant": "弱對偶鏈與零間隙最優證書",
    "en": "The weak-duality chain and a zero-gap optimality certificate"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-linear-program-duality-01",
    "source": {
      "mko_id": "mko-linear-program-duality",
      "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
      "sha256": "89eec94cb92d6b32f73da15c2cad46fdeedeb59b91505437cded6bef94a6a6d5",
      "english_sha256": "9c16a09fc23a4b6c83b28e225509ab5ae11db44820a9ebfb53fd29aa70646cb2"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "algebra",
      "lp_form"
    ],
    "goal": {
      "zh-Hant": "完整構造對偶，核 x=(1,3)、y=(1,1) 可行並由零間隙證雙最優。",
      "en": "Construct the full dual, check feasibility of x=(1,3), y=(1,1), and certify both optimal by zero gap."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "A=[[1,1],[2,1]], b=(4,5), c=(3,2)；primal max c^Tx with Ax≤b,x≥0；x=(1,3),y=(1,1)。",
          "en": "A=[[1,1],[2,1]], b=(4,5), c=(3,2); primal max c^T*x with A*x≤b,x≥0; x=(1,3), y=(1,1)."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1"
        ],
        "before_tex": "A\\in\\mathbb Q^{2\\times2},\\quad x,c\\in\\mathbb R^2,\\quad y,b\\in\\mathbb R^2",
        "after_tex": "\\min b^Ty\\quad\\text{s.t. }A^Ty\\ge c,\\ y\\ge0",
        "relation": "definition",
        "rule": "lp_form",
        "conditions": [],
        "explanation": {
          "zh-Hant": "兩條 primal constraints 對應兩個 dual variables，兩個 primal coordinates 對應兩條 dual inequalities。",
          "en": "Two primal constraints give two dual variables, and two primal coordinates give two dual inequalities."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "尺寸及轉置方向先核，不把 y 當 x 的複製。",
            "en": "Check dimensions and transpose direction before treating y as a dual candidate."
          }
        },
        "leaf_basis": "lp_form"
      },
      {
        "id": "S02",
        "uses": [
          "G1"
        ],
        "before_tex": "x=(1,3)",
        "after_tex": "x\\ge0,\\quad Ax=(4,5)=b",
        "relation": "implies",
        "rule": "algebra",
        "conditions": [],
        "explanation": {
          "zh-Hant": "逐行核 primal feasibility。",
          "en": "Check primal feasibility row by row."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "objective 相等不能代替這項資格。",
            "en": "Objective equality cannot replace this qualification."
          }
        },
        "leaf_basis": "algebra"
      },
      {
        "id": "S03",
        "uses": [
          "G1",
          "S01"
        ],
        "before_tex": "A^Ty=(y_1+2y_2,y_1+y_2)",
        "after_tex": "y_1+2y_2\\ge3,\\quad y_1+y_2\\ge2,\\quad y_1,y_2\\ge0",
        "relation": "equivalent",
        "rule": "algebra",
        "conditions": [],
        "explanation": {
          "zh-Hant": "把完整對偶兩條限制展開，保留固定正號方向。",
          "en": "Expand both dual constraints, retaining the fixed sign direction."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "G1",
            "S01"
          ],
          "explanation": {
            "zh-Hant": "若換原 convention，對偶也須重建，不能只換一個符號。",
            "en": "Changing the primal convention requires reconstructing the dual, not changing one sign."
          }
        },
        "leaf_basis": "algebra"
      },
      {
        "id": "S04",
        "uses": [
          "G1",
          "S03"
        ],
        "before_tex": "y=(1,1)",
        "after_tex": "y\\ge0,\\quad A^Ty=(3,2)=c",
        "relation": "implies",
        "rule": "algebra",
        "conditions": [],
        "explanation": {
          "zh-Hant": "逐列核 dual feasibility，所有殘差為零。",
          "en": "Check dual feasibility column by column; every slack is zero."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S03"
          ],
          "explanation": {
            "zh-Hant": "雙方 feasibility 兩份證據已分開。",
            "en": "Primal and dual feasibility have separate evidence."
          }
        },
        "leaf_basis": "algebra"
      },
      {
        "id": "S05",
        "uses": [
          "S01"
        ],
        "before_tex": "u\\ge0,\\ Au\\le b,\\quad v\\ge0,\\ A^Tv\\ge c",
        "after_tex": "c^Tu\\le(A^Tv)^Tu=v^TAu\\le v^Tb",
        "relation": "implies",
        "rule": "algebra",
        "conditions": [
          "u,v\\text{ primal/dual feasible}"
        ],
        "explanation": {
          "zh-Hant": "第一界因 u 非負，第二界因 v 非負；有限矩陣乘積結合律給中間等式。",
          "en": "The first inequality uses u≥0 and the second v≥0; finite matrix associativity gives the middle equality."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S01"
          ],
          "explanation": {
            "zh-Hant": "這是任意可行 u,v 的全稱弱界，後續最優性才可用。",
            "en": "This is a universal weak bound for arbitrary feasible u,v, enabling the later optimality argument."
          }
        },
        "leaf_basis": "algebra"
      },
      {
        "id": "S06",
        "uses": [
          "G1",
          "S02",
          "S04"
        ],
        "before_tex": "c^Tx=3+6,\\quad b^Ty=4+5",
        "after_tex": "c^Tx=b^Ty=9",
        "relation": "implies",
        "rule": "algebra",
        "conditions": [],
        "explanation": {
          "zh-Hant": "兩個 objective 獨立精確算出相等。",
          "en": "Compute both objective values independently and exactly."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S02",
            "S04"
          ],
          "explanation": {
            "zh-Hant": "只有加上已核 feasibility 才具證書意義。",
            "en": "Equality is a certificate only with the established feasibility checks."
          }
        },
        "leaf_basis": "algebra"
      },
      {
        "id": "S07",
        "uses": [
          "S02",
          "S04",
          "S06"
        ],
        "before_tex": "g(x,y)=b^Ty-c^Tx",
        "after_tex": "g=y^T(b-Ax)+x^T(A^Ty-c)=0",
        "relation": "equivalent",
        "rule": "algebra",
        "conditions": [],
        "explanation": {
          "zh-Hant": "以兩個非負 slack 內積分解 gap，A 是固定問題資料、x,y 是候選點。",
          "en": "Decompose the gap into two nonnegative slack products; A is fixed problem data and x,y are candidate points."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "S02",
            "S04",
            "S06"
          ],
          "explanation": {
            "zh-Hant": "間隙依 x,y，沒有以未定義 D(A,b,c) 混淆候選與最優值。",
            "en": "The gap depends on x,y, without an ambiguous D(A,b,c) conflating candidates and optimal values."
          }
        },
        "leaf_basis": "algebra"
      },
      {
        "id": "S08",
        "uses": [
          "S05",
          "S06"
        ],
        "before_tex": "c^Tu\\le b^Ty=9=c^Tx\\quad\\forall u\\text{ primal feasible}",
        "after_tex": "x\\text{ maximizes primal};\\quad y\\text{ minimizes dual}",
        "relation": "implies",
        "rule": "algebra",
        "conditions": [],
        "explanation": {
          "zh-Hant": "另一側對任意 dual feasible v 亦有 b^Tv≥c^Tx=9，所以兩點各達自己的最佳界。",
          "en": "For every dual-feasible v, b^T*v≥c^T*x=9 as well, so each candidate attains its own best bound."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S05",
            "S06"
          ],
          "explanation": {
            "zh-Hant": "不需要一般 strong duality 存在定理，因已給等值可行點。",
            "en": "No general strong-duality existence theorem is needed because equal-valued feasible points were supplied."
          }
        },
        "leaf_basis": "algebra"
      }
    ],
    "result": {
      "zh-Hant": "x=(1,3) primal 最優、y=(1,1) dual 最優，兩側值 9，零間隙由弱對偶證。",
      "en": "x=(1,3) is primal-optimal and y=(1,1) dual-optimal with common value 9, certified by weak duality and zero gap."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "objective 相等即使點不可行也證最優。",
          "en": "Equal objectives certify optimality even for infeasible points."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "弱界需要雙方 feasibility；不可行點無證書資格。",
          "en": "The weak bound requires feasibility on both sides; infeasible points do not qualify."
        }
      },
      {
        "claim": {
          "zh-Hant": "有限 grid 找到等值便證一般 strong duality。",
          "en": "A finite-grid equality proves general strong duality."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "只證這些給定可行點，未量化所有 LP 存在性。",
          "en": "It certifies these feasible points, not existence for every LP."
        }
      },
      {
        "claim": {
          "zh-Hant": "gap 是只依 A,b,c 的候選純量。",
          "en": "The candidate gap depends only on A,b,c."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "式子 b^Ty-c^Tx 也依候選 x,y。",
          "en": "The expression b^T*y-c^T*x also depends on candidate x,y."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "mko_definition",
        "kind": "cited",
        "statement": {
          "zh-Hant": "先核A為m×n exact rational matrix、b∈R^m、c∈R^n，dual variable y∈R^m且A^Ty≥c。對feasible x,y逐項驗c^Tx≤y^TAx≤b^Ty。若兩方feasible且objectives相等，zero gap即同時給primal與dual optimality certificate。缺任一方feasibility時objective equality不證optimality；有限grid不證一般strong duality，infeasible或unbounded cases也不得套用。一般有限維LP strong duality保留為明示定理，非本輪enumeration結果。",
          "en": "Qualify the exact rational m-by-n matrix A and matching b,c. The dual variable has m components and A^T*y≥c has n constraints. For a feasible primal point x and dual point y verify c^T*x≤y^T*A*x≤b^T*y. If both are feasible and the objective values agree, weak duality certifies both points optimal. Equality without both feasibility checks is insufficient. A finite grid does not prove general strong duality or settle infeasible/unbounded cases. General finite-dimensional LP strong duality remains a separately stated theorem, not the result of these finite candidate checks."
        },
        "source": {
          "mko_id": "mko-linear-program-duality",
          "sha256": "89eec94cb92d6b32f73da15c2cad46fdeedeb59b91505437cded6bef94a6a6d5",
          "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f"
        }
      },
      {
        "id": "algebra",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "實數域的等式運算；除法前分母必非零，不等式乘正數保持方向。",
          "en": "Use real-field identities; division requires a nonzero denominator and multiplication by a positive number preserves inequalities."
        }
      },
      {
        "id": "lp_form",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "固定 primal 為 maximize c^T x subject to Ax≤b,x≥0；slack equality form 為 Ax+s=b、x,s≥0，s=b-Ax；標準對偶為 minimize b^T y subject to A^T y≥c,y≥0。",
          "en": "Fix the primal as maximize c^T*x subject to A*x≤b,x≥0; its slack equality form is A*x+s=b,x,s≥0 with s=b-A*x; the dual minimizes b^T*y subject to A^T*y≥c,y≥0."
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "primal-value",
        "lhs": "3*1+2*3",
        "rhs": "9",
        "step": "S06"
      },
      {
        "id": "dual-value",
        "lhs": "4*1+5*1",
        "rhs": "9",
        "step": "S06"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "固定 maximize/≤/nonnegative 慣例，只用弱對偶與給定點，不以有限 grid 證一般 strong duality。",
      "en": "Fixed maximize/≤/nonnegative convention; weak duality and supplied points only, not general strong duality from a finite grid."
    },
    "md_symbols": [
      [
        "g(x,y)",
        "候選點依賴間隙",
        "candidate-dependent gap"
      ],
      [
        "u,v",
        "任意可行比較點",
        "arbitrary feasible comparison points"
      ]
    ],
    "md_error_controls": [
      {
        "title": "兩邊資格 / Both feasibility gates",
        "zh": "先核 x≥0、Ax≤b、y≥0、A^Ty≥c。",
        "en": "First check x≥0,A*x≤b,y≥0,A^T*y≥c."
      },
      {
        "title": "弱界先於零 gap / Weak bound before zero gap",
        "zh": "任意可行比較點的界才把等值升為最優。",
        "en": "A bound against every feasible comparison point promotes equality to optimality."
      }
    ],
    "md_open_items": []
  },
  "revision": {
    "id": "ocme-new142-reader-adoption-20261021",
    "collection": "coverage-20261021",
    "source_commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
    "adopted_source_sha256": "4dbbe01008153ab71828d6d5e0589260df9825bedd57436dfebb4de98ad56e3a",
    "original_source_sha256": "4dbbe01008153ab71828d6d5e0589260df9825bedd57436dfebb4de98ad56e3a",
    "owner_adopted": true,
    "bilingual_sync": "complete_source_bound",
    "formal_Lean": "NOT_RUN",
    "reader_review": "142_of_142_source_bound",
    "wording_review": "original_Lead_decisions_resolved",
    "glossary_reader_paraphrases": [],
    "independent_AI_concurrence": "SCOPED_LEAD_AND_BILINGUAL_CONTEXT_REVIEW",
    "issue_ids": [],
    "parent_manifest_sha256": "d29f4cae8229ebd24f60d496cb1d3cd4ad8c0a4dca9d44daab0c3245c544283a",
    "scope": "Owner-adopted reader revision. Lead and bilingual review concern the recorded text and premises; no new universal or Lean proof, canonical promotion or historical-label rewrite."
  }
}
