Alphabeta Math
LemmaStatement: Literature-sourcedProof: AI-generatedprecheck passjudge pass (gpt-5.6-terra)audited 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.

Substituting a variable's productions into a leading variable occurrence preserves the language

Statement

Let G be a context-free grammar containing the production A→uBv. Suppose the productions of B in G are exactly B→w1,…,B→wm, where u,v,w1,…,wm are words over variables and terminals. Let H be the grammar obtained by deleting the production A→uBv and replacing it by the family A→uw1v,…,A→uwmv, while keeping every other production of G.

Then L(H)=L(G).

Facts & Assumptions

Given: Grammars G and H related by the displayed substitution step, with the displayed list B→w1,…,B→wm equal to the full family of B-productions in G.

[L1]

A finite derivation is a chain of one-step derivations, by One-step derivation and finite derivation in a context-free grammar.

[L2]

The language L(G) consists of the terminal words derivable from the start symbol, by The language generated by a CFG.

Proof

technique · direct
1.1givenL1

Let xAy⇒GxuBvy be one use of the deleted production in a derivation of a terminal word, and follow the distinguished occurrence of B created by this step. It is eventually rewritten by some B→wi, since the displayed rules are all the productions of B. Every intervening step rewrites a different variable occurrence. Such a step commutes with the rewrite of the distinguished B: applying the two context-free productions in either order gives the same sentential form. We may therefore move B→wi leftward past all intervening steps and replace the resulting adjacent fragment xAy⇒GxuBvy⇒Gxuwivy by the single H-step xAy⇒Hxuwivy. Restoring the commuted surrounding-context steps gives the same final terminal word.

1.2givenL1L2

Conversely, every use in H of a substituted production A→uwiv can be expanded in G to the two steps xAy⇒GxuBvy⇒Gxuwivy. Replacing each substituted step in a derivation of a terminal word in H by this two-step fragment yields a derivation in G with the same yield. Hence [L2] gives L(H)⊆L(G).

2.1L2step 1.1

If a terminal derivation in G never uses the deleted production A→uBv, then it is also a derivation in H. Otherwise apply step 1.1 to one use of A→uBv. This decreases by one the number of uses of the deleted production in the finite derivation without changing its terminal yield. Repeating finitely many times produces an H-derivation of the same word, so [L2] gives L(G)⊆L(H).

3.1step 2.1step 1.2∎

The two inclusions from steps 2.1 and 1.2 prove L(H)=L(G).

Depends on

Used by

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