{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-finite-directed-graph-01",
  "mko_id": "mko-finite-directed-graph",
  "title": {
    "zh-Hant": "方向、全部degree與walk核對",
    "en": "Orientation, all degrees and a walk audit"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-finite-directed-graph-01",
    "source": {
      "mko_id": "mko-finite-directed-graph",
      "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
      "sha256": "09311b0ec711e3f02a16b1c332e69c9f718fe2a288f2005683d393695a41161b",
      "english_sha256": "1a9289ec7bd86c2ec776a919d938ee1c37455b7d8c5ec5c81e2293906e548c98"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "work"
    ],
    "goal": {
      "zh-Hant": "按loop-free simple convention核完整digraph。",
      "en": "Audit a fully specified digraph under the declared loop-free simple convention."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "V={0,1,2}，有向E={(0,1),(1,0),(1,2)}，以lexicographic排序；walk候選W=(0,1,2)。",
          "en": "V={0,1,2}, directed E={(0,1),(1,0),(1,2)}, in lexicographic order; candidate walk W=(0,1,2)."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1",
          "work"
        ],
        "before_tex": "E=((0,1),(1,0),(1,2))",
        "after_tex": "\\text{unique ordered pairs, all endpoints in }V,\\quad u\\ne v",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "三個ordered pairs合法、無duplicate、無loop。",
          "en": "All three ordered pairs are legal, unique and loop-free."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "work"
          ],
          "explanation": {
            "zh-Hant": "(0,1)與(1,0)並不duplicate。",
            "en": "(0,1) and(1,0) are not duplicates."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S02",
        "uses": [
          "G1",
          "S01",
          "work"
        ],
        "before_tex": "v=0",
        "after_tex": "d^+(0)=1,\\quad d^-(0)=1",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "0向1送一邊，也從1收一邊。",
          "en": "Vertex 0 sends one edge to 1 and receives one from 1."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "work"
          ],
          "explanation": {
            "zh-Hant": "incoming與outgoing分別計。",
            "en": "Count incoming and outgoing edges separately."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S03",
        "uses": [
          "G1",
          "S02",
          "work"
        ],
        "before_tex": "v=1",
        "after_tex": "d^+(1)=2,\\quad d^-(1)=1",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "1有到0、2兩條out邊，只有0到1的in邊。",
          "en": "Vertex 1 has outgoing edges to 0,2 and only the incoming edge from 0."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S02",
            "work"
          ],
          "explanation": {
            "zh-Hant": "逆向兩邊互不抵消。",
            "en": "Opposite edges do not cancel."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S04",
        "uses": [
          "G1",
          "S03",
          "work"
        ],
        "before_tex": "v=2",
        "after_tex": "d^+(2)=0,\\quad d^-(2)=1",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "2沒有out邊，但從1收一邊。",
          "en": "Vertex 2 has no outgoing edge and receives one from 1."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S03",
            "work"
          ],
          "explanation": {
            "zh-Hant": "三頂點全分類完成。",
            "en": "All three vertices have been classified."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S05",
        "uses": [
          "G1",
          "S04",
          "work"
        ],
        "before_tex": "\\sum_vd^+(v),\\quad\\sum_vd^-(v)",
        "after_tex": "1+2+0=3=|E|,\\quad1+1+1=3=|E|",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "每ordered edge各提供一次out與一次in。",
          "en": "Each ordered edge contributes once to each degree sum."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S04",
            "work"
          ],
          "explanation": {
            "zh-Hant": "不能把單個總和寫成2|E|，那是兩總和合併。",
            "en": "One sum is not 2|E|; that combines both sums."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S06",
        "uses": [
          "G1",
          "S05",
          "work"
        ],
        "before_tex": "W=(0,1,2)",
        "after_tex": "(0,1)\\in E,\\quad(1,2)\\in E",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "兩步方向均與E一致，故是directed walk。",
          "en": "Both steps follow the declared orientation, so W is a directed walk."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S05",
            "work"
          ],
          "explanation": {
            "zh-Hant": "無向相鄰不足以核有向walk。",
            "en": "Undirected adjacency would not suffice."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S07",
        "uses": [
          "G1",
          "S06",
          "work"
        ],
        "before_tex": "W'=(2,1,0)",
        "after_tex": "(2,1)\\notin E\\implies W'\\text{ invalid}",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "反轉walk第一步缺所需方向，提供明確反例邊。",
          "en": "The first reversed step lacks the required orientation, giving an explicit counterexample edge."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S06",
            "work"
          ],
          "explanation": {
            "zh-Hant": "(1,2)存在不補出(2,1)。",
            "en": "Existence of(1,2) does not supply(2,1)."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S08",
        "uses": [
          "G1",
          "S07",
          "work"
        ],
        "before_tex": "(1,1)\\text{ proposed addition}",
        "after_tex": "u=v\\implies\\text{rejected under this convention}",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "loop違反本次宣告模型，不宣稱所有digraph定義都禁止loop。",
          "en": "A loop violates this declared model, not every possible digraph convention."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S07",
            "work"
          ],
          "explanation": {
            "zh-Hant": "重複加入(0,1)也違反simple set模型。",
            "en": "Adding a duplicate(0,1) also violates the simple-set model."
          }
        },
        "leaf_basis": "work"
      }
    ],
    "result": {
      "zh-Hant": "out=(1,2,0)、in=(1,1,1)，各總和3；W合法而反向W'不合法。",
      "en": "Out-degrees are(1,2,0), in-degrees(1,1,1), each summing to 3; W is valid and W' is not."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "(0,1)與(1,0)是同邊。",
          "en": "(0,1) and(1,0) are the same edge."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "ordered pairs方向不同。",
          "en": "Their ordered-pair orientations differ."
        }
      },
      {
        "claim": {
          "zh-Hant": "out-degree總和6。",
          "en": "The out-degree sum is 6."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "它為3=|E|，不是2|E|。",
          "en": "It is 3=|E|, not 2|E|."
        }
      },
      {
        "claim": {
          "zh-Hant": "W'沿原walk反向故合法。",
          "en": "W' is valid because it reverses W."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "(2,1)不在E。",
          "en": "(2,1) is absent from E."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "mko_definition",
        "kind": "cited",
        "statement": {
          "zh-Hant": "固定loop-free simple convention：每edge=(u,v)、u!=v，(u,v)與(v,u)不同，E為set故同向parallel duplicates禁止。out-degree與in-degree分開，兩者全圖總和皆等於|E|。walk每一步必須符合edge orientation；loops由negative boundary拒絕。",
          "en": "Each edge is (u,v) with u≠v; (u,v) and (v,u) are different edges. Edges form a set, so same-direction parallel duplicates are forbidden. In-degrees and out-degrees are separate, each summing over the whole graph to |E|. Successive walk steps must follow orientation. Explicit loop boundaries fail this declared model, not every possible digraph convention."
        },
        "source": {
          "mko_id": "mko-finite-directed-graph",
          "sha256": "09311b0ec711e3f02a16b1c332e69c9f718fe2a288f2005683d393695a41161b",
          "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f"
        }
      },
      {
        "id": "work",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "有向邊為ordered pairs；out-degree計第一座標、in-degree計第二座標；walk逐步尊重方向。 simple loop-free digraph的邊為唯一ordered pairs且兩端不同；反向pair是不同邊；directed walk每步方向必在E。",
          "en": "Directed edges are ordered pairs; out-degree counts first coordinates and in-degree second coordinates; walks respect each orientation. Edges of a simple loop-free digraph are unique ordered pairs with distinct endpoints; a reverse pair is a distinct edge; every directed-walk step must belong to E in that orientation."
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "N01",
        "lhs": "1+2+0",
        "rhs": "3"
      },
      {
        "id": "N02",
        "lhs": "1+1+1",
        "rhs": "3"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "n≥1；不混用無向degree或loop模型。",
      "en": "n≥1; no undirected-degree or loop-model substitution."
    },
    "md_symbols": [
      [
        "V,E",
        "完整頂點與邊集合",
        "complete vertex and edge sets"
      ],
      [
        "d+,d-",
        "out與in degree",
        "out- and in-degree"
      ]
    ],
    "md_error_controls": [
      {
        "title": "方向 / Orientation",
        "zh": "每step查ordered pair本身，不查unordered化結果。",
        "en": "Check each ordered pair itself, not its unordered version."
      },
      {
        "title": "完整degree / Complete degrees",
        "zh": "三頂點in/out都列出，再分開總和。",
        "en": "List both degrees at all three vertices before summing separately."
      }
    ],
    "md_open_items": []
  },
  "revision": {
    "id": "ocme-new142-reader-adoption-20261021",
    "collection": "coverage-20261021",
    "source_commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
    "adopted_source_sha256": "29de68530ae033900877a5ed071984a0b1139166bdb2f8540730b83646126993",
    "original_source_sha256": "e9c6f110a34b506927711f1056970b7cb9f9b0ad5005a7b6dd237f108c5bb012",
    "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": [
      "BR142-P050",
      "BR142-S141",
      "BR142-S142",
      "BR142-S140",
      "BR142-S136",
      "BR142-S137",
      "BR142-S138",
      "BR142-S139"
    ],
    "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."
  }
}
