# 第 27517 題：正規表示式

[返回所在分頁 138](https://ocme.evemisslab.com/zh-Hant/questions/page/138/)

[← 逐題詳解目錄](https://ocme.evemisslab.com/zh-Hant/questions/) · [原題批次](https://ocme.evemisslab.com/zh-Hant/practice/batch-20261015-advance-20261118-r06-regular-expression-foundations/#q-20261015-advance-20261118-r06-regular-expression-0017)

本頁是已完成第二對話 AI 數理與中英語義覆核的教學詳解，只支持本題明示的模型與前提。沒有人工審查或新 Lean 證明，也不提升原題或 MKO 的 Canonical 真值狀態。

R0054-27517 · q-20261015-advance-20261118-r06-regular-expression-0017



## 原題與已知條件

typed regex AST、finite alphabet與完整word semantics責任。操作=regex-ast-qualification；資料={"alphabet":["a","b","c"],"regex":{"type":"union","children":[{"type":"union","children":[{"type":"union","children":[{"type":"concat","children":[{"type":"symbol","value":"b"},{"type":"symbol","value":"c"}]},{"type":"star","child":{"type":"symbol","value":"c"}}]},{"type":"star","child":{"type":"symbol","value":"a"}}]},{"type":"star","child":{"type":"symbol","value":"b"}}]}}。請依 exact_ordered_tuple_declared_by_interface 欄序回答。


- G001 — typed regex AST、finite alphabet與完整word semantics責任。操作=regex-ast-qualification；資料={"alphabet":["a","b","c"],"regex":{"type":"union","children":[{"type":"union","children":[{"type":"union","children":[{"type":"concat","children":[{"type":"symbol","value":"b"},{"type":"symbol","value":"c"}]},{"type":"star","child":{"type":"symbol","value":"c"}}]},{"type":"star","child":{"type":"symbol","value":"a"}}]},{"type":"star","child":{"type":"symbol","value":"b"}}]}}。請依 exact_ordered_tuple_declared_by_interface 欄序回答。





## 定義與適用範圍

沿用原題明示的論域、假設與來源 MKO 定義。本題已完成第二對話數理與中英語義覆核，並由原始參數逐題獨立重算模型、答案與每個算術步驟；原題仍為 candidate。


- [mko-regular-expression](https://ocme.evemisslab.com/zh-Hant/mko/mko-regular-expression/)





## 逐步推導

S001 · implies操作前

source roles = [regex-ast-qualification]

操作後

derived = [[alphabet, canonical_typed_AST, AST_qualified, qualification_statement]]

條件：無

直接明列此操作與mode完整欄序，不依JavaScript、不由答案形狀猜角色；布林、字串、null與未作聲稱保持不同。

步驟識別與依賴規則：source_ordered_fields_without_JS · 依賴：G001





S002 · implies操作前

source roles = [root.children[0].children[0].children[0].children[0], [a, b, c], {'type': 'symbol', 'value': 'b'}]

操作後

derived = [{'type': 'symbol', 'value': 'b'}, {type:"symbol",value:"b"}]

條件：無

逐node檢type、exact keys與symbol membership。union在raw至少兩child之後才extensional去重（canonical可剩一child）；concat保原順序，star保child。不把canonical結果當raw再多加arity限制。

步驟識別與依賴規則：Regex_EACH_typed_node_exact_keys_symbol_scope_union_set_concat_order · 依賴：G001, S001





S003 · implies操作前

source roles = [root.children[0].children[0].children[0].children[1], [a, b, c], {'type': 'symbol', 'value': 'c'}]

操作後

derived = [{'type': 'symbol', 'value': 'c'}, {type:"symbol",value:"c"}]

條件：無

逐node檢type、exact keys與symbol membership。union在raw至少兩child之後才extensional去重（canonical可剩一child）；concat保原順序，star保child。不把canonical結果當raw再多加arity限制。

步驟識別與依賴規則：Regex_EACH_typed_node_exact_keys_symbol_scope_union_set_concat_order · 依賴：G001, S002





S004 · implies操作前

source roles = [root.children[0].children[0].children[0], [a, b, c], {'type': 'concat', 'children': [{'type': 'symbol', 'value': 'b'}, {'type': 'symbol', 'value': 'c'}]}]

操作後

derived = [{'type': 'concat', 'children': [{'type': 'symbol', 'value': 'b'}, {'type': 'symbol', 'value': 'c'}]}, {children:[{type:"symbol",value:"b"},{type:"symbol",value:"c"}],type:"concat"}]

條件：無

逐node檢type、exact keys與symbol membership。union在raw至少兩child之後才extensional去重（canonical可剩一child）；concat保原順序，star保child。不把canonical結果當raw再多加arity限制。

步驟識別與依賴規則：Regex_EACH_typed_node_exact_keys_symbol_scope_union_set_concat_order · 依賴：G001, S003





S005 · implies操作前

source roles = [root.children[0].children[0].children[1].child, [a, b, c], {'type': 'symbol', 'value': 'c'}]

操作後

derived = [{'type': 'symbol', 'value': 'c'}, {type:"symbol",value:"c"}]

條件：無

逐node檢type、exact keys與symbol membership。union在raw至少兩child之後才extensional去重（canonical可剩一child）；concat保原順序，star保child。不把canonical結果當raw再多加arity限制。

步驟識別與依賴規則：Regex_EACH_typed_node_exact_keys_symbol_scope_union_set_concat_order · 依賴：G001, S004





S006 · implies操作前

source roles = [root.children[0].children[0].children[1], [a, b, c], {'type': 'star', 'child': {'type': 'symbol', 'value': 'c'}}]

操作後

derived = [{'type': 'star', 'child': {'type': 'symbol', 'value': 'c'}}, {child:{type:"symbol",value:"c"},type:"star"}]

條件：無

逐node檢type、exact keys與symbol membership。union在raw至少兩child之後才extensional去重（canonical可剩一child）；concat保原順序，star保child。不把canonical結果當raw再多加arity限制。

步驟識別與依賴規則：Regex_EACH_typed_node_exact_keys_symbol_scope_union_set_concat_order · 依賴：G001, S005





S007 · implies操作前

source roles = [root.children[0].children[0], [a, b, c], {'type': 'union', 'children': [{'type': 'concat', 'children': [{'type': 'symbol', 'value': 'b'}, {'type': 'symbol', 'value': 'c'}]}, {'type': 'star', 'child': {'type': 'symbol', 'value': 'c'}}]}]

操作後

derived = [{'type': 'union', 'children': [{'type': 'star', 'child': {'type': 'symbol', 'value': 'c'}}, {'type': 'concat', 'children': [{'type': 'symbol', 'value': 'b'}, {'type': 'symbol', 'value': 'c'}]}]}, {children:[{child:{type:"symbol",value:"c"},type:"star"},{children:[{type:"symbol",value:"b"},{type:"symbol",value:"c"}],type:"concat"}],type:"union"}]

條件：無

逐node檢type、exact keys與symbol membership。union在raw至少兩child之後才extensional去重（canonical可剩一child）；concat保原順序，star保child。不把canonical結果當raw再多加arity限制。

步驟識別與依賴規則：Regex_EACH_typed_node_exact_keys_symbol_scope_union_set_concat_order · 依賴：G001, S006





S008 · implies操作前

source roles = [root.children[0].children[1].child, [a, b, c], {'type': 'symbol', 'value': 'a'}]

操作後

derived = [{'type': 'symbol', 'value': 'a'}, {type:"symbol",value:"a"}]

條件：無

逐node檢type、exact keys與symbol membership。union在raw至少兩child之後才extensional去重（canonical可剩一child）；concat保原順序，star保child。不把canonical結果當raw再多加arity限制。

步驟識別與依賴規則：Regex_EACH_typed_node_exact_keys_symbol_scope_union_set_concat_order · 依賴：G001, S007





S009 · implies操作前

source roles = [root.children[0].children[1], [a, b, c], {'type': 'star', 'child': {'type': 'symbol', 'value': 'a'}}]

操作後

derived = [{'type': 'star', 'child': {'type': 'symbol', 'value': 'a'}}, {child:{type:"symbol",value:"a"},type:"star"}]

條件：無

逐node檢type、exact keys與symbol membership。union在raw至少兩child之後才extensional去重（canonical可剩一child）；concat保原順序，star保child。不把canonical結果當raw再多加arity限制。

步驟識別與依賴規則：Regex_EACH_typed_node_exact_keys_symbol_scope_union_set_concat_order · 依賴：G001, S008





S010 · implies操作前

source roles = [root.children[0], [a, b, c], {'type': 'union', 'children': [{'type': 'union', 'children': [{'type': 'concat', 'children': [{'type': 'symbol', 'value': 'b'}, {'type': 'symbol', 'value': 'c'}]}, {'type': 'star', 'child': {'type': 'symbol', 'value': 'c'}}]}, {'type': 'star', 'child': {'type': 'symbol', 'value': 'a'}}]}]

操作後

derived = [{'type': 'union', 'children': [{'type': 'star', 'child': {'type': 'symbol', 'value': 'a'}}, {'type': 'union', 'children': [{'type': 'star', 'child': {'type': 'symbol', 'value': 'c'}}, {'type': 'concat', 'children': [{'type': 'symbol', 'value': 'b'}, {'type': 'symbol', 'value': 'c'}]}]}]}, {children:[{child:{type:"symbol",value:"a"},type:"star"},{children:[{child:{type:"symbol",value:"c"},type:"star"},{children:[{type:"symbol",value:"b"},{type:"symbol",value:"c"}],type:"concat"}],type:"union"}],type:"union"}]

條件：無

逐node檢type、exact keys與symbol membership。union在raw至少兩child之後才extensional去重（canonical可剩一child）；concat保原順序，star保child。不把canonical結果當raw再多加arity限制。

步驟識別與依賴規則：Regex_EACH_typed_node_exact_keys_symbol_scope_union_set_concat_order · 依賴：G001, S009





S011 · implies操作前

source roles = [root.children[1].child, [a, b, c], {'type': 'symbol', 'value': 'b'}]

操作後

derived = [{'type': 'symbol', 'value': 'b'}, {type:"symbol",value:"b"}]

條件：無

逐node檢type、exact keys與symbol membership。union在raw至少兩child之後才extensional去重（canonical可剩一child）；concat保原順序，star保child。不把canonical結果當raw再多加arity限制。

步驟識別與依賴規則：Regex_EACH_typed_node_exact_keys_symbol_scope_union_set_concat_order · 依賴：G001, S010





S012 · implies操作前

source roles = [root.children[1], [a, b, c], {'type': 'star', 'child': {'type': 'symbol', 'value': 'b'}}]

操作後

derived = [{'type': 'star', 'child': {'type': 'symbol', 'value': 'b'}}, {child:{type:"symbol",value:"b"},type:"star"}]

條件：無

逐node檢type、exact keys與symbol membership。union在raw至少兩child之後才extensional去重（canonical可剩一child）；concat保原順序，star保child。不把canonical結果當raw再多加arity限制。

步驟識別與依賴規則：Regex_EACH_typed_node_exact_keys_symbol_scope_union_set_concat_order · 依賴：G001, S011





S013 · implies操作前

source roles = [root, [a, b, c], {'type': 'union', 'children': [{'type': 'union', 'children': [{'type': 'union', 'children': [{'type': 'concat', 'children': [{'type': 'symbol', 'value': 'b'}, {'type': 'symbol', 'value': 'c'}]}, {'type': 'star', 'child': {'type': 'symbol', 'value': 'c'}}]}, {'type': 'star', 'child': {'type': 'symbol', 'value': 'a'}}]}, {'type': 'star', 'child': {'type': 'symbol', 'value': 'b'}}]}]

操作後

derived = [{'type': 'union', 'children': [{'type': 'star', 'child': {'type': 'symbol', 'value': 'b'}}, {'type': 'union', 'children': [{'type': 'star', 'child': {'type': 'symbol', 'value': 'a'}}, {'type': 'union', 'children': [{'type': 'star', 'child': {'type': 'symbol', 'value': 'c'}}, {'type': 'concat', 'children': [{'type': 'symbol', 'value': 'b'}, {'type': 'symbol', 'value': 'c'}]}]}]}]}, {children:[{child:{type:"symbol",value:"b"},type:"star"},{children:[{child:{type:"symbol",value:"a"},type:"star"},{children:[{child:{type:"symbol",value:"c"},type:"star"},{children:[{type:"symbol",value:"b"},{type:"symbol",value:"c"}],type:"concat"}],type:"union"}],type:"union"}],type:"union"}]

條件：無

逐node檢type、exact keys與symbol membership。union在raw至少兩child之後才extensional去重（canonical可剩一child）；concat保原順序，star保child。不把canonical結果當raw再多加arity限制。

步驟識別與依賴規則：Regex_EACH_typed_node_exact_keys_symbol_scope_union_set_concat_order · 依賴：G001, S012









## 逐步反向核對


- S013 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S012 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S011 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S010 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S009 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S008 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S007 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S006 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S005 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S004 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S003 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S002 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S001 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。





## 結論

([a, b, c], {children:[{child:{type:"symbol",value:"b"},type:"star"},{children:[{child:{type:"symbol",value:"a"},type:"star"},{children:[{child:{type:"symbol",value:"c"},type:"star"},{children:[{type:"symbol",value:"b"},{type:"symbol",value:"c"}],type:"concat"}],type:"union"}],type:"union"}],type:"union"}, 是, typed_AST_symbols_in_alphabet)

依上列完整代值及條件核對得到原題答案；原題編號、格式與狀態保持不變。





## 本題覆核與來源綁定

覆核日期：2026-10-26

原題、答案、步驟表達式、數值 AST 與既有歷史保持原樣；原來的候選狀態屬於來源歷史，不覆寫為形式化證明。

來源雜湊與覆核憑證
- input commit: 0f7be61e2c22317a4075561dc822c87d881a50db
- original question SHA-256: f3cf681babc157d07b0ea4e9eacd60f37d8f17ecc68e338ecb1b3c7601fbb274
- candidate record SHA-256: d9c11c3fdbe5371282611e1a557ca6c92ced20c18f6e4ec5175d50a6b04c78b1
- semantic review receipt SHA-256: 0a76d8e93c08bb16998a0483f3dfc0504f269fc3e1982e6cd868cab0a2856d54
- question-first witness SHA-256: 09127b736c225714dfa0b7ceb0e6a6e66df27438b480cad8217d3c2f99ce9437
- Lean: NOT_RUN · human review: NOT_PERFORMED

[同源完整 JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261015-advance-20261118-r06-regular-expression-0017.json)




