author | blanchet |
Thu, 13 Mar 2014 13:18:13 +0100 | |
changeset 56079 | 175ac95720d4 |
parent 55465 | 0d31c0546286 |
child 56109 | 1ba56358eba4 |
permissions | -rw-r--r-- |
36899
bcd6fce5bf06
layered SMT setup, adapted SMT clients, added further tests, made Z3 proof abstraction configurable
boehmes
parents:
36898
diff
changeset
|
1 |
(* Title: HOL/SMT_Examples/SMT_Examples.thy |
36898 | 2 |
Author: Sascha Boehme, TU Muenchen |
3 |
*) |
|
4 |
||
36899
bcd6fce5bf06
layered SMT setup, adapted SMT clients, added further tests, made Z3 proof abstraction configurable
boehmes
parents:
36898
diff
changeset
|
5 |
header {* Examples for the SMT binding *} |
36898 | 6 |
|
7 |
theory SMT_Examples |
|
36899
bcd6fce5bf06
layered SMT setup, adapted SMT clients, added further tests, made Z3 proof abstraction configurable
boehmes
parents:
36898
diff
changeset
|
8 |
imports Complex_Main |
36898 | 9 |
begin |
10 |
||
47152
446cfc760ccf
renamed "smt_fixed" to "smt_read_only_certificates"
blanchet
parents:
47111
diff
changeset
|
11 |
declare [[smt_certificates = "SMT_Examples.certs"]] |
446cfc760ccf
renamed "smt_fixed" to "smt_read_only_certificates"
blanchet
parents:
47111
diff
changeset
|
12 |
declare [[smt_read_only_certificates = true]] |
36898 | 13 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
14 |
declare [[smt2_certificates = "SMT_Examples.certs2"]] |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
15 |
declare [[smt2_read_only_certificates = true]] |
36898 | 16 |
|
17 |
||
18 |
section {* Propositional and first-order logic *} |
|
19 |
||
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
20 |
lemma "True" by smt2 |
36898 | 21 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
22 |
lemma "p \<or> \<not>p" by smt2 |
36898 | 23 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
24 |
lemma "(p \<and> True) = p" by smt2 |
36898 | 25 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
26 |
lemma "(p \<or> q) \<and> \<not>p \<Longrightarrow> q" by smt2 |
36898 | 27 |
|
28 |
lemma "(a \<and> b) \<or> (c \<and> d) \<Longrightarrow> (a \<and> b) \<or> (c \<and> d)" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
29 |
by smt2 |
36898 | 30 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
31 |
lemma "(p1 \<and> p2) \<or> p3 \<longrightarrow> (p1 \<longrightarrow> (p3 \<and> p2) \<or> (p1 \<and> p3)) \<or> p1" by smt2 |
36898 | 32 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
33 |
lemma "P = P = P = P = P = P = P = P = P = P" by smt2 |
36898 | 34 |
|
46084
dd7fb9e651ad
regenerate SMT example certificates, to reflect "set" type constructor
blanchet
parents:
45972
diff
changeset
|
35 |
lemma |
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
36 |
assumes "a \<or> b \<or> c \<or> d" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
37 |
and "e \<or> f \<or> (a \<and> d)" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
38 |
and "\<not> (a \<or> (c \<and> ~c)) \<or> b" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
39 |
and "\<not> (b \<and> (x \<or> \<not> x)) \<or> c" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
40 |
and "\<not> (d \<or> False) \<or> c" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
41 |
and "\<not> (c \<or> (\<not> p \<and> (p \<or> (q \<and> \<not> q))))" |
36898 | 42 |
shows False |
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
43 |
using assms by smt2 |
36898 | 44 |
|
45 |
axiomatization symm_f :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" where |
|
46 |
symm_f: "symm_f x y = symm_f y x" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
47 |
lemma "a = a \<and> symm_f a b = symm_f b a" by (smt2 symm_f) |
36898 | 48 |
|
46084
dd7fb9e651ad
regenerate SMT example certificates, to reflect "set" type constructor
blanchet
parents:
45972
diff
changeset
|
49 |
(* |
36898 | 50 |
Taken from ~~/src/HOL/ex/SAT_Examples.thy. |
51 |
Translated from TPTP problem library: PUZ015-2.006.dimacs |
|
52 |
*) |
|
46084
dd7fb9e651ad
regenerate SMT example certificates, to reflect "set" type constructor
blanchet
parents:
45972
diff
changeset
|
53 |
lemma |
36898 | 54 |
assumes "~x0" |
55 |
and "~x30" |
|
56 |
and "~x29" |
|
57 |
and "~x59" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
58 |
and "x1 \<or> x31 \<or> x0" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
59 |
and "x2 \<or> x32 \<or> x1" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
60 |
and "x3 \<or> x33 \<or> x2" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
61 |
and "x4 \<or> x34 \<or> x3" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
62 |
and "x35 \<or> x4" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
63 |
and "x5 \<or> x36 \<or> x30" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
64 |
and "x6 \<or> x37 \<or> x5 \<or> x31" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
65 |
and "x7 \<or> x38 \<or> x6 \<or> x32" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
66 |
and "x8 \<or> x39 \<or> x7 \<or> x33" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
67 |
and "x9 \<or> x40 \<or> x8 \<or> x34" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
68 |
and "x41 \<or> x9 \<or> x35" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
69 |
and "x10 \<or> x42 \<or> x36" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
70 |
and "x11 \<or> x43 \<or> x10 \<or> x37" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
71 |
and "x12 \<or> x44 \<or> x11 \<or> x38" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
72 |
and "x13 \<or> x45 \<or> x12 \<or> x39" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
73 |
and "x14 \<or> x46 \<or> x13 \<or> x40" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
74 |
and "x47 \<or> x14 \<or> x41" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
75 |
and "x15 \<or> x48 \<or> x42" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
76 |
and "x16 \<or> x49 \<or> x15 \<or> x43" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
77 |
and "x17 \<or> x50 \<or> x16 \<or> x44" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
78 |
and "x18 \<or> x51 \<or> x17 \<or> x45" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
79 |
and "x19 \<or> x52 \<or> x18 \<or> x46" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
80 |
and "x53 \<or> x19 \<or> x47" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
81 |
and "x20 \<or> x54 \<or> x48" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
82 |
and "x21 \<or> x55 \<or> x20 \<or> x49" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
83 |
and "x22 \<or> x56 \<or> x21 \<or> x50" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
84 |
and "x23 \<or> x57 \<or> x22 \<or> x51" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
85 |
and "x24 \<or> x58 \<or> x23 \<or> x52" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
86 |
and "x59 \<or> x24 \<or> x53" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
87 |
and "x25 \<or> x54" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
88 |
and "x26 \<or> x25 \<or> x55" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
89 |
and "x27 \<or> x26 \<or> x56" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
90 |
and "x28 \<or> x27 \<or> x57" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
91 |
and "x29 \<or> x28 \<or> x58" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
92 |
and "~x1 \<or> ~x31" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
93 |
and "~x1 \<or> ~x0" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
94 |
and "~x31 \<or> ~x0" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
95 |
and "~x2 \<or> ~x32" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
96 |
and "~x2 \<or> ~x1" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
97 |
and "~x32 \<or> ~x1" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
98 |
and "~x3 \<or> ~x33" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
99 |
and "~x3 \<or> ~x2" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
100 |
and "~x33 \<or> ~x2" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
101 |
and "~x4 \<or> ~x34" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
102 |
and "~x4 \<or> ~x3" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
103 |
and "~x34 \<or> ~x3" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
104 |
and "~x35 \<or> ~x4" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
105 |
and "~x5 \<or> ~x36" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
106 |
and "~x5 \<or> ~x30" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
107 |
and "~x36 \<or> ~x30" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
108 |
and "~x6 \<or> ~x37" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
109 |
and "~x6 \<or> ~x5" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
110 |
and "~x6 \<or> ~x31" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
111 |
and "~x37 \<or> ~x5" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
112 |
and "~x37 \<or> ~x31" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
113 |
and "~x5 \<or> ~x31" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
114 |
and "~x7 \<or> ~x38" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
115 |
and "~x7 \<or> ~x6" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
116 |
and "~x7 \<or> ~x32" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
117 |
and "~x38 \<or> ~x6" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
118 |
and "~x38 \<or> ~x32" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
119 |
and "~x6 \<or> ~x32" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
120 |
and "~x8 \<or> ~x39" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
121 |
and "~x8 \<or> ~x7" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
122 |
and "~x8 \<or> ~x33" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
123 |
and "~x39 \<or> ~x7" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
124 |
and "~x39 \<or> ~x33" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
125 |
and "~x7 \<or> ~x33" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
126 |
and "~x9 \<or> ~x40" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
127 |
and "~x9 \<or> ~x8" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
128 |
and "~x9 \<or> ~x34" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
129 |
and "~x40 \<or> ~x8" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
130 |
and "~x40 \<or> ~x34" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
131 |
and "~x8 \<or> ~x34" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
132 |
and "~x41 \<or> ~x9" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
133 |
and "~x41 \<or> ~x35" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
134 |
and "~x9 \<or> ~x35" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
135 |
and "~x10 \<or> ~x42" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
136 |
and "~x10 \<or> ~x36" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
137 |
and "~x42 \<or> ~x36" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
138 |
and "~x11 \<or> ~x43" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
139 |
and "~x11 \<or> ~x10" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
140 |
and "~x11 \<or> ~x37" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
141 |
and "~x43 \<or> ~x10" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
142 |
and "~x43 \<or> ~x37" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
143 |
and "~x10 \<or> ~x37" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
144 |
and "~x12 \<or> ~x44" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
145 |
and "~x12 \<or> ~x11" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
146 |
and "~x12 \<or> ~x38" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
147 |
and "~x44 \<or> ~x11" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
148 |
and "~x44 \<or> ~x38" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
149 |
and "~x11 \<or> ~x38" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
150 |
and "~x13 \<or> ~x45" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
151 |
and "~x13 \<or> ~x12" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
152 |
and "~x13 \<or> ~x39" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
153 |
and "~x45 \<or> ~x12" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
154 |
and "~x45 \<or> ~x39" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
155 |
and "~x12 \<or> ~x39" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
156 |
and "~x14 \<or> ~x46" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
157 |
and "~x14 \<or> ~x13" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
158 |
and "~x14 \<or> ~x40" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
159 |
and "~x46 \<or> ~x13" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
160 |
and "~x46 \<or> ~x40" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
161 |
and "~x13 \<or> ~x40" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
162 |
and "~x47 \<or> ~x14" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
163 |
and "~x47 \<or> ~x41" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
164 |
and "~x14 \<or> ~x41" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
165 |
and "~x15 \<or> ~x48" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
166 |
and "~x15 \<or> ~x42" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
167 |
and "~x48 \<or> ~x42" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
168 |
and "~x16 \<or> ~x49" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
169 |
and "~x16 \<or> ~x15" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
170 |
and "~x16 \<or> ~x43" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
171 |
and "~x49 \<or> ~x15" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
172 |
and "~x49 \<or> ~x43" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
173 |
and "~x15 \<or> ~x43" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
174 |
and "~x17 \<or> ~x50" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
175 |
and "~x17 \<or> ~x16" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
176 |
and "~x17 \<or> ~x44" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
177 |
and "~x50 \<or> ~x16" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
178 |
and "~x50 \<or> ~x44" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
179 |
and "~x16 \<or> ~x44" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
180 |
and "~x18 \<or> ~x51" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
181 |
and "~x18 \<or> ~x17" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
182 |
and "~x18 \<or> ~x45" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
183 |
and "~x51 \<or> ~x17" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
184 |
and "~x51 \<or> ~x45" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
185 |
and "~x17 \<or> ~x45" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
186 |
and "~x19 \<or> ~x52" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
187 |
and "~x19 \<or> ~x18" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
188 |
and "~x19 \<or> ~x46" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
189 |
and "~x52 \<or> ~x18" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
190 |
and "~x52 \<or> ~x46" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
191 |
and "~x18 \<or> ~x46" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
192 |
and "~x53 \<or> ~x19" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
193 |
and "~x53 \<or> ~x47" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
194 |
and "~x19 \<or> ~x47" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
195 |
and "~x20 \<or> ~x54" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
196 |
and "~x20 \<or> ~x48" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
197 |
and "~x54 \<or> ~x48" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
198 |
and "~x21 \<or> ~x55" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
199 |
and "~x21 \<or> ~x20" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
200 |
and "~x21 \<or> ~x49" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
201 |
and "~x55 \<or> ~x20" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
202 |
and "~x55 \<or> ~x49" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
203 |
and "~x20 \<or> ~x49" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
204 |
and "~x22 \<or> ~x56" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
205 |
and "~x22 \<or> ~x21" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
206 |
and "~x22 \<or> ~x50" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
207 |
and "~x56 \<or> ~x21" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
208 |
and "~x56 \<or> ~x50" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
209 |
and "~x21 \<or> ~x50" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
210 |
and "~x23 \<or> ~x57" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
211 |
and "~x23 \<or> ~x22" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
212 |
and "~x23 \<or> ~x51" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
213 |
and "~x57 \<or> ~x22" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
214 |
and "~x57 \<or> ~x51" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
215 |
and "~x22 \<or> ~x51" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
216 |
and "~x24 \<or> ~x58" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
217 |
and "~x24 \<or> ~x23" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
218 |
and "~x24 \<or> ~x52" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
219 |
and "~x58 \<or> ~x23" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
220 |
and "~x58 \<or> ~x52" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
221 |
and "~x23 \<or> ~x52" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
222 |
and "~x59 \<or> ~x24" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
223 |
and "~x59 \<or> ~x53" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
224 |
and "~x24 \<or> ~x53" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
225 |
and "~x25 \<or> ~x54" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
226 |
and "~x26 \<or> ~x25" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
227 |
and "~x26 \<or> ~x55" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
228 |
and "~x25 \<or> ~x55" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
229 |
and "~x27 \<or> ~x26" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
230 |
and "~x27 \<or> ~x56" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
231 |
and "~x26 \<or> ~x56" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
232 |
and "~x28 \<or> ~x27" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
233 |
and "~x28 \<or> ~x57" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
234 |
and "~x27 \<or> ~x57" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
235 |
and "~x29 \<or> ~x28" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
236 |
and "~x29 \<or> ~x58" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
237 |
and "~x28 \<or> ~x58" |
36898 | 238 |
shows False |
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
239 |
using assms by smt (* smt2 FIXME: THM 0 *) |
36898 | 240 |
|
241 |
lemma "\<forall>x::int. P x \<longrightarrow> (\<forall>y::int. P x \<or> P y)" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
242 |
by smt2 |
36898 | 243 |
|
46084
dd7fb9e651ad
regenerate SMT example certificates, to reflect "set" type constructor
blanchet
parents:
45972
diff
changeset
|
244 |
lemma |
36898 | 245 |
assumes "(\<forall>x y. P x y = x)" |
246 |
shows "(\<exists>y. P x y) = P x c" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
247 |
using assms by smt (* smt2 FIXME: Option *) |
36898 | 248 |
|
46084
dd7fb9e651ad
regenerate SMT example certificates, to reflect "set" type constructor
blanchet
parents:
45972
diff
changeset
|
249 |
lemma |
36898 | 250 |
assumes "(\<forall>x y. P x y = x)" |
251 |
and "(\<forall>x. \<exists>y. P x y) = (\<forall>x. P x c)" |
|
252 |
shows "(EX y. P x y) = P x c" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
253 |
using assms by smt (* smt2 FIXME: Option *) |
36898 | 254 |
|
255 |
lemma |
|
256 |
assumes "if P x then \<not>(\<exists>y. P y) else (\<forall>y. \<not>P y)" |
|
257 |
shows "P x \<longrightarrow> P y" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
258 |
using assms by smt2 |
36898 | 259 |
|
260 |
||
261 |
section {* Arithmetic *} |
|
262 |
||
263 |
subsection {* Linear arithmetic over integers and reals *} |
|
264 |
||
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
265 |
lemma "(3::int) = 3" by smt2 |
36898 | 266 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
267 |
lemma "(3::real) = 3" by smt2 |
36898 | 268 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
269 |
lemma "(3 :: int) + 1 = 4" by smt2 |
36898 | 270 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
271 |
lemma "x + (y + z) = y + (z + (x::int))" by smt2 |
36898 | 272 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
273 |
lemma "max (3::int) 8 > 5" by smt2 |
36898 | 274 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
275 |
lemma "abs (x :: real) + abs y \<ge> abs (x + y)" by smt2 |
36898 | 276 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
277 |
lemma "P ((2::int) < 3) = P True" by smt2 |
36898 | 278 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
279 |
lemma "x + 3 \<ge> 4 \<or> x < (1::int)" by smt2 |
36898 | 280 |
|
281 |
lemma |
|
282 |
assumes "x \<ge> (3::int)" and "y = x + 4" |
|
46084
dd7fb9e651ad
regenerate SMT example certificates, to reflect "set" type constructor
blanchet
parents:
45972
diff
changeset
|
283 |
shows "y - x > 0" |
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
284 |
using assms by smt2 |
36898 | 285 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
286 |
lemma "let x = (2 :: int) in x + x \<noteq> 5" by smt2 |
36898 | 287 |
|
288 |
lemma |
|
289 |
fixes x :: real |
|
290 |
assumes "3 * x + 7 * a < 4" and "3 < 2 * x" |
|
291 |
shows "a < 0" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
292 |
using assms by smt2 |
36898 | 293 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
294 |
lemma "(0 \<le> y + -1 * x \<or> \<not> 0 \<le> x \<or> 0 \<le> (x::int)) = (\<not> False)" by smt2 |
36898 | 295 |
|
296 |
lemma " |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
297 |
(n < m \<and> m < n') \<or> (n < m \<and> m = n') \<or> (n < n' \<and> n' < m) \<or> |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
298 |
(n = n' \<and> n' < m) \<or> (n = m \<and> m < n') \<or> |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
299 |
(n' < m \<and> m < n) \<or> (n' < m \<and> m = n) \<or> |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
300 |
(n' < n \<and> n < m) \<or> (n' = n \<and> n < m) \<or> (n' = m \<and> m < n) \<or> |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
301 |
(m < n \<and> n < n') \<or> (m < n \<and> n' = n) \<or> (m < n' \<and> n' < n) \<or> |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
302 |
(m = n \<and> n < n') \<or> (m = n' \<and> n' < n) \<or> |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
303 |
(n' = m \<and> m = (n::int))" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
304 |
by smt2 |
36898 | 305 |
|
46084
dd7fb9e651ad
regenerate SMT example certificates, to reflect "set" type constructor
blanchet
parents:
45972
diff
changeset
|
306 |
text{* |
36898 | 307 |
The following example was taken from HOL/ex/PresburgerEx.thy, where it says: |
308 |
||
309 |
This following theorem proves that all solutions to the |
|
310 |
recurrence relation $x_{i+2} = |x_{i+1}| - x_i$ are periodic with |
|
311 |
period 9. The example was brought to our attention by John |
|
312 |
Harrison. It does does not require Presburger arithmetic but merely |
|
313 |
quantifier-free linear arithmetic and holds for the rationals as well. |
|
314 |
||
46084
dd7fb9e651ad
regenerate SMT example certificates, to reflect "set" type constructor
blanchet
parents:
45972
diff
changeset
|
315 |
Warning: it takes (in 2006) over 4.2 minutes! |
36898 | 316 |
|
317 |
There, it is proved by "arith". SMT is able to prove this within a fraction |
|
318 |
of one second. With proof reconstruction, it takes about 13 seconds on a Core2 |
|
319 |
processor. |
|
320 |
*} |
|
321 |
||
322 |
lemma "\<lbrakk> x3 = abs x2 - x1; x4 = abs x3 - x2; x5 = abs x4 - x3; |
|
323 |
x6 = abs x5 - x4; x7 = abs x6 - x5; x8 = abs x7 - x6; |
|
324 |
x9 = abs x8 - x7; x10 = abs x9 - x8; x11 = abs x10 - x9 \<rbrakk> |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
325 |
\<Longrightarrow> x1 = x10 \<and> x2 = (x11::int)" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
326 |
by smt2 |
36898 | 327 |
|
328 |
||
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
329 |
lemma "let P = 2 * x + 1 > x + (x::real) in P \<or> False \<or> P" by smt2 |
36898 | 330 |
|
48069
e9b2782c4f99
restricted Z3 by default to a fragment where proof reconstruction should not fail (for better integration with Sledgehammer) -- the full set of supported Z3 features can still be used by enabling the configuration option "z3_with_extensions"
boehmes
parents:
47155
diff
changeset
|
331 |
lemma "x + (let y = x mod 2 in 2 * y + 1) \<ge> x + (1::int)" |
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
332 |
using [[z3_new_extensions]] |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
333 |
by smt2 |
36898 | 334 |
|
48069
e9b2782c4f99
restricted Z3 by default to a fragment where proof reconstruction should not fail (for better integration with Sledgehammer) -- the full set of supported Z3 features can still be used by enabling the configuration option "z3_with_extensions"
boehmes
parents:
47155
diff
changeset
|
335 |
lemma "x + (let y = x mod 2 in y + y) < x + (3::int)" |
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
336 |
using [[z3_new_extensions]] |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
337 |
by smt2 |
36898 | 338 |
|
339 |
lemma |
|
340 |
assumes "x \<noteq> (0::real)" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
341 |
shows "x + x \<noteq> (let P = (abs x > 1) in if P \<or> \<not> P then 4 else 2) * x" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
342 |
using assms [[z3_new_extensions]] by smt2 |
36898 | 343 |
|
46084
dd7fb9e651ad
regenerate SMT example certificates, to reflect "set" type constructor
blanchet
parents:
45972
diff
changeset
|
344 |
lemma |
dd7fb9e651ad
regenerate SMT example certificates, to reflect "set" type constructor
blanchet
parents:
45972
diff
changeset
|
345 |
assumes "(n + m) mod 2 = 0" and "n mod 4 = 3" |
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
346 |
shows "n mod 2 = 1 \<and> m mod 2 = (1::int)" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
347 |
using assms [[z3_new_extensions]] by smt2 |
36898 | 348 |
|
349 |
||
350 |
subsection {* Linear arithmetic with quantifiers *} |
|
351 |
||
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
352 |
lemma "~ (\<exists>x::int. False)" by smt2 |
36898 | 353 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
354 |
lemma "~ (\<exists>x::real. False)" by smt2 |
36898 | 355 |
|
356 |
lemma "\<exists>x::int. 0 < x" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
357 |
using [[smt2_oracle=true]] (* no Z3 proof *) |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
358 |
by smt2 |
36898 | 359 |
|
360 |
lemma "\<exists>x::real. 0 < x" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
361 |
using [[smt2_oracle=true]] (* no Z3 proof *) |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
362 |
by smt2 |
36898 | 363 |
|
364 |
lemma "\<forall>x::int. \<exists>y. y > x" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
365 |
using [[smt2_oracle=true]] (* no Z3 proof *) |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
366 |
by smt2 |
36898 | 367 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
368 |
lemma "\<forall>x y::int. (x = 0 \<and> y = 1) \<longrightarrow> x \<noteq> y" by smt2 |
36898 | 369 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
370 |
lemma "\<exists>x::int. \<forall>y. x < y \<longrightarrow> y < 0 \<or> y >= 0" by smt2 |
36898 | 371 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
372 |
lemma "\<forall>x y::int. x < y \<longrightarrow> (2 * x + 1) < (2 * y)" by smt2 |
36898 | 373 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
374 |
lemma "\<forall>x y::int. (2 * x + 1) \<noteq> (2 * y)" by smt2 |
36898 | 375 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
376 |
lemma "\<forall>x y::int. x + y > 2 \<or> x + y = 2 \<or> x + y < 2" by smt2 |
36898 | 377 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
378 |
lemma "\<forall>x::int. if x > 0 then x + 1 > 0 else 1 > x" by smt2 |
36898 | 379 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
380 |
lemma "if (ALL x::int. x < 0 \<or> x > 0) then False else True" by smt2 |
36898 | 381 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
382 |
lemma "(if (ALL x::int. x < 0 \<or> x > 0) then -1 else 3) > (0::int)" by smt2 |
36898 | 383 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
384 |
lemma "~ (\<exists>x y z::int. 4 * x + -6 * y = (1::int))" by smt2 |
36898 | 385 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
386 |
lemma "\<exists>x::int. \<forall>x y. 0 < x \<and> 0 < y \<longrightarrow> (0::int) < x + y" by smt2 |
36898 | 387 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
388 |
lemma "\<exists>u::int. \<forall>(x::int) y::real. 0 < x \<and> 0 < y \<longrightarrow> -1 < x" by smt2 |
36898 | 389 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
390 |
lemma "\<exists>x::int. (\<forall>y. y \<ge> x \<longrightarrow> y > 0) \<longrightarrow> x > 0" by smt2 |
36898 | 391 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
392 |
lemma "\<forall>x::int. SMT2.trigger [[SMT2.pat x]] (x < a \<longrightarrow> 2 * x < 2 * a)" by smt2 |
36898 | 393 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
394 |
lemma "\<forall>(a::int) b::int. 0 < b \<or> b < 1" by smt2 |
42318
0fd33b6b22cf
corrected order of steps in Z3 proof reconstruction for elimination of unused quantified variables: first try to eliminate unused variables, then skip over used variables
boehmes
parents:
41786
diff
changeset
|
395 |
|
36898 | 396 |
|
397 |
subsection {* Non-linear arithmetic over integers and reals *} |
|
398 |
||
399 |
lemma "a > (0::int) \<Longrightarrow> a*b > 0 \<Longrightarrow> b > 0" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
400 |
using [[smt2_oracle, z3_new_extensions]] |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
401 |
by smt2 |
36899
bcd6fce5bf06
layered SMT setup, adapted SMT clients, added further tests, made Z3 proof abstraction configurable
boehmes
parents:
36898
diff
changeset
|
402 |
|
41282 | 403 |
lemma "(a::int) * (x + 1 + y) = a * x + a * (y + 1)" |
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
404 |
using [[z3_new_extensions]] |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
405 |
by smt2 |
36898 | 406 |
|
41282 | 407 |
lemma "((x::real) * (1 + y) - x * (1 - y)) = (2 * x * y)" |
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
408 |
using [[z3_new_extensions]] |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
409 |
by smt2 |
36898 | 410 |
|
411 |
lemma |
|
412 |
"(U::int) + (1 + p) * (b + e) + p * d = |
|
413 |
U + (2 * (1 + p) * (b + e) + (1 + p) * d + d * p) - (1 + p) * (b + d + e)" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
414 |
using [[z3_new_extensions]] |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
415 |
by smt2 |
36898 | 416 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
417 |
lemma [z3_rule, z3_new_rule]: |
43893
f3e75541cb78
allow rules with premises to be declared as z3_rule (to circumvent incompleteness of Z3 proof reconstruction)
boehmes
parents:
42321
diff
changeset
|
418 |
fixes x :: "int" |
f3e75541cb78
allow rules with premises to be declared as z3_rule (to circumvent incompleteness of Z3 proof reconstruction)
boehmes
parents:
42321
diff
changeset
|
419 |
assumes "x * y \<le> 0" and "\<not> y \<le> 0" and "\<not> x \<le> 0" |
f3e75541cb78
allow rules with premises to be declared as z3_rule (to circumvent incompleteness of Z3 proof reconstruction)
boehmes
parents:
42321
diff
changeset
|
420 |
shows False |
f3e75541cb78
allow rules with premises to be declared as z3_rule (to circumvent incompleteness of Z3 proof reconstruction)
boehmes
parents:
42321
diff
changeset
|
421 |
using assms by (metis mult_le_0_iff) |
f3e75541cb78
allow rules with premises to be declared as z3_rule (to circumvent incompleteness of Z3 proof reconstruction)
boehmes
parents:
42321
diff
changeset
|
422 |
|
48069
e9b2782c4f99
restricted Z3 by default to a fragment where proof reconstruction should not fail (for better integration with Sledgehammer) -- the full set of supported Z3 features can still be used by enabling the configuration option "z3_with_extensions"
boehmes
parents:
47155
diff
changeset
|
423 |
lemma "x * y \<le> (0 :: int) \<Longrightarrow> x \<le> 0 \<or> y \<le> 0" |
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
424 |
using [[z3_with_extensions]] [[z3_new_extensions]] |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
425 |
by smt (* smt2 FIXME: "th-lemma" tactic fails *) |
43893
f3e75541cb78
allow rules with premises to be declared as z3_rule (to circumvent incompleteness of Z3 proof reconstruction)
boehmes
parents:
42321
diff
changeset
|
426 |
|
36898 | 427 |
|
428 |
subsection {* Linear arithmetic for natural numbers *} |
|
429 |
||
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
430 |
lemma "2 * (x::nat) ~= 1" by smt2 |
36898 | 431 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
432 |
lemma "a < 3 \<Longrightarrow> (7::nat) > 2 * a" by smt2 |
36898 | 433 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
434 |
lemma "let x = (1::nat) + y in x - y > 0 * x" by smt2 |
36898 | 435 |
|
436 |
lemma |
|
437 |
"let x = (1::nat) + y in |
|
438 |
let P = (if x > 0 then True else False) in |
|
439 |
False \<or> P = (x - 1 = y) \<or> (\<not>P \<longrightarrow> False)" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
440 |
by smt2 |
36898 | 441 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
442 |
lemma "int (nat \<bar>x::int\<bar>) = \<bar>x\<bar>" by smt2 |
36898 | 443 |
|
444 |
definition prime_nat :: "nat \<Rightarrow> bool" where |
|
445 |
"prime_nat p = (1 < p \<and> (\<forall>m. m dvd p --> m = 1 \<or> m = p))" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
446 |
lemma "prime_nat (4*m + 1) \<Longrightarrow> m \<ge> (1::nat)" by (smt2 prime_nat_def) |
36898 | 447 |
|
448 |
||
449 |
section {* Pairs *} |
|
450 |
||
41132 | 451 |
lemma "fst (x, y) = a \<Longrightarrow> x = a" |
452 |
using fst_conv |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
453 |
by smt2 |
36898 | 454 |
|
41132 | 455 |
lemma "p1 = (x, y) \<and> p2 = (y, x) \<Longrightarrow> fst p1 = snd p2" |
456 |
using fst_conv snd_conv |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
457 |
by smt2 |
36898 | 458 |
|
459 |
||
460 |
section {* Higher-order problems and recursion *} |
|
461 |
||
41132 | 462 |
lemma "i \<noteq> i1 \<and> i \<noteq> i2 \<Longrightarrow> (f (i1 := v1, i2 := v2)) i = f i" |
463 |
using fun_upd_same fun_upd_apply |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
464 |
by smt2 |
36898 | 465 |
|
466 |
lemma "(f g (x::'a::type) = (g x \<and> True)) \<or> (f g x = True) \<or> (g x = True)" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
467 |
by smt2 |
36898 | 468 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
469 |
lemma "id x = x \<and> id True = True" by (smt id_def) (* smt2 FIXME: Option *) |
36898 | 470 |
|
41132 | 471 |
lemma "i \<noteq> i1 \<and> i \<noteq> i2 \<Longrightarrow> ((f (i1 := v1)) (i2 := v2)) i = f i" |
472 |
using fun_upd_same fun_upd_apply |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
473 |
by smt2 |
36898 | 474 |
|
41786
a5899d0ce1a1
added test cases with quantifier occurring in first-order term positions
boehmes
parents:
41601
diff
changeset
|
475 |
lemma |
a5899d0ce1a1
added test cases with quantifier occurring in first-order term positions
boehmes
parents:
41601
diff
changeset
|
476 |
"f (\<exists>x. g x) \<Longrightarrow> True" |
a5899d0ce1a1
added test cases with quantifier occurring in first-order term positions
boehmes
parents:
41601
diff
changeset
|
477 |
"f (\<forall>x. g x) \<Longrightarrow> True" |
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
478 |
by smt2+ |
36899
bcd6fce5bf06
layered SMT setup, adapted SMT clients, added further tests, made Z3 proof abstraction configurable
boehmes
parents:
36898
diff
changeset
|
479 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
480 |
lemma True using let_rsp by smt2 |
36899
bcd6fce5bf06
layered SMT setup, adapted SMT clients, added further tests, made Z3 proof abstraction configurable
boehmes
parents:
36898
diff
changeset
|
481 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
482 |
lemma "le = op \<le> \<Longrightarrow> le (3::int) 42" by smt2 |
42321
ce83c1654b86
fixed eta-expansion: use correct order to apply new bound variables
boehmes
parents:
42319
diff
changeset
|
483 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
484 |
lemma "map (\<lambda>i::nat. i + 1) [0, 1] = [1, 2]" by (smt2 list.map) |
36898 | 485 |
|
36899
bcd6fce5bf06
layered SMT setup, adapted SMT clients, added further tests, made Z3 proof abstraction configurable
boehmes
parents:
36898
diff
changeset
|
486 |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
487 |
lemma "(ALL x. P x) \<or> ~ All P" by smt2 |
36898 | 488 |
|
489 |
fun dec_10 :: "nat \<Rightarrow> nat" where |
|
490 |
"dec_10 n = (if n < 10 then n else dec_10 (n - 10))" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
491 |
lemma "dec_10 (4 * dec_10 4) = 6" by (smt2 dec_10.simps) |
36898 | 492 |
|
36899
bcd6fce5bf06
layered SMT setup, adapted SMT clients, added further tests, made Z3 proof abstraction configurable
boehmes
parents:
36898
diff
changeset
|
493 |
|
36898 | 494 |
axiomatization |
495 |
eval_dioph :: "int list \<Rightarrow> nat list \<Rightarrow> int" |
|
496 |
where |
|
497 |
eval_dioph_mod: |
|
498 |
"eval_dioph ks xs mod int n = eval_dioph ks (map (\<lambda>x. x mod n) xs) mod int n" |
|
499 |
and |
|
500 |
eval_dioph_div_mult: |
|
501 |
"eval_dioph ks (map (\<lambda>x. x div n) xs) * int n + |
|
502 |
eval_dioph ks (map (\<lambda>x. x mod n) xs) = eval_dioph ks xs" |
|
503 |
lemma |
|
504 |
"(eval_dioph ks xs = l) = |
|
505 |
(eval_dioph ks (map (\<lambda>x. x mod 2) xs) mod 2 = l mod 2 \<and> |
|
506 |
eval_dioph ks (map (\<lambda>x. x div 2) xs) = |
|
507 |
(l - eval_dioph ks (map (\<lambda>x. x mod 2) xs)) div 2)" |
|
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
508 |
using [[smt2_oracle=true]] (*FIXME*) |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
509 |
using [[z3_new_extensions]] |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
510 |
by (smt2 eval_dioph_mod[where n=2] eval_dioph_div_mult[where n=2]) |
36898 | 511 |
|
512 |
||
45393
13ab80eafd71
try different alternatives in discharging extra assumptions when schematic theorems obtained from lambda-lifting can be instantiated in different ways
boehmes
parents:
43893
diff
changeset
|
513 |
context complete_lattice |
13ab80eafd71
try different alternatives in discharging extra assumptions when schematic theorems obtained from lambda-lifting can be instantiated in different ways
boehmes
parents:
43893
diff
changeset
|
514 |
begin |
13ab80eafd71
try different alternatives in discharging extra assumptions when schematic theorems obtained from lambda-lifting can be instantiated in different ways
boehmes
parents:
43893
diff
changeset
|
515 |
|
46084
dd7fb9e651ad
regenerate SMT example certificates, to reflect "set" type constructor
blanchet
parents:
45972
diff
changeset
|
516 |
lemma |
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
517 |
assumes "Sup {a | i::bool. True} \<le> Sup {b | i::bool. True}" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
518 |
and "Sup {b | i::bool. True} \<le> Sup {a | i::bool. True}" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
519 |
shows "Sup {a | i::bool. True} \<le> Sup {a | i::bool. True}" |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
520 |
using assms by (smt2 order_trans) |
45393
13ab80eafd71
try different alternatives in discharging extra assumptions when schematic theorems obtained from lambda-lifting can be instantiated in different ways
boehmes
parents:
43893
diff
changeset
|
521 |
|
13ab80eafd71
try different alternatives in discharging extra assumptions when schematic theorems obtained from lambda-lifting can be instantiated in different ways
boehmes
parents:
43893
diff
changeset
|
522 |
end |
13ab80eafd71
try different alternatives in discharging extra assumptions when schematic theorems obtained from lambda-lifting can be instantiated in different ways
boehmes
parents:
43893
diff
changeset
|
523 |
|
13ab80eafd71
try different alternatives in discharging extra assumptions when schematic theorems obtained from lambda-lifting can be instantiated in different ways
boehmes
parents:
43893
diff
changeset
|
524 |
|
36898 | 525 |
section {* Monomorphization examples *} |
526 |
||
36899
bcd6fce5bf06
layered SMT setup, adapted SMT clients, added further tests, made Z3 proof abstraction configurable
boehmes
parents:
36898
diff
changeset
|
527 |
definition Pred :: "'a \<Rightarrow> bool" where "Pred x = True" |
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
528 |
|
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
529 |
lemma poly_Pred: "Pred x \<and> (Pred [x] \<or> \<not> Pred [x])" by (simp add: Pred_def) |
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
530 |
lemma "Pred (1::int)" by (smt2 poly_Pred) |
36898 | 531 |
|
36899
bcd6fce5bf06
layered SMT setup, adapted SMT clients, added further tests, made Z3 proof abstraction configurable
boehmes
parents:
36898
diff
changeset
|
532 |
axiomatization g :: "'a \<Rightarrow> nat" |
bcd6fce5bf06
layered SMT setup, adapted SMT clients, added further tests, made Z3 proof abstraction configurable
boehmes
parents:
36898
diff
changeset
|
533 |
axiomatization where |
bcd6fce5bf06
layered SMT setup, adapted SMT clients, added further tests, made Z3 proof abstraction configurable
boehmes
parents:
36898
diff
changeset
|
534 |
g1: "g (Some x) = g [x]" and |
bcd6fce5bf06
layered SMT setup, adapted SMT clients, added further tests, made Z3 proof abstraction configurable
boehmes
parents:
36898
diff
changeset
|
535 |
g2: "g None = g []" and |
36898 | 536 |
g3: "g xs = length xs" |
56079
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
537 |
|
175ac95720d4
use 'smt2' in SMT examples as much as currently possible
blanchet
parents:
55465
diff
changeset
|
538 |
lemma "g (Some (3::int)) = g (Some True)" by (smt g1 g2 g3 list.size) (* smt2 FIXME: Option *) |
36898 | 539 |
|
540 |
end |