src/Pure/Isar/expression.ML
changeset 38350 480b2de9927c
parent 38316 88e774d09fbc
child 38389 d7d915bae307
equal deleted inserted replaced
38349:ed50e21e715a 38350:480b2de9927c
   773     val axioms = map Element.conclude_witness b_axioms;
   773     val axioms = map Element.conclude_witness b_axioms;
   774 
   774 
   775     val loc_ctxt = thy'
   775     val loc_ctxt = thy'
   776       |> Locale.register_locale binding (extraTs, params)
   776       |> Locale.register_locale binding (extraTs, params)
   777           (asm, rev defs) (a_intro, b_intro) axioms [] (rev notes) (rev deps')
   777           (asm, rev defs) (a_intro, b_intro) axioms [] (rev notes) (rev deps')
   778       |> Theory_Target.init (SOME name)
   778       |> Named_Target.init (SOME name)
   779       |> fold (fn (kind, facts) => Local_Theory.notes_kind kind facts #> snd) notes';
   779       |> fold (fn (kind, facts) => Local_Theory.notes_kind kind facts #> snd) notes';
   780 
   780 
   781   in (name, loc_ctxt) end;
   781   in (name, loc_ctxt) end;
   782 
   782 
   783 in
   783 in
   868 local
   868 local
   869 
   869 
   870 fun gen_sublocale prep_expr intern raw_target expression thy =
   870 fun gen_sublocale prep_expr intern raw_target expression thy =
   871   let
   871   let
   872     val target = intern thy raw_target;
   872     val target = intern thy raw_target;
   873     val target_ctxt = Theory_Target.init (SOME target) thy;
   873     val target_ctxt = Named_Target.init (SOME target) thy;
   874     val ((propss, deps, export), goal_ctxt) = prep_expr expression target_ctxt;
   874     val ((propss, deps, export), goal_ctxt) = prep_expr expression target_ctxt;
   875     fun after_qed witss = ProofContext.theory
   875     fun after_qed witss = ProofContext.theory
   876       (fold (fn ((dep, morph), wits) => Locale.add_dependency
   876       (fold (fn ((dep, morph), wits) => Locale.add_dependency
   877         target (dep, morph $> Element.satisfy_morphism wits) export) (deps ~~ witss));
   877         target (dep, morph $> Element.satisfy_morphism wits) export) (deps ~~ witss));
   878   in Element.witness_proof after_qed propss goal_ctxt end;
   878   in Element.witness_proof after_qed propss goal_ctxt end;