# Question 21503: A Bounded Search No-Hit Is Not a Nonmembership Proof

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

[← Question derivation index](https://ocme.evemisslab.com/en/questions/) · [Original question batch](https://ocme.evemisslab.com/en/practice/batch-20261014-advance-20261109-r07-context-free-grammar-foundations/#q-20261014-advance-20261109-r07-context-free-grammar-0078)

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.

R0042-21503 · q-20261014-advance-20261109-r07-context-free-grammar-0078



## Original question and givens

Use the complete finite grammar: nonterminals=[S2, A2], terminals=[a2, b2], start=S2, productions=[[S2, [a2, A2]], [A2, [b2, A2]], [A2, []]] and allow_epsilon=true. Alphabets must be unique and disjoint, the start belongs to nonterminals, and each production [lhs,rhs] has exactly one nonterminal lhs and a finite legal-symbol rhs. Empty rhs is permitted only under the explicit epsilon convention. Keep original symbol and production order. Search word=[a2, b2, b2, b2] with max_steps=1. Give (word, max_steps, found_in_bounded_search, nonmembership_claim, boundary).


- G001 — Use the complete finite grammar: nonterminals=[S2, A2], terminals=[a2, b2], start=S2, productions=[[S2, [a2, A2]], [A2, [b2, A2]], [A2, []]] and allow_epsilon=true. Alphabets must be unique and disjoint, the start belongs to nonterminals, and each production [lhs,rhs] has exactly one nonterminal lhs and a finite legal-symbol rhs. Empty rhs is permitted only under the explicit epsilon convention. Keep original symbol and production order. Search word=[a2, b2, b2, b2] with max_steps=1. Give (word, max_steps, found_in_bounded_search, nonmembership_claim, boundary).





## 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-context-free-grammar](https://ocme.evemisslab.com/en/mko/mko-context-free-grammar/)





## Step-by-step derivation

S001 · impliesBefore

source operation=cfg-bounded-search-boundary;original snapshot and mathematics retained

After

explicit ordered source output fields=[word, max_steps, found_in_bounded_search, nonmembership_claim, boundary]

Conditions: none

Keep the original historical interface marker while listing ordered source fields without JavaScript.Tags are not additional evidence;fixed No markers retain their source claim scope.

Step identifiers and dependenciesRule: source_ordered_interface_explicit_without_javascript · Uses: G001





S002 · impliesBefore

ORIGINAL production index=0;lhs=S2,rhs=[a2, A2];N=[S2, A2],T=[a2, b2],allow_epsilon=Yes

After

lhs is ONE declared nonterminal;every rhs symbol legal;empty rhs accepted ONLY under the explicit epsilon convention;original production position retained

Conditions: none

Each production has one nonterminal on the left.Check every right-hand symbol and the explicit epsilon convention.Duplicate production positions may exist;sorting them would change first-witness indices.

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





S003 · impliesBefore

ORIGINAL production index=1;lhs=A2,rhs=[b2, A2];N=[S2, A2],T=[a2, b2],allow_epsilon=Yes

After

lhs is ONE declared nonterminal;every rhs symbol legal;empty rhs accepted ONLY under the explicit epsilon convention;original production position retained

Conditions: none

Each production has one nonterminal on the left.Check every right-hand symbol and the explicit epsilon convention.Duplicate production positions may exist;sorting them would change first-witness indices.

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





S004 · impliesBefore

ORIGINAL production index=2;lhs=A2,rhs=[];N=[S2, A2],T=[a2, b2],allow_epsilon=Yes

After

lhs is ONE declared nonterminal;every rhs symbol legal;empty rhs accepted ONLY under the explicit epsilon convention;original production position retained

Conditions: none

Each production has one nonterminal on the left.Check every right-hand symbol and the explicit epsilon convention.Duplicate production positions may exist;sorting them would change first-witness indices.

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





S005 · impliesBefore

ORIGINAL unique disjoint N=[S2, A2],T=[a2, b2];start=S2;complete productions=[[S2, [a2, A2]], [A2, [b2, A2]], [A2, []]];allow_epsilon=Yes

After

start belongs to nonterminals;finite grammar qualified;NO derivation,membership,regularity,unambiguity or PDA equivalence inferred

Conditions: none

Grammar qualification alone supplies no derivation for a word and no regularity or unambiguity claim.Retain both alphabet orders.

Step identifiers and dependenciesRule: cfg_qualified_alphabets_start_not_language_property · Uses: G001, S004





S006 · impliesBefore

ORIGINAL target form=[a2, b2, b2, b2];start=S2;max_steps=1;length cap=6

After

initial depth0 frontier=[[S2]];target already found=No;form equality itself does NOT require terminal-only target

Conditions: none

This is the declared depth-and-length-bounded search,not a general recognizer.Check exact form equality at depth0.A found form with nonterminals is not a terminal-word membership certificate.

Step identifiers and dependenciesRule: cfg_bounded_search_initial_exact_form_not_terminal_membership · Uses: G001, S005





S007 · impliesBefore

ORIGINAL depth=0;ALL frontier forms=[[S2]];length cap=6

After

ALL [from,position,production_index,next,target_equal,within_cap] transitions=[[[S2], 0, 0, [a2, A2], No, Yes]];next distinct frontier=[[a2, A2]];any hit=No

Conditions: none

Expand every legal position/production at this layer,deduplicating equal forms within the layer.Check target equality before the source length filter.Display sorting makes a set readable without altering production indices or existential found status.

Step identifiers and dependenciesRule: cfg_every_bounded_frontier_expansion_and_length_filter · Uses: G001, S006





S008 · impliesBefore

ORIGINAL target=[a2, b2, b2, b2],depth bound=1;bounded found=No

After

nonmembership_claim fixed No whether found or not;longer or excluded derivations have NOT been ruled out

Conditions: none

A no-hit rules out only paths within these depth/length limits.Without a completeness bound it is not a nonmembership proof.A found terminal string can separately witness membership,but not unambiguity.

Step identifiers and dependenciesRule: cfg_bounded_nohit_never_nonmembership_claim · Uses: G001, S007









## Reverse checks


- S008 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S007 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S006 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S005 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S004 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S003 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S002 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S001 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.





## Result

([a2, b2, b2, b2], 1, No, No, bounded_search_failure_cannot_prove_nonmembership_without_complete_bound)

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: deab1a518bf9de7844792d8acce07148c88928083dc92b17e22f078e89aec14d
- candidate record SHA-256: 8883cf7f07728c3ae51e921091421f01ec03be50b08b3be2cb737028669ae2c2
- semantic review receipt SHA-256: dd44555041dfbb6fe9936aa00b9a5f8c5982c2784ef61dd0cbd5d1a303a49c1a
- question-first witness SHA-256: 9a6011263f6ac53b9a1fd57addf2f3e2f6088b54802c539f332d689480dc2d17
- Lean: NOT_RUN · human review: NOT_PERFORMED

[Same-source full JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261014-advance-20261109-r07-context-free-grammar-0078.json)




