equal
deleted
inserted
replaced
40 val assert_rew: thm -> thm |
40 val assert_rew: thm -> thm |
41 val mk_rew: thm -> thm |
41 val mk_rew: thm -> thm |
42 val mk_func: thm -> thm |
42 val mk_func: thm -> thm |
43 val head_func: thm -> string * ((string * sort) list * typ) |
43 val head_func: thm -> string * ((string * sort) list * typ) |
44 val expand_eta: int -> thm -> thm |
44 val expand_eta: int -> thm -> thm |
45 val rewrite_func: MetaSimplifier.simpset -> thm -> thm |
45 val rewrite_func: simpset -> thm -> thm |
|
46 val rewrite_head: thm list -> thm -> thm |
46 val norm_args: thm list -> thm list |
47 val norm_args: thm list -> thm list |
47 val norm_varnames: (string -> string) -> (string -> string) -> thm list -> thm list |
48 val norm_varnames: (string -> string) -> (string -> string) -> thm list -> thm list |
48 |
49 |
49 (*case certificates*) |
50 (*case certificates*) |
50 val case_cert: thm -> string * (int * string list) |
51 val case_cert: thm -> string * (int * string list) |
145 fun lhs_conv ct = if can Thm.dest_comb ct |
146 fun lhs_conv ct = if can Thm.dest_comb ct |
146 then (Conv.fun_conv lhs_conv) ct |
147 then (Conv.fun_conv lhs_conv) ct |
147 else conv ct; |
148 else conv ct; |
148 in Conv.fun_conv (Conv.arg_conv lhs_conv) end; |
149 in Conv.fun_conv (Conv.arg_conv lhs_conv) end; |
149 |
150 |
150 fun rewrite_func ss thm = (Conv.fconv_rule o func_conv o |
151 val rewrite_func = Conv.fconv_rule o func_conv o Simplifier.rewrite; |
151 (MetaSimplifier.rewrite' (ProofContext.init (Thm.theory_of_thm thm)) false)) ss thm; |
|
152 val rewrite_head = Conv.fconv_rule o head_conv o MetaSimplifier.rewrite false; |
152 val rewrite_head = Conv.fconv_rule o head_conv o MetaSimplifier.rewrite false; |
153 |
153 |
154 fun norm_args thms = |
154 fun norm_args thms = |
155 let |
155 let |
156 val num_args_of = length o snd o strip_comb o fst o Logic.dest_equals; |
156 val num_args_of = length o snd o strip_comb o fst o Logic.dest_equals; |