register pre-fixpoint BNFs in database to enable lookup later (e.g. in 'corec')
authorblanchet
Thu, 26 Mar 2015 23:23:04 +0100
changeset 59820 0e9a0a5f4424
parent 59819 dbec7f33093d
child 59821 fd3a7692e083
register pre-fixpoint BNFs in database to enable lookup later (e.g. in 'corec')
src/HOL/Tools/BNF/bnf_comp.ML
--- a/src/HOL/Tools/BNF/bnf_comp.ML	Thu Mar 26 17:10:24 2015 +0100
+++ b/src/HOL/Tools/BNF/bnf_comp.ML	Thu Mar 26 23:23:04 2015 +0100
@@ -906,7 +906,9 @@
     val notes = (map_b, map_def) :: (rel_b, rel_def) :: (set_bs ~~ set_defs)
       |> map (fn (b, def) => ((b, []), [([def], [])]))
 
-    val (noted, lthy'') = lthy' |> Local_Theory.notes notes
+    val (noted, lthy'') = lthy'
+      |> Local_Theory.notes notes
+      ||> (if repTA = TA then I else register_bnf_raw (fst (dest_Type TA)) bnf'')
   in
     ((morph_bnf (substitute_noted_thm noted) bnf'', (all_deads, absT_info)), lthy'')
   end;