Alphabeta Math
CounterexampleConstruction: AI-generatedVerification: AI-generatedprecheck passaudited 2026-08-30
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.

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 EE+EEE(E)ab, and the precedence grammar EE+TT,TTFF,F(E)ab.

[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.1

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

given
1.2

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+aa has only the parse a+(aa).

giveninduction
2.1

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

A1L1step 1.1step 1.2

Depends on

Used by

Nothing in the library uses this result yet.

Dependency tree · two levels

4 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.

Sources