src/HOL/Tools/Datatype/rep_datatype.ML
changeset 56245 84fc7dfa3cd4
parent 56239 17df7145a871
child 56254 a2dd9200854d
equal deleted inserted replaced
56244:3298b7a2795a 56245:84fc7dfa3cd4
   432 
   432 
   433 fun prove_case_congs new_type_names case_names descr nchotomys case_thms thy =
   433 fun prove_case_congs new_type_names case_names descr nchotomys case_thms thy =
   434   let
   434   let
   435     fun prove_case_cong ((t, nchotomy), case_rewrites) =
   435     fun prove_case_cong ((t, nchotomy), case_rewrites) =
   436       let
   436       let
   437         val Const ("==>", _) $ tm $ _ = t;
   437         val Const (@{const_name Pure.imp}, _) $ tm $ _ = t;
   438         val Const (@{const_name Trueprop}, _) $ (Const (@{const_name HOL.eq}, _) $ _ $ Ma) = tm;
   438         val Const (@{const_name Trueprop}, _) $ (Const (@{const_name HOL.eq}, _) $ _ $ Ma) = tm;
   439         val cert = cterm_of thy;
   439         val cert = cterm_of thy;
   440         val nchotomy' = nchotomy RS spec;
   440         val nchotomy' = nchotomy RS spec;
   441         val [v] = Term.add_vars (concl_of nchotomy') [];
   441         val [v] = Term.add_vars (concl_of nchotomy') [];
   442         val nchotomy'' = cterm_instantiate [(cert (Var v), cert Ma)] nchotomy';
   442         val nchotomy'' = cterm_instantiate [(cert (Var v), cert Ma)] nchotomy';