{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-lagrange-multiplier-condition-01",
  "mko_id": "mko-lagrange-multiplier-condition",
  "title": {
    "zh-Hant": "正則乘數與完整平方距離解",
    "en": "Regular multipliers and a complete squared-distance solution"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-lagrange-multiplier-condition-01",
    "source": {
      "mko_id": "mko-lagrange-multiplier-condition",
      "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
      "sha256": "cfaf4ce60e4c881cdfb0ca770d8574ec63898460c86c1049720cf5c9546bfdd7",
      "english_sha256": "51b359b63416bacca8d5d5350982535ac76896b00ad3397742174d696a57ddbb"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "algebra",
      "polynomial",
      "lagrange_regular"
    ],
    "goal": {
      "zh-Hant": "minimize ‖x-(1,2)‖^2 subject to x_1+x_2=0，求點、乘數並獨立證最小。",
      "en": "Minimize the squared distance to (1,2) subject to x_1+x_2=0; find the point and multiplier and independently prove the minimum."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "f(x_1,x_2)=(x_1-1)^2+(x_2-2)^2，g=x_1+x_2；J_g 的 rows 依唯一 constraint 排序。",
          "en": "f(x_1,x_2)=(x_1-1)^2+(x_2-2)^2, g=x_1+x_2; the Jacobian rows follow the single constraint's order."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1"
        ],
        "before_tex": "n=2,\\quad m=1,\\quad J_g=(1\\ \\ 1)",
        "after_tex": "\\operatorname{rank}J_g=1=m,\\quad f,g\\text{ differentiable on }\\mathbb R^2",
        "relation": "implies",
        "rule": "polynomial",
        "conditions": [],
        "explanation": {
          "zh-Hant": "非零唯一列向量確滿 row rank；完整多項式給鄰域可微。",
          "en": "The single nonzero row has full row rank, and the full polynomials give neighborhood differentiability."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "m≤n 及 row/column convention 都已核。",
            "en": "Both m≤n and row/column conventions are checked."
          }
        },
        "leaf_basis": "polynomial"
      },
      {
        "id": "S02",
        "uses": [
          "G1",
          "S01",
          "lagrange_regular"
        ],
        "before_tex": "\\nabla f=(2(x_1-1),2(x_2-2))",
        "after_tex": "2(x_1-1)=\\lambda,\\quad2(x_2-2)=\\lambda,\\quad x_1+x_2=0",
        "relation": "definition",
        "rule": "lagrange_regular",
        "conditions": [],
        "explanation": {
          "zh-Hant": "先把必要條件與可行性聯立成候選方程；此時不因解方程就預先稱最小。",
          "en": "Form the candidate equations from necessary stationarity and feasibility without yet declaring their solution a minimum."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "lagrange_regular"
          ],
          "explanation": {
            "zh-Hant": "正號 convention 固定，沒有偷偷換成 grad f+lambda grad g=0。",
            "en": "The positive-sign convention is fixed, not silently changed to grad f+lambda*grad g=0."
          }
        },
        "leaf_basis": "lagrange_regular"
      },
      {
        "id": "S03",
        "uses": [
          "S02"
        ],
        "before_tex": "x_1=1+\\lambda/2,\\quad x_2=2+\\lambda/2",
        "after_tex": "3+\\lambda=0\\Longrightarrow\\lambda=-3",
        "relation": "equivalent",
        "rule": "algebra",
        "conditions": [],
        "explanation": {
          "zh-Hant": "代回單一線性 constraint 得乘數唯一值。",
          "en": "Substitution into the single linear constraint determines the multiplier uniquely."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "S02"
          ],
          "explanation": {
            "zh-Hant": "乘數解不等於所有一般問題都唯一 primal point。",
            "en": "A unique multiplier does not imply a unique primal point for general problems."
          }
        },
        "leaf_basis": "algebra"
      },
      {
        "id": "S04",
        "uses": [
          "S03"
        ],
        "before_tex": "\\lambda=-3",
        "after_tex": "x^*=(-1/2,1/2)",
        "relation": "equivalent",
        "rule": "algebra",
        "conditions": [],
        "explanation": {
          "zh-Hant": "代回兩座標候選式。",
          "en": "Substitute into both candidate-coordinate formulas."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "S03"
          ],
          "explanation": {
            "zh-Hant": "中心是 (1,2) 而不是原點。",
            "en": "The center remains (1,2), not the origin."
          }
        },
        "leaf_basis": "algebra"
      },
      {
        "id": "S05",
        "uses": [
          "G1",
          "S01",
          "S04"
        ],
        "before_tex": "g(x^*)=-1/2+1/2",
        "after_tex": "g(x^*)=0,\\quad\\nabla f(x^*)=(-3,-3)=J_g^T(-3)",
        "relation": "implies",
        "rule": "algebra",
        "conditions": [],
        "explanation": {
          "zh-Hant": "候選點的 feasibility 與 stationarity residual 重新獨立核，滿秩資格仍有效。",
          "en": "Independently recheck feasibility and stationarity residual at the candidate; full rank remains valid."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "S04"
          ],
          "explanation": {
            "zh-Hant": "不只解出 lambda 而漏掉 constraint。",
            "en": "The constraint is not omitted after solving for lambda."
          }
        },
        "leaf_basis": "algebra"
      },
      {
        "id": "S06",
        "uses": [
          "G1",
          "S04",
          "S05"
        ],
        "before_tex": "z=(1,2),\\quad x^*-z=(-3/2,-3/2)",
        "after_tex": "f(x^*)=9/4+9/4=9/2",
        "relation": "implies",
        "rule": "algebra",
        "conditions": [],
        "explanation": {
          "zh-Hant": "精確算平方距離，為後續比較點界準備。",
          "en": "Compute the squared distance exactly as the reference for all comparison points."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S04",
            "S05"
          ],
          "explanation": {
            "zh-Hant": "此數值本身不證最小。",
            "en": "The numerical value alone does not prove minimality."
          }
        },
        "leaf_basis": "algebra"
      },
      {
        "id": "S07",
        "uses": [
          "G1",
          "S04",
          "S06"
        ],
        "before_tex": "y=x^*+v\\text{ feasible}\\Longrightarrow v_1+v_2=0",
        "after_tex": "f(y)=\\|x^*-z\\|^2+2(x^*-z)\\cdot v+\\|v\\|^2=9/2+\\|v\\|^2\\ge9/2",
        "relation": "implies",
        "rule": "algebra",
        "conditions": [
          "y\\text{ feasible}"
        ],
        "explanation": {
          "zh-Hant": "x*-z 平行 constraint normal (1,1)，與每個可行切向差 v 正交，交叉項零。等號迫 v=0，另證唯一 global minimizer。",
          "en": "The offset x*-z is parallel to normal (1,1), orthogonal to every feasible difference v, so the cross term vanishes. Equality forces v=0, separately proving the unique global minimizer."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S04",
            "S06"
          ],
          "explanation": {
            "zh-Hant": "充分與 global 證書來自此平方分解，不是一般 Lagrange 必要定理。",
            "en": "Sufficiency and globality come from this squared decomposition, not the general necessary multiplier theorem."
          }
        },
        "leaf_basis": "algebra"
      },
      {
        "id": "S08",
        "uses": [
          "G1"
        ],
        "before_tex": "F(u,v)=u^3,\\quad G(u,v)=v,\\quad(u,v)=(0,0)",
        "after_tex": "\\nabla F=0=J_G^T\\cdot0,\\quad\\operatorname{rank}J_G=1;\\quad F(t,0)=t^3\\text{ has both signs}",
        "relation": "implies",
        "rule": "polynomial",
        "conditions": [],
        "explanation": {
          "zh-Hant": "正則可行且 stationarity 成立仍可不是極值，明示必要非充分。",
          "en": "A regular feasible stationary point can still fail to be an extremum, explicitly showing necessity is not sufficiency."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "主平方距離例之最小已由 S07 獨立證；不與反例混淆。",
            "en": "The main distance example's minimum was independently proved at S07 and is not conflated with this counterexample."
          }
        },
        "leaf_basis": "polynomial"
      }
    ],
    "result": {
      "zh-Hant": "x*=(-1/2,1/2)、lambda=-3、最小平方距離 9/2；唯一 global 性另由正交平方分解證。",
      "en": "x*=(-1/2,1/2), lambda=-3 and minimum squared distance 9/2; uniqueness and globality are separately proved by orthogonal squared decomposition."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "解出乘數必最小。",
          "en": "Solving multiplier equations guarantees a minimum."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "S08 正則 stationary 例不是極值。",
          "en": "The regular stationary example at S08 is not an extremum."
        }
      },
      {
        "claim": {
          "zh-Hant": "rank deficient 表示沒有極值。",
          "en": "Rank deficiency means no extremum exists."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "一維 g(x)=x^2=0 只有可行點 0，f(x)=x 在該集合仍達極值；g'(0)=0 只阻定理。",
          "en": "In one dimension g(x)=x^2=0 has only feasible point zero, where f(x)=x attains an extremum; g'(0)=0 only withholds the theorem."
        }
      },
      {
        "claim": {
          "zh-Hant": "本等式條件等同含不等式的 KKT。",
          "en": "These equality conditions are the full inequality KKT conditions."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "沒有不等式乘數符號與 complementary slackness。",
          "en": "Inequality multiplier signs and complementary slackness are absent."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "mko_definition",
        "kind": "cited",
        "statement": {
          "zh-Hant": "來源語義轉述：可行局部極值在鄰域可微及約束 Jacobian 滿列秩時，必有唯一乘數使梯度等於約束梯度列的線性組合；這只是必要條件。",
          "en": "Source semantic paraphrase: at a feasible local extremum, neighborhood differentiability and full row rank give a unique multiplier representing the objective gradient; the condition is necessary only."
        },
        "source": {
          "mko_id": "mko-lagrange-multiplier-condition",
          "sha256": "cfaf4ce60e4c881cdfb0ca770d8574ec63898460c86c1049720cf5c9546bfdd7",
          "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": "polynomial",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "多項式在實數上連續且可逐項微分；d(x^k)/dx=k x^(k-1)，常數導數為零。",
          "en": "Real polynomials are continuous and differentiate termwise: the derivative of x^k is k*x^(k-1), and constants differentiate to zero."
        }
      },
      {
        "id": "lagrange_regular",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "若可行點為局部極值、f 與等式約束在鄰域可微、Jacobian rows 線性獨立，則存在唯一 lambda 使 grad f=J_g^T lambda；此為必要條件。",
          "en": "At a feasible local extremum, neighborhood differentiability and independent constraint-gradient rows imply a unique lambda with grad f=J_g^T*lambda; this is necessary only."
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "lagrange-feasible",
        "lhs": "-1/2+1/2",
        "rhs": "0",
        "step": "S05"
      },
      {
        "id": "lagrange-value",
        "lhs": "(-1/2-1)**2+(1/2-2)**2",
        "rhs": "9/2",
        "step": "S06"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "固定正號 grad f=J_g^T lambda；一般乘數只必要，這個特定平方距離問題另有充分性證明。",
      "en": "Fix the positive sign grad f=J_g^T*lambda; general multipliers are necessary only, while this particular distance problem has a separate sufficiency proof."
    },
    "md_symbols": [
      [
        "J_g",
        "依 constraint 排序的 row Jacobian",
        "row Jacobian ordered by constraint"
      ],
      [
        "\\lambda",
        "正號 convention 乘數",
        "multiplier in the positive-sign convention"
      ],
      [
        "v",
        "任意可行點差",
        "arbitrary feasible difference"
      ]
    ],
    "md_error_controls": [
      {
        "title": "regularity 先行 / Regularity first",
        "zh": "先核 feasibility、鄰域可微及 full row rank 才應用必要定理。",
        "en": "Check feasibility, neighborhood differentiability and full row rank before applying the necessary theorem."
      },
      {
        "title": "充分性另證 / Separate sufficiency",
        "zh": "本 global minimum 由所有可行 y 的平方分解，不由 lambda 本身。",
        "en": "The global minimum follows from a squared decomposition for every feasible y, not lambda alone."
      }
    ],
    "md_open_items": []
  },
  "revision": {
    "id": "ocme-new142-reader-adoption-20261021",
    "collection": "coverage-20261021",
    "source_commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
    "adopted_source_sha256": "9dfb066e1160c3636dc41e2ce2e4263a60a1d24ba863f56867789a1f48c7bef4",
    "original_source_sha256": "9dfb066e1160c3636dc41e2ce2e4263a60a1d24ba863f56867789a1f48c7bef4",
    "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."
  }
}
