{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-graph-walk-simple-path-01",
  "mko_id": "mko-graph-walk-simple-path",
  "title": {
    "zh-Hant": "圖的 walk 與 simple path：逐對核對、長度與 trail 的區別",
    "en": "Graph walks and simple paths: pair-by-pair checks, length and the difference from trails"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-graph-walk-simple-path-01",
    "source": {
      "mko_id": "mko-graph-walk-simple-path",
      "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
      "sha256": "e48ce83c081f9aa69ead3069dd9ed3c1f58b44d320e7dc35d7794f060c83b554",
      "english_sha256": "26c10dfdc30c28816aa973a1410f93d152f298fc836343c29bbeab96045bacd5"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "graph_basics",
      "finite_counting_basics",
      "quantifier_negation",
      "and_intro_elim",
      "numeric_evaluation"
    ],
    "goal": {
      "zh-Hant": "有限無向無 loop 簡單圖 G：V={0,1,2,3,4}，E={{0,1},{1,2},{2,3},{0,3},{1,3},{3,4}}。對頂點序列 W₁=(0,1,2,3,4)、W₂=(0,1,3,1,2)、W₃=(0,2,3)、W₄=(2,3,0,1,3,4)、W₅=(4)、W₆=(1,1) 逐一判定是否為 walk、長度為何、是否為 simple path；並證明 simple path 不重複邊，以及本圖中 simple path 的長度至多為 4。",
      "en": "Finite undirected loop-free simple graph G: V={0,1,2,3,4}, E={{0,1},{1,2},{2,3},{0,3},{1,3},{3,4}}. For the vertex sequences W₁=(0,1,2,3,4), W₂=(0,1,3,1,2), W₃=(0,2,3), W₄=(2,3,0,1,3,4), W₅=(4) and W₆=(1,1), decide whether each is a walk, its length, and whether it is a simple path; also prove that a simple path repeats no edge and that in this graph a simple path has length at most 4."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "V={0,1,2,3,4}；E={{0,1},{1,2},{2,3},{0,3},{1,3},{3,4}}，共 6 條邊；除此之外沒有其他邊。",
          "en": "V={0,1,2,3,4}; E={{0,1},{1,2},{2,3},{0,3},{1,3},{3,4}}, six edges in all; there are no other edges."
        }
      },
      {
        "id": "G2",
        "statement": {
          "zh-Hant": "待判定的序列：W₁=(0,1,2,3,4)、W₂=(0,1,3,1,2)、W₃=(0,2,3)、W₄=(2,3,0,1,3,4)、W₅=(4)、W₆=(1,1)，以及空序列 ()。",
          "en": "The sequences to decide: W₁=(0,1,2,3,4), W₂=(0,1,3,1,2), W₃=(0,2,3), W₄=(2,3,0,1,3,4), W₅=(4), W₆=(1,1), and the empty sequence ()."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1",
          "graph_basics"
        ],
        "before_tex": "V=\\{0,1,2,3,4\\},\\ E=\\{\\{0,1\\},\\{1,2\\},\\{2,3\\},\\{0,3\\},\\{1,3\\},\\{3,4\\}\\}",
        "after_tex": "G\\ \\text{simple, loop-free};\\ \\sum_{v}\\deg v=2+3+2+4+1=12=2|E|",
        "relation": "definition",
        "rule": "graph_basics",
        "conditions": [],
        "explanation": {
          "zh-Hant": "先確認給定資料是 MKO 所要求的有限無向無 loop 簡單圖：每條邊是兩個相異頂點的無序對，清單中沒有重複的邊。度數為 deg0=2、deg1=3、deg2=2、deg3=4、deg4=1，和為 12=2·6，與握手引理一致，作為邊清單抄寫無誤的核對。",
          "en": "First confirm that the data form the finite undirected loop-free simple graph the MKO requires: each edge is an unordered pair of two distinct vertices and no edge is listed twice. The degrees are deg0=2, deg1=3, deg2=2, deg3=4, deg4=1, summing to 12=2·6, in agreement with the handshake lemma, which checks that the edge list was copied consistently."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "graph_basics"
          ],
          "explanation": {
            "zh-Hant": "只確認資格與做一致性核對（N1）；握手等式成立不能證明邊清單正確，只能排除部分抄寫錯誤。",
            "en": "It only confirms the setting and makes a consistency check (N1); the handshake equation cannot prove the edge list correct, only exclude some copying errors."
          }
        },
        "leaf_basis": "graph_basics + numeric_evaluation"
      },
      {
        "id": "S02",
        "uses": [
          "mko_walk_def"
        ],
        "before_tex": "W=(v_i)_{i=0}^{k}",
        "after_tex": "W\\ \\text{walk}\\iff\\forall i\\ (0\\le i\\le k-1):\\ \\{v_i,v_{i+1}\\}\\in E;\\ \\ \\text{length}=k;\\ \\ \\text{simple path}\\iff\\text{walk}\\land(i\\neq j\\Rightarrow v_i\\neq v_j)",
        "relation": "definition",
        "rule": "mko_walk_def",
        "conditions": [
          "k\\ge 0"
        ],
        "explanation": {
          "zh-Hant": "展開 MKO 的三個定義。walk 要求每一個連續無序對都是邊；長度 k 是連續對的個數，也就是項數減一；simple path 另外要求所有項彼此相異。序列至少有一項（k≥0），空序列被協定排除。",
          "en": "Unfold the MKO's three definitions. A walk requires every consecutive unordered pair to be an edge; the length k is the number of consecutive pairs, that is the number of entries minus one; a simple path additionally requires all entries to be distinct. A sequence has at least one entry (k≥0); the empty sequence is excluded by the protocol."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "mko_walk_def",
            "def_unfold"
          ],
          "explanation": {
            "zh-Hant": "只展開定義，不推出新事實；之後每個判定都回到這三個條件。",
            "en": "It only unfolds definitions and derives no new fact; each later decision returns to these three conditions."
          }
        },
        "leaf_basis": "mko_walk_def + def_unfold"
      },
      {
        "id": "S03",
        "uses": [
          "S02",
          "G1",
          "G2"
        ],
        "before_tex": "W_1=(0,1,2,3,4)",
        "after_tex": "\\{0,1\\},\\{1,2\\},\\{2,3\\},\\{3,4\\}\\in E\\ \\Rightarrow\\ W_1\\ \\text{walk}",
        "relation": "implies",
        "rule": "and_intro_elim",
        "conditions": [],
        "explanation": {
          "zh-Hant": "W₁ 有四個連續對：{0,1}、{1,2}、{2,3}、{3,4}。逐一在 E 中查到。四個條件都成立，依合取引入，W₁ 是 walk。",
          "en": "W₁ has four consecutive pairs: {0,1}, {1,2}, {2,3}, {3,4}. Each is found in E. All four conditions hold, so by conjunction introduction W₁ is a walk."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S02",
            "G1",
            "and_intro_elim"
          ],
          "explanation": {
            "zh-Hant": "必須核對每一個連續對，不能只核第一對或最後一對；這一步四對都已核對。",
            "en": "Every consecutive pair must be checked, not just the first or the last; this step checks all four."
          }
        },
        "leaf_basis": "and_intro_elim + mko_walk_def"
      },
      {
        "id": "S04",
        "uses": [
          "S02",
          "S03"
        ],
        "before_tex": "W_1\\ \\text{has}\\ 5\\ \\text{entries}",
        "after_tex": "\\operatorname{len}(W_1)=5-1=4",
        "relation": "equivalent",
        "rule": "mko_walk_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "長度是邊數（連續對的個數），不是頂點數：5 項序列有 4 個連續對，所以長度為 4。",
          "en": "The length is the number of edges (consecutive pairs), not the number of vertices: a sequence of 5 entries has 4 consecutive pairs, so the length is 4."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "mko_walk_def",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "反向：長度 4 加一得項數 5；兩種說法描述同一個序列（N2）。",
            "en": "Backward: length 4 plus one gives 5 entries; both descriptions refer to the same sequence (N2)."
          }
        },
        "leaf_basis": "mko_walk_def + numeric_evaluation"
      },
      {
        "id": "S05",
        "uses": [
          "S03",
          "S02",
          "G2"
        ],
        "before_tex": "W_1\\ \\text{walk},\\ 0,1,2,3,4\\ \\text{pairwise distinct}",
        "after_tex": "W_1\\ \\text{simple path}",
        "relation": "implies",
        "rule": "mko_walk_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "W₁ 的五項 0、1、2、3、4 兩兩相異，加上 S03 的 walk 資格，依定義 W₁ 是長度 4 的 simple path。",
          "en": "The five entries 0, 1, 2, 3, 4 of W₁ are pairwise distinct; together with the walk property of S03, W₁ is by definition a simple path of length 4."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S03",
            "mko_walk_def"
          ],
          "explanation": {
            "zh-Hant": "simple path 需要兩個條件：walk（S03）與項不重複；只有項不重複而不是 walk 不夠（見 S08）。",
            "en": "A simple path needs two conditions: being a walk (S03) and having no repeated entry; distinct entries without the walk property are not enough (see S08)."
          }
        },
        "leaf_basis": "mko_walk_def + and_intro_elim"
      },
      {
        "id": "S06",
        "uses": [
          "S02",
          "G1",
          "G2"
        ],
        "before_tex": "W_2=(0,1,3,1,2)",
        "after_tex": "\\{0,1\\},\\{1,3\\},\\{3,1\\},\\{1,2\\}\\in E\\ \\Rightarrow\\ W_2\\ \\text{walk},\\ \\operatorname{len}(W_2)=4",
        "relation": "implies",
        "rule": "and_intro_elim",
        "conditions": [],
        "explanation": {
          "zh-Hant": "W₂ 的四個連續對是 {0,1}、{1,3}、{3,1}、{1,2}。無序對 {3,1} 與 {1,3} 是同一條邊，在 E 中。四對都是邊，所以 W₂ 是 walk；5 項，長度 4。",
          "en": "The four consecutive pairs of W₂ are {0,1}, {1,3}, {3,1}, {1,2}. The unordered pair {3,1} is the same edge as {1,3}, which is in E. All four are edges, so W₂ is a walk; it has 5 entries and length 4."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S02",
            "unordered_pair_eq",
            "and_intro_elim"
          ],
          "explanation": {
            "zh-Hant": "因圖是無向的，{3,1}={1,3}（無序對相等）；若是有向圖，這一步要另外核對方向。",
            "en": "Because the graph is undirected, {3,1}={1,3} (equality of unordered pairs); in a directed graph this step would need a separate check of direction."
          }
        },
        "leaf_basis": "and_intro_elim + unordered_pair_eq + mko_walk_def"
      },
      {
        "id": "S07",
        "uses": [
          "S06",
          "S02"
        ],
        "before_tex": "v_1=1=v_3\\ \\text{in}\\ W_2",
        "after_tex": "W_2\\ \\text{walk but not a simple path}",
        "relation": "implies",
        "rule": "quantifier_negation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "W₂ 的索引 1 與索引 3 的項都是 1（i=1≠3=j），所以「項兩兩相異」不成立，W₂ 不是 simple path。它仍是 walk：MKO 明說 walk 可以重複頂點與邊（這裡邊 {1,3} 走了兩次）。",
          "en": "The entries at indices 1 and 3 of W₂ are both 1 (i=1≠3=j), so 'entries pairwise distinct' fails and W₂ is not a simple path. It is still a walk: the MKO says a walk may repeat vertices and edges (here the edge {1,3} is used twice)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S06",
            "quantifier_negation"
          ],
          "explanation": {
            "zh-Hant": "否定「對所有 i≠j，v_i≠v_j」只需一組見證 (i,j)=(1,3)。",
            "en": "Denying 'for all i≠j, v_i≠v_j' needs one witness pair (i,j)=(1,3)."
          }
        },
        "leaf_basis": "quantifier_negation + mko_walk_def"
      },
      {
        "id": "S08",
        "uses": [
          "S02",
          "G1",
          "G2"
        ],
        "before_tex": "W_3=(0,2,3)",
        "after_tex": "\\{0,2\\}\\notin E\\ \\Rightarrow\\ W_3\\ \\text{not a walk}",
        "relation": "implies",
        "rule": "quantifier_negation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "第一個連續對 {0,2} 不在 E 中（E 中含 0 的邊只有 {0,1} 與 {0,3}）。walk 要求每一對都是邊，一對失敗就足以否定。雖然 0、2、3 都是頂點、彼此相異，W₃ 仍不是 walk，因此也不是 simple path。",
          "en": "The first consecutive pair {0,2} is not in E (the only edges of E containing 0 are {0,1} and {0,3}). A walk requires every pair to be an edge, so one failing pair refutes it. Although 0, 2, 3 are distinct vertices, W₃ is not a walk and hence not a simple path."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "quantifier_negation"
          ],
          "explanation": {
            "zh-Hant": "「{0,2}∉E」依 G1 的「沒有其他邊」成立；若邊集合不完整，就不能判定不相鄰，這正是假設 a1 要求完整邊集的原因。",
            "en": "'{0,2}∉E' holds by the clause 'no other edges' in G1; with an incomplete edge set non-adjacency could not be decided, which is why assumption a1 requires the complete edge set."
          }
        },
        "leaf_basis": "quantifier_negation + mko_walk_def"
      },
      {
        "id": "S09",
        "uses": [
          "S02",
          "G1",
          "G2",
          "trail_def"
        ],
        "before_tex": "W_4=(2,3,0,1,3,4)",
        "after_tex": "\\{2,3\\},\\{3,0\\},\\{0,1\\},\\{1,3\\},\\{3,4\\}\\in E,\\ \\text{pairwise distinct}\\ \\Rightarrow\\ W_4\\ \\text{trail},\\ \\operatorname{len}(W_4)=5",
        "relation": "implies",
        "rule": "trail_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "W₄ 的五個連續對 {2,3}、{3,0}、{0,1}、{1,3}、{3,4} 都在 E 中，所以是 walk；6 項，長度 5。這五條邊兩兩不同（逐一比對無序對），所以 W₄ 不重複邊，是 trail。",
          "en": "The five consecutive pairs {2,3}, {3,0}, {0,1}, {1,3}, {3,4} of W₄ are all in E, so W₄ is a walk; it has 6 entries and length 5. These five edges are pairwise different (compare the unordered pairs one by one), so W₄ repeats no edge and is a trail."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S02",
            "trail_def",
            "unordered_pair_eq"
          ],
          "explanation": {
            "zh-Hant": "trail 需要 walk 加上邊不重複；這裡兩者都已逐一核對（N3 核長度）。",
            "en": "A trail needs the walk property plus no repeated edge; both are checked one by one here (N3 checks the length)."
          }
        },
        "leaf_basis": "trail_def + and_intro_elim + unordered_pair_eq"
      },
      {
        "id": "S10",
        "uses": [
          "S09",
          "S02"
        ],
        "before_tex": "v_1=3=v_4\\ \\text{in}\\ W_4",
        "after_tex": "W_4\\ \\text{trail but not a simple path}",
        "relation": "implies",
        "rule": "quantifier_negation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "W₄ 的索引 1 與索引 4 的項都是頂點 3，所以 W₄ 不是 simple path，雖然它沒有重複的邊。這正是 MKO 提醒的：不重複邊的 trail 不能與 simple path 混同。",
          "en": "The entries at indices 1 and 4 of W₄ are both vertex 3, so W₄ is not a simple path, even though it repeats no edge. This is exactly the MKO's warning: a trail without repeated edges must not be confused with a simple path."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S09",
            "quantifier_negation"
          ],
          "explanation": {
            "zh-Hant": "一組見證 (i,j)=(1,4) 足以否定頂點兩兩相異；S12 的長度上界給出獨立的交叉核對。",
            "en": "One witness pair (i,j)=(1,4) suffices to deny pairwise distinct vertices; the length bound of S12 gives an independent cross-check."
          }
        },
        "leaf_basis": "quantifier_negation + mko_walk_def"
      },
      {
        "id": "S11",
        "uses": [
          "S02",
          "trail_def"
        ],
        "before_tex": "W=(v_i)_{i=0}^{k}\\ \\text{simple path}",
        "after_tex": "\\{v_i,v_{i+1}\\}\\neq\\{v_j,v_{j+1}\\}\\ \\ (0\\le i<j\\le k-1),\\ \\text{so}\\ W\\ \\text{is a trail}",
        "relation": "implies",
        "rule": "L_path_trail",
        "conditions": [],
        "explanation": {
          "zh-Hant": "反方向的關係：每個 simple path 都是 trail（引理 L_path_trail）。證明在子步 S11.1、S11.2：假設兩條邊相同，會推出兩個不同位置的頂點相同，與 simple path 矛盾。所以 simple path 比 trail 更嚴格，S10 說明反向不成立。",
          "en": "The relation in the other direction: every simple path is a trail (Lemma L_path_trail). The proof is in sub-steps S11.1 and S11.2: if two edges were the same, two different positions would carry the same vertex, contradicting the simple-path property. So simple paths are stricter than trails, and S10 shows the converse fails."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "L_path_trail",
            "trail_def"
          ],
          "explanation": {
            "zh-Hant": "只宣稱 simple path ⇒ trail；反向由 W₄ 否定。",
            "en": "Only simple path ⇒ trail is claimed; the converse is refuted by W₄."
          }
        },
        "leaf_basis": "contradiction + unordered_pair_eq + trail_def"
      },
      {
        "id": "S11.1",
        "uses": [
          "unordered_pair_eq"
        ],
        "before_tex": "\\{v_i,v_{i+1}\\}=\\{v_j,v_{j+1}\\},\\ 0\\le i<j\\le k-1",
        "after_tex": "v_i=v_j\\ \\lor\\ v_i=v_{j+1}",
        "relation": "implies",
        "rule": "unordered_pair_eq",
        "conditions": [
          "i<j"
        ],
        "explanation": {
          "zh-Hant": "為了反證，假設存在 i<j 使兩條邊相同。依無序對相等，(v_i=v_j 且 v_{i+1}=v_{j+1}) 或 (v_i=v_{j+1} 且 v_{i+1}=v_j)；兩種情形都至少給出 v_i=v_j 或 v_i=v_{j+1}。",
          "en": "For a proof by contradiction, suppose some i<j makes the two edges equal. By equality of unordered pairs, (v_i=v_j and v_{i+1}=v_{j+1}) or (v_i=v_{j+1} and v_{i+1}=v_j); either case gives at least v_i=v_j or v_i=v_{j+1}."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "unordered_pair_eq",
            "and_intro_elim"
          ],
          "explanation": {
            "zh-Hant": "只取每個情形的第一個合取項，不宣稱反向。",
            "en": "Only the first conjunct of each case is kept; no converse is claimed."
          }
        },
        "leaf_basis": "unordered_pair_eq + and_intro_elim"
      },
      {
        "id": "S11.2",
        "uses": [
          "S11.1",
          "S02"
        ],
        "before_tex": "v_i=v_j\\ \\lor\\ v_i=v_{j+1},\\ \\ i<j<j+1",
        "after_tex": "\\bot,\\ \\text{hence no two edges of}\\ W\\ \\text{coincide}",
        "relation": "implies",
        "rule": "contradiction",
        "conditions": [],
        "explanation": {
          "zh-Hant": "因 i<j<j+1，位置 i 與 j、i 與 j+1 都不同；simple path 在不同位置的頂點相異，所以兩個情形都矛盾（分情形證明）。假設不成立：任兩條邊都不同。S11.1 與 S11.2 合起來證得引理 L_path_trail。",
          "en": "Since i<j<j+1, the positions i and j, and i and j+1, are different; a simple path has different vertices at different positions, so both cases are contradictory (proof by cases). The assumption fails: no two edges coincide. S11.1 and S11.2 together prove Lemma L_path_trail."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S11.1",
            "contradiction",
            "case_analysis"
          ],
          "explanation": {
            "zh-Hant": "兩個情形涵蓋 S11.1 的所有可能；矛盾只用到 simple path 的定義。",
            "en": "The two cases cover every possibility from S11.1; the contradiction uses only the definition of a simple path."
          }
        },
        "leaf_basis": "contradiction + case_analysis + mko_walk_def"
      },
      {
        "id": "S12",
        "uses": [
          "S02",
          "G1",
          "inj_size_le"
        ],
        "before_tex": "W=(v_i)_{i=0}^{k}\\ \\text{simple path in}\\ G,\\ |V|=5",
        "after_tex": "k+1\\le 5,\\ \\text{so}\\ \\operatorname{len}(W)=k\\le 4",
        "relation": "implies",
        "rule": "inj_size_le",
        "conditions": [],
        "explanation": {
          "zh-Hant": "simple path 的 k+1 項兩兩相異，所以 i↦v_i 是由 {i∈ℤ:0≤i≤k}（k+1 個元素）到 V（5 個元素）的單射；依鴿籠原理 k+1≤5，即長度至多 4。W₁ 的長度恰為 4，達到上界。W₄ 的長度 5>4，所以由這個上界也可看出它不可能是 simple path，與 S10 一致。",
          "en": "The k+1 entries of a simple path are pairwise distinct, so i↦v_i is an injective map from {i∈ℤ:0≤i≤k} (k+1 elements) into V (5 elements); by the pigeonhole principle k+1≤5, so the length is at most 4. W₁ has length exactly 4 and attains the bound. W₄ has length 5>4, so the bound alone also shows it cannot be a simple path, in agreement with S10."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "inj_size_le",
            "S02"
          ],
          "explanation": {
            "zh-Hant": "需要項兩兩相異（單射）；對一般 walk 不成立，W₂ 與 W₄ 都可重複頂點。長度 ≤4 只是必要條件，不推出是 simple path（N4、N5）。",
            "en": "It needs pairwise distinct entries (injectivity); for a general walk it fails, since W₂ and W₄ repeat vertices. Length ≤4 is only necessary and does not imply being a simple path (N4, N5)."
          }
        },
        "leaf_basis": "inj_size_le + finite_counting_basics"
      },
      {
        "id": "S13",
        "uses": [
          "S02",
          "G2"
        ],
        "before_tex": "W_5=(4),\\ k=0",
        "after_tex": "W_5\\ \\text{simple path of length}\\ 0;\\ \\ ()\\ \\text{not a walk}",
        "relation": "implies",
        "rule": "mko_walk_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "W₅ 只有一項，沒有連續對，「每個連續對都是邊」空真成立，所以是 walk，長度 1−1=0；唯一的一項當然不重複，所以是 simple path。依 MKO 協定（假設 a2），空序列 () 不算 walk，也沒有長度。",
          "en": "W₅ has one entry and no consecutive pair, so 'every consecutive pair is an edge' holds vacuously: it is a walk of length 1−1=0, and its single entry cannot repeat, so it is a simple path. By the MKO's protocol (assumption a2), the empty sequence () is not a walk and has no length."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "mko_walk_def"
          ],
          "explanation": {
            "zh-Hant": "空真成立是因為沒有任何 i 滿足 0≤i≤k−1=−1；空序列的排除是協定規定，不是由定義推出。",
            "en": "The vacuous truth holds because no i satisfies 0≤i≤k−1=−1; the exclusion of the empty sequence is a protocol choice, not derived from the definition."
          }
        },
        "leaf_basis": "mko_walk_def + forall_intro"
      },
      {
        "id": "S14",
        "uses": [
          "S01",
          "S02",
          "G2"
        ],
        "before_tex": "W_6=(1,1)",
        "after_tex": "\\{1,1\\}\\notin E\\ \\Rightarrow\\ W_6\\ \\text{not a walk}",
        "relation": "implies",
        "rule": "graph_basics",
        "conditions": [],
        "explanation": {
          "zh-Hant": "唯一的連續對是 {1,1}，它只含一個頂點，不是兩個相異頂點的無序對；本圖無 loop（S01），所以它不是邊。W₆ 不是 walk，不能把「停在原地」當成長度 1 的 walk。",
          "en": "The only consecutive pair is {1,1}, which contains a single vertex and is not an unordered pair of two distinct vertices; the graph has no loops (S01), so it is not an edge. W₆ is not a walk, and 'staying in place' cannot count as a walk of length 1."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S01",
            "graph_basics",
            "quantifier_negation"
          ],
          "explanation": {
            "zh-Hant": "依賴「簡單圖的邊是相異頂點的無序對」；若另換允許 loop 的模型，仍須實際含有頂點 1 的 loop 才會使 W₆ 成為長度 1 的 walk；只說允許 loop 不保證結論改變。即使該 loop 存在，W₆ 仍因頂點重複而非 simple path。該模型不在此 MKO 範圍內。",
            "en": "It relies on edges of a simple graph being unordered pairs of distinct vertices; in a different model allowing loops, an actual loop at vertex 1 is still needed for W₆ to be a length-1 walk. Merely allowing loops does not force a changed conclusion. Even with that loop, repeated vertices keep W₆ from being a simple path. That model is outside this MKO's scope."
          }
        },
        "leaf_basis": "graph_basics + quantifier_negation"
      },
      {
        "id": "S15",
        "uses": [
          "S05",
          "S07",
          "S08",
          "S10",
          "S11",
          "S12",
          "S13",
          "S14"
        ],
        "before_tex": "\\text{S05},\\ \\text{S07},\\ \\text{S08},\\ \\text{S10},\\ \\text{S13},\\ \\text{S14}",
        "after_tex": "W_1,W_5\\ \\text{simple paths};\\ W_2\\ \\text{walk only};\\ W_4\\ \\text{trail, not simple path};\\ W_3,W_6,()\\ \\text{not walks}",
        "relation": "implies",
        "rule": "and_intro_elim",
        "conditions": [],
        "explanation": {
          "zh-Hant": "彙整：W₁ 是長度 4 的 simple path；W₂ 是長度 4 的 walk，重複頂點與邊；W₃ 不是 walk；W₄ 是長度 5 的 trail，但不是 simple path；W₅ 是長度 0 的 simple path；W₆ 與空序列不是 walk。另證得 simple path 必為 trail，且本圖 simple path 長度至多 4。",
          "en": "Summary: W₁ is a simple path of length 4; W₂ is a walk of length 4 that repeats a vertex and an edge; W₃ is not a walk; W₄ is a trail of length 5 but not a simple path; W₅ is a simple path of length 0; W₆ and the empty sequence are not walks. Also proved: every simple path is a trail, and in this graph a simple path has length at most 4."
        },
        "reverse_audit": {
          "kind": "sufficient_goal_reduction",
          "required_ids": [
            "S05",
            "S07",
            "S08",
            "S10",
            "S11",
            "S12",
            "S13",
            "S14",
            "and_intro_elim"
          ],
          "explanation": {
            "zh-Hant": "目標 G 是所有判定與兩個一般性質的合取；足夠條件 H 是各步的結論，H⇒G 由合取引入，每一項都由已知正向證得，沒有把 G 當作前提。",
            "en": "Goal G is the conjunction of all decisions and the two general facts; the sufficient condition H consists of the conclusions of the steps listed, H⇒G by conjunction introduction, and each part is proved forwards from the givens; G is never used as a premise."
          }
        },
        "leaf_basis": "and_intro_elim"
      }
    ],
    "result": {
      "zh-Hant": "在 G 中：W₁=(0,1,2,3,4) 是長度 4 的 simple path；W₂=(0,1,3,1,2) 是長度 4 的 walk 但不是 simple path；W₃=(0,2,3) 因 {0,2}∉E 不是 walk；W₄=(2,3,0,1,3,4) 是長度 5 的 trail，但頂點 3 重複，不是 simple path；W₅=(4) 是長度 0 的 simple path；W₆=(1,1) 與空序列不是 walk。每個 simple path 都是 trail，反之不然；本圖中 simple path 的長度至多為 4。",
      "en": "In G: W₁=(0,1,2,3,4) is a simple path of length 4; W₂=(0,1,3,1,2) is a walk of length 4 but not a simple path; W₃=(0,2,3) is not a walk because {0,2}∉E; W₄=(2,3,0,1,3,4) is a trail of length 5 but repeats vertex 3 and is not a simple path; W₅=(4) is a simple path of length 0; W₆=(1,1) and the empty sequence are not walks. Every simple path is a trail but not conversely; in this graph a simple path has length at most 4."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "(0,2,3) 的頂點都在 V 中且不重複，所以它是 simple path",
          "en": "The vertices of (0,2,3) are all in V and do not repeat, so it is a simple path"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "{0,2}∉E，所以它根本不是 walk。",
          "en": "{0,2}∉E, so it is not even a walk."
        }
      },
      {
        "claim": {
          "zh-Hant": "W₁=(0,1,2,3,4) 有 5 個頂點，所以長度是 5",
          "en": "W₁=(0,1,2,3,4) has 5 vertices, so its length is 5"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "長度是連續對的個數 5−1=4。",
          "en": "The length is the number of consecutive pairs, 5−1=4."
        }
      },
      {
        "claim": {
          "zh-Hant": "W₄ 沒有重複的邊，所以是 simple path",
          "en": "W₄ has no repeated edge, so it is a simple path"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "頂點 3 出現在索引 1 與索引 4 的項；而且長度 5 超過 simple path 的上界 4。",
          "en": "Vertex 3 appears at indices 1 and 4; moreover its length 5 exceeds the simple-path bound 4."
        }
      },
      {
        "claim": {
          "zh-Hant": "(1,1) 是在頂點 1 停留一步、長度為 1 的 walk",
          "en": "(1,1) is a walk of length 1 that stays at vertex 1 for one step"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "{1,1} 不是兩個相異頂點的無序對，無 loop 簡單圖中不是邊。",
          "en": "{1,1} is not an unordered pair of distinct vertices and is not an edge of a loop-free simple graph."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "graph_basics",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "（簡單無向）圖：G=(V,E)，E 中每條邊是 V 中兩個相異頂點的無序對；頂點度數是與它相連的邊數；握手引理 Σ_v deg(v)=2|E|。",
          "en": "(Simple undirected) graph: G=(V,E), where each edge is an unordered pair of distinct vertices; the degree of a vertex is the number of edges at it; handshake lemma Σ_v deg(v)=2|E|."
        }
      },
      {
        "id": "finite_counting_basics",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "有限計數：互斥有限集合 A、B 有 |A∪B|=|A|+|B|；|A×B|=|A|·|B|；有限集之間存在雙射 ⇔ 元素個數相同。",
          "en": "Finite counting: for disjoint finite sets A, B, |A∪B|=|A|+|B|; |A×B|=|A|·|B|; there is a bijection between finite sets ⇔ they have the same number of elements."
        }
      },
      {
        "id": "quantifier_negation",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "量詞否定：¬(∀x, P(x)) 等價於 ∃x, ¬P(x)；¬(∃x, P(x)) 等價於 ∀x, ¬P(x)。",
          "en": "Negating quantifiers: ¬(∀x, P(x)) is equivalent to ∃x, ¬P(x), and ¬(∃x, P(x)) is equivalent to ∀x, ¬P(x)."
        }
      },
      {
        "id": "and_intro_elim",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "合取：由 P 與 Q 得 P∧Q；由 P∧Q 可分別得 P 與 Q。",
          "en": "Conjunction: from P and Q infer P∧Q; from P∧Q infer P and infer Q."
        }
      },
      {
        "id": "numeric_evaluation",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "明確整數或有理數算式的精確求值；可以獨立重算。",
          "en": "Exact evaluation of an explicit integer or rational expression; independently recomputable."
        }
      },
      {
        "id": "def_unfold",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "展開定義：把一個已定義的詞換成它的定義內容（或反向收回），命題的真假不變。",
          "en": "Unfolding a definition: replacing a defined term by its definition (or folding it back) does not change whether a statement is true."
        }
      },
      {
        "id": "contradiction",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "反證法：若假設 ¬P 推出矛盾（某命題與其否定同時成立），則 P 成立。",
          "en": "Proof by contradiction: if assuming ¬P leads to a contradiction (a statement and its negation both hold), then P holds."
        }
      },
      {
        "id": "case_analysis",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "分情況論證：若 P∨Q 成立，且 P⇒R、Q⇒R 都已證，則 R 成立。所有情況必須涵蓋全部可能。",
          "en": "Proof by cases: if P∨Q holds and both P⇒R and Q⇒R are proved, then R holds. The cases must cover every possibility."
        }
      },
      {
        "id": "forall_intro",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "∀引入（全稱推廣）：若某命題對一個「任意的」元素 x 證成，而證明沒有對 x 加任何額外假設，則它對論域中所有 x 成立。",
          "en": "∀-introduction (generalization): if a statement is proved for an arbitrary element x, with no extra assumption on x, it holds for every x in the domain."
        }
      },
      {
        "id": "mko_walk_def",
        "kind": "cited",
        "source": {
          "mko_id": "mko-graph-walk-simple-path",
          "sha256": "e48ce83c081f9aa69ead3069dd9ed3c1f58b44d320e7dc35d7794f060c83b554",
          "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f"
        },
        "statement": {
          "zh-Hant": "固定有限無向無 loop 簡單圖。頂點序列 (v₀ 到 v_k) 為 walk，若每個連續無序對都是邊；其 edge length 為 k。simple path 是頂點不重複的 walk。walk 可重複頂點或邊，cycle 與 trail 另有額外責任。空序列不作 walk；單頂點序列是長度 0 的 simple path。",
          "en": "Fix a finite undirected loop-free simple graph. A vertex sequence (v₀ to v_k) is a walk if every consecutive unordered pair is an edge; its edge length is k. A simple path is a walk without repeated vertices. A walk may repeat vertices or edges; cycles and trails have additional obligations. The empty sequence is not a walk; a singleton vertex is a length-zero simple path."
        }
      },
      {
        "id": "trail_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "trail 是不重複邊的 walk：對所有 0≤i<j≤k−1，{v_i,v_{i+1}}≠{v_j,v_{j+1}}。",
          "en": "A trail is a walk with no repeated edge: for all 0≤i<j≤k−1, {v_i,v_{i+1}}≠{v_j,v_{j+1}}."
        }
      },
      {
        "id": "unordered_pair_eq",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "無序對相等：{p,q}={r,s} 當且僅當 (p=r 且 q=s) 或 (p=s 且 q=r)。",
          "en": "Equality of unordered pairs: {p,q}={r,s} iff (p=r and q=s) or (p=s and q=r)."
        }
      },
      {
        "id": "inj_size_le",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "若有限集合 X 到有限集合 Y 有單射，則 |X|≤|Y|（鴿籠原理）。",
          "en": "If there is an injective map from a finite set X to a finite set Y, then |X|≤|Y| (pigeonhole principle)."
        }
      },
      {
        "id": "L_path_trail",
        "kind": "lemma",
        "proved_in": [
          "S11.1",
          "S11.2"
        ],
        "statement": {
          "zh-Hant": "在簡單圖中，每個 simple path 都不重複邊，因此是 trail。",
          "en": "In a simple graph every simple path repeats no edge and is therefore a trail."
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "N1",
        "step": "S01",
        "lhs": "2+3+2+4+1",
        "rhs": "2*6"
      },
      {
        "id": "N2",
        "step": "S04",
        "lhs": "5-1",
        "rhs": "4"
      },
      {
        "id": "N3",
        "step": "S09",
        "lhs": "6-1",
        "rhs": "5"
      },
      {
        "id": "N4",
        "step": "S12",
        "lhs": "5-1",
        "rhs": "4"
      },
      {
        "id": "N5",
        "step": "S12",
        "lhs": "6-1",
        "relation": ">",
        "rhs": "5-1"
      },
      {
        "id": "N6",
        "step": "S13",
        "lhs": "1-1",
        "rhs": "0"
      },
      {
        "id": "N7",
        "step": "S01",
        "lhs": "6",
        "relation": "<=",
        "rhs": "comb(5,2)"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "在 MKO 的範圍內工作：頂點標為 0 到 n−1，完整的無向簡單邊集合與有序頂點序列都明示（假設 a1）；空序列不算 walk，單一頂點是長度 0 的 simple path（假設 a2）。trail 只用來對照 simple path；不處理 cycle、連通分量或有向圖，不改動 canonical MKO 或英文 edition。",
      "en": "Works inside the MKO's scope: vertices are labeled 0 to n−1, and the complete undirected simple edge set and ordered vertex sequences are explicit (assumption a1); the empty sequence is not a walk and a single vertex is a simple path of length 0 (assumption a2). Trails appear only for contrast with simple paths; cycles, connected components and directed graphs are not treated, and the canonical MKO and its English edition are not changed."
    },
    "md_symbols": [
      [
        "G=(V,E)",
        "給定的有限無向簡單圖",
        "the given finite undirected simple graph"
      ],
      [
        "\\{p,q\\}",
        "無序頂點對；p≠q 時才可能是邊",
        "an unordered pair of vertices; it can be an edge only if p≠q"
      ],
      [
        "W=(v_i)_{i=0}^{k}",
        "頂點序列 v₀ 到 v_k，共 k+1 項",
        "the vertex sequence v₀ to v_k, with k+1 entries"
      ],
      [
        "k",
        "walk 的 edge length（連續對的個數）",
        "the edge length of a walk (the number of consecutive pairs)"
      ],
      [
        "W_1,W_2,W_3,W_4,W_5,W_6",
        "六個待判定的序列",
        "the six sequences to be decided"
      ],
      [
        "n=|V|=5",
        "頂點數",
        "the number of vertices"
      ]
    ],
    "md_error_controls": [
      {
        "title": "頂點清單不一定是 walk / A list of vertices need not be a walk",
        "zh": "MKO 指出的誤解之一是把任何頂點清單當成 walk。W₃=(0,2,3) 的三個頂點都在 V 中且彼此相異，但 {0,2} 不是邊，所以不是 walk。判定必須逐一核對每個連續對（S03、S08），而且需要完整的邊集合才能判定「不相鄰」。",
        "en": "One misconception named by the MKO is to treat any list of vertices as a walk. The three vertices of W₃=(0,2,3) are in V and distinct, yet {0,2} is not an edge, so W₃ is not a walk. The decision must check every consecutive pair (S03, S08), and the complete edge set is needed to decide non-adjacency."
      },
      {
        "title": "長度是邊數，不是頂點數 / Length counts edges, not vertices",
        "zh": "W₁ 有 5 個頂點，長度是 4。W₂ 有 5 項但只有 4 個不同頂點、3 條不同的邊，長度仍是 4：長度數的是連續對（走過的邊，重複也算），等於項數減一。",
        "en": "W₁ has 5 vertices and length 4. W₂ has 5 entries but only 4 distinct vertices and 3 distinct edges, and its length is still 4: the length counts consecutive pairs (edges traversed, repetitions included), which is the number of entries minus one."
      },
      {
        "title": "trail 不一定是 simple path / A trail need not be a simple path",
        "zh": "W₄ 不重複任何邊，卻兩次經過頂點 3。simple path 禁止的是重複頂點；不重複邊只是較弱的 trail 條件。引理 L_path_trail 只給出 simple path ⇒ trail 這一個方向。",
        "en": "W₄ repeats no edge but passes through vertex 3 twice. A simple path forbids repeated vertices; having no repeated edge is only the weaker trail condition. Lemma L_path_trail gives only the direction simple path ⇒ trail."
      }
    ],
    "md_open_items": [
      {
        "zh-Hant": "本稿以完整邊清單逐對核對；對更大的圖，同樣的判定可寫成演算法，但本稿不分析其複雜度。",
        "en": "This guide checks pairs against the complete edge list; for larger graphs the same decisions can be written as an algorithm, but its complexity is not analyzed here."
      },
      {
        "zh-Hant": "cycle 與連通分量不在本稿範圍內，trail 只用作對照。",
        "en": "Cycles and connected components are outside this guide's scope; trails are used only for contrast."
      }
    ]
  },
  "revision": {
    "id": "production-20261019-adopted-96",
    "source_commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
    "adopted_source_sha256": "49f77d500fdd6a9edd41755d563203dc6463ebe4857c93350c07bbfd67d26ec3",
    "original_source_sha256": "658afc79124d38166f5b5ff1eb4fae1b1b76dccfe69d963b6d261be4216f8d9c",
    "owner_adopted": true,
    "bilingual_sync": "complete_source_bound",
    "formal_Lean": "NOT_RUN",
    "independent_AI_concurrence": "NOT_MEASURED",
    "issue_ids": [
      "BR-M076"
    ],
    "scope": "Owner-adopted natural-language teaching guide; not a formal proof, canonical MKO rewrite or evidence-status promotion."
  }
}
