src/HOL/Tools/Function/scnp_reconstruct.ML
changeset 59584 4517e9a96ace
parent 59582 0fbed69ff081
child 59618 e6939796717e
equal deleted inserted replaced
59583:3c94c44dfc0f 59584:4517e9a96ace
   197                      THEN (if strict then set_nonempty_tac 1 else all_tac)
   197                      THEN (if strict then set_nonempty_tac 1 else all_tac)
   198                 else
   198                 else
   199                   let
   199                   let
   200                     val (j, b) :: rest = lq
   200                     val (j, b) :: rest = lq
   201                     val (i, a) = the (covering g strict j)
   201                     val (i, a) = the (covering g strict j)
   202                     fun choose xs = set_member_tac (Library.find_index (curry op = (i, a)) xs) 1
   202                     fun choose xs = set_member_tac (find_index (curry op = (i, a)) xs) 1
   203                     val solve_tac = choose lp THEN less_proof strict (j, b) (i, a)
   203                     val solve_tac = choose lp THEN less_proof strict (j, b) (i, a)
   204                   in
   204                   in
   205                     rtac step 1 THEN solve_tac THEN steps_tac MAX strict rest lp
   205                     rtac step 1 THEN solve_tac THEN steps_tac MAX strict rest lp
   206                   end
   206                   end
   207               end
   207               end
   214                      THEN (if strict then set_nonempty_tac 1 else all_tac)
   214                      THEN (if strict then set_nonempty_tac 1 else all_tac)
   215                 else
   215                 else
   216                   let
   216                   let
   217                     val (i, a) :: rest = lp
   217                     val (i, a) :: rest = lp
   218                     val (j, b) = the (covering g strict i)
   218                     val (j, b) = the (covering g strict i)
   219                     fun choose xs = set_member_tac (Library.find_index (curry op = (j, b)) xs) 1
   219                     fun choose xs = set_member_tac (find_index (curry op = (j, b)) xs) 1
   220                     val solve_tac = choose lq THEN less_proof strict (j, b) (i, a)
   220                     val solve_tac = choose lq THEN less_proof strict (j, b) (i, a)
   221                   in
   221                   in
   222                     rtac step 1 THEN solve_tac THEN steps_tac MIN strict lq rest
   222                     rtac step 1 THEN solve_tac THEN steps_tac MIN strict lq rest
   223                   end
   223                   end
   224               end
   224               end
   229                 fun get_wk_cover (j, b) = the (covering g false j)
   229                 fun get_wk_cover (j, b) = the (covering g false j)
   230 
   230 
   231                 val qs = subtract (op =) (map_filter get_str_cover lq) lq
   231                 val qs = subtract (op =) (map_filter get_str_cover lq) lq
   232                 val ps = map get_wk_cover qs
   232                 val ps = map get_wk_cover qs
   233 
   233 
   234                 fun indices xs ys = map (fn y => Library.find_index (curry op = y) xs) ys
   234                 fun indices xs ys = map (fn y => find_index (curry op = y) xs) ys
   235                 val iqs = indices lq qs
   235                 val iqs = indices lq qs
   236                 val ips = indices lp ps
   236                 val ips = indices lp ps
   237 
   237 
   238                 local open Conv in
   238                 local open Conv in
   239                 fun t_conv a C =
   239                 fun t_conv a C =