Uniquely inversible grammar

From HandWiki
Revision as of 12:00, 26 November 2021 by imported>AnLinks (change)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A uniquely inversible grammar is a formal grammar where no two distinct productions give the same result. This implies the specific production can be inferred from its results.

Formal definition

[math]\displaystyle{ A \to \alpha \land B \to \beta \iff (A \lt \gt B \Rightarrow \alpha \lt \gt \beta) }[/math]

Examples

Uniquely inversibles

[math]\displaystyle{ A \to aA | bB }[/math]

[math]\displaystyle{ B \to b | a }[/math]

Not uniquely inversibles[citation needed]

[math]\displaystyle{ A \to aA | bB }[/math]

[math]\displaystyle{ B \to bB | a }[/math]