# Question 17248: A Finite Test Suite Alone Is Not a Language or Equivalence Certificate

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

[← Question derivation index](https://ocme.evemisslab.com/en/questions/) · [Original question batch](https://ocme.evemisslab.com/en/practice/batch-20261014-advance-20261102-r07-regular-language-foundations/#q-20261014-advance-20261102-r07-regular-language-0098)

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.

R0033-17248 · q-20261014-advance-20261102-r07-regular-language-0098



## Original question and givens

Use alphabet=Fin(3)={0,…,2} and the language whose number of occurrences of target_symbol=1 is congruent to residue=1 modulo modulus=5. Construct the complete DFA on states 0 through modulus−1, start 0 and accepting subset [residue]. A target symbol increments the state modulo the modulus; every other symbol leaves it unchanged. The invariant is state equals target-symbol count modulo the modulus for every prefix of every finite word, not just selected tests. No regex, NFA, epsilon move, minimization or pumping-lemma result is added. Ordered test_words=[[], [0, 1, 1, 0, 1]]. Give (tested_words,sufficient?,finite_test_suite_not_regular_language_or_equivalence_certificate), with each tested row [word,accepted?].


- G001 — Use alphabet=Fin(3)={0,…,2} and the language whose number of occurrences of target_symbol=1 is congruent to residue=1 modulo modulus=5. Construct the complete DFA on states 0 through modulus−1, start 0 and accepting subset [residue]. A target symbol increments the state modulo the modulus; every other symbol leaves it unchanged. The invariant is state equals target-symbol count modulo the modulus for every prefix of every finite word, not just selected tests. No regex, NFA, epsilon move, minimization or pumping-lemma result is added. Ordered test_words=[[], [0, 1, 1, 0, 1]]. Give (tested_words,sufficient?,finite_test_suite_not_regular_language_or_equivalence_certificate), with each tested row [word,accepted?].





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





## Step-by-step derivation

S001 · impliesBefore

mod-count state=0;original symbol=0;target symbol=1;indicator=0;modulus=5

After

next state=(0+0) mod5=0

Conditions: none

Increment only for the target symbol,otherwise by0,and reduce modulo the same modulus.Check every state-symbol cell,including wraparound from the last residue to0.

Step identifiers and dependenciesRule: regular_mod_count_every_state_symbol_cell · Uses: G001





S002 · impliesBefore

mod-count state=0;original symbol=1;target symbol=1;indicator=1;modulus=5

After

next state=(0+1) mod5=1

Conditions: none

Increment only for the target symbol,otherwise by0,and reduce modulo the same modulus.Check every state-symbol cell,including wraparound from the last residue to0.

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





S003 · impliesBefore

mod-count state=0;original symbol=2;target symbol=1;indicator=0;modulus=5

After

next state=(0+0) mod5=0

Conditions: none

Increment only for the target symbol,otherwise by0,and reduce modulo the same modulus.Check every state-symbol cell,including wraparound from the last residue to0.

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





S004 · impliesBefore

mod-count state=1;original symbol=0;target symbol=1;indicator=0;modulus=5

After

next state=(1+0) mod5=1

Conditions: none

Increment only for the target symbol,otherwise by0,and reduce modulo the same modulus.Check every state-symbol cell,including wraparound from the last residue to0.

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





S005 · impliesBefore

mod-count state=1;original symbol=1;target symbol=1;indicator=1;modulus=5

After

next state=(1+1) mod5=2

Conditions: none

Increment only for the target symbol,otherwise by0,and reduce modulo the same modulus.Check every state-symbol cell,including wraparound from the last residue to0.

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





S006 · impliesBefore

mod-count state=1;original symbol=2;target symbol=1;indicator=0;modulus=5

After

next state=(1+0) mod5=1

Conditions: none

Increment only for the target symbol,otherwise by0,and reduce modulo the same modulus.Check every state-symbol cell,including wraparound from the last residue to0.

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





S007 · impliesBefore

mod-count state=2;original symbol=0;target symbol=1;indicator=0;modulus=5

After

next state=(2+0) mod5=2

Conditions: none

Increment only for the target symbol,otherwise by0,and reduce modulo the same modulus.Check every state-symbol cell,including wraparound from the last residue to0.

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





S008 · impliesBefore

mod-count state=2;original symbol=1;target symbol=1;indicator=1;modulus=5

After

next state=(2+1) mod5=3

Conditions: none

Increment only for the target symbol,otherwise by0,and reduce modulo the same modulus.Check every state-symbol cell,including wraparound from the last residue to0.

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





S009 · impliesBefore

mod-count state=2;original symbol=2;target symbol=1;indicator=0;modulus=5

After

next state=(2+0) mod5=2

Conditions: none

Increment only for the target symbol,otherwise by0,and reduce modulo the same modulus.Check every state-symbol cell,including wraparound from the last residue to0.

Step identifiers and dependenciesRule: regular_mod_count_every_state_symbol_cell · Uses: G001, S008





S010 · impliesBefore

mod-count state=3;original symbol=0;target symbol=1;indicator=0;modulus=5

After

next state=(3+0) mod5=3

Conditions: none

Increment only for the target symbol,otherwise by0,and reduce modulo the same modulus.Check every state-symbol cell,including wraparound from the last residue to0.

Step identifiers and dependenciesRule: regular_mod_count_every_state_symbol_cell · Uses: G001, S009





S011 · impliesBefore

mod-count state=3;original symbol=1;target symbol=1;indicator=1;modulus=5

After

next state=(3+1) mod5=4

Conditions: none

Increment only for the target symbol,otherwise by0,and reduce modulo the same modulus.Check every state-symbol cell,including wraparound from the last residue to0.

Step identifiers and dependenciesRule: regular_mod_count_every_state_symbol_cell · Uses: G001, S010





S012 · impliesBefore

mod-count state=3;original symbol=2;target symbol=1;indicator=0;modulus=5

After

next state=(3+0) mod5=3

Conditions: none

Increment only for the target symbol,otherwise by0,and reduce modulo the same modulus.Check every state-symbol cell,including wraparound from the last residue to0.

Step identifiers and dependenciesRule: regular_mod_count_every_state_symbol_cell · Uses: G001, S011





S013 · impliesBefore

mod-count state=4;original symbol=0;target symbol=1;indicator=0;modulus=5

After

next state=(4+0) mod5=4

Conditions: none

Increment only for the target symbol,otherwise by0,and reduce modulo the same modulus.Check every state-symbol cell,including wraparound from the last residue to0.

Step identifiers and dependenciesRule: regular_mod_count_every_state_symbol_cell · Uses: G001, S012





S014 · impliesBefore

mod-count state=4;original symbol=1;target symbol=1;indicator=1;modulus=5

After

next state=(4+1) mod5=0

Conditions: none

Increment only for the target symbol,otherwise by0,and reduce modulo the same modulus.Check every state-symbol cell,including wraparound from the last residue to0.

Step identifiers and dependenciesRule: regular_mod_count_every_state_symbol_cell · Uses: G001, S013





S015 · impliesBefore

mod-count state=4;original symbol=2;target symbol=1;indicator=0;modulus=5

After

next state=(4+0) mod5=4

Conditions: none

Increment only for the target symbol,otherwise by0,and reduce modulo the same modulus.Check every state-symbol cell,including wraparound from the last residue to0.

Step identifiers and dependenciesRule: regular_mod_count_every_state_symbol_cell · Uses: G001, S014





S016 · impliesBefore

states Fin(5);complete typed table=[[0, 1, 0], [1, 2, 1], [2, 3, 2], [3, 4, 3], [4, 0, 4]];start0;accepting residue=1

After

empty prefix count=0 equals start;append any symbol adds exactly its target indicator to BOTH count and state modulo the modulus

Conditions: none

Both count and state start at0.Appending any symbol updates both by the same indicator,so induction preserves state equal to target-symbol count modulo m for every prefix of every word.

Step identifiers and dependenciesRule: regular_mod_count_all_prefix_induction_base_step · Uses: G001, S015





S017 · impliesBefore

for EVERY finite word,state equals target-symbol count mod5;accepting set=[1]

After

accepted iff count congruent to1;whole declared language has this complete DFA certificate

Conditions: none

Final-state membership in the specified residue characterizes the entire declared language.This uses the complete DFA and universal invariant,not finite tests,and adds no regex,epsilon moves,minimization or pumping lemma.

Step identifiers and dependenciesRule: regular_mod_count_language_characterized_not_test_suite · Uses: G001, S016





S018 · impliesBefore

original test0:original ordered word=[];start=0

After

trace before consuming symbols=[0]

Conditions: none

Include the initial state.An empty word performs no transition;do not reorder symbols merely because a final answer might coincide.

Step identifiers and dependenciesRule: regular_word_initial_state_empty_word_retained · Uses: G001, S017





S019 · calculationBefore

original test0 exact target-symbol indicator count := sum()

After

original test0 exact target-symbol indicator count = 0

Conditions: none

Compute exactly from original roles and established intermediates,retaining denominators,signs,coordinates and indices.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S018





S020 · impliesBefore

original test0:original word=[];exact target count=0;final state=0;accepting residue=1

After

accepted=No;final state equals count modulo5

Conditions: none

Independently count original-symbol indicators and cross-check the final trace state.An empty word has empty sum0 and no invented transition.

Step identifiers and dependenciesRule: regular_selected_word_count_reverse_check · Uses: G001, S019





S021 · impliesBefore

original test1:original ordered word=[0, 1, 1, 0, 1];start=0

After

trace before consuming symbols=[0]

Conditions: none

Include the initial state.An empty word performs no transition;do not reorder symbols merely because a final answer might coincide.

Step identifiers and dependenciesRule: regular_word_initial_state_empty_word_retained · Uses: G001, S020





S022 · impliesBefore

original test1:word position=0;symbol=0;current state=0;complete original row=[0, 1, 0]

After

next state=0;ordered prefix trace=[0, 0]

Conditions: none

Read one original symbol per lookup,using the state row and symbol column.Retain every intermediate state,including rejecting paths and the dead state.

Step identifiers and dependenciesRule: regular_every_symbol_source_bound_transition · Uses: G001, S021





S023 · impliesBefore

original test1:word position=1;symbol=1;current state=0;complete original row=[0, 1, 0]

After

next state=1;ordered prefix trace=[0, 0, 1]

Conditions: none

Read one original symbol per lookup,using the state row and symbol column.Retain every intermediate state,including rejecting paths and the dead state.

Step identifiers and dependenciesRule: regular_every_symbol_source_bound_transition · Uses: G001, S022





S024 · impliesBefore

original test1:word position=2;symbol=1;current state=1;complete original row=[1, 2, 1]

After

next state=2;ordered prefix trace=[0, 0, 1, 2]

Conditions: none

Read one original symbol per lookup,using the state row and symbol column.Retain every intermediate state,including rejecting paths and the dead state.

Step identifiers and dependenciesRule: regular_every_symbol_source_bound_transition · Uses: G001, S023





S025 · impliesBefore

original test1:word position=3;symbol=0;current state=2;complete original row=[2, 3, 2]

After

next state=2;ordered prefix trace=[0, 0, 1, 2, 2]

Conditions: none

Read one original symbol per lookup,using the state row and symbol column.Retain every intermediate state,including rejecting paths and the dead state.

Step identifiers and dependenciesRule: regular_every_symbol_source_bound_transition · Uses: G001, S024





S026 · impliesBefore

original test1:word position=4;symbol=1;current state=2;complete original row=[2, 3, 2]

After

next state=3;ordered prefix trace=[0, 0, 1, 2, 2, 3]

Conditions: none

Read one original symbol per lookup,using the state row and symbol column.Retain every intermediate state,including rejecting paths and the dead state.

Step identifiers and dependenciesRule: regular_every_symbol_source_bound_transition · Uses: G001, S025





S027 · calculationBefore

original test1 exact target-symbol indicator count := sum(0, 1, 1, 0, 1)

After

original test1 exact target-symbol indicator count = 3

Conditions: none

Compute exactly from original roles and established intermediates,retaining denominators,signs,coordinates and indices.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S026





S028 · impliesBefore

original test1:original word=[0, 1, 1, 0, 1];exact target count=3;final state=3;accepting residue=1

After

accepted=No;final state equals count modulo5

Conditions: none

Independently count original-symbol indicators and cross-check the final trace state.An empty word has empty sum0 and no invented transition.

Step identifiers and dependenciesRule: regular_selected_word_count_reverse_check · Uses: G001, S027





S029 · impliesBefore

original finite test rows in supplied order=[[[], No], [[0, 1, 1, 0, 1], No]]

After

test-suite sufficiency=No;finite_test_suite_not_regular_language_or_equivalence_certificate

Conditions: none

The test list may repeat words or be empty;retain supplied order.The No rejects inference from tests alone to full-language regularity/equivalence.It does not deny the separate explicit DFA/invariant certificate for this model.

Step identifiers and dependenciesRule: regular_finite_tests_not_universal_language_certificate · Uses: G001, S028









## Reverse checks


- S029 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S028 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S027 · premise_and_result_audit — Recompute original test1 exact target-symbol indicator count with exact rational arithmetic, not rounded decimals.
- S026 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S025 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S024 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S023 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S022 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S021 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S020 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S019 · premise_and_result_audit — Recompute original test0 exact target-symbol indicator count with exact rational arithmetic, not rounded decimals.
- S018 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S017 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S016 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S015 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S014 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S013 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S012 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S011 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S010 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S009 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- 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

([[[], No], [[0, 1, 1, 0, 1], No]], No, finite_test_suite_not_regular_language_or_equivalence_certificate)

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: d86c326227d874d98feb154c2789a7fbc769e8155af8fead601e169364c96492
- candidate record SHA-256: b83753de019a7d84597add7bc34d1d34e59956d870a39453c8f23076e011c5b3
- semantic review receipt SHA-256: 4a0957a15bb33fbe5f663e37a8babf46ab5a291eb5d1dfa3bf9045204cd43ec3
- question-first witness SHA-256: 22a8506bcfa34c503216083d1a8e813d61aad22dbc81589c0d41089c528a7f93
- Lean: NOT_RUN · human review: NOT_PERFORMED

[Same-source full JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261014-advance-20261102-r07-regular-language-0098.json)




