9 text {* |
9 text {* |
10 @{text "blast"}'s runtime for this type of problem appears to be exponential |
10 @{text "blast"}'s runtime for this type of problem appears to be exponential |
11 in its length, though @{text "fast"} manages. |
11 in its length, though @{text "fast"} manages. |
12 *} |
12 *} |
13 lemma "P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P" |
13 lemma "P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P=P" |
14 by (tactic {* svc_tac 1 *}) |
14 by svc |
15 |
15 |
16 |
16 |
17 subsection {* Some big tautologies supplied by John Harrison *} |
17 subsection {* Some big tautologies supplied by John Harrison *} |
18 |
18 |
19 text {* |
19 text {* |
115 (OUT4 <-> WRES11 & IN9 | WRES12 & IN8) & |
115 (OUT4 <-> WRES11 & IN9 | WRES12 & IN8) & |
116 (OUT3 <-> WRES8 & IN9 & ~IN8 | WRES11 & ~IN9 | WRES12 & ~IN8) & |
116 (OUT3 <-> WRES8 & IN9 & ~IN8 | WRES11 & ~IN9 | WRES12 & ~IN8) & |
117 (OUT2 <-> WRES8 & ~IN9 | WRES10 & IN8) & |
117 (OUT2 <-> WRES8 & ~IN9 | WRES10 & IN8) & |
118 (OUT1 <-> WRES7 & IN8) & |
118 (OUT1 <-> WRES7 & IN8) & |
119 (OUT0 <-> WRES7 & ~IN8)" |
119 (OUT0 <-> WRES7 & ~IN8)" |
120 by (tactic {* svc_tac 1 *}) |
120 by svc |
121 |
121 |
122 text {* @{text "fast"} only takes a couple of seconds. *} |
122 text {* @{text "fast"} only takes a couple of seconds. *} |
123 |
123 |
124 lemma sqn_be: "(GE0 <-> IN6 & IN1 | ~IN6 & ~IN1) & |
124 lemma sqn_be: "(GE0 <-> IN6 & IN1 | ~IN6 & ~IN1) & |
125 (GE8 <-> ~IN3 & ~IN1) & |
125 (GE8 <-> ~IN3 & ~IN1) & |
219 WRES9 & ~WRES1 | |
219 WRES9 & ~WRES1 | |
220 WRES12 & ~WRES10 | |
220 WRES12 & ~WRES10 | |
221 WRES16 & WRES7 | |
221 WRES16 & WRES7 | |
222 WRES18 & WRES0 & ~IN5 | |
222 WRES18 & WRES0 & ~IN5 | |
223 WRES19)" |
223 WRES19)" |
224 by (tactic {* svc_tac 1 *}) |
224 by svc |
225 |
225 |
226 |
226 |
227 subsection {* Linear arithmetic *} |
227 subsection {* Linear arithmetic *} |
228 |
228 |
229 lemma "x ~= 14 & x ~= 13 & x ~= 12 & x ~= 11 & x ~= 10 & x ~= 9 & |
229 lemma "x ~= 14 & x ~= 13 & x ~= 12 & x ~= 11 & x ~= 10 & x ~= 9 & |
230 x ~= 8 & x ~= 7 & x ~= 6 & x ~= 5 & x ~= 4 & x ~= 3 & |
230 x ~= 8 & x ~= 7 & x ~= 6 & x ~= 5 & x ~= 4 & x ~= 3 & |
231 x ~= 2 & x ~= 1 & 0 < x & x < 16 --> 15 = (x::int)" |
231 x ~= 2 & x ~= 1 & 0 < x & x < 16 --> 15 = (x::int)" |
232 by (tactic {* svc_tac 1 *}) |
232 by svc |
233 |
233 |
234 text {*merely to test polarity handling in the presence of biconditionals*} |
234 text {*merely to test polarity handling in the presence of biconditionals*} |
235 lemma "(x < (y::int)) = (x+1 <= y)" |
235 lemma "(x < (y::int)) = (x+1 <= y)" |
236 by (tactic {* svc_tac 1 *}) |
236 by svc |
237 |
237 |
238 |
238 |
239 subsection {* Natural number examples requiring implicit "non-negative" assumptions *} |
239 subsection {* Natural number examples requiring implicit "non-negative" assumptions *} |
240 |
240 |
241 lemma "(3::nat)*a <= 2 + 4*b + 6*c & 11 <= 2*a + b + 2*c & |
241 lemma "(3::nat)*a <= 2 + 4*b + 6*c & 11 <= 2*a + b + 2*c & |
242 a + 3*b <= 5 + 2*c --> 2 + 3*b <= 2*a + 6*c" |
242 a + 3*b <= 5 + 2*c --> 2 + 3*b <= 2*a + 6*c" |
243 by (tactic {* svc_tac 1 *}) |
243 by svc |
244 |
244 |
245 lemma "(n::nat) < 2 ==> (n = 0) | (n = 1)" |
245 lemma "(n::nat) < 2 ==> (n = 0) | (n = 1)" |
246 by (tactic {* svc_tac 1 *}) |
246 by svc |
247 |
247 |
248 end |
248 end |