src/HOL/Tools/Lifting/lifting_def_code_dt.ML
changeset 60230 4857d553c52c
parent 60229 4cd6462c1fda
child 60231 0daab758e087
equal deleted inserted replaced
60229:4cd6462c1fda 60230:4857d553c52c
   240     fun R_conv rel_eq_onps = Transfer.top_sweep_rewr_conv @{thms eq_onp_top_eq_eq[symmetric, THEN eq_reflection]}
   240     fun R_conv rel_eq_onps = Transfer.top_sweep_rewr_conv @{thms eq_onp_top_eq_eq[symmetric, THEN eq_reflection]}
   241       then_conv Transfer.bottom_rewr_conv rel_eq_onps
   241       then_conv Transfer.bottom_rewr_conv rel_eq_onps
   242 
   242 
   243     val (ret_lift_def, lthy) = add_lift_def (#lift_config config) var qty rhs rsp_thm par_thms lthy
   243     val (ret_lift_def, lthy) = add_lift_def (#lift_config config) var qty rhs rsp_thm par_thms lthy
   244   in
   244   in
   245     if (not (#code_dt config) orelse (code_eq_of_lift_def ret_lift_def <> NONE_EQ))
   245     if (not (#code_dt config) orelse (code_eq_of_lift_def ret_lift_def <> NONE_EQ)
       
   246       andalso (code_eq_of_lift_def ret_lift_def <> UNKNOWN_EQ))
       
   247       (* Let us try even in case of UNKNOWN_EQ. If this leads to problems, the user can always
       
   248         say that they do not want this workaround. *)
   246     then  (ret_lift_def, lthy)
   249     then  (ret_lift_def, lthy)
   247     else
   250     else
   248       let
   251       let
   249         val lift_def = inst_of_lift_def lthy qty ret_lift_def
   252         val lift_def = inst_of_lift_def lthy qty ret_lift_def
   250         val rty = rty_of_lift_def lift_def
   253         val rty = rty_of_lift_def lift_def