4 Copyright 1994 TU Muenchen |
4 Copyright 1994 TU Muenchen |
5 |
5 |
6 Some general lemmas |
6 Some general lemmas |
7 *) |
7 *) |
8 |
8 |
9 val sorting_ss = list_ss addsimps |
9 Addsimps [Sorting.mset_Nil,Sorting.mset_Cons, |
10 [Sorting.mset_Nil,Sorting.mset_Cons, |
10 Sorting.sorted_Nil,Sorting.sorted_Cons, |
11 Sorting.sorted_Nil,Sorting.sorted_Cons, |
11 Sorting.sorted1_Nil,Sorting.sorted1_One,Sorting.sorted1_Cons]; |
12 Sorting.sorted1_Nil,Sorting.sorted1_One,Sorting.sorted1_Cons]; |
|
13 |
12 |
14 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"; |
15 by(list.induct_tac "xs" 1); |
14 by(list.induct_tac "xs" 1); |
16 by(ALLGOALS(asm_simp_tac (sorting_ss setloop (split_tac [expand_if])))); |
15 by(ALLGOALS(asm_simp_tac (!simpset setloop (split_tac [expand_if])))); |
17 qed "mset_app_distr"; |
16 qed "mset_app_distr"; |
18 |
17 |
19 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 = \ |
20 \ mset xs x"; |
19 \ mset xs x"; |
21 by(list.induct_tac "xs" 1); |
20 by(list.induct_tac "xs" 1); |
22 by(ALLGOALS(asm_simp_tac (sorting_ss setloop (split_tac [expand_if])))); |
21 by(ALLGOALS(asm_simp_tac (!simpset setloop (split_tac [expand_if])))); |
23 qed "mset_compl_add"; |
22 qed "mset_compl_add"; |
24 |
23 |
25 val sorting_ss = sorting_ss addsimps |
24 Addsimps [mset_app_distr, mset_compl_add]; |
26 [mset_app_distr, mset_compl_add]; |
|