39 "x > 1 --> (\<exists>y :: nat. x < y & y <= 1)" |
39 "x > 1 --> (\<exists>y :: nat. x < y & y <= 1)" |
40 quickcheck[tester = narrowing, finite_types = false, expect = counterexample] |
40 quickcheck[tester = narrowing, finite_types = false, expect = counterexample] |
41 oops |
41 oops |
42 |
42 |
43 lemma |
43 lemma |
44 "x > 2 --> (\<exists>y :: nat. x < y & y <= 2)" |
44 "x > 2 \<longrightarrow> (\<exists>y :: nat. x < y \<and> y \<le> 2)" |
45 quickcheck[tester = narrowing, finite_types = false, size = 10] |
45 quickcheck[tester = narrowing, finite_types = false, size = 10] |
46 oops |
46 oops |
47 |
47 |
48 lemma |
48 lemma |
49 "\<forall> x. \<exists> y :: nat. x > 3 --> (y < x & y > 3)" |
49 "\<forall>x. \<exists>y :: nat. x > 3 \<longrightarrow> (y < x \<and> y > 3)" |
50 quickcheck[tester = narrowing, finite_types = false, size = 7] |
50 quickcheck[tester = narrowing, finite_types = false, size = 7] |
51 oops |
51 oops |
52 |
52 |
53 text \<open>A false conjecture derived from an partial copy-n-paste of @{thm not_distinct_decomp}\<close> |
53 text \<open>A false conjecture derived from an partial copy-n-paste of @{thm not_distinct_decomp}\<close> |
54 lemma |
54 lemma |
55 "~ distinct ws ==> EX xs ys zs y. ws = xs @ [y] @ ys @ [y]" |
55 "\<not> distinct ws \<Longrightarrow> \<exists>xs ys zs y. ws = xs @ [y] @ ys @ [y]" |
56 quickcheck[tester = narrowing, finite_types = false, default_type = nat, expect = counterexample] |
56 quickcheck[tester = narrowing, finite_types = false, default_type = nat, expect = counterexample] |
57 oops |
57 oops |
58 |
58 |
59 text \<open>A false conjecture derived from theorems @{thm split_list_first} and @{thm split_list_last}\<close> |
59 text \<open>A false conjecture derived from theorems @{thm split_list_first} and @{thm split_list_last}\<close> |
60 lemma |
60 lemma |
61 "x : set xs ==> EX ys zs. xs = ys @ x # zs & x ~: set zs & x ~: set ys" |
61 "x \<in> set xs \<Longrightarrow> \<exists>ys zs. xs = ys @ x # zs \<and> x \<notin> set zs \<and> x \<notin> set ys" |
62 quickcheck[tester = narrowing, finite_types = false, default_type = nat, expect = counterexample] |
62 quickcheck[tester = narrowing, finite_types = false, default_type = nat, expect = counterexample] |
63 oops |
63 oops |
64 |
64 |
65 text \<open>A false conjecture derived from @{thm map_eq_Cons_conv} with a typo\<close> |
65 text \<open>A false conjecture derived from @{thm map_eq_Cons_conv} with a typo\<close> |
66 lemma |
66 lemma |
67 "(map f xs = y # ys) = (EX z zs. xs = z' # zs & f z = y & map f zs = ys)" |
67 "(map f xs = y # ys) = (\<exists>z zs. xs = z' # zs & f z = y \<and> map f zs = ys)" |
68 quickcheck[tester = narrowing, finite_types = false, default_type = nat, expect = counterexample] |
68 quickcheck[tester = narrowing, finite_types = false, default_type = nat, expect = counterexample] |
69 oops |
69 oops |
70 |
70 |
71 lemma "a # xs = ys @ [a] ==> EX zs. xs = zs @ [a] & ys = a#zs" |
71 lemma "a # xs = ys @ [a] \<Longrightarrow> \<exists>zs. xs = zs @ [a] \<and> ys = a#zs" |
72 quickcheck[narrowing, expect = counterexample] |
72 quickcheck[narrowing, expect = counterexample] |
73 quickcheck[exhaustive, random, expect = no_counterexample] |
73 quickcheck[exhaustive, random, expect = no_counterexample] |
74 oops |
74 oops |
75 |
75 |
76 subsection \<open>Simple list examples\<close> |
76 subsection \<open>Simple list examples\<close> |