avoid accidental specialization of the types in the "map" property of codatatypes
--- a/src/HOL/BNF/Tools/bnf_fp_def_sugar.ML Tue Apr 23 17:15:44 2013 +0200
+++ b/src/HOL/BNF/Tools/bnf_fp_def_sugar.ML Tue Apr 23 17:46:12 2013 +0200
@@ -516,8 +516,12 @@
val nones = replicate live NONE;
val ctor_cong =
- if lfp then Drule.dummy_thm
- else cterm_instantiate_pos [NONE, NONE, SOME (certify lthy ctor)] arg_cong;
+ if lfp then
+ Drule.dummy_thm
+ else
+ let val ctor' = mk_ctor Bs ctor in
+ cterm_instantiate_pos [NONE, NONE, SOME (certify lthy ctor')] arg_cong
+ end;
fun mk_cIn ify =
certify lthy o (not lfp ? curry (op $) (map_types ify ctor)) oo