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