author | huffman |
Wed, 27 Oct 2010 14:15:54 -0700 | |
changeset 40322 | 707eb30e8a53 |
parent 40321 | d065b195ec89 |
child 40327 | 1dfdbd66093a |
permissions | -rw-r--r-- |
15600 | 1 |
(* Title: HOLCF/Ssum.thy |
16060
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
2 |
Author: Franz Regensburger and Brian Huffman |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
3 |
*) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
4 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
5 |
header {* The type of strict sums *} |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
6 |
|
15577 | 7 |
theory Ssum |
31115 | 8 |
imports Tr |
15577 | 9 |
begin |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
10 |
|
36452 | 11 |
default_sort pcpo |
16083
fca38c55c8fa
added defaultsort declaration, moved cpair_less to Cprod.thy
huffman
parents:
16070
diff
changeset
|
12 |
|
15593
24d770bbc44a
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
13 |
subsection {* Definition of strict sum type *} |
24d770bbc44a
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
14 |
|
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
15 |
pcpodef ('a, 'b) ssum (infixr "++" 10) = |
40080 | 16 |
"{p :: tr \<times> ('a \<times> 'b). p = \<bottom> \<or> |
17 |
(fst p = TT \<and> fst (snd p) \<noteq> \<bottom> \<and> snd (snd p) = \<bottom>) \<or> |
|
18 |
(fst p = FF \<and> fst (snd p) = \<bottom> \<and> snd (snd p) \<noteq> \<bottom>) }" |
|
29063
7619f0561cd7
pcpodef package: state two goals, instead of encoded conjunction;
wenzelm
parents:
27310
diff
changeset
|
19 |
by simp_all |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
20 |
|
35525 | 21 |
instance ssum :: ("{chfin,pcpo}", "{chfin,pcpo}") chfin |
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
22 |
by (rule typedef_chfin [OF type_definition_ssum below_ssum_def]) |
25827
c2adeb1bae5c
new instance proofs for classes finite_po, chfin, flat
huffman
parents:
25756
diff
changeset
|
23 |
|
35427 | 24 |
type_notation (xsymbols) |
35547 | 25 |
ssum ("(_ \<oplus>/ _)" [21, 20] 20) |
35427 | 26 |
type_notation (HTML output) |
35547 | 27 |
ssum ("(_ \<oplus>/ _)" [21, 20] 20) |
28 |
||
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
29 |
|
16060
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
30 |
subsection {* Definitions of constructors *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
31 |
|
25131
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19440
diff
changeset
|
32 |
definition |
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19440
diff
changeset
|
33 |
sinl :: "'a \<rightarrow> ('a ++ 'b)" where |
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
34 |
"sinl = (\<Lambda> a. Abs_ssum (strict\<cdot>a\<cdot>TT, a, \<bottom>))" |
16060
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
35 |
|
25131
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19440
diff
changeset
|
36 |
definition |
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19440
diff
changeset
|
37 |
sinr :: "'b \<rightarrow> ('a ++ 'b)" where |
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
38 |
"sinr = (\<Lambda> b. Abs_ssum (strict\<cdot>b\<cdot>FF, \<bottom>, b))" |
25740
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
39 |
|
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
40 |
lemma sinl_ssum: "(strict\<cdot>a\<cdot>TT, a, \<bottom>) \<in> ssum" |
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
41 |
by (simp add: ssum_def strict_conv_if) |
25740
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
42 |
|
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
43 |
lemma sinr_ssum: "(strict\<cdot>b\<cdot>FF, \<bottom>, b) \<in> ssum" |
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
44 |
by (simp add: ssum_def strict_conv_if) |
25740
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
45 |
|
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
46 |
lemma Rep_ssum_sinl: "Rep_ssum (sinl\<cdot>a) = (strict\<cdot>a\<cdot>TT, a, \<bottom>)" |
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
47 |
by (simp add: sinl_def cont_Abs_ssum Abs_ssum_inverse sinl_ssum) |
25740
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
48 |
|
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
49 |
lemma Rep_ssum_sinr: "Rep_ssum (sinr\<cdot>b) = (strict\<cdot>b\<cdot>FF, \<bottom>, b)" |
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
50 |
by (simp add: sinr_def cont_Abs_ssum Abs_ssum_inverse sinr_ssum) |
40092
baf5953615da
do proofs using Rep_Sprod_simps, Rep_Ssum_simps; remove unused lemmas
huffman
parents:
40089
diff
changeset
|
51 |
|
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
52 |
lemmas Rep_ssum_simps = |
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
53 |
Rep_ssum_inject [symmetric] below_ssum_def |
40092
baf5953615da
do proofs using Rep_Sprod_simps, Rep_Ssum_simps; remove unused lemmas
huffman
parents:
40089
diff
changeset
|
54 |
Pair_fst_snd_eq below_prod_def |
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
55 |
Rep_ssum_strict Rep_ssum_sinl Rep_ssum_sinr |
16060
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
56 |
|
35900
aa5dfb03eb1e
remove LaTeX hyperref warnings by avoiding antiquotations within section headings
huffman
parents:
35783
diff
changeset
|
57 |
subsection {* Properties of \emph{sinl} and \emph{sinr} *} |
16060
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
58 |
|
25740
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
59 |
text {* Ordering *} |
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
60 |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29530
diff
changeset
|
61 |
lemma sinl_below [simp]: "(sinl\<cdot>x \<sqsubseteq> sinl\<cdot>y) = (x \<sqsubseteq> y)" |
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
62 |
by (simp add: Rep_ssum_simps strict_conv_if) |
25740
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
63 |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29530
diff
changeset
|
64 |
lemma sinr_below [simp]: "(sinr\<cdot>x \<sqsubseteq> sinr\<cdot>y) = (x \<sqsubseteq> y)" |
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
65 |
by (simp add: Rep_ssum_simps strict_conv_if) |
25740
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
66 |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29530
diff
changeset
|
67 |
lemma sinl_below_sinr [simp]: "(sinl\<cdot>x \<sqsubseteq> sinr\<cdot>y) = (x = \<bottom>)" |
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
68 |
by (simp add: Rep_ssum_simps strict_conv_if) |
25740
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
69 |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29530
diff
changeset
|
70 |
lemma sinr_below_sinl [simp]: "(sinr\<cdot>x \<sqsubseteq> sinl\<cdot>y) = (x = \<bottom>)" |
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
71 |
by (simp add: Rep_ssum_simps strict_conv_if) |
25740
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
72 |
|
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
73 |
text {* Equality *} |
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
74 |
|
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
75 |
lemma sinl_eq [simp]: "(sinl\<cdot>x = sinl\<cdot>y) = (x = y)" |
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
76 |
by (simp add: po_eq_conv) |
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
77 |
|
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
78 |
lemma sinr_eq [simp]: "(sinr\<cdot>x = sinr\<cdot>y) = (x = y)" |
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
79 |
by (simp add: po_eq_conv) |
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
80 |
|
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
81 |
lemma sinl_eq_sinr [simp]: "(sinl\<cdot>x = sinr\<cdot>y) = (x = \<bottom> \<and> y = \<bottom>)" |
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
82 |
by (subst po_eq_conv, simp) |
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
83 |
|
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
84 |
lemma sinr_eq_sinl [simp]: "(sinr\<cdot>x = sinl\<cdot>y) = (x = \<bottom> \<and> y = \<bottom>)" |
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
85 |
by (subst po_eq_conv, simp) |
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
86 |
|
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
87 |
lemma sinl_inject: "sinl\<cdot>x = sinl\<cdot>y \<Longrightarrow> x = y" |
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
88 |
by (rule sinl_eq [THEN iffD1]) |
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
89 |
|
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
90 |
lemma sinr_inject: "sinr\<cdot>x = sinr\<cdot>y \<Longrightarrow> x = y" |
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
91 |
by (rule sinr_eq [THEN iffD1]) |
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
92 |
|
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
93 |
text {* Strictness *} |
17837 | 94 |
|
16211
faa9691da2bc
changed to use new contI; renamed strict, defined, and inject lemmas
huffman
parents:
16083
diff
changeset
|
95 |
lemma sinl_strict [simp]: "sinl\<cdot>\<bottom> = \<bottom>" |
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
96 |
by (simp add: Rep_ssum_simps) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
97 |
|
16211
faa9691da2bc
changed to use new contI; renamed strict, defined, and inject lemmas
huffman
parents:
16083
diff
changeset
|
98 |
lemma sinr_strict [simp]: "sinr\<cdot>\<bottom> = \<bottom>" |
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
99 |
by (simp add: Rep_ssum_simps) |
16060
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
100 |
|
40321
d065b195ec89
rename lemmas *_defined_iff and *_strict_iff to *_bottom_iff
huffman
parents:
40098
diff
changeset
|
101 |
lemma sinl_bottom_iff [simp]: "(sinl\<cdot>x = \<bottom>) = (x = \<bottom>)" |
40080 | 102 |
using sinl_eq [of "x" "\<bottom>"] by simp |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
103 |
|
40321
d065b195ec89
rename lemmas *_defined_iff and *_strict_iff to *_bottom_iff
huffman
parents:
40098
diff
changeset
|
104 |
lemma sinr_bottom_iff [simp]: "(sinr\<cdot>x = \<bottom>) = (x = \<bottom>)" |
40080 | 105 |
using sinr_eq [of "x" "\<bottom>"] by simp |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
106 |
|
40081 | 107 |
lemma sinl_defined: "x \<noteq> \<bottom> \<Longrightarrow> sinl\<cdot>x \<noteq> \<bottom>" |
16752
270ec60cc9e8
added lemmas sinl_defined_iff sinr_defined_iff, sinl_eq_sinr, sinr_eq_sinl; added more simp rules; cleaned up
huffman
parents:
16742
diff
changeset
|
108 |
by simp |
270ec60cc9e8
added lemmas sinl_defined_iff sinr_defined_iff, sinl_eq_sinr, sinr_eq_sinl; added more simp rules; cleaned up
huffman
parents:
16742
diff
changeset
|
109 |
|
40081 | 110 |
lemma sinr_defined: "x \<noteq> \<bottom> \<Longrightarrow> sinr\<cdot>x \<noteq> \<bottom>" |
16752
270ec60cc9e8
added lemmas sinl_defined_iff sinr_defined_iff, sinl_eq_sinr, sinr_eq_sinl; added more simp rules; cleaned up
huffman
parents:
16742
diff
changeset
|
111 |
by simp |
270ec60cc9e8
added lemmas sinl_defined_iff sinr_defined_iff, sinl_eq_sinr, sinr_eq_sinl; added more simp rules; cleaned up
huffman
parents:
16742
diff
changeset
|
112 |
|
25882
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
113 |
text {* Compactness *} |
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
114 |
|
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
115 |
lemma compact_sinl: "compact x \<Longrightarrow> compact (sinl\<cdot>x)" |
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
116 |
by (rule compact_ssum, simp add: Rep_ssum_sinl) |
25882
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
117 |
|
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
118 |
lemma compact_sinr: "compact x \<Longrightarrow> compact (sinr\<cdot>x)" |
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
119 |
by (rule compact_ssum, simp add: Rep_ssum_sinr) |
25882
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
120 |
|
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
121 |
lemma compact_sinlD: "compact (sinl\<cdot>x) \<Longrightarrow> compact x" |
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
122 |
unfolding compact_def |
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
123 |
by (drule adm_subst [OF cont_Rep_CFun2 [where f=sinl]], simp) |
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
124 |
|
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
125 |
lemma compact_sinrD: "compact (sinr\<cdot>x) \<Longrightarrow> compact x" |
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
126 |
unfolding compact_def |
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
127 |
by (drule adm_subst [OF cont_Rep_CFun2 [where f=sinr]], simp) |
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
128 |
|
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
129 |
lemma compact_sinl_iff [simp]: "compact (sinl\<cdot>x) = compact x" |
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
130 |
by (safe elim!: compact_sinl compact_sinlD) |
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
131 |
|
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
132 |
lemma compact_sinr_iff [simp]: "compact (sinr\<cdot>x) = compact x" |
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
133 |
by (safe elim!: compact_sinr compact_sinrD) |
c58e380d9f7d
new compactness lemmas; removed duplicated flat_less_iff
huffman
parents:
25827
diff
changeset
|
134 |
|
16060
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
135 |
subsection {* Case analysis *} |
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
136 |
|
35783 | 137 |
lemma ssumE [case_names bottom sinl sinr, cases type: ssum]: |
40080 | 138 |
obtains "p = \<bottom>" |
139 |
| x where "p = sinl\<cdot>x" and "x \<noteq> \<bottom>" |
|
140 |
| y where "p = sinr\<cdot>y" and "y \<noteq> \<bottom>" |
|
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
141 |
using Rep_ssum [of p] by (auto simp add: ssum_def Rep_ssum_simps) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
142 |
|
35783 | 143 |
lemma ssum_induct [case_names bottom sinl sinr, induct type: ssum]: |
25756 | 144 |
"\<lbrakk>P \<bottom>; |
145 |
\<And>x. x \<noteq> \<bottom> \<Longrightarrow> P (sinl\<cdot>x); |
|
146 |
\<And>y. y \<noteq> \<bottom> \<Longrightarrow> P (sinr\<cdot>y)\<rbrakk> \<Longrightarrow> P x" |
|
147 |
by (cases x, simp_all) |
|
148 |
||
35783 | 149 |
lemma ssumE2 [case_names sinl sinr]: |
16060
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
150 |
"\<lbrakk>\<And>x. p = sinl\<cdot>x \<Longrightarrow> Q; \<And>y. p = sinr\<cdot>y \<Longrightarrow> Q\<rbrakk> \<Longrightarrow> Q" |
25740
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
151 |
by (cases p, simp only: sinl_strict [symmetric], simp, simp) |
16060
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
152 |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29530
diff
changeset
|
153 |
lemma below_sinlD: "p \<sqsubseteq> sinl\<cdot>x \<Longrightarrow> \<exists>y. p = sinl\<cdot>y \<and> y \<sqsubseteq> x" |
25740
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
154 |
by (cases p, rule_tac x="\<bottom>" in exI, simp_all) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
155 |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29530
diff
changeset
|
156 |
lemma below_sinrD: "p \<sqsubseteq> sinr\<cdot>x \<Longrightarrow> \<exists>y. p = sinr\<cdot>y \<and> y \<sqsubseteq> x" |
25740
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
157 |
by (cases p, rule_tac x="\<bottom>" in exI, simp_all) |
16060
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
158 |
|
25740
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
159 |
subsection {* Case analysis combinator *} |
16060
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
160 |
|
25131
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19440
diff
changeset
|
161 |
definition |
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19440
diff
changeset
|
162 |
sscase :: "('a \<rightarrow> 'c) \<rightarrow> ('b \<rightarrow> 'c) \<rightarrow> ('a ++ 'b) \<rightarrow> 'c" where |
40322
707eb30e8a53
make syntax of continuous if-then-else consistent with HOL if-then-else
huffman
parents:
40321
diff
changeset
|
163 |
"sscase = (\<Lambda> f g s. (\<lambda>(t, x, y). If t then f\<cdot>x else g\<cdot>y) (Rep_ssum s))" |
16060
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
164 |
|
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
165 |
translations |
26046 | 166 |
"case s of XCONST sinl\<cdot>x \<Rightarrow> t1 | XCONST sinr\<cdot>y \<Rightarrow> t2" == "CONST sscase\<cdot>(\<Lambda> x. t1)\<cdot>(\<Lambda> y. t2)\<cdot>s" |
18078
20e5a6440790
change syntax for LAM to use expressions as patterns; define LAM pattern syntax for cpair, spair, sinl, sinr, up
huffman
parents:
17837
diff
changeset
|
167 |
|
20e5a6440790
change syntax for LAM to use expressions as patterns; define LAM pattern syntax for cpair, spair, sinl, sinr, up
huffman
parents:
17837
diff
changeset
|
168 |
translations |
26046 | 169 |
"\<Lambda>(XCONST sinl\<cdot>x). t" == "CONST sscase\<cdot>(\<Lambda> x. t)\<cdot>\<bottom>" |
170 |
"\<Lambda>(XCONST sinr\<cdot>y). t" == "CONST sscase\<cdot>\<bottom>\<cdot>(\<Lambda> y. t)" |
|
16060
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
171 |
|
25740
de65baf89106
changed type definition to make Iwhen and reasoning about chains unnecessary;
huffman
parents:
25131
diff
changeset
|
172 |
lemma beta_sscase: |
40322
707eb30e8a53
make syntax of continuous if-then-else consistent with HOL if-then-else
huffman
parents:
40321
diff
changeset
|
173 |
"sscase\<cdot>f\<cdot>g\<cdot>s = (\<lambda>(t, x, y). If t then f\<cdot>x else g\<cdot>y) (Rep_ssum s)" |
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
174 |
unfolding sscase_def by (simp add: cont_Rep_ssum [THEN cont_compose]) |
16060
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
175 |
|
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
176 |
lemma sscase1 [simp]: "sscase\<cdot>f\<cdot>g\<cdot>\<bottom> = \<bottom>" |
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
177 |
unfolding beta_sscase by (simp add: Rep_ssum_strict) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
178 |
|
16060
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
179 |
lemma sscase2 [simp]: "x \<noteq> \<bottom> \<Longrightarrow> sscase\<cdot>f\<cdot>g\<cdot>(sinl\<cdot>x) = f\<cdot>x" |
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
180 |
unfolding beta_sscase by (simp add: Rep_ssum_sinl) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
181 |
|
16060
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
182 |
lemma sscase3 [simp]: "y \<noteq> \<bottom> \<Longrightarrow> sscase\<cdot>f\<cdot>g\<cdot>(sinr\<cdot>y) = g\<cdot>y" |
40098
9dbb01456031
use default names sprod/Rep_sprod/Abs_sprod from pcpodef instead of Sprod/Rep_Sprod/Abs_Sprod; similarly for ssum
huffman
parents:
40092
diff
changeset
|
183 |
unfolding beta_sscase by (simp add: Rep_ssum_sinr) |
15593
24d770bbc44a
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
184 |
|
16060
833be7f71ecd
Simplified version of strict sum theory, using TypedefPcpo
huffman
parents:
15606
diff
changeset
|
185 |
lemma sscase4 [simp]: "sscase\<cdot>sinl\<cdot>sinr\<cdot>z = z" |
25756 | 186 |
by (cases z, simp_all) |
15593
24d770bbc44a
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
187 |
|
25827
c2adeb1bae5c
new instance proofs for classes finite_po, chfin, flat
huffman
parents:
25756
diff
changeset
|
188 |
subsection {* Strict sum preserves flatness *} |
c2adeb1bae5c
new instance proofs for classes finite_po, chfin, flat
huffman
parents:
25756
diff
changeset
|
189 |
|
35525 | 190 |
instance ssum :: (flat, flat) flat |
25827
c2adeb1bae5c
new instance proofs for classes finite_po, chfin, flat
huffman
parents:
25756
diff
changeset
|
191 |
apply (intro_classes, clarify) |
31115 | 192 |
apply (case_tac x, simp) |
193 |
apply (case_tac y, simp_all add: flat_below_iff) |
|
194 |
apply (case_tac y, simp_all add: flat_below_iff) |
|
25827
c2adeb1bae5c
new instance proofs for classes finite_po, chfin, flat
huffman
parents:
25756
diff
changeset
|
195 |
done |
c2adeb1bae5c
new instance proofs for classes finite_po, chfin, flat
huffman
parents:
25756
diff
changeset
|
196 |
|
33504
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
197 |
subsection {* Map function for strict sums *} |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
198 |
|
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
199 |
definition |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
200 |
ssum_map :: "('a \<rightarrow> 'b) \<rightarrow> ('c \<rightarrow> 'd) \<rightarrow> 'a \<oplus> 'c \<rightarrow> 'b \<oplus> 'd" |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
201 |
where |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
202 |
"ssum_map = (\<Lambda> f g. sscase\<cdot>(sinl oo f)\<cdot>(sinr oo g))" |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
203 |
|
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
204 |
lemma ssum_map_strict [simp]: "ssum_map\<cdot>f\<cdot>g\<cdot>\<bottom> = \<bottom>" |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
205 |
unfolding ssum_map_def by simp |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
206 |
|
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
207 |
lemma ssum_map_sinl [simp]: "x \<noteq> \<bottom> \<Longrightarrow> ssum_map\<cdot>f\<cdot>g\<cdot>(sinl\<cdot>x) = sinl\<cdot>(f\<cdot>x)" |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
208 |
unfolding ssum_map_def by simp |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
209 |
|
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
210 |
lemma ssum_map_sinr [simp]: "x \<noteq> \<bottom> \<Longrightarrow> ssum_map\<cdot>f\<cdot>g\<cdot>(sinr\<cdot>x) = sinr\<cdot>(g\<cdot>x)" |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
211 |
unfolding ssum_map_def by simp |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
212 |
|
35491 | 213 |
lemma ssum_map_sinl': "f\<cdot>\<bottom> = \<bottom> \<Longrightarrow> ssum_map\<cdot>f\<cdot>g\<cdot>(sinl\<cdot>x) = sinl\<cdot>(f\<cdot>x)" |
214 |
by (cases "x = \<bottom>") simp_all |
|
215 |
||
216 |
lemma ssum_map_sinr': "g\<cdot>\<bottom> = \<bottom> \<Longrightarrow> ssum_map\<cdot>f\<cdot>g\<cdot>(sinr\<cdot>x) = sinr\<cdot>(g\<cdot>x)" |
|
217 |
by (cases "x = \<bottom>") simp_all |
|
218 |
||
33808 | 219 |
lemma ssum_map_ID: "ssum_map\<cdot>ID\<cdot>ID = ID" |
40002
c5b5f7a3a3b1
new theorem names: fun_below_iff, fun_belowI, cfun_eq_iff, cfun_eqI, cfun_below_iff, cfun_belowI
huffman
parents:
39987
diff
changeset
|
220 |
unfolding ssum_map_def by (simp add: cfun_eq_iff eta_cfun) |
33808 | 221 |
|
33587 | 222 |
lemma ssum_map_map: |
223 |
"\<lbrakk>f1\<cdot>\<bottom> = \<bottom>; g1\<cdot>\<bottom> = \<bottom>\<rbrakk> \<Longrightarrow> |
|
224 |
ssum_map\<cdot>f1\<cdot>g1\<cdot>(ssum_map\<cdot>f2\<cdot>g2\<cdot>p) = |
|
225 |
ssum_map\<cdot>(\<Lambda> x. f1\<cdot>(f2\<cdot>x))\<cdot>(\<Lambda> x. g1\<cdot>(g2\<cdot>x))\<cdot>p" |
|
226 |
apply (induct p, simp) |
|
227 |
apply (case_tac "f2\<cdot>x = \<bottom>", simp, simp) |
|
228 |
apply (case_tac "g2\<cdot>y = \<bottom>", simp, simp) |
|
229 |
done |
|
230 |
||
33504
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
231 |
lemma ep_pair_ssum_map: |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
232 |
assumes "ep_pair e1 p1" and "ep_pair e2 p2" |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
233 |
shows "ep_pair (ssum_map\<cdot>e1\<cdot>e2) (ssum_map\<cdot>p1\<cdot>p2)" |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
234 |
proof |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
235 |
interpret e1p1: pcpo_ep_pair e1 p1 unfolding pcpo_ep_pair_def by fact |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
236 |
interpret e2p2: pcpo_ep_pair e2 p2 unfolding pcpo_ep_pair_def by fact |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
237 |
fix x show "ssum_map\<cdot>p1\<cdot>p2\<cdot>(ssum_map\<cdot>e1\<cdot>e2\<cdot>x) = x" |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
238 |
by (induct x) simp_all |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
239 |
fix y show "ssum_map\<cdot>e1\<cdot>e2\<cdot>(ssum_map\<cdot>p1\<cdot>p2\<cdot>y) \<sqsubseteq> y" |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
240 |
apply (induct y, simp) |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
241 |
apply (case_tac "p1\<cdot>x = \<bottom>", simp, simp add: e1p1.e_p_below) |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
242 |
apply (case_tac "p2\<cdot>y = \<bottom>", simp, simp add: e2p2.e_p_below) |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
243 |
done |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
244 |
qed |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
245 |
|
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
246 |
lemma deflation_ssum_map: |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
247 |
assumes "deflation d1" and "deflation d2" |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
248 |
shows "deflation (ssum_map\<cdot>d1\<cdot>d2)" |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
249 |
proof |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
250 |
interpret d1: deflation d1 by fact |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
251 |
interpret d2: deflation d2 by fact |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
252 |
fix x |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
253 |
show "ssum_map\<cdot>d1\<cdot>d2\<cdot>(ssum_map\<cdot>d1\<cdot>d2\<cdot>x) = ssum_map\<cdot>d1\<cdot>d2\<cdot>x" |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
254 |
apply (induct x, simp) |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
255 |
apply (case_tac "d1\<cdot>x = \<bottom>", simp, simp add: d1.idem) |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
256 |
apply (case_tac "d2\<cdot>y = \<bottom>", simp, simp add: d2.idem) |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
257 |
done |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
258 |
show "ssum_map\<cdot>d1\<cdot>d2\<cdot>x \<sqsubseteq> x" |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
259 |
apply (induct x, simp) |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
260 |
apply (case_tac "d1\<cdot>x = \<bottom>", simp, simp add: d1.below) |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
261 |
apply (case_tac "d2\<cdot>y = \<bottom>", simp, simp add: d2.below) |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
262 |
done |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
263 |
qed |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
264 |
|
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
265 |
lemma finite_deflation_ssum_map: |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
266 |
assumes "finite_deflation d1" and "finite_deflation d2" |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
267 |
shows "finite_deflation (ssum_map\<cdot>d1\<cdot>d2)" |
39973
c62b4ff97bfc
add lemma finite_deflation_intro
Brian Huffman <brianh@cs.pdx.edu>
parents:
36452
diff
changeset
|
268 |
proof (rule finite_deflation_intro) |
33504
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
269 |
interpret d1: finite_deflation d1 by fact |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
270 |
interpret d2: finite_deflation d2 by fact |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
271 |
have "deflation d1" and "deflation d2" by fact+ |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
272 |
thus "deflation (ssum_map\<cdot>d1\<cdot>d2)" by (rule deflation_ssum_map) |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
273 |
have "{x. ssum_map\<cdot>d1\<cdot>d2\<cdot>x = x} \<subseteq> |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
274 |
(\<lambda>x. sinl\<cdot>x) ` {x. d1\<cdot>x = x} \<union> |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
275 |
(\<lambda>x. sinr\<cdot>x) ` {x. d2\<cdot>x = x} \<union> {\<bottom>}" |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
276 |
by (rule subsetI, case_tac x, simp_all) |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
277 |
thus "finite {x. ssum_map\<cdot>d1\<cdot>d2\<cdot>x = x}" |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
278 |
by (rule finite_subset, simp add: d1.finite_fixes d2.finite_fixes) |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
279 |
qed |
b4210cc3ac97
map functions for various types, with ep_pair/deflation/finite_deflation lemmas
huffman
parents:
32960
diff
changeset
|
280 |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
281 |
end |