# Question 27502: Regular Expressions Have Typed Nodes and an Explicit Alphabet

[Return to catalogue page 138](https://ocme.evemisslab.com/en/questions/page/138/)

[← Question derivation index](https://ocme.evemisslab.com/en/questions/) · [Original question batch](https://ocme.evemisslab.com/en/practice/batch-20261015-advance-20261118-r06-regular-expression-foundations/#q-20261015-advance-20261118-r06-regular-expression-0002)

This teaching derivation has second-context AI mathematical and bilingual semantic review, limited to the model and assumptions stated in this question. It has no human review or new Lean proof and does not promote the original question or MKO to Canonical truth.

R0054-27502 · q-20261015-advance-20261118-r06-regular-expression-0002



## Original question and givens

Use alphabet=[a, b, c] and typed regular-expression AST={"type":"concat","children":[{"type":"symbol","value":"b"},{"type":"symbol","value":"c"}]}. Words are arrays of alphabet symbols; distinguish empty language from the language containing the empty word. Give (alphabet, canonical_typed_AST, AST_qualified, qualification_statement).


- G001 — Use alphabet=[a, b, c] and typed regular-expression AST={"type":"concat","children":[{"type":"symbol","value":"b"},{"type":"symbol","value":"c"}]}. Words are arrays of alphabet symbols; distinguish empty language from the language containing the empty word. Give (alphabet, canonical_typed_AST, AST_qualified, qualification_statement).





## Definition and scope

Use the original question domain, assumptions and cited MKO definitions. This item has second-context mathematical and bilingual review, with the model, answer and every arithmetic step independently recomputed from the original parameters; the source question remains a candidate.


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





## Step-by-step derivation

S001 · impliesBefore

source roles = [regex-ast-qualification]

After

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

Conditions: none

List the complete operation/mode field order without JavaScript or answer-shape inference;Boolean,string,null and an unclaimed result remain distinct.

Step identifiers and dependenciesRule: source_ordered_fields_without_JS · Uses: G001





S002 · impliesBefore

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

After

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

Conditions: none

For EACH node qualify type,exact keys and symbol membership.A union checks raw arity>=2 BEFORE extensional deduplication,so its canonical form may have one child.Concatenation retains order and star retains its child.Do not revalidate canonical output as raw input with a new arity gate.

Step identifiers and dependenciesRule: Regex_EACH_typed_node_exact_keys_symbol_scope_union_set_concat_order · Uses: G001, S001





S003 · impliesBefore

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

After

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

Conditions: none

For EACH node qualify type,exact keys and symbol membership.A union checks raw arity>=2 BEFORE extensional deduplication,so its canonical form may have one child.Concatenation retains order and star retains its child.Do not revalidate canonical output as raw input with a new arity gate.

Step identifiers and dependenciesRule: Regex_EACH_typed_node_exact_keys_symbol_scope_union_set_concat_order · Uses: G001, S002





S004 · impliesBefore

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

After

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

Conditions: none

For EACH node qualify type,exact keys and symbol membership.A union checks raw arity>=2 BEFORE extensional deduplication,so its canonical form may have one child.Concatenation retains order and star retains its child.Do not revalidate canonical output as raw input with a new arity gate.

Step identifiers and dependenciesRule: Regex_EACH_typed_node_exact_keys_symbol_scope_union_set_concat_order · Uses: G001, S003









## Reverse checks


- S004 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S003 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S002 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S001 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.





## Result

([a, b, c], {children:[{type:"symbol",value:"b"},{type:"symbol",value:"c"}],type:"concat"}, Yes, typed_AST_symbols_in_alphabet)

The full substitutions and premise checks give the original answer; source identity,format and status are unchanged.





## This question review and source binding

Review date: 2026-10-26

Original questions, answers, step expressions, numeric ASTs and historical records are retained. Source candidate labels remain historical and are not overwritten as formal proof.

Source hashes and review receipts
- input commit: 0f7be61e2c22317a4075561dc822c87d881a50db
- original question SHA-256: fb36082cfa03a8d7692bc53d5ab4d86358ca8bc355ce9fcf32b9541ad74a4897
- candidate record SHA-256: 7ea1c5519f530c2abd5b712aab3ef532c9b126a88a87cfa4aa6c862662910c52
- semantic review receipt SHA-256: 0a76d8e93c08bb16998a0483f3dfc0504f269fc3e1982e6cd868cab0a2856d54
- question-first witness SHA-256: 09127b736c225714dfa0b7ceb0e6a6e66df27438b480cad8217d3c2f99ce9437
- Lean: NOT_RUN · human review: NOT_PERFORMED

[Same-source full JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261015-advance-20261118-r06-regular-expression-0002.json)




