diff -r 905f17258bca -r 3f1a44c2d645 src/HOL/Product_Type.thy --- a/src/HOL/Product_Type.thy Sat Jul 02 22:14:47 2011 +0200 +++ b/src/HOL/Product_Type.thy Sat Jul 02 22:55:58 2011 +0200 @@ -28,6 +28,15 @@ and [code nbe]: "HOL.equal P P \ True" by (simp_all add: equal) +lemma If_case_cert: + assumes "CASE \ (\b. If b f g)" + shows "(CASE True \ f) &&& (CASE False \ g)" + using assms by simp_all + +setup {* + Code.add_case @{thm If_case_cert} +*} + code_const "HOL.equal \ bool \ bool \ bool" (Haskell infix 4 "==")