# HG changeset patch # User nipkow # Date 1022746372 -7200 # Node ID e5434b822a961088ebaddf6ea17a8d40b0de0de6 # Parent ef8ed6adcb383626eb6114a01a3cc939147d6397 Modifications due to enhanced linear arithmetic. diff -r ef8ed6adcb38 -r e5434b822a96 src/HOL/Hoare/Examples.ML --- a/src/HOL/Hoare/Examples.ML Thu May 30 10:12:11 2002 +0200 +++ b/src/HOL/Hoare/Examples.ML Thu May 30 10:12:52 2002 +0200 @@ -30,10 +30,8 @@ by (hoare_tac (K all_tac) 1); (*Now prove the verification conditions*) by Auto_tac; -by (etac gcd_nnn 4); -by (asm_full_simp_tac (simpset() addsimps [not_less_iff_le, gcd_diff_l]) 3); -by (force_tac (claset(), - simpset() addsimps [not_less_iff_le, le_eq_less_or_eq]) 2); +by (etac gcd_nnn 3); +by (asm_full_simp_tac (simpset() addsimps [not_less_iff_le, gcd_diff_l]) 2); by (asm_simp_tac (simpset() addsimps [gcd_diff_r,less_imp_le]) 1); qed "Euclid_GCD"; diff -r ef8ed6adcb38 -r e5434b822a96 src/HOL/HoareParallel/Gar_Coll.thy --- a/src/HOL/HoareParallel/Gar_Coll.thy Thu May 30 10:12:11 2002 +0200 +++ b/src/HOL/HoareParallel/Gar_Coll.thy Thu May 30 10:12:52 2002 +0200 @@ -124,8 +124,6 @@ apply(simp_all add:collector_defs Graph_defs) apply safe apply(simp_all add:nth_list_update) - apply (erule less_SucE) - apply simp+ apply (erule less_SucE) apply simp+ apply(drule le_imp_less_or_eq) diff -r ef8ed6adcb38 -r e5434b822a96 src/HOL/HoareParallel/Mul_Gar_Coll.thy --- a/src/HOL/HoareParallel/Mul_Gar_Coll.thy Thu May 30 10:12:11 2002 +0200 +++ b/src/HOL/HoareParallel/Mul_Gar_Coll.thy Thu May 30 10:12:52 2002 +0200 @@ -93,7 +93,6 @@ apply interfree_aux apply safe apply(simp_all add: nth_list_update) -apply force+ done lemma Mul_interfree_Redirect_Edge_Color_Target: @@ -112,7 +111,6 @@ apply interfree_aux apply safe apply(simp_all add:nth_list_update) -apply (drule not_sym,force)+ done lemma Mul_interfree_Color_Target_Color_Target: @@ -122,7 +120,6 @@ apply interfree_aux apply safe apply(simp_all add: nth_list_update) -apply (drule not_sym,force) done lemmas mul_mutator_interfree = @@ -138,7 +135,6 @@ apply(tactic {* TRYALL (interfree_aux_tac) *}) apply(tactic {* ALLGOALS Clarify_tac *}) apply (simp_all add:nth_list_update) -apply force+ done subsubsection {* Modular Parameterized Mutators *} @@ -154,7 +150,7 @@ apply oghoare apply(force simp add:Mul_Mutator_def mul_mutator_defs nth_list_update) apply(erule Mul_Mutator) -apply(simp add:Mul_interfree_Mutator_Mutator) +apply(simp add:Mul_interfree_Mutator_Mutator) apply(force simp add:Mul_Mutator_def mul_mutator_defs nth_list_update) done @@ -204,8 +200,6 @@ apply(simp_all add:mul_collector_defs Graph_defs) apply safe apply(simp_all add:nth_list_update) - apply (erule less_SucE) - apply simp+ apply (erule less_SucE) apply simp+ apply(drule le_imp_less_or_eq) @@ -1288,4 +1282,4 @@ apply(simp add:Mul_Mutator_def mul_mutator_defs mul_collector_defs nth_append) done -end \ No newline at end of file +end diff -r ef8ed6adcb38 -r e5434b822a96 src/HOL/HoareParallel/OG_Examples.thy --- a/src/HOL/HoareParallel/OG_Examples.thy Thu May 30 10:12:11 2002 +0200 +++ b/src/HOL/HoareParallel/OG_Examples.thy Thu May 30 10:12:52 2002 +0200 @@ -136,6 +136,7 @@ COEND .{False}." apply oghoare +--{* 20 vc *} apply auto done @@ -169,7 +170,9 @@ apply oghoare --{* 35 vc *} apply simp_all +--{* 21 vc *} apply(tactic {* ALLGOALS Clarify_tac *}) +--{* 11 vc *} apply simp_all apply(tactic {* ALLGOALS Clarify_tac *}) --{* 11 subgoals left *} @@ -194,17 +197,12 @@ apply force --{* 5 subgoals left *} prefer 5 -apply(rule conjI) - apply clarify -prefer 2 -apply(case_tac "j=i") - apply simp -apply simp ---{* 4 subgoals left *} apply(tactic {* ALLGOALS (case_tac "j=k") *}) +--{* 10 subgoals left *} apply simp_all apply(erule_tac x=i in allE) apply force +--{* 9 subgoals left *} apply(case_tac "j=l") apply simp apply(erule_tac x=k in allE) @@ -224,18 +222,21 @@ apply force apply force apply force +--{* 5 subgoals left *} apply(erule_tac x=k in allE) apply(erule_tac x=l in allE) apply(case_tac "j=l") apply force apply force apply force +--{* 3 subgoals left *} apply(erule_tac x=k in allE) apply(erule_tac x=l in allE) apply(case_tac "j=l") apply force apply force apply force +--{* 1 subgoals left *} apply(erule_tac x=k in allE) apply(erule_tac x=l in allE) apply(case_tac "j=l") @@ -482,10 +483,7 @@ COEND .{\i < n. \A!i = 0}." apply oghoare -apply simp_all - apply force+ -apply clarify -apply (simp add:nth_list_update) +apply force+ done subsubsection {* Increment a Variable in Parallel *} @@ -508,7 +506,7 @@ apply(subgoal_tac "n - j = Suc(n- Suc j)") apply simp apply arith -done +done lemma Example2_lemma2_aux2: "!!b. j\ s \ (\ii (x#xs) ! 0=x \ (x#xs) ! Suc n = xs ! n" by simp lemma le_Suc_eq_insert: "{i. i d = 0 | d = 1 | d = 2 | d = 3"; by (case_tac "d" 1 THEN Auto_tac); -by (case_tac "nat" 1 THEN Auto_tac); -by (case_tac "nata" 1 THEN Auto_tac); qed "lemma_exhaust_less_4"; bind_thm ("real_mult_le_lemma", diff -r ef8ed6adcb38 -r e5434b822a96 src/HOL/Integ/IntArith.ML --- a/src/HOL/Integ/IntArith.ML Thu May 30 10:12:11 2002 +0200 +++ b/src/HOL/Integ/IntArith.ML Thu May 30 10:12:52 2002 +0200 @@ -40,7 +40,6 @@ by (etac impE 1); by (asm_full_simp_tac (simpset() addsimps [zabs_def] addsplits [split_if_asm]) 1); - by (arith_tac 1); by (blast_tac (claset() addIs [le_SucI]) 1); val lemma = result(); diff -r ef8ed6adcb38 -r e5434b822a96 src/HOL/Isar_examples/MutilatedCheckerboard.thy --- a/src/HOL/Isar_examples/MutilatedCheckerboard.thy Thu May 30 10:12:11 2002 +0200 +++ b/src/HOL/Isar_examples/MutilatedCheckerboard.thy Thu May 30 10:12:52 2002 +0200 @@ -79,7 +79,7 @@ lemma Sigma_Suc2: "m = n + 2 ==> A <*> below m = (A <*> {n}) Un (A <*> {n + 1}) Un (A <*> below n)" - by (auto simp add: below_def) arith + by (auto simp add: below_def) lemmas Sigma_Suc = Sigma_Suc1 Sigma_Suc2 diff -r ef8ed6adcb38 -r e5434b822a96 src/HOL/Lambda/Eta.thy --- a/src/HOL/Lambda/Eta.thy Thu May 30 10:12:11 2002 +0200 +++ b/src/HOL/Lambda/Eta.thy Thu May 30 10:12:52 2002 +0200 @@ -69,9 +69,6 @@ prefer 2 apply simp apply (simp add: diff_Suc subst_Var split: nat.split) - apply clarify - apply (erule linorder_neqE) - apply simp_all done lemma free_eta [rule_format]: diff -r ef8ed6adcb38 -r e5434b822a96 src/HOL/Lambda/Lambda.thy --- a/src/HOL/Lambda/Lambda.thy Thu May 30 10:12:11 2002 +0200 +++ b/src/HOL/Lambda/Lambda.thy Thu May 30 10:12:52 2002 +0200 @@ -150,7 +150,6 @@ apply (simp_all add: diff_Suc subst_Var lift_lift [symmetric] lift_subst_lt split: nat.split) - apply (auto simp add: linorder_neq_iff) done diff -r ef8ed6adcb38 -r e5434b822a96 src/HOL/Lex/RegSet_of_nat_DA.ML --- a/src/HOL/Lex/RegSet_of_nat_DA.ML Thu May 30 10:12:11 2002 +0200 +++ b/src/HOL/Lex/RegSet_of_nat_DA.ML Thu May 30 10:12:52 2002 +0200 @@ -64,8 +64,6 @@ by (Asm_full_simp_tac 1); by (blast_tac (claset() addDs [in_set_butlastD]) 1); by (Asm_simp_tac 1); -by (rtac conjI 1); - by (Blast_tac 1); by (strip_tac 1); by (etac allE 1); by (etac impE 1); diff -r ef8ed6adcb38 -r e5434b822a96 src/HOL/Library/Primes.thy --- a/src/HOL/Library/Primes.thy Thu May 30 10:12:11 2002 +0200 +++ b/src/HOL/Library/Primes.thy Thu May 30 10:12:52 2002 +0200 @@ -185,7 +185,6 @@ apply (auto simp add: prime_def) apply (case_tac m) apply (auto dest!: dvd_imp_le) - apply arith done text {* diff -r ef8ed6adcb38 -r e5434b822a96 src/HOL/List.thy --- a/src/HOL/List.thy Thu May 30 10:12:11 2002 +0200 +++ b/src/HOL/List.thy Thu May 30 10:12:52 2002 +0200 @@ -531,7 +531,6 @@ apply simp_all apply(erule ssubst) apply auto -apply arith done lemma in_set_conv_decomp: "(x : set xs) = (\ys zs. xs = ys @ x # zs)" diff -r ef8ed6adcb38 -r e5434b822a96 src/HOL/MicroJava/BV/BVExample.thy --- a/src/HOL/MicroJava/BV/BVExample.thy Thu May 30 10:12:11 2002 +0200 +++ b/src/HOL/MicroJava/BV/BVExample.thy Thu May 30 10:12:52 2002 +0200 @@ -174,8 +174,7 @@ lemma pc_next: "x \ [n0, n) \ P n0 \ (x \ [Suc n0, n) \ P x) \ P x" apply (cases "x=n0") - apply (auto simp add: intervall_def) - apply arith + apply (auto simp add: intervall_def) done lemma pc_end: "x \ [n,n) \ P x" diff -r ef8ed6adcb38 -r e5434b822a96 src/HOL/NumberTheory/Chinese.thy --- a/src/HOL/NumberTheory/Chinese.thy Thu May 30 10:12:11 2002 +0200 +++ b/src/HOL/NumberTheory/Chinese.thy Thu May 30 10:12:52 2002 +0200 @@ -185,14 +185,11 @@ apply (rule_tac [!] funprod_zgcd) apply safe apply simp_all - apply (subgoal_tac [3] "ia \ n") - prefer 4 - apply arith - apply (subgoal_tac "i zgcd (m, n) = zgcd (n, m mod n)" apply (frule_tac b = n and a = m in pos_mod_sign) apply (simp add: zgcd_def zabs_def nat_mod_distrib) - apply (cut_tac a = "-m" and b = n in zmod_zminus1_eq_if) apply (auto simp add: gcd_non_0 nat_mod_distrib [symmetric] zmod_zminus1_eq_if) apply (frule_tac a = m in pos_mod_bound) - apply (simp add: nat_diff_distrib) - apply (rule gcd_diff2) - apply (simp add: nat_le_eq_zle) + apply (simp add: nat_diff_distrib gcd_diff2 nat_le_eq_zle) + apply (simp add: gcd_non_0 nat_mod_distrib [symmetric]) done lemma zgcd_eq: "zgcd (m, n) = zgcd (n, m mod n)" @@ -707,7 +705,6 @@ prefer 2 apply (frule_tac a = "r'" in pos_mod_sign) apply auto - apply arith apply (rule exI) apply (rule exI) apply (subst xzgcda.simps) @@ -727,7 +724,6 @@ prefer 2 apply (frule_tac a = "r'" in pos_mod_sign) apply auto - apply arith apply (erule_tac P = "xzgcda ?u = ?v" in rev_mp) apply (subst xzgcda.simps) apply auto diff -r ef8ed6adcb38 -r e5434b822a96 src/HOL/NumberTheory/WilsonRuss.thy --- a/src/HOL/NumberTheory/WilsonRuss.thy Thu May 30 10:12:11 2002 +0200 +++ b/src/HOL/NumberTheory/WilsonRuss.thy Thu May 30 10:12:52 2002 +0200 @@ -344,7 +344,6 @@ apply safe apply (rule_tac x = "2" in exI) apply auto - apply arith done theorem Wilson_Russ: diff -r ef8ed6adcb38 -r e5434b822a96 src/HOL/TLA/TLA.ML --- a/src/HOL/TLA/TLA.ML Thu May 30 10:12:11 2002 +0200 +++ b/src/HOL/TLA/TLA.ML Thu May 30 10:12:52 2002 +0200 @@ -999,8 +999,6 @@ by (etac STL4E 1); by (rtac DmdImpl 1); by (clarsimp_tac (temp_css addsimps2 [angle_def]) 1); - by (rtac nat_less_cases 1); - by Auto_tac; by (rtac (temp_use wf_box_dmd_decrease) 1); by (auto_tac (temp_css addSEs2 [STL4E,DmdImplE])); qed "nat_box_dmd_decrease"; diff -r ef8ed6adcb38 -r e5434b822a96 src/HOL/ex/AVL.ML --- a/src/HOL/ex/AVL.ML Thu May 30 10:12:11 2002 +0200 +++ b/src/HOL/ex/AVL.ML Thu May 30 10:12:52 2002 +0200 @@ -93,7 +93,6 @@ by (case_tac "tree1" 1); by (Asm_simp_tac 1); by (asm_simp_tac (simpset() addsimps [max_def]) 1); -by (arith_tac 1); qed_spec_mp "height_rl_rot"; diff -r ef8ed6adcb38 -r e5434b822a96 src/HOL/ex/BinEx.thy --- a/src/HOL/ex/BinEx.thy Thu May 30 10:12:11 2002 +0200 +++ b/src/HOL/ex/BinEx.thy Thu May 30 10:12:52 2002 +0200 @@ -342,18 +342,35 @@ apply (erule normal.induct) apply auto done - +(* lemma bin_minus_normal: "w \ normal ==> bin_minus w \ normal" apply (erule normal.induct) apply (simp_all add: bin_minus_BIT) apply (rule normal.intros) - apply assumption + apply assumption apply (simp add: normal_Pls_eq_0) apply (simp only: number_of_minus iszero_def zminus_equation [of _ "0"]) + +The previous command should have finished the proof but the lin-arith +procedure at the end of simplificatioon fails. +Problem: lin-arith correctly derives the contradictory thm +"number_of w + 1 + - 0 \ 0 + number_of w" [..] +which its local simplification setup should turn into False. +But on the way we get + +Procedure "int_add_eval_numerals" produced rewrite rule: +number_of ?v3 + 1 \ number_of (bin_add ?v3 (Pls BIT True)) + +and eventually we arrive not at false but at + +"\ neg (number_of (bin_add w (bin_minus (bin_add w (Pls BIT True)))))" + +The next 2 commands should now be obsolete: apply (rule not_sym) apply simp done +needs the previous thm: lemma bin_mult_normal [rule_format]: "w \ normal ==> z \ normal --> bin_mult w z \ normal" apply (erule normal.induct) @@ -361,5 +378,5 @@ apply (safe dest!: normal_BIT_D) apply (simp add: bin_add_normal) done - +*) end