src/Pure/Thy/export_theory.ML
changeset 70974 3ee90f831805
parent 70923 98d9b78b7f47
child 70975 19818f99b4ae
equal deleted inserted replaced
70972:196b41b9b9c8 70974:3ee90f831805
   253     val clean_thm = Thm.check_hyps (Context.Theory thy) #> Thm.strip_shyps;
   253     val clean_thm = Thm.check_hyps (Context.Theory thy) #> Thm.strip_shyps;
   254 
   254 
   255     val lookup_thm_id = Global_Theory.lookup_thm_id thy;
   255     val lookup_thm_id = Global_Theory.lookup_thm_id thy;
   256 
   256 
   257     fun proof_boxes_of thm thm_id =
   257     fun proof_boxes_of thm thm_id =
   258       let
   258       (Thm_Deps.proof_boxes
   259         val dep_boxes =
   259         {included = fn thm_id' => #serial thm_id = #serial thm_id',
   260           thm |> Thm_Deps.proof_boxes (fn thm_id' =>
   260          excluded = is_some o lookup_thm_id} [thm]) @ [thm_id];
   261             if #serial thm_id = #serial thm_id' then false else is_some (lookup_thm_id thm_id'));
       
   262       in dep_boxes @ [thm_id] end;
       
   263 
   261 
   264     fun expand_name thm_id (header: Proofterm.thm_header) =
   262     fun expand_name thm_id (header: Proofterm.thm_header) =
   265       if #serial header = #serial thm_id then ""
   263       if #serial header = #serial thm_id then ""
   266       else
   264       else
   267         (case lookup_thm_id (Proofterm.thm_header_id header) of
   265         (case lookup_thm_id (Proofterm.thm_header_id header) of