author | nipkow |
Tue, 02 Sep 2008 21:31:28 +0200 | |
changeset 28091 | 50f2d6ba024c |
parent 27293 | de9a2fd0eab4 |
child 29138 | 661a8db7e647 |
permissions | -rw-r--r-- |
2640 | 1 |
(* Title: HOLCF/One.thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
2 |
ID: $Id$ |
2640 | 3 |
Author: Oscar Slotosch |
16070
4a83dd540b88
removed LICENCE note -- everything is subject to Isabelle licence as
wenzelm
parents:
15577
diff
changeset
|
4 |
|
4a83dd540b88
removed LICENCE note -- everything is subject to Isabelle licence as
wenzelm
parents:
15577
diff
changeset
|
5 |
The unit domain. |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
6 |
*) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
7 |
|
15577 | 8 |
header {* The unit domain *} |
9 |
||
10 |
theory One |
|
11 |
imports Lift |
|
12 |
begin |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
13 |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
14 |
types one = "unit lift" |
25131
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
18111
diff
changeset
|
15 |
translations |
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
18111
diff
changeset
|
16 |
"one" <= (type) "unit lift" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
17 |
|
3717 | 18 |
constdefs |
19 |
ONE :: "one" |
|
25131
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
18111
diff
changeset
|
20 |
"ONE == Def ()" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
21 |
|
16747 | 22 |
text {* Exhaustion and Elimination for type @{typ one} *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
23 |
|
16747 | 24 |
lemma Exh_one: "t = \<bottom> \<or> t = ONE" |
27293 | 25 |
unfolding ONE_def by (induct t) simp_all |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
26 |
|
16747 | 27 |
lemma oneE: "\<lbrakk>p = \<bottom> \<Longrightarrow> Q; p = ONE \<Longrightarrow> Q\<rbrakk> \<Longrightarrow> Q" |
27293 | 28 |
unfolding ONE_def by (induct p) simp_all |
29 |
||
30 |
lemma one_induct: "\<lbrakk>P \<bottom>; P ONE\<rbrakk> \<Longrightarrow> P x" |
|
31 |
by (cases x rule: oneE) simp_all |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
32 |
|
16747 | 33 |
lemma dist_less_one [simp]: "\<not> ONE \<sqsubseteq> \<bottom>" |
27293 | 34 |
unfolding ONE_def by simp |
35 |
||
36 |
lemma less_ONE [simp]: "x \<sqsubseteq> ONE" |
|
37 |
by (induct x rule: one_induct) simp_all |
|
38 |
||
39 |
lemma ONE_less_iff [simp]: "ONE \<sqsubseteq> x \<longleftrightarrow> x = ONE" |
|
40 |
by (induct x rule: one_induct) simp_all |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
41 |
|
16747 | 42 |
lemma dist_eq_one [simp]: "ONE \<noteq> \<bottom>" "\<bottom> \<noteq> ONE" |
27293 | 43 |
unfolding ONE_def by simp_all |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
44 |
|
27293 | 45 |
lemma one_neq_iffs [simp]: |
46 |
"x \<noteq> ONE \<longleftrightarrow> x = \<bottom>" |
|
47 |
"ONE \<noteq> x \<longleftrightarrow> x = \<bottom>" |
|
48 |
"x \<noteq> \<bottom> \<longleftrightarrow> x = ONE" |
|
49 |
"\<bottom> \<noteq> x \<longleftrightarrow> x = ONE" |
|
50 |
by (induct x rule: one_induct) simp_all |
|
51 |
||
52 |
lemma compact_ONE: "compact ONE" |
|
17838 | 53 |
by (rule compact_chfin) |
54 |
||
18080 | 55 |
text {* Case analysis function for type @{typ one} *} |
56 |
||
25131
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
18111
diff
changeset
|
57 |
definition |
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
18111
diff
changeset
|
58 |
one_when :: "'a::pcpo \<rightarrow> one \<rightarrow> 'a" where |
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
18111
diff
changeset
|
59 |
"one_when = (\<Lambda> a. strictify\<cdot>(\<Lambda> _. a))" |
18080 | 60 |
|
61 |
translations |
|
27293 | 62 |
"case x of XCONST ONE \<Rightarrow> t" == "CONST one_when\<cdot>t\<cdot>x" |
63 |
"\<Lambda> (XCONST ONE). t" == "CONST one_when\<cdot>t" |
|
18080 | 64 |
|
18111 | 65 |
lemma one_when1 [simp]: "(case \<bottom> of ONE \<Rightarrow> t) = \<bottom>" |
18080 | 66 |
by (simp add: one_when_def) |
67 |
||
18111 | 68 |
lemma one_when2 [simp]: "(case ONE of ONE \<Rightarrow> t) = t" |
18080 | 69 |
by (simp add: one_when_def) |
70 |
||
18111 | 71 |
lemma one_when3 [simp]: "(case x of ONE \<Rightarrow> ONE) = x" |
27293 | 72 |
by (induct x rule: one_induct) simp_all |
18080 | 73 |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
74 |
end |