Formalization of the pumping lemma for context-free languages
Abstract
Context-free languages are highly important in computer language processing technology as well as in formal language theory. The pumping lemma is a property that is valid for all context-free languages, and is used to show the existence of non context-free languages. This paper presents a formalization, using the Coq proof assistant, of the Pumping Lemma for context-free languages.
Full text
· X!X L ⌃ 8L,(L)!9n|8↵,(↵2L)^(|↵|n)! 9u, v, w, x, y 2⌃⇤|(↵=uvwxy)^(|vx|1) ^(|vwx|n)^
· 8i, uviwxiy2L L={aibici|i1} {a, b, c}abc, aabbcc aaabbbccc L n↵= anbncn↵2L |↵|=3nnu, v, x, w, y ↵=uvwxy, |vx|1,|vwx|n8i0,uviwxiy2L vwx vwx a⇤,b ⇤,c ⇤,a ⇤b⇤b⇤c⇤v x uviwxiy L GL G G L G L(G)=L G0G0L(G0)=L(G) n2kk G0 ↵ ↵ 2L |↵|n t↵G0 t t t k +1
· k+2 k+1 G0k d t1t2 t2t1t1t t1 2k t2 2k1 tu, v, w, x, y w t2vwx t1 |vx|1|vwx|n t1t t2 t0uv0wx0y=uwy t1t2 t2uv2wx2y ti uviwxiy8i2 n=mk m k 8G=(V,⌃,P,S),9G0=(V0,⌃,P0,S0)|L(G)=L(G0)^
· 8(↵!G0)2P0,(2⌃)_(2N·N) N=V\⌃N0=V0\⌃ G S0!G0✏ G0 G0 8 _⇠ ^ _⇠ ! 9 ^ _ ! ! 86= 86= 9 9 9
· P P ! ! 8 8 8 8 ! ! 9 ^ 6=
· 8 $ 9 _ 9 8 8 ! 8 8 ! ^ _ 8
· _⇠ ^ _⇠ ! ! 9 8 ! ! 9 ^ ^ ^ 8 ! 8$ 9 9 ) ! ! !!!
· G L G0 G G G0 n2kk G0 ↵L(G0)n t↵G0 ↵6=✏|↵|2k G0↵ 8 8 8 6=! _ ! ! ! 9 ^ ^ t1 ! 8 8 ! 8 8 8 ! ! 8 8 8 ! !
·