src/HOL/Library/multiset_simprocs.ML
author paulson <lp15@cam.ac.uk>
Mon, 28 Aug 2017 20:33:08 +0100
changeset 66537 e2249cd6df67
parent 65029 00731700e54f
child 69593 3dda49e08b9d
permissions -rw-r--r--
sorted out cases in negligible_standard_hyperplane

(* Author: Mathias Fleury, MPII


Simprocs for multisets, based on Larry Paulson's simprocs for
natural numbers and numerals.
*)

signature MULTISET_SIMPROCS =
sig
  val subset_cancel_msets: Proof.context -> cterm -> thm option
  val subseteq_cancel_msets: Proof.context -> cterm -> thm option
end;

structure Multiset_Simprocs : MULTISET_SIMPROCS =
struct

structure Subset_Cancel_Multiset = Cancel_Fun
 (open Cancel_Data
  val mk_bal   = HOLogic.mk_binrel @{const_name subset_mset}
  val dest_bal = HOLogic.dest_bin @{const_name subset_mset} dummyT
  val bal_add1 = @{thm mset_subset_add_iff1[unfolded repeat_mset_iterate_add]} RS trans
  val bal_add2 = @{thm mset_subset_add_iff2[unfolded repeat_mset_iterate_add]} RS trans
);

structure Subseteq_Cancel_Multiset = Cancel_Fun
 (open Cancel_Data
  val mk_bal   = HOLogic.mk_binrel @{const_name subseteq_mset}
  val dest_bal = HOLogic.dest_bin @{const_name subseteq_mset} dummyT
  val bal_add1 = @{thm mset_subseteq_add_iff1[unfolded repeat_mset_iterate_add]} RS trans
  val bal_add2 = @{thm mset_subseteq_add_iff2[unfolded repeat_mset_iterate_add]} RS trans
);

val subset_cancel_msets = Subset_Cancel_Multiset.proc;
val subseteq_cancel_msets = Subseteq_Cancel_Multiset.proc;

end