# DFA-loop quantifiers and the a^n b^n contradiction

[← Guide index](https://ocme.evemisslab.com/en/derivations/) · [Original MKO](https://ocme.evemisslab.com/en/mko/mko-pumping-lemma-regular-languages/)

This is an owner-adopted natural-language teaching guide. Finite/arithmetic checks are not universal proofs; no Lean was run, and review scope is recorded per revision. Original source status labels are retained as historical data. Formulas retain exact TeX; no new semantic AST is invented.

derivation-mko-pumping-lemma-regular-languages-01 · ocme-new142-reader-adoption-20261021



## Goal and scope

Expose quantifier order, the all-pump-count loop argument and every legal split.

A necessary condition for regularity, not sufficient; no finite pumping tests prove regularity.





## Givens and symbols


- work


- G1 — First let D be any complete DFA, R=L(D), with p=|Q|≥1. The later L={a^n b^n:n≥0} is a separate language whose regularity is to be refuted; its p is obtained from the regularity assumption only after the first part proves the necessary condition.


- p — DFA state count or assumed pumping length
- r,s — parameters of all legal splits
- i — last-chosen pump count





## Rules and sources


- mko_definition · cited — Keep the quantifier order: there exists p, for every w in L with |w|≥p, there exist x,y,z, for every i≥0, with w=xyz, |xy|≤p, |y|>0 and xy^i z in L. Positive regular families use a repeated-state loop in a complete DFA run and a symbolic invariant for every i, not a few pump tests. For L={a^n b^n}, choose w=a^p b^p and address every legal split: y consists only of a symbols, so i=0 leaves the language. One decomposition, bounded words or finite checks do not prove regularity. The adversary chooses the word before the prover chooses the split and the adversary chooses i after that. · mko-pumping-lemma-regular-languages
- work · prerequisite — A regular language is accepted by a complete finite DFA; also use deterministic runs, pigeonhole, word slicing and length, induction and quantifier negation. A target declaration only sets the proposition to prove; the DFA run establishes pumping necessity without assuming it.





## Main derivation

S01 · definitionBefore

\mathcal T:\ R\text{ regular}\Longrightarrow\text{the following pumping condition}

After

\text{Target: }\exists p\ge1\ \forall w\in R,\ |w|\ge p\ \exists x,y,z\ \forall i\ge0:\ w=xyz,\ |xy|\le p,\ |y|>0,\ xy^iz\in R

Conditions: none

Rule: work · Uses: G1, work

Leaf basis: work

This step sets a proof target and its quantifier obligations, not an established conclusion: word first, split next, pump count last.



S02 · impliesBefore

w\in R,\ |w|\ge p\text{ arbitrary};\quad q_j=\delta^*(q_0,w[0:j])\ (0\le j\le p)

After

\exists0\le r<s\le p:\ q_r=q_s

Conditions: none

Rule: work · Uses: G1, work

Leaf basis: work

For an arbitrary qualified word, p+1 prefix positions in p states yield a repeated state by pigeonhole.



S03 · impliesBefore

x=w[0:r],\ y=w[r:s],\ z=w[s:|w|]

After

|xy|=s\le p,\quad|y|=s-r>0,\quad\delta^*(q_r,y)=q_r

Conditions: none

Rule: work · Uses: G1, S02, work

Leaf basis: work

The word segment between repeated states forms a nonempty loop.



S04 · impliesBefore

\delta^*(q_r,y)=q_r,\quad\delta^*(q_0,w)\in F

After

\forall i\ge0:\ \delta^*(q_0,xy^iz)=\delta^*(q_0,w)\in F

Conditions: none

Rule: work · Uses: G1, S03, work

Leaf basis: work

Zero iterations are the base; each added y returns to the same state, proving acceptance for all pump counts. Since w was arbitrary, this now establishes the universal target of S01.



S05 · impliesBefore

\text{assume }L=\{a^nb^n:n\ge0\}\text{ regular};\quad p\text{ from the proved condition}

After

w=a^pb^p\in L,\quad |w|=2p\ge p

Conditions: none

Rule: work · Uses: G1, S04, work

Leaf basis: work

A regular language has a complete DFA, so the necessary condition proved at S04 now supplies p before the contradiction word is chosen.



S06 · impliesBefore

w=xyz,\quad|xy|\le p,\quad|y|>0

After

x=a^r,\quad y=a^s,\quad z=a^{p-r-s}b^p,\quad0\le r,\ 1\le s,\ r+s\le p

Conditions: none

Rule: work · Uses: G1, S05, work

Leaf basis: work

Every legal split lies within the first p a's; parameters(r,s) describe all splits.



S07 · impliesBefore

\forall(r,s):0\le r,\ 1\le s,\ r+s\le p,\quad i=0

After

xy^0z=a^{p-s}b^p\notin L\quad\text{since }p-s<p

Conditions: none

Rule: work · Uses: G1, S06, work

Leaf basis: work

For every legal split, pump count 0 destroys equality of a- and b-counts.



S08 · impliesBefore

\forall p\ge1\ \exists w\in L\ \forall\text{ legal splits}\ \exists i\ge0:\ xy^iz\notin L

After

L=\{a^nb^n:n\ge0\}\text{ is not regular}

Conditions: none

Rule: work · Uses: G1, S07, work

Leaf basis: work

This is the quantified negation of the necessary pumping condition, contradicting regularity.







## Substeps and lemmas

No substeps in this guide.





## Reverse audits


- S08 · premise_audit · G1, S07, work — At p=3 the complete pairs are(0,1),(0,2),(0,3),(1,1),(1,2),(2,1), all refuted by the same formula.
- S07 · premise_audit · G1, S06, work — s≥1 guarantees strictly fewer a's, covering every split rather than one case.
- S06 · premise_audit · G1, S05, work — No particular prover-selected split is assumed.
- S05 · premise_audit · G1, S04, work — The regularity assumption and proved condition supply p first; the word then depends on p, rather than assuming the unproved target.
- S04 · premise_audit · G1, S03, work — The loop invariant, not finite i tests, proves the claim;|Q| supplies one p for every qualified w.
- S03 · premise_audit · G1, S02, work — Half-open slices give xyz=w without omitting symbols.
- S02 · premise_audit · G1, work — The sequence includes q0 before input; the argument uses the DFA and pigeonhole, not the unproved target.
- S01 · premise_audit · G1, work — S02 through S04 prove the target; the target itself is not a premise of that proof.





## Error controls and negative controls

Quantifier orderp first, then word, then split response, then i.

All splitsParameterize all splits by 0≤r,1≤s,r+s≤p rather than a few samples.


- One failing split proves nonregularity. → reject — Every legal prover split needs a refuting i.
- Finite pump tests prove regularity. → reject — The property is necessary, not sufficient, and quantifies over all words and i.
- A legal y may contain b here. → reject — Because|xy|≤p and the first p symbols are all a, y contains only a.





## Result and limitations

The DFA loop proves the necessary pumping property for regular languages; all legal splits refute regularity of a^n b^n.







## Verification and source binding

3 declared checks for this guide; only the listed expressions are covered.


- source commit: b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f
- adopted source SHA-256: 74020259b19fb881bf3f9e3f2ce15d36f3ba93deaa04bee651ffdee1cc305948
- original source SHA-256: ba5e44306bc5a91679067d83527f25fce70d5e9a74dad386eb916092392fbdb2
- Lean: NOT_RUN · independent AI: SCOPED_LEAD_AND_BILINGUAL_CONTEXT_REVIEW

[Same-source full JSON (formulas, ASTs, controls and revision log)](https://ocme.evemisslab.com/data/derivations/coverage-20261021/guides/derivation-mko-pumping-lemma-regular-languages-01.json)




