| author | wenzelm | 
| Tue, 08 Jul 2008 17:52:28 +0200 | |
| changeset 27495 | d2bb5d61b392 | 
| parent 25032 | f7095d7cb9a3 | 
| child 28524 | 644b62cf678f | 
| permissions | -rw-r--r-- | 
| 14350 | 1  | 
(* Title: HOL/ex/Refute_Examples.thy  | 
2  | 
ID: $Id$  | 
|
3  | 
Author: Tjark Weber  | 
|
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
4  | 
Copyright 2003-2007  | 
| 14350 | 5  | 
*)  | 
6  | 
||
7  | 
(* See 'HOL/Refute.thy' for help. *)  | 
|
8  | 
||
9  | 
header {* Examples for the 'refute' command *}
 | 
|
10  | 
||
| 15297 | 11  | 
theory Refute_Examples imports Main  | 
12  | 
begin  | 
|
| 14350 | 13  | 
|
| 18774 | 14  | 
refute_params [satsolver="dpll"]  | 
15  | 
||
| 14350 | 16  | 
lemma "P \<and> Q"  | 
17  | 
apply (rule conjI)  | 
|
18  | 
  refute 1  -- {* refutes @{term "P"} *}
 | 
|
19  | 
  refute 2  -- {* refutes @{term "Q"} *}
 | 
|
20  | 
  refute    -- {* equivalent to 'refute 1' *}
 | 
|
| 14455 | 21  | 
    -- {* here 'refute 3' would cause an exception, since we only have 2 subgoals *}
 | 
| 14465 | 22  | 
  refute [maxsize=5]           -- {* we can override parameters ... *}
 | 
23  | 
  refute [satsolver="dpll"] 2  -- {* ... and specify a subgoal at the same time *}
 | 
|
| 14350 | 24  | 
oops  | 
25  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
26  | 
(*****************************************************************************)  | 
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
27  | 
|
| 23219 | 28  | 
subsection {* Examples and Test Cases *}
 | 
| 14350 | 29  | 
|
| 23219 | 30  | 
subsubsection {* Propositional logic *}
 | 
| 14350 | 31  | 
|
32  | 
lemma "True"  | 
|
33  | 
refute  | 
|
34  | 
apply auto  | 
|
35  | 
done  | 
|
36  | 
||
37  | 
lemma "False"  | 
|
38  | 
refute  | 
|
39  | 
oops  | 
|
40  | 
||
41  | 
lemma "P"  | 
|
42  | 
refute  | 
|
43  | 
oops  | 
|
44  | 
||
45  | 
lemma "~ P"  | 
|
46  | 
refute  | 
|
47  | 
oops  | 
|
48  | 
||
49  | 
lemma "P & Q"  | 
|
50  | 
refute  | 
|
51  | 
oops  | 
|
52  | 
||
53  | 
lemma "P | Q"  | 
|
54  | 
refute  | 
|
55  | 
oops  | 
|
56  | 
||
57  | 
lemma "P \<longrightarrow> Q"  | 
|
58  | 
refute  | 
|
59  | 
oops  | 
|
60  | 
||
61  | 
lemma "(P::bool) = Q"  | 
|
62  | 
refute  | 
|
63  | 
oops  | 
|
64  | 
||
65  | 
lemma "(P | Q) \<longrightarrow> (P & Q)"  | 
|
66  | 
refute  | 
|
67  | 
oops  | 
|
68  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
69  | 
(*****************************************************************************)  | 
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
70  | 
|
| 23219 | 71  | 
subsubsection {* Predicate logic *}
 | 
| 14350 | 72  | 
|
| 14455 | 73  | 
lemma "P x y z"  | 
| 14350 | 74  | 
refute  | 
75  | 
oops  | 
|
76  | 
||
77  | 
lemma "P x y \<longrightarrow> P y x"  | 
|
78  | 
refute  | 
|
79  | 
oops  | 
|
80  | 
||
| 14455 | 81  | 
lemma "P (f (f x)) \<longrightarrow> P x \<longrightarrow> P (f x)"  | 
82  | 
refute  | 
|
83  | 
oops  | 
|
84  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
85  | 
(*****************************************************************************)  | 
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
86  | 
|
| 23219 | 87  | 
subsubsection {* Equality *}
 | 
| 14350 | 88  | 
|
89  | 
lemma "P = True"  | 
|
90  | 
refute  | 
|
91  | 
oops  | 
|
92  | 
||
93  | 
lemma "P = False"  | 
|
94  | 
refute  | 
|
95  | 
oops  | 
|
96  | 
||
97  | 
lemma "x = y"  | 
|
98  | 
refute  | 
|
99  | 
oops  | 
|
100  | 
||
101  | 
lemma "f x = g x"  | 
|
102  | 
refute  | 
|
103  | 
oops  | 
|
104  | 
||
105  | 
lemma "(f::'a\<Rightarrow>'b) = g"  | 
|
106  | 
refute  | 
|
107  | 
oops  | 
|
108  | 
||
109  | 
lemma "(f::('d\<Rightarrow>'d)\<Rightarrow>('c\<Rightarrow>'d)) = g"
 | 
|
110  | 
refute  | 
|
111  | 
oops  | 
|
112  | 
||
113  | 
lemma "distinct [a,b]"  | 
|
| 14809 | 114  | 
refute  | 
| 14350 | 115  | 
apply simp  | 
116  | 
refute  | 
|
117  | 
oops  | 
|
118  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
119  | 
(*****************************************************************************)  | 
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
120  | 
|
| 23219 | 121  | 
subsubsection {* First-Order Logic *}
 | 
| 14350 | 122  | 
|
123  | 
lemma "\<exists>x. P x"  | 
|
124  | 
refute  | 
|
125  | 
oops  | 
|
126  | 
||
127  | 
lemma "\<forall>x. P x"  | 
|
128  | 
refute  | 
|
129  | 
oops  | 
|
130  | 
||
131  | 
lemma "EX! x. P x"  | 
|
132  | 
refute  | 
|
133  | 
oops  | 
|
134  | 
||
135  | 
lemma "Ex P"  | 
|
136  | 
refute  | 
|
137  | 
oops  | 
|
138  | 
||
139  | 
lemma "All P"  | 
|
140  | 
refute  | 
|
141  | 
oops  | 
|
142  | 
||
143  | 
lemma "Ex1 P"  | 
|
144  | 
refute  | 
|
145  | 
oops  | 
|
146  | 
||
147  | 
lemma "(\<exists>x. P x) \<longrightarrow> (\<forall>x. P x)"  | 
|
148  | 
refute  | 
|
149  | 
oops  | 
|
150  | 
||
151  | 
lemma "(\<forall>x. \<exists>y. P x y) \<longrightarrow> (\<exists>y. \<forall>x. P x y)"  | 
|
152  | 
refute  | 
|
153  | 
oops  | 
|
154  | 
||
155  | 
lemma "(\<exists>x. P x) \<longrightarrow> (EX! x. P x)"  | 
|
156  | 
refute  | 
|
157  | 
oops  | 
|
158  | 
||
159  | 
text {* A true statement (also testing names of free and bound variables being identical) *}
 | 
|
160  | 
||
161  | 
lemma "(\<forall>x y. P x y \<longrightarrow> P y x) \<longrightarrow> (\<forall>x. P x y) \<longrightarrow> P y x"  | 
|
| 18774 | 162  | 
refute [maxsize=4]  | 
| 14350 | 163  | 
apply fast  | 
164  | 
done  | 
|
165  | 
||
| 18789 | 166  | 
text {* "A type has at most 4 elements." *}
 | 
| 14350 | 167  | 
|
| 18789 | 168  | 
lemma "a=b | a=c | a=d | a=e | b=c | b=d | b=e | c=d | c=e | d=e"  | 
| 14455 | 169  | 
refute  | 
170  | 
oops  | 
|
171  | 
||
| 18789 | 172  | 
lemma "\<forall>a b c d e. a=b | a=c | a=d | a=e | b=c | b=d | b=e | c=d | c=e | d=e"  | 
| 21559 | 173  | 
refute  | 
| 14350 | 174  | 
oops  | 
175  | 
||
176  | 
text {* "Every reflexive and symmetric relation is transitive." *}
 | 
|
177  | 
||
178  | 
lemma "\<lbrakk> \<forall>x. P x x; \<forall>x y. P x y \<longrightarrow> P y x \<rbrakk> \<Longrightarrow> P x y \<longrightarrow> P y z \<longrightarrow> P x z"  | 
|
| 14489 | 179  | 
refute  | 
| 14350 | 180  | 
oops  | 
181  | 
||
| 14465 | 182  | 
text {* The "Drinker's theorem" ... *}
 | 
| 14350 | 183  | 
|
184  | 
lemma "\<exists>x. f x = g x \<longrightarrow> f = g"  | 
|
| 14809 | 185  | 
refute [maxsize=4]  | 
| 14350 | 186  | 
apply (auto simp add: ext)  | 
187  | 
done  | 
|
188  | 
||
| 14465 | 189  | 
text {* ... and an incorrect version of it *}
 | 
| 14350 | 190  | 
|
191  | 
lemma "(\<exists>x. f x = g x) \<longrightarrow> f = g"  | 
|
192  | 
refute  | 
|
193  | 
oops  | 
|
194  | 
||
195  | 
text {* "Every function has a fixed point." *}
 | 
|
196  | 
||
197  | 
lemma "\<exists>x. f x = x"  | 
|
198  | 
refute  | 
|
199  | 
oops  | 
|
200  | 
||
201  | 
text {* "Function composition is commutative." *}
 | 
|
202  | 
||
203  | 
lemma "f (g x) = g (f x)"  | 
|
204  | 
refute  | 
|
205  | 
oops  | 
|
206  | 
||
207  | 
text {* "Two functions that are equivalent wrt.\ the same predicate 'P' are equal." *}
 | 
|
208  | 
||
209  | 
lemma "((P::('a\<Rightarrow>'b)\<Rightarrow>bool) f = P g) \<longrightarrow> (f x = g x)"
 | 
|
210  | 
refute  | 
|
211  | 
oops  | 
|
212  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
213  | 
(*****************************************************************************)  | 
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
214  | 
|
| 23219 | 215  | 
subsubsection {* Higher-Order Logic *}
 | 
| 14350 | 216  | 
|
217  | 
lemma "\<exists>P. P"  | 
|
218  | 
refute  | 
|
219  | 
apply auto  | 
|
220  | 
done  | 
|
221  | 
||
222  | 
lemma "\<forall>P. P"  | 
|
223  | 
refute  | 
|
224  | 
oops  | 
|
225  | 
||
226  | 
lemma "EX! P. P"  | 
|
227  | 
refute  | 
|
228  | 
apply auto  | 
|
229  | 
done  | 
|
230  | 
||
231  | 
lemma "EX! P. P x"  | 
|
232  | 
refute  | 
|
233  | 
oops  | 
|
234  | 
||
235  | 
lemma "P Q | Q x"  | 
|
236  | 
refute  | 
|
237  | 
oops  | 
|
238  | 
||
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
239  | 
lemma "x \<noteq> All"  | 
| 14455 | 240  | 
refute  | 
241  | 
oops  | 
|
242  | 
||
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
243  | 
lemma "x \<noteq> Ex"  | 
| 14455 | 244  | 
refute  | 
245  | 
oops  | 
|
246  | 
||
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
247  | 
lemma "x \<noteq> Ex1"  | 
| 14455 | 248  | 
refute  | 
249  | 
oops  | 
|
250  | 
||
| 14350 | 251  | 
text {* "The transitive closure 'T' of an arbitrary relation 'P' is non-empty." *}
 | 
252  | 
||
253  | 
constdefs  | 
|
254  | 
  "trans" :: "('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> bool"
 | 
|
255  | 
"trans P == (ALL x y z. P x y \<longrightarrow> P y z \<longrightarrow> P x z)"  | 
|
256  | 
  "subset" :: "('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> bool"
 | 
|
257  | 
"subset P Q == (ALL x y. P x y \<longrightarrow> Q x y)"  | 
|
258  | 
  "trans_closure" :: "('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> bool"
 | 
|
259  | 
"trans_closure P Q == (subset Q P) & (trans P) & (ALL R. subset Q R \<longrightarrow> trans R \<longrightarrow> subset P R)"  | 
|
260  | 
||
261  | 
lemma "trans_closure T P \<longrightarrow> (\<exists>x y. T x y)"  | 
|
262  | 
refute  | 
|
263  | 
oops  | 
|
264  | 
||
265  | 
text {* "The union of transitive closures is equal to the transitive closure of unions." *}
 | 
|
266  | 
||
267  | 
lemma "(\<forall>x y. (P x y | R x y) \<longrightarrow> T x y) \<longrightarrow> trans T \<longrightarrow> (\<forall>Q. (\<forall>x y. (P x y | R x y) \<longrightarrow> Q x y) \<longrightarrow> trans Q \<longrightarrow> subset T Q)  | 
|
268  | 
\<longrightarrow> trans_closure TP P  | 
|
269  | 
\<longrightarrow> trans_closure TR R  | 
|
270  | 
\<longrightarrow> (T x y = (TP x y | TR x y))"  | 
|
| 16910 | 271  | 
refute  | 
| 14350 | 272  | 
oops  | 
273  | 
||
274  | 
text {* "Every surjective function is invertible." *}
 | 
|
275  | 
||
276  | 
lemma "(\<forall>y. \<exists>x. y = f x) \<longrightarrow> (\<exists>g. \<forall>x. g (f x) = x)"  | 
|
277  | 
refute  | 
|
278  | 
oops  | 
|
279  | 
||
280  | 
text {* "Every invertible function is surjective." *}
 | 
|
281  | 
||
282  | 
lemma "(\<exists>g. \<forall>x. g (f x) = x) \<longrightarrow> (\<forall>y. \<exists>x. y = f x)"  | 
|
283  | 
refute  | 
|
284  | 
oops  | 
|
285  | 
||
286  | 
text {* Every point is a fixed point of some function. *}
 | 
|
287  | 
||
288  | 
lemma "\<exists>f. f x = x"  | 
|
| 14809 | 289  | 
refute [maxsize=4]  | 
| 14350 | 290  | 
apply (rule_tac x="\<lambda>x. x" in exI)  | 
291  | 
apply simp  | 
|
292  | 
done  | 
|
293  | 
||
| 14465 | 294  | 
text {* Axiom of Choice: first an incorrect version ... *}
 | 
| 14350 | 295  | 
|
296  | 
lemma "(\<forall>x. \<exists>y. P x y) \<longrightarrow> (EX!f. \<forall>x. P x (f x))"  | 
|
297  | 
refute  | 
|
298  | 
oops  | 
|
299  | 
||
| 14465 | 300  | 
text {* ... and now two correct ones *}
 | 
| 14350 | 301  | 
|
302  | 
lemma "(\<forall>x. \<exists>y. P x y) \<longrightarrow> (\<exists>f. \<forall>x. P x (f x))"  | 
|
| 14809 | 303  | 
refute [maxsize=4]  | 
| 14350 | 304  | 
apply (simp add: choice)  | 
305  | 
done  | 
|
306  | 
||
307  | 
lemma "(\<forall>x. EX!y. P x y) \<longrightarrow> (EX!f. \<forall>x. P x (f x))"  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
308  | 
refute [maxsize=2]  | 
| 14350 | 309  | 
apply auto  | 
310  | 
apply (simp add: ex1_implies_ex choice)  | 
|
311  | 
apply (fast intro: ext)  | 
|
312  | 
done  | 
|
313  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
314  | 
(*****************************************************************************)  | 
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
315  | 
|
| 23219 | 316  | 
subsubsection {* Meta-logic *}
 | 
| 14350 | 317  | 
|
318  | 
lemma "!!x. P x"  | 
|
319  | 
refute  | 
|
320  | 
oops  | 
|
321  | 
||
322  | 
lemma "f x == g x"  | 
|
323  | 
refute  | 
|
324  | 
oops  | 
|
325  | 
||
326  | 
lemma "P \<Longrightarrow> Q"  | 
|
327  | 
refute  | 
|
328  | 
oops  | 
|
329  | 
||
330  | 
lemma "\<lbrakk> P; Q; R \<rbrakk> \<Longrightarrow> S"  | 
|
331  | 
refute  | 
|
332  | 
oops  | 
|
333  | 
||
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
334  | 
lemma "(x == all) \<Longrightarrow> False"  | 
| 
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
335  | 
refute  | 
| 
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
336  | 
oops  | 
| 
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
337  | 
|
| 
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
338  | 
lemma "(x == (op ==)) \<Longrightarrow> False"  | 
| 
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
339  | 
refute  | 
| 
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
340  | 
oops  | 
| 
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
341  | 
|
| 
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
342  | 
lemma "(x == (op \<Longrightarrow>)) \<Longrightarrow> False"  | 
| 
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
343  | 
refute  | 
| 
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
344  | 
oops  | 
| 
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
345  | 
|
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
346  | 
(*****************************************************************************)  | 
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
347  | 
|
| 23219 | 348  | 
subsubsection {* Schematic variables *}
 | 
| 14350 | 349  | 
|
350  | 
lemma "?P"  | 
|
351  | 
refute  | 
|
352  | 
apply auto  | 
|
353  | 
done  | 
|
354  | 
||
355  | 
lemma "x = ?y"  | 
|
356  | 
refute  | 
|
357  | 
apply auto  | 
|
358  | 
done  | 
|
359  | 
||
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
360  | 
(******************************************************************************)  | 
| 
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
361  | 
|
| 23219 | 362  | 
subsubsection {* Abstractions *}
 | 
| 14350 | 363  | 
|
364  | 
lemma "(\<lambda>x. x) = (\<lambda>x. y)"  | 
|
365  | 
refute  | 
|
366  | 
oops  | 
|
367  | 
||
368  | 
lemma "(\<lambda>f. f x) = (\<lambda>f. True)"  | 
|
369  | 
refute  | 
|
370  | 
oops  | 
|
371  | 
||
372  | 
lemma "(\<lambda>x. x) = (\<lambda>y. y)"  | 
|
373  | 
refute  | 
|
374  | 
apply simp  | 
|
375  | 
done  | 
|
376  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
377  | 
(*****************************************************************************)  | 
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
378  | 
|
| 23219 | 379  | 
subsubsection {* Sets *}
 | 
| 14350 | 380  | 
|
381  | 
lemma "P (A::'a set)"  | 
|
382  | 
refute  | 
|
383  | 
oops  | 
|
384  | 
||
385  | 
lemma "P (A::'a set set)"  | 
|
386  | 
refute  | 
|
387  | 
oops  | 
|
388  | 
||
389  | 
lemma "{x. P x} = {y. P y}"
 | 
|
| 14489 | 390  | 
refute  | 
| 14350 | 391  | 
apply simp  | 
392  | 
done  | 
|
393  | 
||
394  | 
lemma "x : {x. P x}"
 | 
|
395  | 
refute  | 
|
396  | 
oops  | 
|
397  | 
||
| 14455 | 398  | 
lemma "P op:"  | 
399  | 
refute  | 
|
400  | 
oops  | 
|
401  | 
||
402  | 
lemma "P (op: x)"  | 
|
403  | 
refute  | 
|
404  | 
oops  | 
|
405  | 
||
406  | 
lemma "P Collect"  | 
|
407  | 
refute  | 
|
408  | 
oops  | 
|
409  | 
||
| 14350 | 410  | 
lemma "A Un B = A Int B"  | 
411  | 
refute  | 
|
412  | 
oops  | 
|
413  | 
||
414  | 
lemma "(A Int B) Un C = (A Un C) Int B"  | 
|
415  | 
refute  | 
|
416  | 
oops  | 
|
417  | 
||
418  | 
lemma "Ball A P \<longrightarrow> Bex A P"  | 
|
| 14455 | 419  | 
refute  | 
420  | 
oops  | 
|
421  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
422  | 
(*****************************************************************************)  | 
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
423  | 
|
| 23219 | 424  | 
subsubsection {* arbitrary *}
 | 
| 14455 | 425  | 
|
426  | 
lemma "arbitrary"  | 
|
427  | 
refute  | 
|
428  | 
oops  | 
|
429  | 
||
430  | 
lemma "P arbitrary"  | 
|
431  | 
refute  | 
|
432  | 
oops  | 
|
433  | 
||
434  | 
lemma "arbitrary x"  | 
|
435  | 
refute  | 
|
436  | 
oops  | 
|
437  | 
||
438  | 
lemma "arbitrary arbitrary"  | 
|
439  | 
refute  | 
|
440  | 
oops  | 
|
441  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
442  | 
(*****************************************************************************)  | 
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
443  | 
|
| 23219 | 444  | 
subsubsection {* The *}
 | 
| 14455 | 445  | 
|
446  | 
lemma "The P"  | 
|
447  | 
refute  | 
|
448  | 
oops  | 
|
449  | 
||
450  | 
lemma "P The"  | 
|
| 14350 | 451  | 
refute  | 
452  | 
oops  | 
|
453  | 
||
| 14455 | 454  | 
lemma "P (The P)"  | 
455  | 
refute  | 
|
456  | 
oops  | 
|
457  | 
||
458  | 
lemma "(THE x. x=y) = z"  | 
|
459  | 
refute  | 
|
460  | 
oops  | 
|
461  | 
||
462  | 
lemma "Ex P \<longrightarrow> P (The P)"  | 
|
| 14489 | 463  | 
refute  | 
| 14455 | 464  | 
oops  | 
465  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
466  | 
(*****************************************************************************)  | 
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
467  | 
|
| 23219 | 468  | 
subsubsection {* Eps *}
 | 
| 14455 | 469  | 
|
470  | 
lemma "Eps P"  | 
|
471  | 
refute  | 
|
472  | 
oops  | 
|
473  | 
||
474  | 
lemma "P Eps"  | 
|
475  | 
refute  | 
|
476  | 
oops  | 
|
477  | 
||
478  | 
lemma "P (Eps P)"  | 
|
479  | 
refute  | 
|
480  | 
oops  | 
|
481  | 
||
482  | 
lemma "(SOME x. x=y) = z"  | 
|
483  | 
refute  | 
|
484  | 
oops  | 
|
485  | 
||
486  | 
lemma "Ex P \<longrightarrow> P (Eps P)"  | 
|
| 14489 | 487  | 
refute [maxsize=3]  | 
| 14455 | 488  | 
apply (auto simp add: someI)  | 
489  | 
done  | 
|
490  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
491  | 
(*****************************************************************************)  | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
492  | 
|
| 23219 | 493  | 
subsubsection {* Subtypes (typedef), typedecl *}
 | 
| 14809 | 494  | 
|
| 15161 | 495  | 
text {* A completely unspecified non-empty subset of @{typ "'a"}: *}
 | 
496  | 
||
| 14809 | 497  | 
typedef 'a myTdef = "insert (arbitrary::'a) (arbitrary::'a set)"  | 
498  | 
by auto  | 
|
499  | 
||
500  | 
lemma "(x::'a myTdef) = y"  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
501  | 
refute  | 
| 14809 | 502  | 
oops  | 
503  | 
||
504  | 
typedecl myTdecl  | 
|
505  | 
||
506  | 
typedef 'a T_bij = "{(f::'a\<Rightarrow>'a). \<forall>y. \<exists>!x. f x = y}"
 | 
|
507  | 
by auto  | 
|
508  | 
||
509  | 
lemma "P (f::(myTdecl myTdef) T_bij)"  | 
|
510  | 
refute  | 
|
511  | 
oops  | 
|
512  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
513  | 
(*****************************************************************************)  | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
514  | 
|
| 23219 | 515  | 
subsubsection {* Inductive datatypes *}
 | 
| 14350 | 516  | 
|
| 21502 | 517  | 
text {* With @{text quick_and_dirty} set, the datatype package does
 | 
518  | 
not generate certain axioms for recursion operators. Without these  | 
|
519  | 
axioms, refute may find spurious countermodels. *}  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
520  | 
|
| 25031 | 521  | 
(*  | 
522  | 
ML {* reset quick_and_dirty; *}
 | 
|
523  | 
*)  | 
|
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
524  | 
|
| 23219 | 525  | 
text {* unit *}
 | 
| 14350 | 526  | 
|
527  | 
lemma "P (x::unit)"  | 
|
528  | 
refute  | 
|
529  | 
oops  | 
|
530  | 
||
531  | 
lemma "\<forall>x::unit. P x"  | 
|
532  | 
refute  | 
|
533  | 
oops  | 
|
534  | 
||
535  | 
lemma "P ()"  | 
|
536  | 
refute  | 
|
537  | 
oops  | 
|
538  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
539  | 
lemma "unit_rec u x = u"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
540  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
541  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
542  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
543  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
544  | 
lemma "P (unit_rec u x)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
545  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
546  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
547  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
548  | 
lemma "P (case x of () \<Rightarrow> u)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
549  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
550  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
551  | 
|
| 23219 | 552  | 
text {* option *}
 | 
| 14455 | 553  | 
|
554  | 
lemma "P (x::'a option)"  | 
|
555  | 
refute  | 
|
556  | 
oops  | 
|
557  | 
||
558  | 
lemma "\<forall>x::'a option. P x"  | 
|
559  | 
refute  | 
|
560  | 
oops  | 
|
561  | 
||
| 14809 | 562  | 
lemma "P None"  | 
563  | 
refute  | 
|
564  | 
oops  | 
|
565  | 
||
| 14455 | 566  | 
lemma "P (Some x)"  | 
567  | 
refute  | 
|
568  | 
oops  | 
|
569  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
570  | 
lemma "option_rec n s None = n"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
571  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
572  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
573  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
574  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
575  | 
lemma "option_rec n s (Some x) = s x"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
576  | 
refute [maxsize=4]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
577  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
578  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
579  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
580  | 
lemma "P (option_rec n s x)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
581  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
582  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
583  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
584  | 
lemma "P (case x of None \<Rightarrow> n | Some u \<Rightarrow> s u)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
585  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
586  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
587  | 
|
| 23219 | 588  | 
text {* * *}
 | 
| 14350 | 589  | 
|
590  | 
lemma "P (x::'a*'b)"  | 
|
| 14455 | 591  | 
refute  | 
| 14350 | 592  | 
oops  | 
593  | 
||
594  | 
lemma "\<forall>x::'a*'b. P x"  | 
|
| 14455 | 595  | 
refute  | 
| 14350 | 596  | 
oops  | 
597  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
598  | 
lemma "P (x, y)"  | 
| 14455 | 599  | 
refute  | 
| 14350 | 600  | 
oops  | 
601  | 
||
602  | 
lemma "P (fst x)"  | 
|
| 14455 | 603  | 
refute  | 
| 14350 | 604  | 
oops  | 
605  | 
||
606  | 
lemma "P (snd x)"  | 
|
| 14455 | 607  | 
refute  | 
608  | 
oops  | 
|
609  | 
||
610  | 
lemma "P Pair"  | 
|
611  | 
refute  | 
|
| 14350 | 612  | 
oops  | 
613  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
614  | 
lemma "prod_rec p (a, b) = p a b"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
615  | 
refute [maxsize=2]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
616  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
617  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
618  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
619  | 
lemma "P (prod_rec p x)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
620  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
621  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
622  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
623  | 
lemma "P (case x of Pair a b \<Rightarrow> p a b)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
624  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
625  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
626  | 
|
| 23219 | 627  | 
text {* + *}
 | 
| 14350 | 628  | 
|
629  | 
lemma "P (x::'a+'b)"  | 
|
| 14455 | 630  | 
refute  | 
| 14350 | 631  | 
oops  | 
632  | 
||
633  | 
lemma "\<forall>x::'a+'b. P x"  | 
|
| 14455 | 634  | 
refute  | 
| 14350 | 635  | 
oops  | 
636  | 
||
637  | 
lemma "P (Inl x)"  | 
|
| 14455 | 638  | 
refute  | 
| 14350 | 639  | 
oops  | 
640  | 
||
641  | 
lemma "P (Inr x)"  | 
|
| 14455 | 642  | 
refute  | 
643  | 
oops  | 
|
644  | 
||
645  | 
lemma "P Inl"  | 
|
646  | 
refute  | 
|
| 14350 | 647  | 
oops  | 
648  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
649  | 
lemma "sum_rec l r (Inl x) = l x"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
650  | 
refute [maxsize=3]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
651  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
652  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
653  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
654  | 
lemma "sum_rec l r (Inr x) = r x"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
655  | 
refute [maxsize=3]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
656  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
657  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
658  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
659  | 
lemma "P (sum_rec l r x)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
660  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
661  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
662  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
663  | 
lemma "P (case x of Inl a \<Rightarrow> l a | Inr b \<Rightarrow> r b)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
664  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
665  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
666  | 
|
| 23219 | 667  | 
text {* Non-recursive datatypes *}
 | 
| 14350 | 668  | 
|
| 14455 | 669  | 
datatype T1 = A | B  | 
| 14350 | 670  | 
|
671  | 
lemma "P (x::T1)"  | 
|
672  | 
refute  | 
|
673  | 
oops  | 
|
674  | 
||
675  | 
lemma "\<forall>x::T1. P x"  | 
|
676  | 
refute  | 
|
677  | 
oops  | 
|
678  | 
||
| 14455 | 679  | 
lemma "P A"  | 
| 14350 | 680  | 
refute  | 
681  | 
oops  | 
|
682  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
683  | 
lemma "P B"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
684  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
685  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
686  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
687  | 
lemma "T1_rec a b A = a"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
688  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
689  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
690  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
691  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
692  | 
lemma "T1_rec a b B = b"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
693  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
694  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
695  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
696  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
697  | 
lemma "P (T1_rec a b x)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
698  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
699  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
700  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
701  | 
lemma "P (case x of A \<Rightarrow> a | B \<Rightarrow> b)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
702  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
703  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
704  | 
|
| 14455 | 705  | 
datatype 'a T2 = C T1 | D 'a  | 
706  | 
||
707  | 
lemma "P (x::'a T2)"  | 
|
| 14350 | 708  | 
refute  | 
709  | 
oops  | 
|
710  | 
||
| 14455 | 711  | 
lemma "\<forall>x::'a T2. P x"  | 
| 14350 | 712  | 
refute  | 
713  | 
oops  | 
|
714  | 
||
| 14455 | 715  | 
lemma "P D"  | 
| 14350 | 716  | 
refute  | 
717  | 
oops  | 
|
718  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
719  | 
lemma "T2_rec c d (C x) = c x"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
720  | 
refute [maxsize=4]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
721  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
722  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
723  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
724  | 
lemma "T2_rec c d (D x) = d x"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
725  | 
refute [maxsize=4]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
726  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
727  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
728  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
729  | 
lemma "P (T2_rec c d x)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
730  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
731  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
732  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
733  | 
lemma "P (case x of C u \<Rightarrow> c u | D v \<Rightarrow> d v)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
734  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
735  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
736  | 
|
| 14455 | 737  | 
datatype ('a,'b) T3 = E "'a \<Rightarrow> 'b"
 | 
738  | 
||
| 14809 | 739  | 
lemma "P (x::('a,'b) T3)"
 | 
740  | 
refute  | 
|
741  | 
oops  | 
|
742  | 
||
743  | 
lemma "\<forall>x::('a,'b) T3. P x"
 | 
|
744  | 
refute  | 
|
745  | 
oops  | 
|
746  | 
||
| 14455 | 747  | 
lemma "P E"  | 
748  | 
refute  | 
|
| 14350 | 749  | 
oops  | 
750  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
751  | 
lemma "T3_rec e (E x) = e x"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
752  | 
refute [maxsize=2]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
753  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
754  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
755  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
756  | 
lemma "P (T3_rec e x)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
757  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
758  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
759  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
760  | 
lemma "P (case x of E f \<Rightarrow> e f)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
761  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
762  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
763  | 
|
| 23219 | 764  | 
text {* Recursive datatypes *}
 | 
| 14350 | 765  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
766  | 
text {* nat *}
 | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
767  | 
|
| 14809 | 768  | 
lemma "P (x::nat)"  | 
769  | 
refute  | 
|
770  | 
oops  | 
|
| 14350 | 771  | 
|
| 14809 | 772  | 
lemma "\<forall>x::nat. P x"  | 
773  | 
refute  | 
|
| 14350 | 774  | 
oops  | 
775  | 
||
| 14809 | 776  | 
lemma "P (Suc 0)"  | 
777  | 
refute  | 
|
| 14350 | 778  | 
oops  | 
779  | 
||
| 14809 | 780  | 
lemma "P Suc"  | 
781  | 
  refute  -- {* @{term "Suc"} is a partial function (regardless of the size
 | 
|
782  | 
                of the model), hence @{term "P Suc"} is undefined, hence no
 | 
|
783  | 
model will be found *}  | 
|
| 14350 | 784  | 
oops  | 
785  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
786  | 
lemma "nat_rec zero suc 0 = zero"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
787  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
788  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
789  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
790  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
791  | 
lemma "nat_rec zero suc (Suc x) = suc x (nat_rec zero suc x)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
792  | 
refute [maxsize=2]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
793  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
794  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
795  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
796  | 
lemma "P (nat_rec zero suc x)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
797  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
798  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
799  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
800  | 
lemma "P (case x of 0 \<Rightarrow> zero | Suc n \<Rightarrow> suc n)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
801  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
802  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
803  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
804  | 
text {* 'a list *}
 | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
805  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
806  | 
lemma "P (xs::'a list)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
807  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
808  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
809  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
810  | 
lemma "\<forall>xs::'a list. P xs"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
811  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
812  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
813  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
814  | 
lemma "P [x, y]"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
815  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
816  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
817  | 
|
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
818  | 
lemma "list_rec nil cons [] = nil"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
819  | 
refute [maxsize=3]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
820  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
821  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
822  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
823  | 
lemma "list_rec nil cons (x#xs) = cons x xs (list_rec nil cons xs)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
824  | 
refute [maxsize=2]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
825  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
826  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
827  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
828  | 
lemma "P (list_rec nil cons xs)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
829  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
830  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
831  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
832  | 
lemma "P (case x of Nil \<Rightarrow> nil | Cons a b \<Rightarrow> cons a b)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
833  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
834  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
835  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
836  | 
lemma "(xs::'a list) = ys"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
837  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
838  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
839  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
840  | 
lemma "a # xs = b # xs"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
841  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
842  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
843  | 
|
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
844  | 
datatype BitList = BitListNil | Bit0 BitList | Bit1 BitList  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
845  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
846  | 
lemma "P (x::BitList)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
847  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
848  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
849  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
850  | 
lemma "\<forall>x::BitList. P x"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
851  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
852  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
853  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
854  | 
lemma "P (Bit0 (Bit1 BitListNil))"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
855  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
856  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
857  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
858  | 
lemma "BitList_rec nil bit0 bit1 BitListNil = nil"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
859  | 
refute [maxsize=4]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
860  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
861  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
862  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
863  | 
lemma "BitList_rec nil bit0 bit1 (Bit0 xs) = bit0 xs (BitList_rec nil bit0 bit1 xs)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
864  | 
refute [maxsize=2]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
865  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
866  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
867  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
868  | 
lemma "BitList_rec nil bit0 bit1 (Bit1 xs) = bit1 xs (BitList_rec nil bit0 bit1 xs)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
869  | 
refute [maxsize=2]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
870  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
871  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
872  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
873  | 
lemma "P (BitList_rec nil bit0 bit1 x)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
874  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
875  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
876  | 
|
| 14350 | 877  | 
datatype 'a BinTree = Leaf 'a | Node "'a BinTree" "'a BinTree"  | 
878  | 
||
879  | 
lemma "P (x::'a BinTree)"  | 
|
| 14809 | 880  | 
refute  | 
| 14350 | 881  | 
oops  | 
882  | 
||
883  | 
lemma "\<forall>x::'a BinTree. P x"  | 
|
| 14809 | 884  | 
refute  | 
885  | 
oops  | 
|
886  | 
||
887  | 
lemma "P (Node (Leaf x) (Leaf y))"  | 
|
888  | 
refute  | 
|
| 14350 | 889  | 
oops  | 
890  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
891  | 
lemma "BinTree_rec l n (Leaf x) = l x"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
892  | 
refute [maxsize=1] (* The "maxsize=1" tests are a bit pointless: for some formulae  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
893  | 
below, refute will find no countermodel simply because this  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
894  | 
size makes involved terms undefined. Unfortunately, any  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
895  | 
larger size already takes too long. *)  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
896  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
897  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
898  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
899  | 
lemma "BinTree_rec l n (Node x y) = n x y (BinTree_rec l n x) (BinTree_rec l n y)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
900  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
901  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
902  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
903  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
904  | 
lemma "P (BinTree_rec l n x)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
905  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
906  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
907  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
908  | 
lemma "P (case x of Leaf a \<Rightarrow> l a | Node a b \<Rightarrow> n a b)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
909  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
910  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
911  | 
|
| 23219 | 912  | 
text {* Mutually recursive datatypes *}
 | 
| 14350 | 913  | 
|
914  | 
datatype 'a aexp = Number 'a | ITE "'a bexp" "'a aexp" "'a aexp"  | 
|
915  | 
and 'a bexp = Equal "'a aexp" "'a aexp"  | 
|
916  | 
||
917  | 
lemma "P (x::'a aexp)"  | 
|
| 14809 | 918  | 
refute  | 
| 14350 | 919  | 
oops  | 
920  | 
||
921  | 
lemma "\<forall>x::'a aexp. P x"  | 
|
| 14809 | 922  | 
refute  | 
| 14350 | 923  | 
oops  | 
924  | 
||
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
925  | 
lemma "P (ITE (Equal (Number x) (Number y)) (Number x) (Number y))"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
926  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
927  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
928  | 
|
| 14350 | 929  | 
lemma "P (x::'a bexp)"  | 
| 14809 | 930  | 
refute  | 
| 14350 | 931  | 
oops  | 
932  | 
||
933  | 
lemma "\<forall>x::'a bexp. P x"  | 
|
| 14809 | 934  | 
refute  | 
| 14350 | 935  | 
oops  | 
936  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
937  | 
lemma "aexp_bexp_rec_1 number ite equal (Number x) = number x"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
938  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
939  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
940  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
941  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
942  | 
lemma "aexp_bexp_rec_1 number ite equal (ITE x y z) = ite x y z (aexp_bexp_rec_2 number ite equal x) (aexp_bexp_rec_1 number ite equal y) (aexp_bexp_rec_1 number ite equal z)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
943  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
944  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
945  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
946  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
947  | 
lemma "P (aexp_bexp_rec_1 number ite equal x)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
948  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
949  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
950  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
951  | 
lemma "P (case x of Number a \<Rightarrow> number a | ITE b a1 a2 \<Rightarrow> ite b a1 a2)"  | 
| 14809 | 952  | 
refute  | 
| 14350 | 953  | 
oops  | 
954  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
955  | 
lemma "aexp_bexp_rec_2 number ite equal (Equal x y) = equal x y (aexp_bexp_rec_1 number ite equal x) (aexp_bexp_rec_1 number ite equal y)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
956  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
957  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
958  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
959  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
960  | 
lemma "P (aexp_bexp_rec_2 number ite equal x)"  | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
961  | 
refute  | 
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
962  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
963  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
964  | 
lemma "P (case x of Equal a1 a2 \<Rightarrow> equal a1 a2)"  | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
965  | 
refute  | 
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
966  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
967  | 
|
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
968  | 
datatype X = A | B X | C Y  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
969  | 
and Y = D X | E Y | F  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
970  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
971  | 
lemma "P (x::X)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
972  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
973  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
974  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
975  | 
lemma "P (y::Y)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
976  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
977  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
978  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
979  | 
lemma "P (B (B A))"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
980  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
981  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
982  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
983  | 
lemma "P (B (C F))"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
984  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
985  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
986  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
987  | 
lemma "P (C (D A))"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
988  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
989  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
990  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
991  | 
lemma "P (C (E F))"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
992  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
993  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
994  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
995  | 
lemma "P (D (B A))"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
996  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
997  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
998  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
999  | 
lemma "P (D (C F))"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1000  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1001  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1002  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1003  | 
lemma "P (E (D A))"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1004  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1005  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1006  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1007  | 
lemma "P (E (E F))"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1008  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1009  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1010  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1011  | 
lemma "P (C (D (C F)))"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1012  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1013  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1014  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1015  | 
lemma "X_Y_rec_1 a b c d e f A = a"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1016  | 
refute [maxsize=3]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1017  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1018  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1019  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1020  | 
lemma "X_Y_rec_1 a b c d e f (B x) = b x (X_Y_rec_1 a b c d e f x)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1021  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1022  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1023  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1024  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1025  | 
lemma "X_Y_rec_1 a b c d e f (C y) = c y (X_Y_rec_2 a b c d e f y)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1026  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1027  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1028  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1029  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1030  | 
lemma "X_Y_rec_2 a b c d e f (D x) = d x (X_Y_rec_1 a b c d e f x)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1031  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1032  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1033  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1034  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1035  | 
lemma "X_Y_rec_2 a b c d e f (E y) = e y (X_Y_rec_2 a b c d e f y)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1036  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1037  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1038  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1039  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1040  | 
lemma "X_Y_rec_2 a b c d e f F = f"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1041  | 
refute [maxsize=3]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1042  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1043  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1044  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1045  | 
lemma "P (X_Y_rec_1 a b c d e f x)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1046  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1047  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1048  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1049  | 
lemma "P (X_Y_rec_2 a b c d e f y)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1050  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1051  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1052  | 
|
| 23219 | 1053  | 
text {* Other datatype examples *}
 | 
| 14350 | 1054  | 
|
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1055  | 
text {* Indirect recursion is implemented via mutual recursion. *}
 | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1056  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1057  | 
datatype XOpt = CX "XOpt option" | DX "bool \<Rightarrow> XOpt option"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1058  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1059  | 
lemma "P (x::XOpt)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1060  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1061  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1062  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1063  | 
lemma "P (CX None)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1064  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1065  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1066  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1067  | 
lemma "P (CX (Some (CX None)))"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1068  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1069  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1070  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1071  | 
lemma "XOpt_rec_1 cx dx n1 s1 n2 s2 (CX x) = cx x (XOpt_rec_2 cx dx n1 s1 n2 s2 x)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1072  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1073  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1074  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1075  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1076  | 
lemma "XOpt_rec_1 cx dx n1 s1 n2 s2 (DX x) = dx x (\<lambda>b. XOpt_rec_3 cx dx n1 s1 n2 s2 (x b))"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1077  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1078  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1079  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1080  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1081  | 
lemma "XOpt_rec_2 cx dx n1 s1 n2 s2 None = n1"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1082  | 
refute [maxsize=2]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1083  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1084  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1085  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1086  | 
lemma "XOpt_rec_2 cx dx n1 s1 n2 s2 (Some x) = s1 x (XOpt_rec_1 cx dx n1 s1 n2 s2 x)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1087  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1088  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1089  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1090  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1091  | 
lemma "XOpt_rec_3 cx dx n1 s1 n2 s2 None = n2"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1092  | 
refute [maxsize=2]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1093  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1094  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1095  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1096  | 
lemma "XOpt_rec_3 cx dx n1 s1 n2 s2 (Some x) = s2 x (XOpt_rec_1 cx dx n1 s1 n2 s2 x)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1097  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1098  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1099  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1100  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1101  | 
lemma "P (XOpt_rec_1 cx dx n1 s1 n2 s2 x)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1102  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1103  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1104  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1105  | 
lemma "P (XOpt_rec_2 cx dx n1 s1 n2 s2 x)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1106  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1107  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1108  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1109  | 
lemma "P (XOpt_rec_3 cx dx n1 s1 n2 s2 x)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1110  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1111  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1112  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1113  | 
datatype 'a YOpt = CY "('a \<Rightarrow> 'a YOpt) option"
 | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1114  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1115  | 
lemma "P (x::'a YOpt)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1116  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1117  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1118  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1119  | 
lemma "P (CY None)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1120  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1121  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1122  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1123  | 
lemma "P (CY (Some (\<lambda>a. CY None)))"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1124  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1125  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1126  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1127  | 
lemma "YOpt_rec_1 cy n s (CY x) = cy x (YOpt_rec_2 cy n s x)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1128  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1129  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1130  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1131  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1132  | 
lemma "YOpt_rec_2 cy n s None = n"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1133  | 
refute [maxsize=2]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1134  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1135  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1136  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1137  | 
lemma "YOpt_rec_2 cy n s (Some x) = s x (\<lambda>a. YOpt_rec_1 cy n s (x a))"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1138  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1139  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1140  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1141  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1142  | 
lemma "P (YOpt_rec_1 cy n s x)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1143  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1144  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1145  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1146  | 
lemma "P (YOpt_rec_2 cy n s x)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1147  | 
refute  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1148  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1149  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1150  | 
datatype Trie = TR "Trie list"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1151  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1152  | 
lemma "P (x::Trie)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1153  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1154  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1155  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1156  | 
lemma "\<forall>x::Trie. P x"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1157  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1158  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1159  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1160  | 
lemma "P (TR [TR []])"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1161  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1162  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1163  | 
|
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1164  | 
lemma "Trie_rec_1 tr nil cons (TR x) = tr x (Trie_rec_2 tr nil cons x)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1165  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1166  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1167  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1168  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1169  | 
lemma "Trie_rec_2 tr nil cons [] = nil"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1170  | 
refute [maxsize=3]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1171  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1172  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1173  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1174  | 
lemma "Trie_rec_2 tr nil cons (x#xs) = cons x xs (Trie_rec_1 tr nil cons x) (Trie_rec_2 tr nil cons xs)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1175  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1176  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1177  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1178  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1179  | 
lemma "P (Trie_rec_1 tr nil cons x)"  | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1180  | 
refute  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1181  | 
oops  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1182  | 
|
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1183  | 
lemma "P (Trie_rec_2 tr nil cons x)"  | 
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1184  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1185  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1186  | 
|
| 14809 | 1187  | 
datatype InfTree = Leaf | Node "nat \<Rightarrow> InfTree"  | 
| 14350 | 1188  | 
|
1189  | 
lemma "P (x::InfTree)"  | 
|
| 14809 | 1190  | 
refute  | 
| 14350 | 1191  | 
oops  | 
1192  | 
||
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1193  | 
lemma "\<forall>x::InfTree. P x"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1194  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1195  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1196  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1197  | 
lemma "P (Node (\<lambda>n. Leaf))"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1198  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1199  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1200  | 
|
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1201  | 
lemma "InfTree_rec leaf node Leaf = leaf"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1202  | 
refute [maxsize=2]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1203  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1204  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1205  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1206  | 
lemma "InfTree_rec leaf node (Node x) = node x (\<lambda>n. InfTree_rec leaf node (x n))"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1207  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1208  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1209  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1210  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1211  | 
lemma "P (InfTree_rec leaf node x)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1212  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1213  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1214  | 
|
| 14350 | 1215  | 
datatype 'a lambda = Var 'a | App "'a lambda" "'a lambda" | Lam "'a \<Rightarrow> 'a lambda"  | 
1216  | 
||
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1217  | 
lemma "P (x::'a lambda)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1218  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1219  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1220  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1221  | 
lemma "\<forall>x::'a lambda. P x"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1222  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1223  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1224  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1225  | 
lemma "P (Lam (\<lambda>a. Var a))"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1226  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1227  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1228  | 
|
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1229  | 
lemma "lambda_rec var app lam (Var x) = var x"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1230  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1231  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1232  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1233  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1234  | 
lemma "lambda_rec var app lam (App x y) = app x y (lambda_rec var app lam x) (lambda_rec var app lam y)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1235  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1236  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1237  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1238  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1239  | 
lemma "lambda_rec var app lam (Lam x) = lam x (\<lambda>a. lambda_rec var app lam (x a))"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1240  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1241  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1242  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1243  | 
|
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1244  | 
lemma "P (lambda_rec v a l x)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1245  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1246  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1247  | 
|
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1248  | 
text {* Taken from "Inductive datatypes in HOL", p.8: *}
 | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1249  | 
|
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1250  | 
datatype ('a, 'b) T = C "'a \<Rightarrow> bool" | D "'b list"
 | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1251  | 
datatype 'c U = E "('c, 'c U) T"
 | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1252  | 
|
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1253  | 
lemma "P (x::'c U)"  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1254  | 
refute  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1255  | 
oops  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1256  | 
|
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1257  | 
lemma "\<forall>x::'c U. P x"  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1258  | 
refute  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1259  | 
oops  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1260  | 
|
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1261  | 
lemma "P (E (C (\<lambda>a. True)))"  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1262  | 
refute  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1263  | 
oops  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1264  | 
|
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1265  | 
lemma "U_rec_1 e c d nil cons (E x) = e x (U_rec_2 e c d nil cons x)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1266  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1267  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1268  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1269  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1270  | 
lemma "U_rec_2 e c d nil cons (C x) = c x"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1271  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1272  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1273  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1274  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1275  | 
lemma "U_rec_2 e c d nil cons (D x) = d x (U_rec_3 e c d nil cons x)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1276  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1277  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1278  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1279  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1280  | 
lemma "U_rec_3 e c d nil cons [] = nil"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1281  | 
refute [maxsize=2]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1282  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1283  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1284  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1285  | 
lemma "U_rec_3 e c d nil cons (x#xs) = cons x xs (U_rec_1 e c d nil cons x) (U_rec_3 e c d nil cons xs)"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1286  | 
refute [maxsize=1]  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1287  | 
apply simp  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1288  | 
done  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1289  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1290  | 
lemma "P (U_rec_1 e c d nil cons x)"  | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1291  | 
refute  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1292  | 
oops  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1293  | 
|
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1294  | 
lemma "P (U_rec_2 e c d nil cons x)"  | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1295  | 
refute  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1296  | 
oops  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1297  | 
|
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1298  | 
lemma "P (U_rec_3 e c d nil cons x)"  | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1299  | 
refute  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1300  | 
oops  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1301  | 
|
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1302  | 
(*****************************************************************************)  | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1303  | 
|
| 23219 | 1304  | 
subsubsection {* Records *}
 | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1305  | 
|
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1306  | 
(*TODO: make use of pair types, rather than typedef, for record types*)  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1307  | 
|
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1308  | 
record ('a, 'b) point =
 | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1309  | 
xpos :: 'a  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1310  | 
ypos :: 'b  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1311  | 
|
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1312  | 
lemma "(x::('a, 'b) point) = y"
 | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1313  | 
refute  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1314  | 
oops  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1315  | 
|
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1316  | 
record ('a, 'b, 'c) extpoint = "('a, 'b) point" +
 | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1317  | 
ext :: 'c  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1318  | 
|
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1319  | 
lemma "(x::('a, 'b, 'c) extpoint) = y"
 | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1320  | 
refute  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1321  | 
oops  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1322  | 
|
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1323  | 
(*****************************************************************************)  | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1324  | 
|
| 23219 | 1325  | 
subsubsection {* Inductively defined sets *}
 | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1326  | 
|
| 23778 | 1327  | 
inductive_set arbitrarySet :: "'a set"  | 
1328  | 
where  | 
|
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1329  | 
"arbitrary : arbitrarySet"  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1330  | 
|
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1331  | 
lemma "x : arbitrarySet"  | 
| 16050 | 1332  | 
refute  | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1333  | 
oops  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1334  | 
|
| 23778 | 1335  | 
inductive_set evenCard :: "'a set set"  | 
1336  | 
where  | 
|
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1337  | 
  "{} : evenCard"
 | 
| 23778 | 1338  | 
| "\<lbrakk> S : evenCard; x \<notin> S; y \<notin> S; x \<noteq> y \<rbrakk> \<Longrightarrow> S \<union> {x, y} : evenCard"
 | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1339  | 
|
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1340  | 
lemma "S : evenCard"  | 
| 16050 | 1341  | 
refute  | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1342  | 
oops  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1343  | 
|
| 23778 | 1344  | 
inductive_set  | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1345  | 
even :: "nat set"  | 
| 23778 | 1346  | 
and odd :: "nat set"  | 
1347  | 
where  | 
|
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1348  | 
"0 : even"  | 
| 23778 | 1349  | 
| "n : even \<Longrightarrow> Suc n : odd"  | 
1350  | 
| "n : odd \<Longrightarrow> Suc n : even"  | 
|
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1351  | 
|
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1352  | 
lemma "n : odd"  | 
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1353  | 
(*refute*) (* TODO: there seems to be an issue here with undefined terms  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1354  | 
because of the recursive datatype "nat" *)  | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1355  | 
oops  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1356  | 
|
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1357  | 
consts f :: "'a \<Rightarrow> 'a"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1358  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1359  | 
inductive_set  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1360  | 
a_even :: "'a set"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1361  | 
and a_odd :: "'a set"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1362  | 
where  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1363  | 
"arbitrary : a_even"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1364  | 
| "x : a_even \<Longrightarrow> f x : a_odd"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1365  | 
| "x : a_odd \<Longrightarrow> f x : a_even"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1366  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1367  | 
lemma "x : a_odd"  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1368  | 
  refute  -- {* finds a model of size 2, as expected *}
 | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1369  | 
oops  | 
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1370  | 
|
| 
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1371  | 
(*****************************************************************************)  | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1372  | 
|
| 23219 | 1373  | 
subsubsection {* Examples involving special functions *}
 | 
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1374  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1375  | 
lemma "card x = 0"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1376  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1377  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1378  | 
|
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1379  | 
lemma "finite x"  | 
| 
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1380  | 
  refute  -- {* no finite countermodel exists *}
 | 
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1381  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1382  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1383  | 
lemma "(x::nat) + y = 0"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1384  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1385  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1386  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1387  | 
lemma "(x::nat) = x + x"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1388  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1389  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1390  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1391  | 
lemma "(x::nat) - y + y = x"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1392  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1393  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1394  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1395  | 
lemma "(x::nat) = x * x"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1396  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1397  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1398  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1399  | 
lemma "(x::nat) < x + y"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1400  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1401  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1402  | 
|
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
1403  | 
lemma "xs @ [] = ys @ []"  | 
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1404  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1405  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1406  | 
|
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
1407  | 
lemma "xs @ ys = ys @ xs"  | 
| 
15767
 
8ed9fcc004fe
support for recursion over mutually recursive IDTs
 
webertj 
parents: 
15547 
diff
changeset
 | 
1408  | 
refute  | 
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1409  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1410  | 
|
| 16050 | 1411  | 
lemma "f (lfp f) = lfp f"  | 
1412  | 
refute  | 
|
1413  | 
oops  | 
|
1414  | 
||
1415  | 
lemma "f (gfp f) = gfp f"  | 
|
1416  | 
refute  | 
|
1417  | 
oops  | 
|
1418  | 
||
1419  | 
lemma "lfp f = gfp f"  | 
|
1420  | 
refute  | 
|
1421  | 
oops  | 
|
1422  | 
||
| 
25014
 
b711b0af178e
significant code overhaul, bugfix for inductive data types
 
webertj 
parents: 
24447 
diff
changeset
 | 
1423  | 
(*****************************************************************************)  | 
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1424  | 
|
| 23219 | 1425  | 
subsubsection {* Axiomatic type classes and overloading *}
 | 
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1426  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1427  | 
text {* A type class without axioms: *}
 | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1428  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1429  | 
axclass classA  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1430  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1431  | 
lemma "P (x::'a::classA)"  | 
| 14809 | 1432  | 
refute  | 
1433  | 
oops  | 
|
1434  | 
||
| 
21985
 
acfb13e8819e
constants are unfolded, universal quantifiers are stripped, some minor changes
 
webertj 
parents: 
21559 
diff
changeset
 | 
1435  | 
text {* The axiom of this type class does not contain any type variables: *}
 | 
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1436  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1437  | 
axclass classB  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1438  | 
classB_ax: "P | ~ P"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1439  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1440  | 
lemma "P (x::'a::classB)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1441  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1442  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1443  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1444  | 
text {* An axiom with a type variable (denoting types which have at least two elements): *}
 | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1445  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1446  | 
axclass classC < type  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1447  | 
classC_ax: "\<exists>x y. x \<noteq> y"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1448  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1449  | 
lemma "P (x::'a::classC)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1450  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1451  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1452  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1453  | 
lemma "\<exists>x y. (x::'a::classC) \<noteq> y"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1454  | 
  refute  -- {* no countermodel exists *}
 | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1455  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1456  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1457  | 
text {* A type class for which a constant is defined: *}
 | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1458  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1459  | 
consts  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1460  | 
classD_const :: "'a \<Rightarrow> 'a"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1461  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1462  | 
axclass classD < type  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1463  | 
classD_ax: "classD_const (classD_const x) = classD_const x"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1464  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1465  | 
lemma "P (x::'a::classD)"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1466  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1467  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1468  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1469  | 
text {* A type class with multiple superclasses: *}
 | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1470  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1471  | 
axclass classE < classC, classD  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1472  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1473  | 
lemma "P (x::'a::classE)"  | 
| 14809 | 1474  | 
refute  | 
1475  | 
oops  | 
|
1476  | 
||
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1477  | 
lemma "P (x::'a::{classB, classE})"
 | 
| 14809 | 1478  | 
refute  | 
1479  | 
oops  | 
|
1480  | 
||
| 
15547
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1481  | 
text {* OFCLASS: *}
 | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1482  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1483  | 
lemma "OFCLASS('a::type, type_class)"
 | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1484  | 
  refute  -- {* no countermodel exists *}
 | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1485  | 
apply intro_classes  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1486  | 
done  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1487  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1488  | 
lemma "OFCLASS('a::classC, type_class)"
 | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1489  | 
  refute  -- {* no countermodel exists *}
 | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1490  | 
apply intro_classes  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1491  | 
done  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1492  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1493  | 
lemma "OFCLASS('a, classB_class)"
 | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1494  | 
  refute  -- {* no countermodel exists *}
 | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1495  | 
apply intro_classes  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1496  | 
apply simp  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1497  | 
done  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1498  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1499  | 
lemma "OFCLASS('a::type, classC_class)"
 | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1500  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1501  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1502  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1503  | 
text {* Overloading: *}
 | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1504  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1505  | 
consts inverse :: "'a \<Rightarrow> 'a"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1506  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1507  | 
defs (overloaded)  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1508  | 
inverse_bool: "inverse (b::bool) == ~ b"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1509  | 
inverse_set : "inverse (S::'a set) == -S"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1510  | 
inverse_pair: "inverse p == (inverse (fst p), inverse (snd p))"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1511  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1512  | 
lemma "inverse b"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1513  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1514  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1515  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1516  | 
lemma "P (inverse (S::'a set))"  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1517  | 
refute  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1518  | 
oops  | 
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1519  | 
|
| 
 
f08e2d83681e
major code change: refute can now handle recursion and axiomatic type classes; 3-valued logic with two kinds of equality; some bugfixes
 
webertj 
parents: 
15297 
diff
changeset
 | 
1520  | 
lemma "P (inverse (p::'a\<times>'b))"  | 
| 14809 | 1521  | 
refute  | 
| 14350 | 1522  | 
oops  | 
1523  | 
||
| 18774 | 1524  | 
refute_params [satsolver="auto"]  | 
1525  | 
||
| 14350 | 1526  | 
end  |