src/HOL/Tools/res_axioms.ML
changeset 32231 95b8afcbb0ed
parent 32091 30e2ffbba718
child 32257 bad5a99c16d8
equal deleted inserted replaced
32230:9f6461b1c9cc 32231:95b8afcbb0ed
   501 fun neg_clausify sts =
   501 fun neg_clausify sts =
   502   sts |> Meson.make_clauses |> map combinators |> Meson.finish_cnf;
   502   sts |> Meson.make_clauses |> map combinators |> Meson.finish_cnf;
   503 
   503 
   504 fun neg_conjecture_clauses st0 n =
   504 fun neg_conjecture_clauses st0 n =
   505   let val st = Seq.hd (neg_skolemize_tac n st0)
   505   let val st = Seq.hd (neg_skolemize_tac n st0)
   506       val (params,_,_) = strip_context (Logic.nth_prem (n, Thm.prop_of st))
   506       val (params,_,_) = OldGoals.strip_context (Logic.nth_prem (n, Thm.prop_of st))
   507   in (neg_clausify (the (metahyps_thms n st)), params) end
   507   in (neg_clausify (the (OldGoals.metahyps_thms n st)), params) end
   508   handle Option => error "unable to Skolemize subgoal";
   508   handle Option => error "unable to Skolemize subgoal";
   509 
   509 
   510 (*Conversion of a subgoal to conjecture clauses. Each clause has
   510 (*Conversion of a subgoal to conjecture clauses. Each clause has
   511   leading !!-bound universal variables, to express generality. *)
   511   leading !!-bound universal variables, to express generality. *)
   512 val neg_clausify_tac =
   512 val neg_clausify_tac =
   513   neg_skolemize_tac THEN'
   513   neg_skolemize_tac THEN'
   514   SUBGOAL
   514   SUBGOAL
   515     (fn (prop,_) =>
   515     (fn (prop,_) =>
   516      let val ts = Logic.strip_assums_hyp prop
   516      let val ts = Logic.strip_assums_hyp prop
   517      in EVERY1
   517      in EVERY1
   518          [METAHYPS
   518          [OldGoals.METAHYPS
   519             (fn hyps =>
   519             (fn hyps =>
   520               (Method.insert_tac
   520               (Method.insert_tac
   521                 (map forall_intr_vars (neg_clausify hyps)) 1)),
   521                 (map forall_intr_vars (neg_clausify hyps)) 1)),
   522           REPEAT_DETERM_N (length ts) o (etac thin_rl)]
   522           REPEAT_DETERM_N (length ts) o (etac thin_rl)]
   523      end);
   523      end);