equal
deleted
inserted
replaced
892 in |
892 in |
893 |
893 |
894 fun generic_goal prepp kind before_qed after_qed raw_propp state = |
894 fun generic_goal prepp kind before_qed after_qed raw_propp state = |
895 let |
895 let |
896 val ctxt = context_of state; |
896 val ctxt = context_of state; |
897 val cert = Proof_Context.cterm_of ctxt; |
|
898 val chaining = can assert_chain state; |
897 val chaining = can assert_chain state; |
899 val pos = Position.thread_data (); |
898 val pos = Position.thread_data (); |
900 |
899 |
901 val ((propss, after_ctxt), goal_state) = |
900 val ((propss, after_ctxt), goal_state) = |
902 state |
901 state |
908 |
907 |
909 val vars = implicit_vars props; |
908 val vars = implicit_vars props; |
910 val propss' = vars :: propss; |
909 val propss' = vars :: propss; |
911 val goal_propss = filter_out null propss'; |
910 val goal_propss = filter_out null propss'; |
912 val goal = |
911 val goal = |
913 cert (Logic.mk_conjunction_balanced (map Logic.mk_conjunction_balanced goal_propss)) |
912 Logic.mk_conjunction_balanced (map Logic.mk_conjunction_balanced goal_propss) |
|
913 |> Proof_Context.cterm_of ctxt |
914 |> Thm.weaken_sorts (Variable.sorts_of (context_of goal_state)); |
914 |> Thm.weaken_sorts (Variable.sorts_of (context_of goal_state)); |
915 val statement = ((kind, pos), propss', Thm.term_of goal); |
915 val statement = ((kind, pos), propss', Thm.term_of goal); |
916 val after_qed' = after_qed |>> (fn after_local => |
916 val after_qed' = after_qed |>> (fn after_local => |
917 fn results => map_context after_ctxt #> after_local results); |
917 fn results => map_context after_ctxt #> after_local results); |
918 in |
918 in |