src/HOL/Tools/SMT/z3_replay_methods.ML
changeset 74382 8d0294d877bd
parent 72458 b44e894796d5
equal deleted inserted replaced
74381:79f484b0e35b 74382:8d0294d877bd
   313 
   313 
   314 fun norm_lemma thm =
   314 fun norm_lemma thm =
   315   (thm COMP_INCR intro_hyp_rule1)
   315   (thm COMP_INCR intro_hyp_rule1)
   316   handle THM _ => thm COMP_INCR intro_hyp_rule2
   316   handle THM _ => thm COMP_INCR intro_hyp_rule2
   317 
   317 
   318 fun negated_prop (\<^const>\<open>HOL.Not\<close> $ t) = HOLogic.mk_Trueprop t
   318 fun negated_prop \<^Const_>\<open>Not for t\<close> = HOLogic.mk_Trueprop t
   319   | negated_prop t = HOLogic.mk_Trueprop (HOLogic.mk_not t)
   319   | negated_prop t = HOLogic.mk_Trueprop (HOLogic.mk_not t)
   320 
   320 
   321 fun intro_hyps tab (t as \<^const>\<open>HOL.disj\<close> $ t1 $ t2) cx =
   321 fun intro_hyps tab (t as \<^Const_>\<open>HOL.disj\<close> $ t1 $ t2) cx =
   322       lookup_intro_hyps tab t (fold (intro_hyps tab) [t1, t2]) cx
   322       lookup_intro_hyps tab t (fold (intro_hyps tab) [t1, t2]) cx
   323   | intro_hyps tab t cx =
   323   | intro_hyps tab t cx =
   324       lookup_intro_hyps tab t (fn _ => raise LEMMA ()) cx
   324       lookup_intro_hyps tab t (fn _ => raise LEMMA ()) cx
   325 
   325 
   326 and lookup_intro_hyps tab t f (cx as (thm, terms)) =
   326 and lookup_intro_hyps tab t f (cx as (thm, terms)) =
   374 
   374 
   375 (* definitional axioms *)
   375 (* definitional axioms *)
   376 
   376 
   377 fun def_axiom_disj ctxt t =
   377 fun def_axiom_disj ctxt t =
   378   (case dest_prop t of
   378   (case dest_prop t of
   379     \<^const>\<open>HOL.disj\<close> $ u1 $ u2 =>
   379     \<^Const_>\<open>disj for u1 u2\<close> =>
   380       SMT_Replay_Methods.prove_abstract' ctxt t prop_tac (
   380       SMT_Replay_Methods.prove_abstract' ctxt t prop_tac (
   381          SMT_Replay_Methods.abstract_prop u2 ##>>  SMT_Replay_Methods.abstract_prop u1 #>>
   381          SMT_Replay_Methods.abstract_prop u2 ##>>  SMT_Replay_Methods.abstract_prop u1 #>>
   382          HOLogic.mk_disj o swap)
   382          HOLogic.mk_disj o swap)
   383   | u => SMT_Replay_Methods.prove_abstract' ctxt t prop_tac (SMT_Replay_Methods.abstract_prop u))
   383   | u => SMT_Replay_Methods.prove_abstract' ctxt t prop_tac (SMT_Replay_Methods.abstract_prop u))
   384 
   384