1465
|
1 |
(* Title: HOL/ex/sorting.ML
|
969
|
2 |
ID: $Id$
|
1465
|
3 |
Author: Tobias Nipkow
|
969
|
4 |
Copyright 1994 TU Muenchen
|
|
5 |
|
|
6 |
Some general lemmas
|
|
7 |
*)
|
|
8 |
|
1266
|
9 |
Addsimps [Sorting.mset_Nil,Sorting.mset_Cons,
|
|
10 |
Sorting.sorted_Nil,Sorting.sorted_Cons,
|
|
11 |
Sorting.sorted1_Nil,Sorting.sorted1_One,Sorting.sorted1_Cons];
|
969
|
12 |
|
|
13 |
goal Sorting.thy "!x.mset (xs@ys) x = mset xs x + mset ys x";
|
|
14 |
by(list.induct_tac "xs" 1);
|
1266
|
15 |
by(ALLGOALS(asm_simp_tac (!simpset setloop (split_tac [expand_if]))));
|
969
|
16 |
qed "mset_app_distr";
|
|
17 |
|
|
18 |
goal Sorting.thy "!x. mset [x:xs. ~p(x)] x + mset [x:xs.p(x)] x = \
|
|
19 |
\ mset xs x";
|
|
20 |
by(list.induct_tac "xs" 1);
|
1266
|
21 |
by(ALLGOALS(asm_simp_tac (!simpset setloop (split_tac [expand_if]))));
|
969
|
22 |
qed "mset_compl_add";
|
|
23 |
|
1266
|
24 |
Addsimps [mset_app_distr, mset_compl_add];
|