Alphabeta Math
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

✓ 3 results · all verified · 2 also independently AI-judged
Every result on this page is machine-checked by a proof checker and read in full and owner-audited; the judge is an additional, independent cross-model AI review of the proofs. The 1 not AI-judged were verified by owner audit (typically over a confirmed judge false positive), not failures.

Pushdown Automata and Context-Free Languages: Examples and Counterexamples

1 · Prerequisites

2 · Summary

These examples build the standard PDA for {anbn:n≥0} from a grammar, show that the same language is deterministic context-free and unambiguous, and exhibit the looping DPDA that defeats naive state-swapping complementation.

3 · Logical flowchart

4 · Definitions, theorems and proofs

None yet.

5 · Examples, counterexamples and false statements

ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passaudited 2026-09-12Open item page →

Building a PDA for {anbn:n≥0} from the standard grammar

Example

Start with the grammar S→aSb∣ε.

The standard grammar-to-PDA construction produces a one-state PDA whose initial stack symbol is S, with ε-moves replacing S by aSb or ε, and with input-reading moves that match a or b against the top terminal on the stack.

Facts & Assumptions

Given: The grammar S→aSb∣ε for {anbn:n≥0}.

[L1]

By Every context-free grammar has an equivalent PDA, the standard pop/expand construction turns a CFG into an equivalent PDA that accepts by empty stack.

Verification

technique · direct
1.1given

On input aabb, the unread-input/stack pairs may evolve as (aabb,S)→(aabb,aSb)→(abb,Sb)→(abb,aSbb)→(bb,Sbb)→(bb,bb)→(b,b)→(ε,ε). The four input-consuming moves pop the displayed top terminal, while the three other moves expand S by aSb, expand it once more, and finally replace it by ε.

2.1L1step 1.1

The same pattern works for every word anbn: repeat S→aSb and immediately read and pop the new top a, exactly n times; then use S→ε and read and pop the remaining n symbols b. Therefore the constructed PDA recognizes {anbn:n≥0}.

3.1L1step 2.1∎

This is the standard grammar-to-PDA construction from [L1] on a concrete language.

ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passjudge pass (gpt-5.6-terra)audited 2026-09-12Open item page →

The language {anbn:n≥0} is deterministic context-free and unambiguous

Example

The language {anbn:n≥0} is recognized by the DPDA that pushes one stack symbol for each a, then pops one for each b, rejects any attempt to read an a after a b, and accepts exactly when the endmarker arrives with only the bottom marker left.

It is also generated by the grammar S→aSb∣ε, which is unambiguous.

Facts & Assumptions

Given: The usual stack-matching DPDA and the grammar S→aSb∣ε.

[L1]

By Deterministic pushdown automata and deterministic context-free languages, a language recognized by such a marked-input DPDA is deterministic context-free.

[L2]

By Deterministic context-free languages are unambiguous, every deterministic context-free language has an unambiguous grammar.

Verification

technique · direct
1.1L1given

The displayed machine is deterministic because before the first b it has only the unique push move on a, after the first b it has only the unique pop move on b, and the endmarker is accepted only when the stack has returned to the bottom marker. Therefore it recognizes exactly {anbn:n≥0}.

1.2given

The grammar S→aSb∣ε generates the same language and has exactly one derivation for each word anbn, because the number of leading a's uniquely determines how many times the recursive rule must be used before the final ε step.

2.1L2step 1.1step 1.2∎

So this language is deterministic context-free, and [L2] is realized concretely by an unambiguous grammar.

CounterexampleConstruction: AI-generatedVerification: AI-generatedprecheck passjudge pass (gpt-5.6-terra)audited 2026-09-12Open item page →

A looping DPDA shows naive final-state complementation can fail

Statement refuted

The statement "swapping the accepting states of a DPDA automatically complements its language" is false.

Facts & Assumptions

[A1]

The statement refuted is: swapping the accepting states of a DPDA automatically complements its language.

[L1]

The cited false statement already shows that the original looping DPDA and its state-swapped variant both recognize the empty language, by FALSE: swapping the accepting states of a DPDA automatically complements its language.

Counterexample

technique · direct
1.1L1given

The original machine recognizes ∅, because it loops forever on every marked input. After swapping the accepting status of its only state, the machine still has exactly the same infinite computation on every marked input and still recognizes ∅.

2.1step 1.1

But the complement of ∅ is the full language Σ∗, so the swapped machine does not recognize the complement of the original language.

3.1A1step 2.1∎

Therefore this looping DPDA is a counterexample to [A1].

Sources