{
  "$schema": "../../../schemas/mko-v0.5.schema.json",
  "schema_version": "mko-v0.5",
  "id": "mko-linear-program-duality",
  "semantic_family_id": "sf-linear-program-duality",
  "type": "theorem",
  "version": "0.10.0",
  "language": "zh-Hant",
  "titles": {
    "zh-Hant": "線性規劃對偶"
  },
  "summary": {
    "zh-Hant": "對固定primal max c^Tx、Ax≤b、x≥0，其dual為min b^Ty、A^Ty≥c、y≥0；feasible pair滿足弱對偶。"
  },
  "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結果。"
  },
  "formula": {
    "tex": "g(x,y)=b^\\top*y-c^\\top*x",
    "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mrow><mrow><mi>g</mi><mo>(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo>)</mo></mrow><mo>=</mo><mrow><mrow><msup><mi>b</mi><mo>⊤</mo></msup><mo>×</mo><mi>y</mi></mrow><mo>−</mo><mrow><msup><mi>c</mi><mo>⊤</mo></msup><mo>×</mo><mi>x</mi></mrow></mrow></mrow></math>",
    "semantic_ast": {
      "type": "equation",
      "lhs": {
        "type": "function_call",
        "callee": {
          "type": "symbol",
          "name": "g",
          "glyph": "g"
        },
        "arguments": [
          {
            "type": "symbol",
            "name": "x",
            "glyph": "x"
          },
          {
            "type": "symbol",
            "name": "y",
            "glyph": "y"
          }
        ]
      },
      "rhs": {
        "type": "subtraction",
        "left": {
          "type": "multiplication",
          "operands": [
            {
              "type": "transpose",
              "operand": {
                "type": "symbol",
                "name": "b",
                "glyph": "b"
              }
            },
            {
              "type": "symbol",
              "name": "y",
              "glyph": "y"
            }
          ]
        },
        "right": {
          "type": "multiplication",
          "operands": [
            {
              "type": "transpose",
              "operand": {
                "type": "symbol",
                "name": "c",
                "glyph": "c"
              }
            },
            {
              "type": "symbol",
              "name": "x",
              "glyph": "x"
            }
          ]
        }
      }
    },
    "compiler": {
      "id": "ocme-formula-source13",
      "version": "0.5.0",
      "source_sha256": "b897dbca4223b6dfc025ddc6f255aae8ed4497d63301000175cd0da472c61ead"
    }
  },
  "assumptions": [
    {
      "id": "a1",
      "zh-Hant": "沿用唯一maximize/≤/nonnegative primal convention。"
    },
    {
      "id": "a2",
      "zh-Hant": "matrix、vectors與candidate points皆為bounded exact rationals。"
    }
  ],
  "symbols": [
    {
      "token": "g",
      "role": "pointwise_duality_gap_function",
      "role_zh": "固定問題資料下的逐點對偶間隙函數",
      "scope": "representative_formula"
    },
    {
      "token": "A",
      "role": "constraint_matrix",
      "role_zh": "限制矩陣",
      "scope": "surrounding_statement"
    },
    {
      "token": "b",
      "role": "primal_rhs",
      "role_zh": "primal 右端向量",
      "scope": "representative_formula"
    },
    {
      "token": "c",
      "role": "primal_objective",
      "role_zh": "primal 目標向量",
      "scope": "representative_formula"
    },
    {
      "token": "x",
      "role": "primal_candidate_point",
      "role_zh": "primal 候選點",
      "scope": "representative_formula"
    },
    {
      "token": "y",
      "role": "dual_candidate_point",
      "role_zh": "dual 候選點",
      "scope": "representative_formula"
    }
  ],
  "dependencies": [
    {
      "id": "mko-linear-program-standard-form",
      "title_zh": "線性規劃標準形",
      "reason_zh": "固定primal convention。"
    },
    {
      "id": "mko-optimization-problem",
      "title_zh": "最佳化問題",
      "reason_zh": "feasible與optimal語義。"
    },
    {
      "id": "mko-order-relation",
      "title_zh": "偏序與全序",
      "reason_zh": "componentwise inequalities。"
    }
  ],
  "explanation": {
    "paragraphs_zh": [
      "從固定primal完整構造dual。",
      "weak duality chain逐項exact核對。",
      "zero-gap certificate與strong-duality一般定理分層。",
      "記號對齊候選：固定問題資料 (A,b,c)，g(x,y)=b^T y−c^T x 是依候選點 x,y 變動的純量間隙；A 留在周圍可行性陳述。對 maximize／≤／nonnegative 慣例，須 x>=0、Ax<=b、y>=0、A^Ty>=c 才能使用弱對偶的非負間隙證書；單純目標相等或有限 grid 不證一般 strong duality。"
    ],
    "common_misconception_zh": "混用另一套dual符號，或只因兩個objective數字相等就宣稱optimal。"
  },
  "proofs": [],
  "computational_companions": [],
  "verification": {
    "computational_status": "not_evaluated_no_computational_claim",
    "warning_zh": "有限候選點或grid搜尋不能證一般strong duality；不處理infeasible/unbounded對偶分類。",
    "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": "加入complementary slackness與LP optimality conditions。"
  },
  "provenance": {
    "origin": "ocme_local_ai_materialization_candidate",
    "note_zh": "依 research/atlas-linear-program-duality.md 整理；2026-10-15 脈衝 R04（使用者手動接續 2026-11-15 工作序列；實際日期仍為 2026-10-15），英文及 Lean 依使用者指示延後。",
    "content_license": "CC-BY-SA-4.0",
    "code_license": "MIT",
    "created_at": "2026-10-15"
  }
}
