# Question 27365: A Complete Unary DFA Loop Gives an Invariant for Every Pump Count

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

[← Question derivation index](https://ocme.evemisslab.com/en/questions/) · [Original question batch](https://ocme.evemisslab.com/en/practice/batch-20261015-advance-20261118-r07-pumping-lemma-regular-languages-foundations/#q-20261015-advance-20261118-r07-pumping-lemma-regular-languages-0040)

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.

R0053-27365 · q-20261015-advance-20261118-r07-pumping-lemma-regular-languages-0040



## Original question and givens

Use the unary DFA for lengths divisible by modulus=15, with accepted word length=45. Give (modulus, accepted_unary_word_length, first_modulus_plus_one_states, repeated_state_positions_and_state, x_length, y_length, z_length, all_pump_counts_invariant, loop_qualified).


- G001 — Use the unary DFA for lengths divisible by modulus=15, with accepted word length=45. Give (modulus, accepted_unary_word_length, first_modulus_plus_one_states, repeated_state_positions_and_state, x_length, y_length, z_length, all_pump_counts_invariant, loop_qualified).





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





## Step-by-step derivation

S001 · impliesBefore

source roles = [pump-dfa-loop-witness]

After

derived = [[modulus, accepted_unary_word_length, first_modulus_plus_one_states, repeated_state_positions_and_state, x_length, y_length, z_length, all_pump_counts_invariant, loop_qualified]]

Conditions: none

List the complete source field order and mode-specific roles without JavaScript or answer-shape inference;No,undefined and infinity retain their distinct meanings.

Step identifiers and dependenciesRule: source_ordered_fields_without_JS · Uses: G001





S002 · calculationBefore

Pumping ORIGINAL unary z length := sub(45, 15)

After

Pumping ORIGINAL unary z length = 30

Conditions: none

Substitute original roles and established intermediates exactly;no approximation,slot substitution or internally consistent changed operand.

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





S003 · impliesBefore

source roles = [15, 45]

After

derived = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], [[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 0]], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0], [0, 15, 0], 0, 15, 30]

Conditions: none

The DFA state is length mod m;every unary transition adds1 modulo m.The first m+1 states repeat0 at positions0,m.The ORIGINAL word length is divisible by m,so x empty,y length m and the remaining z form a legal accepted word.

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





S004 · impliesBefore

source roles = [15, 45, 30]

After

derived = [EVERY integer i>=0: pumped length=i*modulus+z, z is divisible by modulus, state remains0 after each loop;accepted, Yes]

Conditions: none

For arbitrary i>=0,traverse the same complete loop i times and then z.Since z is also divisible by m,the final state remains0.Full transitions and this quantified invariant support EVERY i,not sampled pump counts.

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









## Reverse checks


- S004 · premise_and_result_audit — Reverse-check the complete original data,step operands and premises;finite checks,conditional named-theorem use and general formal proof remain distinct.
- S003 · premise_and_result_audit — Reverse-check the complete original data,step operands and premises;finite checks,conditional named-theorem use and general formal proof remain distinct.
- S002 · premise_and_result_audit — Recompute Pumping ORIGINAL unary z length with exact rational arithmetic, not rounded decimals.
- S001 · premise_and_result_audit — Reverse-check the complete original data,step operands and premises;finite checks,conditional named-theorem use and general formal proof remain distinct.





## Result

(15, 45, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0], [0, 15, 0], 0, 15, 30, for_all_i_length=(i*modulus)+z_is_0_mod_modulus, Yes)

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: 3ebcbde9ed2bd002e7b26b641a2d25b09ee0a3b721ced693a435d56a1824173b
- candidate record SHA-256: 389b41d15271ea212abae2ce6441d1106f6684677a468660386ead51147481d4
- semantic review receipt SHA-256: 1b7a62514347b82518305d5feb4369a52d7d44c442a0f2b131e9eb3cd7b45f62
- question-first witness SHA-256: 79dc2a1077081f3ea2a03f75e32778163bf05e814cdf4c29ed86e567295f9ee1
- Lean: NOT_RUN · human review: NOT_PERFORMED

[Same-source full JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261015-advance-20261118-r07-pumping-lemma-regular-languages-0040.json)




