equal
deleted
inserted
replaced
16 val add_defs_i : (string * term) list -> theory -> theory |
16 val add_defs_i : (string * term) list -> theory -> theory |
17 val asm_rl : thm |
17 val asm_rl : thm |
18 val assume_ax : theory -> string -> thm |
18 val assume_ax : theory -> string -> thm |
19 val COMP : thm * thm -> thm |
19 val COMP : thm * thm -> thm |
20 val compose : thm * int * thm -> thm list |
20 val compose : thm * int * thm -> thm list |
|
21 val cprems_of : thm -> cterm list |
|
22 val cskip_flexpairs : cterm -> cterm |
|
23 val cstrip_imp_prems : cterm -> cterm list |
21 val cterm_instantiate : (cterm*cterm)list -> thm -> thm |
24 val cterm_instantiate : (cterm*cterm)list -> thm -> thm |
22 val cut_rl : thm |
25 val cut_rl : thm |
23 val equal_abs_elim : cterm -> thm -> thm |
26 val equal_abs_elim : cterm -> thm -> thm |
24 val equal_abs_elim_list: cterm list -> thm -> thm |
27 val equal_abs_elim_list: cterm list -> thm -> thm |
25 val eq_thm : thm * thm -> bool |
28 val eq_thm : thm * thm -> bool |
215 |
218 |
216 |
219 |
217 |
220 |
218 (**** More derived rules and operations on theorems ****) |
221 (**** More derived rules and operations on theorems ****) |
219 |
222 |
|
223 (** some cterm->cterm operations: much faster than calling cterm_of! **) |
|
224 |
|
225 (*Discard flexflex pairs; return a cterm*) |
|
226 fun cskip_flexpairs ct = |
|
227 case term_of ct of |
|
228 (Const("==>", _) $ (Const("=?=",_)$_$_) $ _) => |
|
229 cskip_flexpairs (#2 (dest_cimplies ct)) |
|
230 | _ => ct; |
|
231 |
|
232 (* A1==>...An==>B goes to [A1,...,An], where B is not an implication *) |
|
233 fun cstrip_imp_prems ct = |
|
234 let val (cA,cB) = dest_cimplies ct |
|
235 in cA :: cstrip_imp_prems cB end |
|
236 handle TERM _ => []; |
|
237 |
|
238 (*The premises of a theorem, as a cterm list*) |
|
239 val cprems_of = cstrip_imp_prems o cskip_flexpairs o cprop_of; |
|
240 |
|
241 |
220 (** reading of instantiations **) |
242 (** reading of instantiations **) |
221 |
243 |
222 fun indexname cs = case Syntax.scan_varname cs of (v,[]) => v |
244 fun indexname cs = case Syntax.scan_varname cs of (v,[]) => v |
223 | _ => error("Lexical error in variable name " ^ quote (implode cs)); |
245 | _ => error("Lexical error in variable name " ^ quote (implode cs)); |
224 |
246 |