equal
deleted
inserted
replaced
245 in ((prems, stmt, facts), goal_ctxt) end); |
245 in ((prems, stmt, facts), goal_ctxt) end); |
246 |
246 |
247 fun gen_theorem prep_att prep_stmt |
247 fun gen_theorem prep_att prep_stmt |
248 kind before_qed after_qed (name, raw_atts) raw_elems raw_concl lthy0 = |
248 kind before_qed after_qed (name, raw_atts) raw_elems raw_concl lthy0 = |
249 let |
249 let |
250 val _ = LocalTheory.assert lthy0; |
250 val _ = LocalTheory.affirm lthy0; |
251 val thy = ProofContext.theory_of lthy0; |
251 val thy = ProofContext.theory_of lthy0; |
252 |
252 |
253 val (loc, ctxt, lthy) = |
253 val (loc, ctxt, lthy) = |
254 (case (TheoryTarget.peek lthy0, exists (fn Locale.Expr _ => true | _ => false) raw_elems) of |
254 (case (TheoryTarget.peek lthy0, exists (fn Locale.Expr _ => true | _ => false) raw_elems) of |
255 (SOME loc, true) => (* workaround non-modularity of in/includes *) (* FIXME *) |
255 (SOME loc, true) => (* workaround non-modularity of in/includes *) (* FIXME *) |