src/HOL/SMT_Examples/SMT_Tests.thy
changeset 57165 7b1bf424ec5f
parent 56859 bc50d5e04e90
child 57168 af95a414136a
equal deleted inserted replaced
57164:eb5f27ec3987 57165:7b1bf424ec5f
   182   "(\<forall>x y z. f x y = f z y \<longrightarrow> x = z) \<and> a \<noteq> d \<longrightarrow> f a b \<noteq> f d b"
   182   "(\<forall>x y z. f x y = f z y \<longrightarrow> x = z) \<and> a \<noteq> d \<longrightarrow> f a b \<noteq> f d b"
   183   using [[smt2_oracle=true]] (* FIXME: disable refine_inj_axiom in Z3 *)
   183   using [[smt2_oracle=true]] (* FIXME: disable refine_inj_axiom in Z3 *)
   184   by smt2+
   184   by smt2+
   185 
   185 
   186 
   186 
   187 section {* Guidance for quantifier heuristics: patterns and weights *}
   187 section {* Guidance for quantifier heuristics: patterns *}
   188 
   188 
   189 lemma
   189 lemma
   190   assumes "\<forall>x. SMT2.trigger [[SMT2.pat (f x)]] (f x = x)"
   190   assumes "\<forall>x. SMT2.trigger [[SMT2.pat (f x)]] (f x = x)"
   191   shows "f 1 = 1"
   191   shows "f 1 = 1"
   192   using assms using [[smt2_trace]] by smt2
   192   using assms using [[smt2_trace]] by smt2
   212 lemma
   212 lemma
   213   assumes "ALL x. SMT2.trigger [[SMT2.pat (P x)], [SMT2.pat (Q x)]]
   213   assumes "ALL x. SMT2.trigger [[SMT2.pat (P x)], [SMT2.pat (Q x)]]
   214     ((P x --> R x) & (Q x --> R x))"
   214     ((P x --> R x) & (Q x --> R x))"
   215   and "P t | Q t"
   215   and "P t | Q t"
   216   shows "R t"
   216   shows "R t"
   217   using assms by smt2
       
   218 
       
   219 lemma
       
   220   assumes "ALL x. SMT2.trigger [[SMT2.pat (P x)]] (SMT2.weight 2 (P x --> Q x))"
       
   221   and "P t"
       
   222   shows "Q t"
       
   223   using assms by smt2
       
   224 
       
   225 lemma
       
   226   assumes "ALL x. SMT2.weight 1 (P x --> Q x)"
       
   227   and "P t"
       
   228   shows "Q t"
       
   229   using assms by smt2
   217   using assms by smt2
   230 
   218 
   231 
   219 
   232 section {* Meta-logical connectives *}
   220 section {* Meta-logical connectives *}
   233 
   221