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.

Context-Free Grammars and Normal Forms: Examples and Counterexamples

1 · Prerequisites

2 · Summary

These examples delete both nongenerating and unreachable symbols from a small grammar, realize the four basic CFL closure constructions on explicit languages, and show that an ambiguous grammar can still generate a language with an unambiguous presentation.

3 · Logical flowchart

4 · Definitions, theorems and proofs

None yet.

5 · Examples, counterexamples and false statements

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

Removing one nongenerating variable and one unreachable variable

Example

Consider the grammar S→AB∣a,A→a,B→b,C→cC,D→d. The variable C is nongenerating, and D is generating but unreachable from S. Deleting both yields the smaller grammar S→AB∣a,A→a,B→b, which generates the same language {ab,a}.

Facts & Assumptions

Given: The grammar displayed above.

[L1]

Eliminating useless symbols preserves the generated language, by Eliminating useless symbols preserves the generated language.

Verification

technique · direct
1.1given

The variable C is nongenerating because its only production is C→cC, which never removes the variable C. The variable D is reachable from no sentential form derived from S, because no production from S, A, or B mentions D.

2.1step 1.1

Every terminal derivation from S therefore uses only the variables S, A, and B, and those derivations yield either a or ab. So deleting C and D leaves the language unchanged.

3.1L1step 2.1∎

This is exactly the useless-symbol elimination guaranteed by [L1].

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

One family of grammars realizing union, concatenation, star, and homomorphism

Example

Let L1={anbn:n≥0},L2={cndn:n≥0}. Standard grammars for them are S1→aS1b∣ε,S2→cS2d∣ε.

Then:

  • L1∪L2 is generated by S→S1∣S2,
  • L1L2 is generated by S→S1S2,
  • L1∗ is generated by S→ε∣S1S,
  • if h(a)=0 and h(b)=1, then h^(L1)={0n1n:n≥0}.

Facts & Assumptions

Given: The two grammars for L1 and L2, and the alphabet map with h(a)=0 and h(b)=1.

[L1]

Context-free languages are closed under union, concatenation, Kleene star, and homomorphism, by Context-free languages are closed under union, concatenation, Kleene star, and homomorphism.

Verification

technique · direct
1.1given

The bridge rules S→S1∣S2 and S→S1S2 give the listed grammars for the union and concatenation constructions, and the rule S→ε∣S1S lists any finite concatenation of words from L1.

1.2given

Replacing each terminal a by 0 and each terminal b by 1 turns the grammar for L1 into one for {0n1n:n≥0}, which is exactly h^(L1).

2.1L1step 1.1step 1.2∎

These concrete constructions realize all four closure operations asserted in [L1].

CounterexampleConstruction: AI-generatedVerification: AI-generatedprecheck passaudited 2026-08-30Open item page →

An ambiguous expression grammar with an unambiguous grammar for the same language

Statement refuted

The statement "an ambiguous CFG always generates an inherently ambiguous language" is false.

Facts & Assumptions

Given: The ambiguous expression grammar E→E+E∣E∗E∣(E)∣a∣b, and the precedence grammar E→E+T∣T,T→T∗F∣F,F→(E)∣a∣b.

[A1]

The statement refuted is: every ambiguous CFG generates an inherently ambiguous language.

[L1]

A context-free language is inherently ambiguous exactly when every context-free grammar generating it is ambiguous, by Ambiguous grammars, unambiguous grammars, and inherently ambiguous languages.

Counterexample

technique · direct
1.1given

The first grammar is ambiguous because the word a+a∗a has both the parse a+(a∗a) and the parse (a+a)∗a.

1.2giveninduction

The second grammar generates the same terminal strings as the first. One inclusion follows by simultaneous induction on its E-, T-, and F-derivations, since every displayed production can be simulated by the first grammar. For the reverse inclusion, scan a generated word at parenthesis depth zero: split at its rightmost top-level + if one exists, otherwise at its rightmost top-level * if one exists, and otherwise recognize the forced factor a, b, or (E). Induction on word length gives a derivation in the second grammar. The same decomposition is unique: the E-rule forces the rightmost top-level +, the T-rule forces the rightmost top-level *, and the outer symbols force the F-rule. Hence the second grammar is unambiguous and, in particular, a+a∗a has only the parse a+(a∗a).

2.1A1L1step 1.1step 1.2∎

By [L1], a language with an unambiguous grammar is not inherently ambiguous. Therefore the first grammar is a counterexample to [A1].

Sources