src/HOL/Tools/SMT/smt_solver.ML
changeset 42320 1f09e4c680fc
parent 41761 2dc75bae5226
child 42616 92715b528e78
equal deleted inserted replaced
42319:9a8ba59aed06 42320:1f09e4c680fc
   282       |> Config.put SMT_Config.filter_only_facts true
   282       |> Config.put SMT_Config.filter_only_facts true
   283 
   283 
   284     val {facts, goal, ...} = Proof.goal st
   284     val {facts, goal, ...} = Proof.goal st
   285     val ({context=ctxt', prems, concl, ...}, _) = Subgoal.focus ctxt i goal
   285     val ({context=ctxt', prems, concl, ...}, _) = Subgoal.focus ctxt i goal
   286     fun negate ct = Thm.dest_comb ct ||> Thm.capply cnot |-> Thm.capply
   286     fun negate ct = Thm.dest_comb ct ||> Thm.capply cnot |-> Thm.capply
   287     val cprop = negate (Thm.rhs_of (SMT_Normalize.atomize_conv ctxt' concl))
   287     val cprop =
       
   288       (case try negate (Thm.rhs_of (SMT_Normalize.atomize_conv ctxt' concl)) of
       
   289         SOME ct => ct
       
   290       | NONE => raise SMT_Failure.SMT (SMT_Failure.Other_Failure (
       
   291           "goal is not a HOL term")))
   288   in
   292   in
   289     map snd xwthms
   293     map snd xwthms
   290     |> map_index I
   294     |> map_index I
   291     |> append (map (pair ~1 o pair NONE) (Thm.assume cprop :: prems @ facts))
   295     |> append (map (pair ~1 o pair NONE) (Thm.assume cprop :: prems @ facts))
   292     |> tap check_topsort
   296     |> tap check_topsort