9 Addsimps [Sorting.mset_Nil,Sorting.mset_Cons, |
9 Addsimps [Sorting.mset_Nil,Sorting.mset_Cons, |
10 Sorting.sorted_Nil,Sorting.sorted_Cons, |
10 Sorting.sorted_Nil,Sorting.sorted_Cons, |
11 Sorting.sorted1_Nil,Sorting.sorted1_One,Sorting.sorted1_Cons]; |
11 Sorting.sorted1_Nil,Sorting.sorted1_One,Sorting.sorted1_Cons]; |
12 |
12 |
13 goal Sorting.thy "!x.mset (xs@ys) x = mset xs x + mset ys x"; |
13 goal Sorting.thy "!x.mset (xs@ys) x = mset xs x + mset ys x"; |
14 by(list.induct_tac "xs" 1); |
14 by (list.induct_tac "xs" 1); |
15 by(ALLGOALS(asm_simp_tac (!simpset setloop (split_tac [expand_if])))); |
15 by (ALLGOALS(asm_simp_tac (!simpset setloop (split_tac [expand_if])))); |
16 qed "mset_app_distr"; |
16 qed "mset_app_distr"; |
17 |
17 |
18 goal Sorting.thy "!x. mset [x:xs. ~p(x)] x + mset [x:xs.p(x)] x = \ |
18 goal Sorting.thy "!x. mset [x:xs. ~p(x)] x + mset [x:xs.p(x)] x = \ |
19 \ mset xs x"; |
19 \ mset xs x"; |
20 by(list.induct_tac "xs" 1); |
20 by (list.induct_tac "xs" 1); |
21 by(ALLGOALS(asm_simp_tac (!simpset setloop (split_tac [expand_if])))); |
21 by (ALLGOALS(asm_simp_tac (!simpset setloop (split_tac [expand_if])))); |
22 qed "mset_compl_add"; |
22 qed "mset_compl_add"; |
23 |
23 |
24 Addsimps [mset_app_distr, mset_compl_add]; |
24 Addsimps [mset_app_distr, mset_compl_add]; |