use 'disc_iff' as simp rules whenever possible + clean up '= True', '= False', etc.
--- a/src/HOL/BNF/Tools/bnf_gfp_rec_sugar.ML Fri Jan 10 14:39:37 2014 +0100
+++ b/src/HOL/BNF/Tools/bnf_gfp_rec_sugar.ML Fri Jan 10 14:39:37 2014 +0100
@@ -1254,6 +1254,8 @@
(the_single exhaust_thms) (the_single disc_thms) disc_thmss' (flat disc_excludess)
|> K |> Goal.prove_sorry lthy [] [] goal
|> Thm.close_derivation
+ |> fold (fn rule => perhaps (try (fn thm => thm RS rule)))
+ @{thms eqTrueE eq_False[THEN iffD1] notnotD}
|> pair eqn_pos
|> single
end;
@@ -1270,7 +1272,9 @@
val code_thmss = map6 prove_code exhaustives disc_eqnss sel_eqnss nchotomy_thmss ctr_thmss'
ctr_specss;
- val simp_thmss = map2 append disc_thmss sel_thmss;
+ val disc_iff_or_disc_thmss =
+ map2 (fn [] => I | disc_iffs => K disc_iffs) disc_iff_thmss disc_thmss;
+ val simp_thmss = map2 append disc_iff_or_disc_thmss sel_thmss;
val common_name = mk_common_name fun_names;