don't allow parametricity theorem for typedefs in setup_lifting. The theorem is not used.
authorkuncar
Fri, 11 Oct 2013 18:36:51 +0200
changeset 54333 ce028cf2e58e
parent 54332 a38160ad741c
child 54334 409d7f7247f4
don't allow parametricity theorem for typedefs in setup_lifting. The theorem is not used.
src/HOL/Tools/Lifting/lifting_setup.ML
--- a/src/HOL/Tools/Lifting/lifting_setup.ML	Mon Oct 14 15:21:45 2013 +0200
+++ b/src/HOL/Tools/Lifting/lifting_setup.ML	Fri Oct 11 18:36:51 2013 +0200
@@ -758,7 +758,11 @@
     fun setup_typedef () = 
       case opt_reflp_xthm of
         SOME _ => error "The reflexivity theorem cannot be specified if the type_definition theorem is used."
-        | NONE => setup_by_typedef_thm gen_code input_thm lthy
+        | NONE => (
+          case opt_par_xthm of
+            SOME _ => error "The parametricity theorem cannot be specified if the type_definition theorem is used."
+            | NONE => setup_by_typedef_thm gen_code input_thm lthy
+        )
   in
     case input_term of
       (Const (@{const_name Quotient}, _) $ _ $ _ $ _ $ _) => setup_quotient ()