equal
deleted
inserted
replaced
27 !A. is_longest_prefix_chopper(accepts A)(chopperf A)" |
27 !A. is_longest_prefix_chopper(accepts A)(chopperf A)" |
28 |
28 |
29 auto_chopper_def "auto_chopper A xs == acc xs (start A) [] [] ([],xs) A" |
29 auto_chopper_def "auto_chopper A xs == acc xs (start A) [] [] ([],xs) A" |
30 |
30 |
31 primrec acc List.list |
31 primrec acc List.list |
32 acc_Nil "acc [] st ys zs chopsr A = |
32 "acc [] st ys zs chopsr A = |
33 (if ys=[] then chopsr else (ys#fst(chopsr),snd(chopsr)))" |
33 (if ys=[] then chopsr else (ys#fst(chopsr),snd(chopsr)))" |
34 acc_Cons "acc(x#xs) st ys zs chopsr A = |
34 "acc(x#xs) st ys zs chopsr A = |
35 (let s0 = start(A); nxt = next(A); fin = fin(A) |
35 (let s0 = start(A); nxt = next(A); fin = fin(A) |
36 in if fin(nxt st x) |
36 in if fin(nxt st x) |
37 then acc xs (nxt st x) (zs@[x]) (zs@[x]) |
37 then acc xs (nxt st x) (zs@[x]) (zs@[x]) |
38 (acc xs s0 [] [] ([],xs) A) A |
38 (acc xs s0 [] [] ([],xs) A) A |
39 else acc xs (nxt st x) ys (zs@[x]) chopsr A)" |
39 else acc xs (nxt st x) ys (zs@[x]) chopsr A)" |