src/Sequents/prover.ML
changeset 32091 30e2ffbba718
parent 29269 5c25a2012975
child 32740 9dd0a2f83429
equal deleted inserted replaced
32090:39acf19e9f3a 32091:30e2ffbba718
    25 
    25 
    26 val empty_pack = Pack([],[]);
    26 val empty_pack = Pack([],[]);
    27 
    27 
    28 fun warn_duplicates [] = []
    28 fun warn_duplicates [] = []
    29   | warn_duplicates dups =
    29   | warn_duplicates dups =
    30       (warning (cat_lines ("Ignoring duplicate theorems:" :: map Display.string_of_thm dups));
    30       (warning (cat_lines ("Ignoring duplicate theorems:" ::
       
    31           map Display.string_of_thm_without_context dups));
    31        dups);
    32        dups);
    32 
    33 
    33 fun (Pack(safes,unsafes)) add_safes ths   = 
    34 fun (Pack(safes,unsafes)) add_safes ths   = 
    34     let val dups = warn_duplicates (gen_inter Thm.eq_thm_prop (ths,safes))
    35     let val dups = warn_duplicates (gen_inter Thm.eq_thm_prop (ths,safes))
    35 	val ths' = subtract Thm.eq_thm_prop dups ths
    36 	val ths' = subtract Thm.eq_thm_prop dups ths
    48         Pack(sort (make_ord less) (safes@safes'), 
    49         Pack(sort (make_ord less) (safes@safes'), 
    49 	     sort (make_ord less) (unsafes@unsafes'));
    50 	     sort (make_ord less) (unsafes@unsafes'));
    50 
    51 
    51 
    52 
    52 fun print_pack (Pack(safes,unsafes)) =
    53 fun print_pack (Pack(safes,unsafes)) =
    53     (writeln "Safe rules:";  Display.print_thms safes;
    54   writeln (cat_lines
    54      writeln "Unsafe rules:"; Display.print_thms unsafes);
    55    (["Safe rules:"] @ map Display.string_of_thm_without_context safes @
       
    56     ["Unsafe rules:"] @ map Display.string_of_thm_without_context unsafes));
    55 
    57 
    56 (*Returns the list of all formulas in the sequent*)
    58 (*Returns the list of all formulas in the sequent*)
    57 fun forms_of_seq (Const("SeqO'",_) $ P $ u) = P :: forms_of_seq u
    59 fun forms_of_seq (Const("SeqO'",_) $ P $ u) = P :: forms_of_seq u
    58   | forms_of_seq (H $ u) = forms_of_seq u
    60   | forms_of_seq (H $ u) = forms_of_seq u
    59   | forms_of_seq _ = [];
    61   | forms_of_seq _ = [];