equal
deleted
inserted
replaced
150 "atomic" indicates if the goal should be wrapped up in the function |
150 "atomic" indicates if the goal should be wrapped up in the function |
151 "Goal::prop=>prop" to avoid assumptions being returned separately. |
151 "Goal::prop=>prop" to avoid assumptions being returned separately. |
152 *) |
152 *) |
153 fun prepare_proof atomic rths chorn = |
153 fun prepare_proof atomic rths chorn = |
154 let |
154 let |
155 val _ = warning "Obsolete goal command encountered"; |
155 val _ = legacy_feature "old goal command"; |
156 val {thy, t=horn,...} = rep_cterm chorn; |
156 val {thy, t=horn,...} = rep_cterm chorn; |
157 val _ = Term.no_dummy_patterns horn handle TERM (msg, _) => error msg; |
157 val _ = Term.no_dummy_patterns horn handle TERM (msg, _) => error msg; |
158 val (As, B) = Logic.strip_horn horn; |
158 val (As, B) = Logic.strip_horn horn; |
159 val atoms = atomic andalso |
159 val atoms = atomic andalso |
160 forall (fn t => not (can Logic.dest_implies t orelse Logic.is_all t)) As; |
160 forall (fn t => not (can Logic.dest_implies t orelse Logic.is_all t)) As; |
371 val Goal = Goalw []; |
371 val Goal = Goalw []; |
372 |
372 |
373 (*simple version with minimal amount of checking and postprocessing*) |
373 (*simple version with minimal amount of checking and postprocessing*) |
374 fun simple_prove_goal_cterm G f = |
374 fun simple_prove_goal_cterm G f = |
375 let |
375 let |
376 val _ = warning "Obsolete goal command encountered"; |
376 val _ = legacy_feature "old goal command"; |
377 val As = Drule.strip_imp_prems G; |
377 val As = Drule.strip_imp_prems G; |
378 val B = Drule.strip_imp_concl G; |
378 val B = Drule.strip_imp_concl G; |
379 val asms = map Assumption.assume As; |
379 val asms = map Assumption.assume As; |
380 fun check NONE = error "prove_goal: tactic failed" |
380 fun check NONE = error "prove_goal: tactic failed" |
381 | check (SOME (thm, _)) = (case nprems_of thm of |
381 | check (SOME (thm, _)) = (case nprems_of thm of |