src/Pure/Isar/specification.ML
changeset 21860 c4492c6bf450
parent 21793 74409847e349
child 22744 5cbe966d67a2
equal deleted inserted replaced
21859:03e1e75ad2e5 21860:c4492c6bf450
   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 *)