author | Christian Urban <christian dot urban at kcl dot ac dot uk> |
Sun, 06 Apr 2014 12:45:54 +0100 | |
changeset 555 | 2c34c69236ce |
parent 538 | e9fd5eff62c1 |
child 562 | daf404920ab9 |
permissions | -rw-r--r-- |
32 | 1 |
theory Simple_Inductive_Package |
164
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
2 |
imports Main "../Base" |
514
7e25716c3744
updated to outer syntax / parser changes
Christian Urban <urbanc@in.tum.de>
parents:
442
diff
changeset
|
3 |
keywords "simple_inductive" :: thy_decl |
32 | 4 |
begin |
5 |
||
538
e9fd5eff62c1
removed "use" for "ML_file"
Christian Urban <urbanc@in.tum.de>
parents:
514
diff
changeset
|
6 |
ML_file "simple_inductive_package.ML" |
e9fd5eff62c1
removed "use" for "ML_file"
Christian Urban <urbanc@in.tum.de>
parents:
514
diff
changeset
|
7 |
|
164
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
8 |
(* |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
9 |
simple_inductive |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
10 |
trcl :: "('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool" |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
11 |
where |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
12 |
base: "trcl R x x" |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
13 |
| step: "trcl R x y \<Longrightarrow> R y z \<Longrightarrow> trcl R x z" |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
14 |
|
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
15 |
thm trcl_def |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
16 |
thm trcl.induct |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
17 |
thm trcl.intros |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
18 |
|
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
19 |
simple_inductive |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
20 |
even and odd |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
21 |
where |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
22 |
even0: "even 0" |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
23 |
| evenS: "odd n \<Longrightarrow> even (Suc n)" |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
24 |
| oddS: "even n \<Longrightarrow> odd (Suc n)" |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
25 |
|
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
26 |
thm even_def odd_def |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
27 |
thm even.induct odd.induct |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
28 |
thm even0 |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
29 |
thm evenS |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
30 |
thm oddS |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
31 |
thm even_odd.intros |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
32 |
|
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
33 |
simple_inductive |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
34 |
accpart for r :: "'a \<Rightarrow> 'a \<Rightarrow> bool" |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
35 |
where |
177 | 36 |
accpartI: "(\<And>y. r y x \<Longrightarrow> accpart r y) \<Longrightarrow> accpart r x" |
164
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
37 |
|
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
38 |
thm accpart_def |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
39 |
thm accpart.induct |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
40 |
thm accpartI |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
41 |
|
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
42 |
locale rel = |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
43 |
fixes r :: "'a \<Rightarrow> 'a \<Rightarrow> bool" |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
44 |
|
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
45 |
simple_inductive (in rel) accpart' |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
46 |
where |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
47 |
accpartI': "\<And>x. (\<And>y. r y x \<Longrightarrow> accpart' y) \<Longrightarrow> accpart' x" |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
48 |
|
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
49 |
context rel |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
50 |
begin |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
51 |
thm accpartI' |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
52 |
thm accpart'.induct |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
53 |
end |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
54 |
|
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
55 |
thm rel.accpartI' |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
56 |
thm rel.accpart'.induct |
3f617d7a2691
more work on simple_inductive
Christian Urban <urbanc@in.tum.de>
parents:
159
diff
changeset
|
57 |
*) |
159
64fa844064fa
updated to chages in binding module
Christian Urban <urbanc@in.tum.de>
parents:
32
diff
changeset
|
58 |
|
32 | 59 |
|
159
64fa844064fa
updated to chages in binding module
Christian Urban <urbanc@in.tum.de>
parents:
32
diff
changeset
|
60 |
|
32 | 61 |
end |