equal
deleted
inserted
replaced
218 List.app (writeln o Sign.string_of_typ thy) Ts; |
218 List.app (writeln o Sign.string_of_typ thy) Ts; |
219 List.app (writeln o Sign.string_of_term thy) ts) |
219 List.app (writeln o Sign.string_of_term thy) ts) |
220 | e => raise e; |
220 | e => raise e; |
221 |
221 |
222 (*Prints an exception, then fails*) |
222 (*Prints an exception, then fails*) |
223 fun print_sign_exn thy e = (print_sign_exn_unit thy e; raise ERROR); |
223 fun print_sign_exn thy e = (print_sign_exn_unit thy e; raise ERROR ""); |
224 |
224 |
225 (** the prove_goal.... commands |
225 (** the prove_goal.... commands |
226 Prove theorem using the listed tactics; check it has the specified form. |
226 Prove theorem using the listed tactics; check it has the specified form. |
227 Augment theory with all type assignments of goal. |
227 Augment theory with all type assignments of goal. |
228 Syntax is similar to "goal" command for easy keyboard use. **) |
228 Syntax is similar to "goal" command for easy keyboard use. **) |
250 |
250 |
251 (*Version taking the goal as a string*) |
251 (*Version taking the goal as a string*) |
252 fun prove_goalw thy rths agoal tacsf = |
252 fun prove_goalw thy rths agoal tacsf = |
253 let val chorn = read_cterm thy (agoal, propT) |
253 let val chorn = read_cterm thy (agoal, propT) |
254 in prove_goalw_cterm_general true rths chorn tacsf end |
254 in prove_goalw_cterm_general true rths chorn tacsf end |
255 handle ERROR => error (*from read_cterm?*) |
255 handle ERROR msg => cat_error msg (*from read_cterm?*) |
256 ("The error(s) above occurred for " ^ quote agoal); |
256 ("The error(s) above occurred for " ^ quote agoal); |
257 |
257 |
258 (*String version with no meta-rewrite-rules*) |
258 (*String version with no meta-rewrite-rules*) |
259 fun prove_goal thy = prove_goalw thy []; |
259 fun prove_goal thy = prove_goalw thy []; |
260 |
260 |
363 val goalw_cterm = agoalw_cterm false; |
363 val goalw_cterm = agoalw_cterm false; |
364 |
364 |
365 (*Version taking the goal as a string*) |
365 (*Version taking the goal as a string*) |
366 fun agoalw atomic thy rths agoal = |
366 fun agoalw atomic thy rths agoal = |
367 agoalw_cterm atomic rths (read_cterm thy (agoal, propT)) |
367 agoalw_cterm atomic rths (read_cterm thy (agoal, propT)) |
368 handle ERROR => error (*from type_assign, etc via prepare_proof*) |
368 handle ERROR msg => cat_error msg (*from type_assign, etc via prepare_proof*) |
369 ("The error(s) above occurred for " ^ quote agoal); |
369 ("The error(s) above occurred for " ^ quote agoal); |
370 |
370 |
371 val goalw = agoalw false; |
371 val goalw = agoalw false; |
372 fun goal thy = goalw thy []; |
372 fun goal thy = goalw thy []; |
373 |
373 |