src/HOL/Tools/Function/function_lib.ML
changeset 74526 bbfed17243af
parent 74525 c960bfcb91db
child 74530 823ccd84b879
equal deleted inserted replaced
74525:c960bfcb91db 74526:bbfed17243af
   121           if null is
   121           if null is
   122           then mk (Const (neu, ty), foldr1 mk (map (nth xs) js))
   122           then mk (Const (neu, ty), foldr1 mk (map (nth xs) js))
   123           else if null js
   123           else if null js
   124             then mk (foldr1 mk (map (nth xs) is), Const (neu, ty))
   124             then mk (foldr1 mk (map (nth xs) is), Const (neu, ty))
   125             else mk (foldr1 mk (map (nth xs) is), foldr1 mk (map (nth xs) js)))))
   125             else mk (foldr1 mk (map (nth xs) is), foldr1 mk (map (nth xs) js)))))
   126      (K (rewrite_goals_tac ctxt ac
   126      (fn {context = goal_ctxt, ...} =>
   127          THEN resolve_tac ctxt [Drule.reflexive_thm] 1))
   127        rewrite_goals_tac goal_ctxt ac THEN resolve_tac goal_ctxt [Drule.reflexive_thm] 1)
   128  end
   128  end
   129 
   129 
   130 (* instance for unions *)
   130 (* instance for unions *)
   131 fun regroup_union_conv ctxt =
   131 fun regroup_union_conv ctxt =
   132   regroup_conv ctxt \<^const_abbrev>\<open>Set.empty\<close> \<^const_name>\<open>Lattices.sup\<close>
   132   regroup_conv ctxt \<^const_abbrev>\<open>Set.empty\<close> \<^const_name>\<open>Lattices.sup\<close>