{
  "$schema": "../../../schemas/mko-v0.4.schema.json",
  "schema_version": "mko-v0.4",
  "id": "mko-subset-construction-nfa-to-dfa",
  "semantic_family_id": "sf-subset-construction-nfa-to-dfa",
  "type": "theorem",
  "version": "0.10.0",
  "language": "zh-Hant",
  "titles": {
    "zh-Hant": "NFA到DFA的子集合構造"
  },
  "summary": {
    "zh-Hant": "以epsilon-NFA狀態子集合為DFA狀態，start、transition與acceptance按epsilon closure定義即可保持語言。"
  },
  "statement": {
    "zh-Hant": "DFA start state是epsilon-closure({q0})。對subset S與symbol a，delta_D(S,a)=epsilon-closure(move(S,a))；accepting subset恰與NFA final-state set有非空交集。empty subset是合法dead state，可只保留reachable subsets但須明示。任意word invariant是DFA讀完每個prefix的subset恰等於NFA所有epsilon-closed reachable states；有限words測試不足以證language equivalence。"
  },
  "formula": {
    "tex": "D(S,a)=E(M(S,a))",
    "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mrow><mrow><mi>D</mi><mo>(</mo><mi>S</mi><mo>,</mo><mi>a</mi><mo>)</mo></mrow><mo>=</mo><mrow><mi>E</mi><mo>(</mo><mrow><mi>M</mi><mo>(</mo><mi>S</mi><mo>,</mo><mi>a</mi><mo>)</mo></mrow><mo>)</mo></mrow></mrow></math>",
    "semantic_ast": {
      "type": "equation",
      "lhs": {
        "type": "function_call",
        "callee": {
          "type": "symbol",
          "name": "D",
          "glyph": "D"
        },
        "arguments": [
          {
            "type": "symbol",
            "name": "S",
            "glyph": "S"
          },
          {
            "type": "symbol",
            "name": "a",
            "glyph": "a"
          }
        ]
      },
      "rhs": {
        "type": "function_call",
        "callee": {
          "type": "symbol",
          "name": "E",
          "glyph": "E"
        },
        "arguments": [
          {
            "type": "function_call",
            "callee": {
              "type": "symbol",
              "name": "M",
              "glyph": "M"
            },
            "arguments": [
              {
                "type": "symbol",
                "name": "S",
                "glyph": "S"
              },
              {
                "type": "symbol",
                "name": "a",
                "glyph": "a"
              }
            ]
          }
        ]
      }
    },
    "compiler": {
      "id": "ocme-formula-core",
      "version": "0.4.0",
      "source_sha256": "663f6e48917f0a630bcaa0af89bbc573b314b3c0a36ade7071ce954f10769dbc"
    }
  },
  "assumptions": [
    {
      "id": "a1",
      "zh-Hant": "來源epsilon-NFA使用完整finite states、alphabet與transition relation；null表示不消耗input的epsilon。"
    },
    {
      "id": "a2",
      "zh-Hant": "所有subset canonical排序且每次symbol move之後重新取epsilon closure；trace從epsilon-closed start開始。"
    }
  ],
  "symbols": [
    {
      "token": "D",
      "role": "dfa_subset_transition",
      "role_zh": "DFA子集合轉移",
      "scope": "representative_formula"
    },
    {
      "token": "S",
      "role": "nfa_state_subset",
      "role_zh": "NFA狀態子集合",
      "scope": "representative_formula"
    },
    {
      "token": "a",
      "role": "input_symbol",
      "role_zh": "輸入符號",
      "scope": "representative_formula"
    },
    {
      "token": "E",
      "role": "epsilon_closure",
      "role_zh": "epsilon closure",
      "scope": "representative_formula"
    },
    {
      "token": "M",
      "role": "symbol_move",
      "role_zh": "symbol move",
      "scope": "representative_formula"
    }
  ],
  "dependencies": [
    {
      "id": "mko-nondeterministic-finite-automaton",
      "title_zh": "非確定有限自動機",
      "reason_zh": "epsilon-NFA語義。"
    },
    {
      "id": "mko-finite-automaton",
      "title_zh": "有限自動機",
      "reason_zh": "目標DFA結構。"
    },
    {
      "id": "mko-subset",
      "title_zh": "子集合",
      "reason_zh": "powerset states與dead empty subset。"
    }
  ],
  "explanation": {
    "paragraphs_zh": [
      "start subset必須先封閉epsilon reachability。",
      "每個symbol transition採move後epsilon closure。",
      "prefix invariant而非有限accept/reject samples支撐一般language equivalence。"
    ],
    "common_misconception_zh": "省略epsilon closure、把empty subset刪掉卻不處理dead transition，或由有限測試字串宣稱語言等價。"
  },
  "proofs": [],
  "computational_companions": [],
  "verification": {
    "computational_status": "not_evaluated_no_computational_claim",
    "warning_zh": "本輪exact traces核對任意給定word；一般等價依prefix induction，不由測試樣本數量成立。",
    "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": "加入正規表示式等價與automata minimization。"
  },
  "provenance": {
    "origin": "ocme_local_ai_materialization_candidate",
    "note_zh": "依 research/atlas-subset-construction-nfa-to-dfa.md 整理；2026-10-14 脈衝 R07（使用者手動接續 2026-11-12 工作序列；實際日期仍為 2026-10-14），英文及 Lean 依使用者指示延後。",
    "content_license": "CC-BY-SA-4.0",
    "code_license": "MIT",
    "created_at": "2026-10-14"
  }
}
