src/HOL/Tools/Lifting/lifting_term.ML
changeset 55731 66df76dd2640
parent 55457 e373c9f60db1
child 57663 b590fcd03a4a
equal deleted inserted replaced
55730:97ff9276e12d 55731:66df76dd2640
   445         Thm.instantiate (Thm.match (lhs_rule, lhs_ct)) rule2
   445         Thm.instantiate (Thm.match (lhs_rule, lhs_ct)) rule2
   446           handle Pattern.MATCH => raise CTERM ("rewr_imp", [lhs_rule, lhs_ct])
   446           handle Pattern.MATCH => raise CTERM ("rewr_imp", [lhs_rule, lhs_ct])
   447    end
   447    end
   448   
   448   
   449   fun rewrs_imp rules = first_imp (map rewr_imp rules)
   449   fun rewrs_imp rules = first_imp (map rewr_imp rules)
   450 
       
   451   fun map_interrupt f l =
       
   452     let
       
   453       fun map_interrupt' _ [] l = SOME (rev l)
       
   454        | map_interrupt' f (x::xs) l = (case f x of
       
   455         NONE => NONE
       
   456         | SOME v => map_interrupt' f xs (v::l))
       
   457     in
       
   458       map_interrupt' f l []
       
   459     end
       
   460 in
   450 in
   461 
   451 
   462   (*
   452   (*
   463     ctm - of the form "[POS|NEG] (par_R OO T) t f) ?X", where par_R is a parametricity transfer 
   453     ctm - of the form "[POS|NEG] (par_R OO T) t f) ?X", where par_R is a parametricity transfer 
   464     relation for t and T is a transfer relation between t and f, which consists only from
   454     relation for t and T is a transfer relation between t and f, which consists only from