register relator equations as spec rules only for datatypes -- for codatatypes they underspecify the function and are therefore dangerous (e.g. to Nitpick)
--- a/src/HOL/Tools/BNF/bnf_fp_def_sugar.ML Tue Mar 04 18:57:17 2014 +0100
+++ b/src/HOL/Tools/BNF/bnf_fp_def_sugar.ML Tue Mar 04 18:57:17 2014 +0100
@@ -1267,7 +1267,8 @@
(((map_thms, rel_inject_thms, rel_distinct_thms, set_thmss), ctr_sugar),
lthy
|> Spec_Rules.add Spec_Rules.Equational (`(single o lhs_head_of o hd) map_thms)
- |> Spec_Rules.add Spec_Rules.Equational (`(single o lhs_head_of o hd) rel_eq_thms)
+ |> fp = Least_FP
+ ? Spec_Rules.add Spec_Rules.Equational (`(single o lhs_head_of o hd) rel_eq_thms)
|> Spec_Rules.add Spec_Rules.Equational (`(single o lhs_head_of o hd) set_thms)
|> Local_Theory.notes (anonymous_notes @ notes)
|> snd)