diff -r bd320b5365e2 -r d6f04e3e9894 thys/turing_basic.thy --- a/thys/turing_basic.thy Tue Jan 29 16:37:38 2013 +0000 +++ b/thys/turing_basic.thy Wed Jan 30 02:26:56 2013 +0000 @@ -179,30 +179,28 @@ abbreviation "tm_wf0 p \ tm_wf (p, 0)" -lemma halt_lemma: - "\wf LE; \n. (\ P (f n) \ (f (Suc n), (f n)) \ LE)\ \ \n. P (f n)" -by (metis wf_iff_no_infinite_down_chain) - abbreviation exponent :: "'a \ nat \ 'a list" ("_ \ _" [100, 99] 100) where "x \ n == replicate n x" consts tape_of :: "'a \ cell list" ("<_>" 100) -fun tape_of_nat_list :: "nat list \ cell list" +defs (overloaded) + tape_of_nat_abv: "<(n::nat)> \ Oc \ (Suc n)" + +fun tape_of_nat_list :: "'a list \ cell list" where "tape_of_nat_list [] = []" | - "tape_of_nat_list [n] = Oc\(Suc n)" | - "tape_of_nat_list (n#ns) = Oc\(Suc n) @ Bk # (tape_of_nat_list ns)" + "tape_of_nat_list [n] = " | + "tape_of_nat_list (n#ns) = @ Bk # (tape_of_nat_list ns)" -fun tape_of_nat_pair :: "nat \ nat \ cell list" +fun tape_of_nat_pair :: "'a \ 'b \ cell list" where - "tape_of_nat_pair (n, m) = Oc\(Suc n) @ [Bk] @ Oc\(Suc m)" + "tape_of_nat_pair (n, m) = @ [Bk] @ " defs (overloaded) - tape_of_nl_abv: " \ tape_of_nat_list ns" - tape_of_nat_abv: "<(n::nat)> \ Oc\(Suc n)" - tape_of_nat_pair: "

\ tape_of_nat_pair p" + tape_of_nl_abv: "<(ns::'a list)> \ tape_of_nat_list ns" + tape_of_nat_pair: "<(np::'a\'b)> \ tape_of_nat_pair np" fun shift :: "instr list \ nat \ instr list"