Two theorems in formal language theory that express necessary conditions for languages to be regular or context-free:
If language L is regular, there exists an integer n such that,
for any word z in L, | z |>n,
there exist u,v,w with
such that:
If language
L is context-free, there exist integers
p and
q such that,
for any z in L, with | z |>p,
there exist u,v,w,x,y with
such that:
The conditions are used in constructing algorithms for decision problems about regular and context-free grammars, and in proving certain languages are not regular or are not context-free.