Context-Free Splitting Lemmas #
This file proves decomposition lemmas for derivations that start from short lists of nonterminals.
Main declarations #
theorem
head_tail_split
{T : Type}
{g : CF_grammar T}
(x : List (symbol T g.nt))
(s : symbol T g.nt)
(ss : List (symbol T g.nt))
(hyp : CF_derives g (s :: ss) x)
:
If a list x is derived from a head symbol s followed by tail symbols ss, then x can be split into u (derived from s) and v (derived from ss).
theorem
concatenation_can_be_split
{T : Type}
{g : CF_grammar T}
(x : List (symbol T g.nt))
(s t : symbol T g.nt)
(hyp : CF_derives g [s, t] x)
:
Corollary: derivation from two symbols can be split.
This is a direct application of the more general head_tail_split lemma.
theorem
concatenation_can_be_split_2
{T : Type}
{g : CF_grammar T}
(x : List (symbol T g.nt))
(s t t' : symbol T g.nt)
(hyp : CF_derives g [s, t, t'] x)
:
Corollary: derivation from three symbols can be split.
This is a direct application of the more general head_tail_split lemma.