src/HOL/Library/multiset_order_simprocs.ML
changeset 63793 e68a0b651eb5
child 65029 00731700e54f
equal deleted inserted replaced
63792:4ccb7e635477 63793:e68a0b651eb5
       
     1 (* Author: Mathias Fleury, MPII
       
     2 
       
     3 
       
     4 Simprocs for multisets ordering, based on the simprocs for nat numerals.
       
     5 *)
       
     6 
       
     7 signature MULTISET_ORDER_SIMPROCS =
       
     8 sig
       
     9   val less_cancel_msets: Proof.context -> cterm -> thm option
       
    10   val le_cancel_msets: Proof.context -> cterm -> thm option
       
    11 end;
       
    12 
       
    13 structure Multiset_Order_Simprocs : MULTISET_ORDER_SIMPROCS =
       
    14 struct
       
    15 
       
    16 structure LessCancelMultiset = CancelNumeralsFun
       
    17  (open Multiset_Cancel_Common
       
    18   val mk_bal   = HOLogic.mk_binrel @{const_name Orderings.less}
       
    19   val dest_bal = HOLogic.dest_bin @{const_name Orderings.less} dummyT
       
    20   val bal_add1 = @{thm mset_less_add_iff1} RS trans
       
    21   val bal_add2 = @{thm mset_less_add_iff2} RS trans
       
    22 );
       
    23 
       
    24 structure LeCancelMultiset = CancelNumeralsFun
       
    25  (open Multiset_Cancel_Common
       
    26   val mk_bal   = HOLogic.mk_binrel @{const_name Orderings.less_eq}
       
    27   val dest_bal = HOLogic.dest_bin @{const_name Orderings.less_eq} dummyT
       
    28   val bal_add1 = @{thm mset_le_add_iff1} RS trans
       
    29   val bal_add2 = @{thm mset_le_add_iff2} RS trans
       
    30 );
       
    31 
       
    32 val less_cancel_msets = LessCancelMultiset.proc;
       
    33 val le_cancel_msets = LeCancelMultiset.proc;
       
    34 
       
    35 end