src/HOL/Tools/Transfer/transfer_bnf.ML
changeset 58179 2de7b0313de3
parent 58177 166131276380
child 58186 a6c3962ea907
equal deleted inserted replaced
58178:695ba3101b37 58179:2de7b0313de3
   288     val (pred_notes, lthy) = predicator bnf lthy
   288     val (pred_notes, lthy) = predicator bnf lthy
   289   in
   289   in
   290     snd (Local_Theory.notes (constr_notes @ relator_eq_notes @ pred_notes) lthy)
   290     snd (Local_Theory.notes (constr_notes @ relator_eq_notes @ pred_notes) lthy)
   291   end
   291   end
   292 
   292 
   293 val _ = Context.>> (Context.map_theory (bnf_interpretation
   293 val _ = Theory.setup (bnf_interpretation
   294   (bnf_only_type_ctr (map_local_theory o transfer_bnf_interpretation))
   294   (bnf_only_type_ctr (map_local_theory o transfer_bnf_interpretation))
   295   (bnf_only_type_ctr (transfer_bnf_interpretation))))
   295   (bnf_only_type_ctr (transfer_bnf_interpretation)))
   296 
   296 
   297 (* simplification rules for the predicator *)
   297 (* simplification rules for the predicator *)
   298 
   298 
   299 fun lookup_defined_pred_data lthy name =
   299 fun lookup_defined_pred_data lthy name =
   300   case (Transfer.lookup_pred_data lthy name) of
   300   case (Transfer.lookup_pred_data lthy name) of
   359     val simp_attrs = @{attributes [simp]}
   359     val simp_attrs = @{attributes [simp]}
   360   in
   360   in
   361     snd (Local_Theory.note ((pred_inject_thm_name, simp_attrs), pred_injects) lthy)
   361     snd (Local_Theory.note ((pred_inject_thm_name, simp_attrs), pred_injects) lthy)
   362   end
   362   end
   363 
   363 
   364 val _ = Context.>> (Context.map_theory (fp_sugar_interpretation
   364 val _ = Theory.setup (fp_sugar_interpretation
   365   (fp_sugar_only_type_ctr (map_local_theory o fold transfer_fp_sugar_interpretation))
   365   (fp_sugar_only_type_ctr (map_local_theory o fold transfer_fp_sugar_interpretation))
   366   (fp_sugar_only_type_ctr (fold transfer_fp_sugar_interpretation))))
   366   (fp_sugar_only_type_ctr (fold transfer_fp_sugar_interpretation)))
   367 
   367 
   368 end
   368 end