changeset 112 | fea23f9a9d85 |
parent 111 | dfc629cd11de |
child 115 | 653426ed4b38 |
111:dfc629cd11de | 112:fea23f9a9d85 |
---|---|
4 |
4 |
5 theory abacus |
5 theory abacus |
6 imports uncomputable |
6 imports uncomputable |
7 begin |
7 begin |
8 |
8 |
9 (* |
|
10 declare tm_comp.simps [simp add] |
|
11 declare adjust.simps[simp add] |
|
12 declare shift.simps[simp add] |
|
13 declare tm_wf.simps[simp add] |
|
14 declare step.simps[simp add] |
|
15 declare steps.simps[simp add] |
|
16 *) |
|
17 declare replicate_Suc[simp add] |
9 declare replicate_Suc[simp add] |
18 |
10 |
19 text {* |
11 text {* |
20 {\em Abacus} instructions: |
12 {\em Abacus} instructions: |
21 *} |
13 *} |
1729 declare inc_inv.simps[simp del] |
1721 declare inc_inv.simps[simp del] |
1730 |
1722 |
1731 lemma wf_inc_le[intro]: "wf inc_LE" |
1723 lemma wf_inc_le[intro]: "wf inc_LE" |
1732 by(auto intro:wf_inv_image simp: inc_LE_def lex_triple_def lex_pair_def) |
1724 by(auto intro:wf_inv_image simp: inc_LE_def lex_triple_def lex_pair_def) |
1733 |
1725 |
1734 lemma numeral_5_eq_5: "5 = Suc (Suc (Suc (Suc (Suc 0))))" |
|
1735 by arith |
|
1736 |
|
1737 lemma numeral_6_eq_6: "6 = Suc (Suc (Suc (Suc (Suc 1))))" |
|
1738 by arith |
|
1739 |
|
1740 lemma numeral_7_eq_7: "7 = Suc (Suc (Suc (Suc (Suc 2))))" |
|
1741 by arith |
|
1742 |
|
1743 lemma numeral_8_eq_8: "8 = Suc (Suc (Suc (Suc (Suc 3))))" |
|
1744 by arith |
|
1745 |
|
1746 lemma numeral_9_eq_9: "9 = Suc (Suc (Suc (Suc (Suc (Suc 3)))))" |
|
1747 by arith |
|
1748 |
|
1749 lemma numeral_10_eq_10: "10 = Suc (Suc (Suc (Suc (Suc (Suc (Suc 3))))))" |
|
1750 by arith |
|
1751 |
1726 |
1752 lemma inv_locate_b_2_after_write[simp]: |
1727 lemma inv_locate_b_2_after_write[simp]: |
1753 "inv_locate_b (as, am) (n, aaa, Bk # xs) ires |
1728 "inv_locate_b (as, am) (n, aaa, Bk # xs) ires |
1754 \<Longrightarrow> inv_after_write (as, abc_lm_s am n (Suc (abc_lm_v am n))) |
1729 \<Longrightarrow> inv_after_write (as, abc_lm_s am n (Suc (abc_lm_v am n))) |
1755 (s, aaa, Oc # xs) ires" |
1730 (s, aaa, Oc # xs) ires" |
2151 assume "a \<noteq> 10 \<and> Q (a, b, c)" |
2126 assume "a \<noteq> 10 \<and> Q (a, b, c)" |
2152 thus "Q (step (a, b, c) (tinc_b, 0)) \<and> (step (a, b, c) (tinc_b, 0), a, b, c) \<in> inc_LE" |
2127 thus "Q (step (a, b, c) (tinc_b, 0)) \<and> (step (a, b, c) (tinc_b, 0), a, b, c) \<in> inc_LE" |
2153 apply(simp add:Q) |
2128 apply(simp add:Q) |
2154 apply(simp add: inc_inv.simps) |
2129 apply(simp add: inc_inv.simps) |
2155 apply(case_tac c, case_tac [2] aa) |
2130 apply(case_tac c, case_tac [2] aa) |
2156 apply(auto simp: Let_def step.simps tinc_b_def numeral_2_eq_2 numeral_3_eq_3 split: if_splits) |
2131 apply(auto simp: Let_def step.simps tinc_b_def numeral split: if_splits) |
2157 apply(simp_all add: inc_inv.simps inc_LE_def lex_triple_def lex_pair_def inc_measure_def numeral_5_eq_5 |
2132 apply(simp_all add: inc_inv.simps inc_LE_def lex_triple_def lex_pair_def inc_measure_def numeral) |
2158 numeral_6_eq_6 numeral_7_eq_7 numeral_8_eq_8 numeral_9_eq_9) |
|
2159 done |
2133 done |
2160 qed |
2134 qed |
2161 qed |
2135 qed |
2162 |
2136 |
2163 |
2137 |
3680 apply(case_tac c, case_tac [2] aa) |
3654 apply(case_tac c, case_tac [2] aa) |
3681 apply(simp_all add: dec_inv_2.simps Let_def) |
3655 apply(simp_all add: dec_inv_2.simps Let_def) |
3682 apply(simp_all split: if_splits) |
3656 apply(simp_all split: if_splits) |
3683 using fetch layout dec_suc |
3657 using fetch layout dec_suc |
3684 apply(auto simp: step.simps P dec_inv_2.simps Let_def abc_dec_2_LE_def lex_triple_def lex_pair_def lex_square_def |
3658 apply(auto simp: step.simps P dec_inv_2.simps Let_def abc_dec_2_LE_def lex_triple_def lex_pair_def lex_square_def |
3685 fix_add numeral_3_eq_3) |
3659 fix_add numeral) |
3686 done |
3660 done |
3687 qed |
3661 qed |
3688 qed |
3662 qed |
3689 qed |
3663 qed |
3690 |
3664 |