{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-gradient-vector-01",
  "mko_id": "mko-gradient-vector",
  "title": {
    "zh-Hant": "座標梯度、駐點與可微的區別",
    "en": "Coordinate gradients, stationarity and differentiability"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-gradient-vector-01",
    "source": {
      "mko_id": "mko-gradient-vector",
      "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
      "sha256": "953e582b90145e3769b9b22891783891e5dbfe6a99446edc1b06a277683029fa",
      "english_sha256": "6ba53da50d59e50b734006c70a0c1e5cb7e4986a4a57e6d0b1f27a8ae84bd363"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "algebra",
      "polynomial",
      "definition_here"
    ],
    "goal": {
      "zh-Hant": "求指定二元多項式梯度並核兩個常見錯誤推論。",
      "en": "Compute the gradient of a specified bivariate polynomial and audit two false inferences."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "f(x,y)=x^2+xy+2y^2-4x+2y，座標依 (x,y)，評估點 p=(1,-1)。",
          "en": "f(x,y)=x^2+x*y+2*y^2-4*x+2*y, coordinates ordered (x,y), evaluation point p=(1,-1)."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1"
        ],
        "before_tex": "f=x^2+xy+2y^2-4x+2y",
        "after_tex": "\\partial_x f=2x+y-4",
        "relation": "implies",
        "rule": "polynomial",
        "conditions": [],
        "explanation": {
          "zh-Hant": "對 x 微分時 y 固定，各項次序依原座標。",
          "en": "Differentiate with respect to x while holding y fixed, preserving coordinate order."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "2y^2 和 2y 對 x 導數為零。",
            "en": "The x-derivatives of 2y^2 and 2y vanish."
          }
        },
        "leaf_basis": "polynomial"
      },
      {
        "id": "S02",
        "uses": [
          "G1"
        ],
        "before_tex": "f=x^2+xy+2y^2-4x+2y",
        "after_tex": "\\partial_y f=x+4y+2",
        "relation": "implies",
        "rule": "polynomial",
        "conditions": [],
        "explanation": {
          "zh-Hant": "對 y 微分時 x 固定，混合項給 x。",
          "en": "Differentiate with respect to y holding x fixed; the mixed term gives x."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "4y 來自 2y^2，沒有漏係數 2。",
            "en": "4y comes from 2y^2 without dropping a factor two."
          }
        },
        "leaf_basis": "polynomial"
      },
      {
        "id": "S03",
        "uses": [
          "S01",
          "S02"
        ],
        "before_tex": "\\nabla f=(\\partial_x f,\\partial_y f)",
        "after_tex": "\\nabla f(x,y)=(2x+y-4,x+4y+2)",
        "relation": "definition",
        "rule": "definition_here",
        "conditions": [],
        "explanation": {
          "zh-Hant": "以固定順序組成兩座標向量，維度恰與來源 R^2 一致。",
          "en": "Assemble the two coordinates in fixed order, matching the R^2 source dimension."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S01",
            "S02"
          ],
          "explanation": {
            "zh-Hant": "不能只給一個偏導就稱完整梯度。",
            "en": "One partial alone cannot be called the complete gradient."
          }
        },
        "leaf_basis": "definition_here"
      },
      {
        "id": "S04",
        "uses": [
          "G1",
          "S03"
        ],
        "before_tex": "p=(1,-1)",
        "after_tex": "\\nabla f(p)=(-3,-1)\\ne(0,0)",
        "relation": "implies",
        "rule": "algebra",
        "conditions": [],
        "explanation": {
          "zh-Hant": "精確代入每一座標，此點不是駐點。",
          "en": "Evaluate every coordinate exactly; this point is not stationary."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S03"
          ],
          "explanation": {
            "zh-Hant": "梯度非零沒有被轉成未給定的下降步或最優分類。",
            "en": "The nonzero gradient is not converted into an unspecified descent step or optimum classification."
          }
        },
        "leaf_basis": "algebra"
      },
      {
        "id": "S05",
        "uses": [
          "S03"
        ],
        "before_tex": "2x+y=4,\\quad x+4y=-2",
        "after_tex": "(x,y)=(18/7,-8/7),\\quad\\nabla f=0",
        "relation": "equivalent",
        "rule": "algebra",
        "conditions": [],
        "explanation": {
          "zh-Hant": "消元得唯一駐點：y=4-2x 代入第二式得 -7x=-18。",
          "en": "Eliminate to get the unique stationary point: substitute y=4-2x into the second equation to obtain -7x=-18."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "S03"
          ],
          "explanation": {
            "zh-Hant": "这里只證駐點，未因梯度零直接稱最小值。",
            "en": "This proves stationarity only, without declaring a minimum merely from zero gradient."
          }
        },
        "leaf_basis": "algebra"
      },
      {
        "id": "S06",
        "uses": [
          "G1"
        ],
        "before_tex": "s(x,y)=x^2-y^2",
        "after_tex": "\\nabla s(0,0)=0,\\quad s(t,0)>0>s(0,t)\\ (t\\ne0)",
        "relation": "implies",
        "rule": "polynomial",
        "conditions": [],
        "explanation": {
          "zh-Hant": "明示 saddle 反例，任意鄰域都有正負值，故零梯度不足以極值。",
          "en": "An explicit saddle has positive and negative values in every neighborhood, so a zero gradient is insufficient for an extremum."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "不是只稱 saddle 而不給兩方向值。",
            "en": "Both directional values are supplied instead of only a saddle label."
          }
        },
        "leaf_basis": "polynomial"
      },
      {
        "id": "S07",
        "uses": [
          "G1"
        ],
        "before_tex": "h(x,y)=x^3/(x^2+y^2)\\ ((x,y)\\ne0),\\quad h(0,0)=0",
        "after_tex": "\\partial_xh(0,0)=1,\\quad\\partial_yh(0,0)=0",
        "relation": "implies",
        "rule": "algebra",
        "conditions": [],
        "explanation": {
          "zh-Hant": "沿 x 軸 h(t,0)=t，沿 y 軸 h(0,t)=0，差商分別為 1 與 0。",
          "en": "Along the x-axis h(t,0)=t, while h(0,t)=0 on the y-axis, giving partial difference quotients 1 and 0."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "偏導逐一存在，但尚未證任意方向的線性餘項。",
            "en": "Coordinate partials exist, but a full-direction linear remainder is not yet proved."
          }
        },
        "leaf_basis": "algebra"
      },
      {
        "id": "S08",
        "uses": [
          "S07"
        ],
        "before_tex": "h(t,t)=t/2,\\quad Dh_{\\text{candidate}}(t,t)=t",
        "after_tex": "\\frac{|h(t,t)-t|}{\\|(t,t)\\|_2}=\\frac1{2\\sqrt2}\\not\\to0",
        "relation": "implies",
        "rule": "algebra",
        "conditions": [
          "t\\ne0"
        ],
        "explanation": {
          "zh-Hant": "若可微，導數由偏導固定為 (1,0)，但對角線正規化餘項不消失，故不可微。",
          "en": "Differentiability would force derivative (1,0), but the normalized diagonal remainder does not vanish, proving nondifferentiability."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S07"
          ],
          "explanation": {
            "zh-Hant": "使用全微分的必要餘項條件，明確否定偏導存在⇒可微。",
            "en": "The necessary differentiability remainder condition explicitly refutes existing partials implying differentiability."
          }
        },
        "leaf_basis": "algebra"
      }
    ],
    "result": {
      "zh-Hant": "梯度為 (2x+y-4,x+4y+2)，p 處 (-3,-1)；零梯度與偏導存在各不足以推出極值與可微。",
      "en": "The gradient is (2x+y-4,x+4y+2), at p it is (-3,-1); zero gradient and existing partials do not imply extrema and differentiability respectively."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "梯度只需一個座標。",
          "en": "A gradient needs only one coordinate."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "來源 R^2 要兩個按序偏導。",
          "en": "An R^2 source requires both ordered partials."
        }
      },
      {
        "claim": {
          "zh-Hant": "零梯度必最小。",
          "en": "A zero gradient guarantees a minimum."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "s=x^2-y^2 在原點兩側異號。",
          "en": "The saddle x^2-y^2 has both signs near the origin."
        }
      },
      {
        "claim": {
          "zh-Hant": "所有偏導存在就可微。",
          "en": "All partials existing imply differentiability."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "S07-S08 的對角餘項不趨零。",
          "en": "The diagonal remainder at S07-S08 does not vanish."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "mko_definition",
        "kind": "cited",
        "statement": {
          "zh-Hant": "來源語義轉述：固定座標順序，梯度由每個座標偏導數組成；偏導存在與駐點都不自動給可微或極值。",
          "en": "Source semantic paraphrase: the gradient contains each coordinate partial in fixed order; existing partials and stationarity do not automatically imply differentiability or an extremum."
        },
        "source": {
          "mko_id": "mko-gradient-vector",
          "sha256": "953e582b90145e3769b9b22891783891e5dbfe6a99446edc1b06a277683029fa",
          "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": "definition_here",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "固定 standard Euclidean 座標下，梯度是每個座標偏導依順序組成的向量；駐點指所有梯度座標為零。",
          "en": "In fixed standard Euclidean coordinates, the gradient is the ordered vector of all coordinate partials; a stationary point has all gradient coordinates zero."
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "grad-x-at-p",
        "lhs": "2*1-1-4",
        "rhs": "-3",
        "step": "S04"
      },
      {
        "id": "grad-y-at-p",
        "lhs": "1+4*(-1)+2",
        "rhs": "-1",
        "step": "S04"
      },
      {
        "id": "stationary-x",
        "lhs": "2*(18/7)-8/7-4",
        "rhs": "0",
        "step": "S05"
      },
      {
        "id": "stationary-y",
        "lhs": "18/7+4*(-8/7)+2",
        "rhs": "0",
        "step": "S05"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "固定 standard Euclidean 座標順序 (x,y)；不自帶最優或下降證書。",
      "en": "Fixed standard Euclidean coordinate order (x,y), with no implicit optimization or descent certificate."
    },
    "md_symbols": [
      [
        "\\nabla f",
        "固定順序梯度",
        "gradient in fixed coordinate order"
      ],
      [
        "p",
        "精確評估點",
        "exact evaluation point"
      ]
    ],
    "md_error_controls": [
      {
        "title": "座標順序 / Coordinate order",
        "zh": "每次 symbolic differentiation 與點值都依 (x,y)。",
        "en": "Both symbolic differentiation and evaluation use (x,y)."
      },
      {
        "title": "責任分離 / Separate obligations",
        "zh": "駐點、可微、極值及 global optimum 不混為一談。",
        "en": "Keep stationarity, differentiability, extrema and global optimality separate."
      }
    ],
    "md_open_items": []
  },
  "revision": {
    "id": "ocme-new142-reader-adoption-20261021",
    "collection": "coverage-20261021",
    "source_commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
    "adopted_source_sha256": "5d7de98af659977808b6bdfbc360956ccd0ca6a6d166fe2b4f428078f3673915",
    "original_source_sha256": "5d7de98af659977808b6bdfbc360956ccd0ca6a6d166fe2b4f428078f3673915",
    "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."
  }
}
