src/HOL/ex/Sorting.ML
author paulson
Tue, 16 Jul 1996 15:49:46 +0200
changeset 1868 836950047d85
parent 1465 5d7a7e439cec
child 2031 03a843f0f447
permissions -rw-r--r--
Put in minimal simpset to avoid excessive simplification, just as in revision 1.9 of HOL/indrule.ML

(*  Title:      HOL/ex/sorting.ML
    ID:         $Id$
    Author:     Tobias Nipkow
    Copyright   1994 TU Muenchen

Some general lemmas
*)

Addsimps [Sorting.mset_Nil,Sorting.mset_Cons,
          Sorting.sorted_Nil,Sorting.sorted_Cons,
          Sorting.sorted1_Nil,Sorting.sorted1_One,Sorting.sorted1_Cons];

goal Sorting.thy "!x.mset (xs@ys) x = mset xs x + mset ys x";
by(list.induct_tac "xs" 1);
by(ALLGOALS(asm_simp_tac (!simpset setloop (split_tac [expand_if]))));
qed "mset_app_distr";

goal Sorting.thy "!x. mset [x:xs. ~p(x)] x + mset [x:xs.p(x)] x = \
\                     mset xs x";
by(list.induct_tac "xs" 1);
by(ALLGOALS(asm_simp_tac (!simpset setloop (split_tac [expand_if]))));
qed "mset_compl_add";

Addsimps [mset_app_distr, mset_compl_add];