487 state |
487 state |
488 |> assert_forward_or_chain |
488 |> assert_forward_or_chain |
489 |> enter_forward |
489 |> enter_forward |
490 |> opt_block |
490 |> opt_block |
491 |> map_context_result (fn c => prepp (c, raw_propp)); |
491 |> map_context_result (fn c => prepp (c, raw_propp)); |
|
492 val cterm_of = Thm.cterm_of (sign_of state); |
492 |
493 |
493 val casms = map (#prop o Thm.crep_thm) (ProofContext.assumptions (context_of state')); |
494 val casms = map (#prop o Thm.crep_thm) (ProofContext.assumptions (context_of state')); |
494 val asms = map Thm.term_of casms; |
495 val cprems = map cterm_of (Logic.strip_imp_prems concl); |
495 |
496 val prop = Logic.list_implies (map Thm.term_of casms, concl); |
496 val prop = Logic.list_implies (asms, concl); |
497 val cprop = cterm_of prop; |
497 val cprop = Thm.cterm_of (sign_of state') prop; |
|
498 val thm = Drule.mk_triv_goal cprop; |
498 val thm = Drule.mk_triv_goal cprop; |
499 in |
499 in |
500 state' |
500 state' |
501 |> put_goal (Some ((kind atts, (PureThy.default_name name), casms, prop), ([], thm))) |
501 |> put_goal (Some ((kind atts, (PureThy.default_name name), casms @ cprems, prop), ([], thm))) |
502 |> bind_props [("thesis", prop)] |
502 |> bind_props [("thesis", prop)] |
503 |> (if is_chain state then use_facts else reset_facts) |
503 |> (if is_chain state then use_facts else reset_facts) |
504 |> new_block |
504 |> new_block |
505 |> enter_backward |
505 |> enter_backward |
506 end; |
506 end; |