| author | bulwahn | 
| Wed, 20 Jan 2010 18:02:22 +0100 | |
| changeset 34952 | bd7e347eb768 | 
| parent 31076 | 99fe356cbbc2 | 
| child 35431 | 8758fe1fc9f8 | 
| permissions | -rw-r--r-- | 
| 2640 | 1 | (* Title: HOLCF/Tr.thy | 
| 2 | Author: Franz Regensburger | |
| 3 | *) | |
| 4 | ||
| 15649 | 5 | header {* The type of lifted booleans *}
 | 
| 6 | ||
| 7 | theory Tr | |
| 16228 | 8 | imports Lift | 
| 15649 | 9 | begin | 
| 2640 | 10 | |
| 27294 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 11 | subsection {* Type definition and constructors *}
 | 
| 16631 | 12 | |
| 2782 | 13 | types | 
| 14 | tr = "bool lift" | |
| 15 | ||
| 2766 | 16 | translations | 
| 25135 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 17 | "tr" <= (type) "bool lift" | 
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 18 | |
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 19 | definition | 
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 20 | TT :: "tr" where | 
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 21 | "TT = Def True" | 
| 2640 | 22 | |
| 25135 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 23 | definition | 
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 24 | FF :: "tr" where | 
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 25 | "FF = Def False" | 
| 2640 | 26 | |
| 27294 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 27 | text {* Exhaustion and Elimination for type @{typ tr} *}
 | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 28 | |
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 29 | lemma Exh_tr: "t = \<bottom> \<or> t = TT \<or> t = FF" | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 30 | unfolding FF_def TT_def by (induct t) auto | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 31 | |
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 32 | lemma trE: "\<lbrakk>p = \<bottom> \<Longrightarrow> Q; p = TT \<Longrightarrow> Q; p = FF \<Longrightarrow> Q\<rbrakk> \<Longrightarrow> Q" | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 33 | unfolding FF_def TT_def by (induct p) auto | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 34 | |
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 35 | lemma tr_induct: "\<lbrakk>P \<bottom>; P TT; P FF\<rbrakk> \<Longrightarrow> P x" | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 36 | by (cases x rule: trE) simp_all | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 37 | |
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 38 | text {* distinctness for type @{typ tr} *}
 | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 39 | |
| 31076 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
29138diff
changeset | 40 | lemma dist_below_tr [simp]: | 
| 27294 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 41 | "\<not> TT \<sqsubseteq> \<bottom>" "\<not> FF \<sqsubseteq> \<bottom>" "\<not> TT \<sqsubseteq> FF" "\<not> FF \<sqsubseteq> TT" | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 42 | unfolding TT_def FF_def by simp_all | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 43 | |
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 44 | lemma dist_eq_tr [simp]: | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 45 | "TT \<noteq> \<bottom>" "FF \<noteq> \<bottom>" "TT \<noteq> FF" "\<bottom> \<noteq> TT" "\<bottom> \<noteq> FF" "FF \<noteq> TT" | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 46 | unfolding TT_def FF_def by simp_all | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 47 | |
| 31076 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
29138diff
changeset | 48 | lemma TT_below_iff [simp]: "TT \<sqsubseteq> x \<longleftrightarrow> x = TT" | 
| 27294 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 49 | by (induct x rule: tr_induct) simp_all | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 50 | |
| 31076 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
29138diff
changeset | 51 | lemma FF_below_iff [simp]: "FF \<sqsubseteq> x \<longleftrightarrow> x = FF" | 
| 27294 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 52 | by (induct x rule: tr_induct) simp_all | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 53 | |
| 31076 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
29138diff
changeset | 54 | lemma not_below_TT_iff [simp]: "\<not> (x \<sqsubseteq> TT) \<longleftrightarrow> x = FF" | 
| 27294 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 55 | by (induct x rule: tr_induct) simp_all | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 56 | |
| 31076 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
29138diff
changeset | 57 | lemma not_below_FF_iff [simp]: "\<not> (x \<sqsubseteq> FF) \<longleftrightarrow> x = TT" | 
| 27294 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 58 | by (induct x rule: tr_induct) simp_all | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 59 | |
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 60 | |
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 61 | subsection {* Case analysis *}
 | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 62 | |
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 63 | defaultsort pcpo | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 64 | |
| 25135 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 65 | definition | 
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 66 | trifte :: "'c \<rightarrow> 'c \<rightarrow> tr \<rightarrow> 'c" where | 
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 67 | ifte_def: "trifte = (\<Lambda> t e. FLIFT b. if b then t else e)" | 
| 25131 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 wenzelm parents: 
18081diff
changeset | 68 | abbreviation | 
| 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 wenzelm parents: 
18081diff
changeset | 69 |   cifte_syn :: "[tr, 'c, 'c] \<Rightarrow> 'c"  ("(3If _/ (then _/ else _) fi)" 60)  where
 | 
| 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 wenzelm parents: 
18081diff
changeset | 70 | "If b then e1 else e2 fi == trifte\<cdot>e1\<cdot>e2\<cdot>b" | 
| 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 wenzelm parents: 
18081diff
changeset | 71 | |
| 27294 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 72 | translations | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 73 | "\<Lambda> (XCONST TT). t" == "CONST trifte\<cdot>t\<cdot>\<bottom>" | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 74 | "\<Lambda> (XCONST FF). t" == "CONST trifte\<cdot>\<bottom>\<cdot>t" | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 75 | |
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 76 | lemma ifte_thms [simp]: | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 77 | "If \<bottom> then e1 else e2 fi = \<bottom>" | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 78 | "If FF then e1 else e2 fi = e2" | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 79 | "If TT then e1 else e2 fi = e1" | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 80 | by (simp_all add: ifte_def TT_def FF_def) | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 81 | |
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 82 | |
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 83 | subsection {* Boolean connectives *}
 | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 84 | |
| 25135 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 85 | definition | 
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 86 | trand :: "tr \<rightarrow> tr \<rightarrow> tr" where | 
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 87 | andalso_def: "trand = (\<Lambda> x y. If x then y else FF fi)" | 
| 25131 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 wenzelm parents: 
18081diff
changeset | 88 | abbreviation | 
| 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 wenzelm parents: 
18081diff
changeset | 89 |   andalso_syn :: "tr \<Rightarrow> tr \<Rightarrow> tr"  ("_ andalso _" [36,35] 35)  where
 | 
| 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 wenzelm parents: 
18081diff
changeset | 90 | "x andalso y == trand\<cdot>x\<cdot>y" | 
| 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 wenzelm parents: 
18081diff
changeset | 91 | |
| 25135 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 92 | definition | 
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 93 | tror :: "tr \<rightarrow> tr \<rightarrow> tr" where | 
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 94 | orelse_def: "tror = (\<Lambda> x y. If x then TT else y fi)" | 
| 25131 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 wenzelm parents: 
18081diff
changeset | 95 | abbreviation | 
| 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 wenzelm parents: 
18081diff
changeset | 96 |   orelse_syn :: "tr \<Rightarrow> tr \<Rightarrow> tr"  ("_ orelse _"  [31,30] 30)  where
 | 
| 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 wenzelm parents: 
18081diff
changeset | 97 | "x orelse y == tror\<cdot>x\<cdot>y" | 
| 25135 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 98 | |
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 99 | definition | 
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 100 | neg :: "tr \<rightarrow> tr" where | 
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 101 | "neg = flift2 Not" | 
| 18070 
b653e18f0a41
cleaned up; removed adm_tricks in favor of compactness theorems
 huffman parents: 
16756diff
changeset | 102 | |
| 25135 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 103 | definition | 
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 104 | If2 :: "[tr, 'c, 'c] \<Rightarrow> 'c" where | 
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 105 | "If2 Q x y = (If Q then x else y fi)" | 
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 106 | |
| 15649 | 107 | text {* tactic for tr-thms with case split *}
 | 
| 108 | ||
| 109 | lemmas tr_defs = andalso_def orelse_def neg_def ifte_def TT_def FF_def | |
| 27148 | 110 | |
| 15649 | 111 | text {* lemmas about andalso, orelse, neg and if *}
 | 
| 112 | ||
| 113 | lemma andalso_thms [simp]: | |
| 114 | "(TT andalso y) = y" | |
| 115 | "(FF andalso y) = FF" | |
| 18070 
b653e18f0a41
cleaned up; removed adm_tricks in favor of compactness theorems
 huffman parents: 
16756diff
changeset | 116 | "(\<bottom> andalso y) = \<bottom>" | 
| 15649 | 117 | "(y andalso TT) = y" | 
| 118 | "(y andalso y) = y" | |
| 119 | apply (unfold andalso_def, simp_all) | |
| 27294 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 120 | apply (cases y rule: trE, simp_all) | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 121 | apply (cases y rule: trE, simp_all) | 
| 15649 | 122 | done | 
| 123 | ||
| 124 | lemma orelse_thms [simp]: | |
| 125 | "(TT orelse y) = TT" | |
| 126 | "(FF orelse y) = y" | |
| 18070 
b653e18f0a41
cleaned up; removed adm_tricks in favor of compactness theorems
 huffman parents: 
16756diff
changeset | 127 | "(\<bottom> orelse y) = \<bottom>" | 
| 15649 | 128 | "(y orelse FF) = y" | 
| 129 | "(y orelse y) = y" | |
| 130 | apply (unfold orelse_def, simp_all) | |
| 27294 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 131 | apply (cases y rule: trE, simp_all) | 
| 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 132 | apply (cases y rule: trE, simp_all) | 
| 15649 | 133 | done | 
| 134 | ||
| 135 | lemma neg_thms [simp]: | |
| 18070 
b653e18f0a41
cleaned up; removed adm_tricks in favor of compactness theorems
 huffman parents: 
16756diff
changeset | 136 | "neg\<cdot>TT = FF" | 
| 
b653e18f0a41
cleaned up; removed adm_tricks in favor of compactness theorems
 huffman parents: 
16756diff
changeset | 137 | "neg\<cdot>FF = TT" | 
| 
b653e18f0a41
cleaned up; removed adm_tricks in favor of compactness theorems
 huffman parents: 
16756diff
changeset | 138 | "neg\<cdot>\<bottom> = \<bottom>" | 
| 15649 | 139 | by (simp_all add: neg_def TT_def FF_def) | 
| 140 | ||
| 141 | text {* split-tac for If via If2 because the constant has to be a constant *}
 | |
| 25135 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 142 | |
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 143 | lemma split_If2: | 
| 18070 
b653e18f0a41
cleaned up; removed adm_tricks in favor of compactness theorems
 huffman parents: 
16756diff
changeset | 144 | "P (If2 Q x y) = ((Q = \<bottom> \<longrightarrow> P \<bottom>) \<and> (Q = TT \<longrightarrow> P x) \<and> (Q = FF \<longrightarrow> P y))" | 
| 15649 | 145 | apply (unfold If2_def) | 
| 146 | apply (rule_tac p = "Q" in trE) | |
| 147 | apply (simp_all) | |
| 148 | done | |
| 149 | ||
| 16121 | 150 | ML {*
 | 
| 15649 | 151 | val split_If_tac = | 
| 25135 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 152 |   simp_tac (HOL_basic_ss addsimps [@{thm If2_def} RS sym])
 | 
| 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 153 |     THEN' (split_tac [@{thm split_If2}])
 | 
| 15649 | 154 | *} | 
| 155 | ||
| 156 | subsection "Rewriting of HOLCF operations to HOL functions" | |
| 157 | ||
| 25135 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 158 | lemma andalso_or: | 
| 18070 
b653e18f0a41
cleaned up; removed adm_tricks in favor of compactness theorems
 huffman parents: 
16756diff
changeset | 159 | "t \<noteq> \<bottom> \<Longrightarrow> ((t andalso s) = FF) = (t = FF \<or> s = FF)" | 
| 15649 | 160 | apply (rule_tac p = "t" in trE) | 
| 161 | apply simp_all | |
| 162 | done | |
| 163 | ||
| 18070 
b653e18f0a41
cleaned up; removed adm_tricks in favor of compactness theorems
 huffman parents: 
16756diff
changeset | 164 | lemma andalso_and: | 
| 
b653e18f0a41
cleaned up; removed adm_tricks in favor of compactness theorems
 huffman parents: 
16756diff
changeset | 165 | "t \<noteq> \<bottom> \<Longrightarrow> ((t andalso s) \<noteq> FF) = (t \<noteq> FF \<and> s \<noteq> FF)" | 
| 15649 | 166 | apply (rule_tac p = "t" in trE) | 
| 167 | apply simp_all | |
| 168 | done | |
| 169 | ||
| 18070 
b653e18f0a41
cleaned up; removed adm_tricks in favor of compactness theorems
 huffman parents: 
16756diff
changeset | 170 | lemma Def_bool1 [simp]: "(Def x \<noteq> FF) = x" | 
| 15649 | 171 | by (simp add: FF_def) | 
| 172 | ||
| 18070 
b653e18f0a41
cleaned up; removed adm_tricks in favor of compactness theorems
 huffman parents: 
16756diff
changeset | 173 | lemma Def_bool2 [simp]: "(Def x = FF) = (\<not> x)" | 
| 15649 | 174 | by (simp add: FF_def) | 
| 175 | ||
| 176 | lemma Def_bool3 [simp]: "(Def x = TT) = x" | |
| 177 | by (simp add: TT_def) | |
| 178 | ||
| 18070 
b653e18f0a41
cleaned up; removed adm_tricks in favor of compactness theorems
 huffman parents: 
16756diff
changeset | 179 | lemma Def_bool4 [simp]: "(Def x \<noteq> TT) = (\<not> x)" | 
| 15649 | 180 | by (simp add: TT_def) | 
| 181 | ||
| 25135 
4f8176c940cf
modernized specifications ('definition', 'axiomatization');
 wenzelm parents: 
25131diff
changeset | 182 | lemma If_and_if: | 
| 18070 
b653e18f0a41
cleaned up; removed adm_tricks in favor of compactness theorems
 huffman parents: 
16756diff
changeset | 183 | "(If Def P then A else B fi) = (if P then A else B)" | 
| 15649 | 184 | apply (rule_tac p = "Def P" in trE) | 
| 185 | apply (auto simp add: TT_def[symmetric] FF_def[symmetric]) | |
| 186 | done | |
| 187 | ||
| 18070 
b653e18f0a41
cleaned up; removed adm_tricks in favor of compactness theorems
 huffman parents: 
16756diff
changeset | 188 | subsection {* Compactness *}
 | 
| 15649 | 189 | |
| 27294 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 190 | lemma compact_TT: "compact TT" | 
| 18070 
b653e18f0a41
cleaned up; removed adm_tricks in favor of compactness theorems
 huffman parents: 
16756diff
changeset | 191 | by (rule compact_chfin) | 
| 15649 | 192 | |
| 27294 
c11e716fafeb
added some lemmas; reorganized into sections; tuned proofs
 huffman parents: 
27148diff
changeset | 193 | lemma compact_FF: "compact FF" | 
| 18070 
b653e18f0a41
cleaned up; removed adm_tricks in favor of compactness theorems
 huffman parents: 
16756diff
changeset | 194 | by (rule compact_chfin) | 
| 2640 | 195 | |
| 196 | end |