src/HOL/Tools/ATP/atp_problem.ML
changeset 44501 5bde887b4785
parent 44499 8870232a87ad
child 44589 0a1dfc6365e9
equal deleted inserted replaced
44500:dbd98b549597 44501:5bde887b4785
   200   | aconn_map pos f (AOr, phis) = AConn (AOr, map (f pos) phis)
   200   | aconn_map pos f (AOr, phis) = AConn (AOr, map (f pos) phis)
   201   | aconn_map _ f (c, phis) = AConn (c, map (f NONE) phis)
   201   | aconn_map _ f (c, phis) = AConn (c, map (f NONE) phis)
   202 
   202 
   203 fun formula_fold pos f =
   203 fun formula_fold pos f =
   204   let
   204   let
   205     fun aux pos (AQuant (_, _, phi)) = aux pos phi
   205     fun fld pos (AQuant (_, _, phi)) = fld pos phi
   206       | aux pos (AConn conn) = aconn_fold pos aux conn
   206       | fld pos (AConn conn) = aconn_fold pos fld conn
   207       | aux pos (AAtom tm) = f pos tm
   207       | fld pos (AAtom tm) = f pos tm
   208   in aux pos end
   208   in fld pos end
   209 
   209 
   210 fun formula_map f (AQuant (q, xs, phi)) = AQuant (q, xs, formula_map f phi)
   210 fun formula_map f (AQuant (q, xs, phi)) = AQuant (q, xs, formula_map f phi)
   211   | formula_map f (AConn (c, phis)) = AConn (c, map (formula_map f) phis)
   211   | formula_map f (AConn (c, phis)) = AConn (c, map (formula_map f) phis)
   212   | formula_map f (AAtom tm) = AAtom (f tm)
   212   | formula_map f (AAtom tm) = AAtom (f tm)
   213 
   213