src/HOL/Tools/refute.ML
changeset 30305 720226bedc4d
parent 30242 aea5d7fa7ef5
parent 30304 d8e4cd2ac2a1
child 30307 6c74ef5a349f
equal deleted inserted replaced
30274:44832d503659 30305:720226bedc4d
  2087           val pairss = map (map HOLogic.mk_prod) functions
  2087           val pairss = map (map HOLogic.mk_prod) functions
  2088           (* Term.typ *)
  2088           (* Term.typ *)
  2089           val HOLogic_prodT = HOLogic.mk_prodT (T1, T2)
  2089           val HOLogic_prodT = HOLogic.mk_prodT (T1, T2)
  2090           val HOLogic_setT  = HOLogic.mk_setT HOLogic_prodT
  2090           val HOLogic_setT  = HOLogic.mk_setT HOLogic_prodT
  2091           (* Term.term *)
  2091           (* Term.term *)
  2092           val HOLogic_empty_set = Const (@{const_name "{}"}, HOLogic_setT)
  2092           val HOLogic_empty_set = Const (@{const_name Set.empty}, HOLogic_setT)
  2093           val HOLogic_insert    =
  2093           val HOLogic_insert    =
  2094             Const (@{const_name insert}, HOLogic_prodT --> HOLogic_setT --> HOLogic_setT)
  2094             Const (@{const_name insert}, HOLogic_prodT --> HOLogic_setT --> HOLogic_setT)
  2095         in
  2095         in
  2096           (* functions as graphs, i.e. as a (HOL) set of pairs "(x, y)" *)
  2096           (* functions as graphs, i.e. as a (HOL) set of pairs "(x, y)" *)
  2097           map (List.foldr (fn (pair, acc) => HOLogic_insert $ pair $ acc)
  2097           map (List.foldr (fn (pair, acc) => HOLogic_insert $ pair $ acc)
  3152           (constants ~~ results)
  3152           (constants ~~ results)
  3153         (* Term.typ *)
  3153         (* Term.typ *)
  3154         val HOLogic_prodT = HOLogic.mk_prodT (T1, T2)
  3154         val HOLogic_prodT = HOLogic.mk_prodT (T1, T2)
  3155         val HOLogic_setT  = HOLogic.mk_setT HOLogic_prodT
  3155         val HOLogic_setT  = HOLogic.mk_setT HOLogic_prodT
  3156         (* Term.term *)
  3156         (* Term.term *)
  3157         val HOLogic_empty_set = Const (@{const_name "{}"}, HOLogic_setT)
  3157         val HOLogic_empty_set = Const (@{const_name Set.empty}, HOLogic_setT)
  3158         val HOLogic_insert    =
  3158         val HOLogic_insert    =
  3159           Const (@{const_name insert}, HOLogic_prodT --> HOLogic_setT --> HOLogic_setT)
  3159           Const (@{const_name insert}, HOLogic_prodT --> HOLogic_setT --> HOLogic_setT)
  3160       in
  3160       in
  3161         SOME (List.foldr (fn (pair, acc) => HOLogic_insert $ pair $ acc)
  3161         SOME (List.foldr (fn (pair, acc) => HOLogic_insert $ pair $ acc)
  3162           HOLogic_empty_set pairs)
  3162           HOLogic_empty_set pairs)