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.
Eliminating useless symbols preserves the generated language
Statement
For every context-free grammar there exists a context-free grammar such that and either:
- and is the evident empty-language grammar, or
- every variable of is both generating and reachable.
Facts & Assumptions
Given: A context-free grammar .
Variables may be nullable, generating, reachable, or useful exactly as in Nullable, generating, and reachable variables.
The generated language is , by The language generated by a CFG.
Proof
Let be the generating variables of , and let consist of the productions whose left-hand side lies in and whose right-hand side contains no variable outside . If , then no terminal word is derivable from , so [L2] gives and we may take to be any fixed grammar generating the empty language. If , set .
In the case , let be the variables reachable from in , let consist of the productions in whose left-hand side lies in and whose right-hand side contains no variable outside , and set . Every derivation beginning at stays inside by definition of reachability.
Assume now that . Any derivation of a terminal word can use only generating variables, because every variable appearing in that derivation must eventually derive a terminal subword. Conversely, every rule kept in was already a rule of . Hence .
Therefore deleting the unreachable variables changes no derivation from to a terminal word, while every variable remaining in is both generating and reachable. So .
Taking in the case and the empty-language grammar in the case proves the theorem.
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
- Jean Gallier and Jocelyn Quaintance, Introduction to the Theory of Computation: Some Notes for CIS511 (standard reference, not scraped)