| author | wenzelm | 
| Thu, 28 Jul 2016 20:39:46 +0200 | |
| changeset 63558 | 0aa33085c8b1 | 
| parent 63400 | 249fa34faba2 | 
| child 63575 | b9bd9e61fd63 | 
| permissions | -rw-r--r-- | 
| 10213 | 1 | (* Title: HOL/Sum_Type.thy | 
| 2 | Author: Lawrence C Paulson, Cambridge University Computer Laboratory | |
| 3 | Copyright 1992 University of Cambridge | |
| 4 | *) | |
| 5 | ||
| 60758 | 6 | section\<open>The Disjoint Sum of Two Types\<close> | 
| 10213 | 7 | |
| 15391 
797ed46d724b
converted Sum_Type to new-style theory: Inl, Inr are NO LONGER global
 paulson parents: 
11609diff
changeset | 8 | theory Sum_Type | 
| 33961 | 9 | imports Typedef Inductive Fun | 
| 15391 
797ed46d724b
converted Sum_Type to new-style theory: Inl, Inr are NO LONGER global
 paulson parents: 
11609diff
changeset | 10 | begin | 
| 
797ed46d724b
converted Sum_Type to new-style theory: Inl, Inr are NO LONGER global
 paulson parents: 
11609diff
changeset | 11 | |
| 60758 | 12 | subsection \<open>Construction of the sum type and its basic abstract operations\<close> | 
| 10213 | 13 | |
| 63400 | 14 | definition Inl_Rep :: "'a \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> bool \<Rightarrow> bool" | 
| 15 | where "Inl_Rep a x y p \<longleftrightarrow> x = a \<and> p" | |
| 10213 | 16 | |
| 63400 | 17 | definition Inr_Rep :: "'b \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> bool \<Rightarrow> bool" | 
| 18 | where "Inr_Rep b x y p \<longleftrightarrow> y = b \<and> \<not> p" | |
| 15391 
797ed46d724b
converted Sum_Type to new-style theory: Inl, Inr are NO LONGER global
 paulson parents: 
11609diff
changeset | 19 | |
| 45694 
4a8743618257
prefer typedef without extra definition and alternative name;
 wenzelm parents: 
45204diff
changeset | 20 | definition "sum = {f. (\<exists>a. f = Inl_Rep (a::'a)) \<or> (\<exists>b. f = Inr_Rep (b::'b))}"
 | 
| 
4a8743618257
prefer typedef without extra definition and alternative name;
 wenzelm parents: 
45204diff
changeset | 21 | |
| 63400 | 22 | typedef ('a, 'b) sum (infixr "+" 10) = "sum :: ('a \<Rightarrow> 'b \<Rightarrow> bool \<Rightarrow> bool) set"
 | 
| 45694 
4a8743618257
prefer typedef without extra definition and alternative name;
 wenzelm parents: 
45204diff
changeset | 23 | unfolding sum_def by auto | 
| 10213 | 24 | |
| 37388 | 25 | lemma Inl_RepI: "Inl_Rep a \<in> sum" | 
| 26 | by (auto simp add: sum_def) | |
| 15391 
797ed46d724b
converted Sum_Type to new-style theory: Inl, Inr are NO LONGER global
 paulson parents: 
11609diff
changeset | 27 | |
| 37388 | 28 | lemma Inr_RepI: "Inr_Rep b \<in> sum" | 
| 29 | by (auto simp add: sum_def) | |
| 15391 
797ed46d724b
converted Sum_Type to new-style theory: Inl, Inr are NO LONGER global
 paulson parents: 
11609diff
changeset | 30 | |
| 37388 | 31 | lemma inj_on_Abs_sum: "A \<subseteq> sum \<Longrightarrow> inj_on Abs_sum A" | 
| 32 | by (rule inj_on_inverseI, rule Abs_sum_inverse) auto | |
| 15391 
797ed46d724b
converted Sum_Type to new-style theory: Inl, Inr are NO LONGER global
 paulson parents: 
11609diff
changeset | 33 | |
| 33962 | 34 | lemma Inl_Rep_inject: "inj_on Inl_Rep A" | 
| 35 | proof (rule inj_onI) | |
| 36 | show "\<And>a c. Inl_Rep a = Inl_Rep c \<Longrightarrow> a = c" | |
| 39302 
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
 nipkow parents: 
39198diff
changeset | 37 | by (auto simp add: Inl_Rep_def fun_eq_iff) | 
| 33962 | 38 | qed | 
| 15391 
797ed46d724b
converted Sum_Type to new-style theory: Inl, Inr are NO LONGER global
 paulson parents: 
11609diff
changeset | 39 | |
| 33962 | 40 | lemma Inr_Rep_inject: "inj_on Inr_Rep A" | 
| 41 | proof (rule inj_onI) | |
| 42 | show "\<And>b d. Inr_Rep b = Inr_Rep d \<Longrightarrow> b = d" | |
| 39302 
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
 nipkow parents: 
39198diff
changeset | 43 | by (auto simp add: Inr_Rep_def fun_eq_iff) | 
| 33962 | 44 | qed | 
| 15391 
797ed46d724b
converted Sum_Type to new-style theory: Inl, Inr are NO LONGER global
 paulson parents: 
11609diff
changeset | 45 | |
| 33962 | 46 | lemma Inl_Rep_not_Inr_Rep: "Inl_Rep a \<noteq> Inr_Rep b" | 
| 39302 
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
 nipkow parents: 
39198diff
changeset | 47 | by (auto simp add: Inl_Rep_def Inr_Rep_def fun_eq_iff) | 
| 15391 
797ed46d724b
converted Sum_Type to new-style theory: Inl, Inr are NO LONGER global
 paulson parents: 
11609diff
changeset | 48 | |
| 63400 | 49 | definition Inl :: "'a \<Rightarrow> 'a + 'b" | 
| 50 | where "Inl = Abs_sum \<circ> Inl_Rep" | |
| 15391 
797ed46d724b
converted Sum_Type to new-style theory: Inl, Inr are NO LONGER global
 paulson parents: 
11609diff
changeset | 51 | |
| 63400 | 52 | definition Inr :: "'b \<Rightarrow> 'a + 'b" | 
| 53 | where "Inr = Abs_sum \<circ> Inr_Rep" | |
| 15391 
797ed46d724b
converted Sum_Type to new-style theory: Inl, Inr are NO LONGER global
 paulson parents: 
11609diff
changeset | 54 | |
| 29025 
8c8859c0d734
move lemmas from Numeral_Type.thy to other theories
 huffman parents: 
28524diff
changeset | 55 | lemma inj_Inl [simp]: "inj_on Inl A" | 
| 63400 | 56 | by (auto simp add: Inl_def intro!: comp_inj_on Inl_Rep_inject inj_on_Abs_sum Inl_RepI) | 
| 29025 
8c8859c0d734
move lemmas from Numeral_Type.thy to other theories
 huffman parents: 
28524diff
changeset | 57 | |
| 33962 | 58 | lemma Inl_inject: "Inl x = Inl y \<Longrightarrow> x = y" | 
| 63400 | 59 | using inj_Inl by (rule injD) | 
| 15391 
797ed46d724b
converted Sum_Type to new-style theory: Inl, Inr are NO LONGER global
 paulson parents: 
11609diff
changeset | 60 | |
| 29025 
8c8859c0d734
move lemmas from Numeral_Type.thy to other theories
 huffman parents: 
28524diff
changeset | 61 | lemma inj_Inr [simp]: "inj_on Inr A" | 
| 63400 | 62 | by (auto simp add: Inr_def intro!: comp_inj_on Inr_Rep_inject inj_on_Abs_sum Inr_RepI) | 
| 15391 
797ed46d724b
converted Sum_Type to new-style theory: Inl, Inr are NO LONGER global
 paulson parents: 
11609diff
changeset | 63 | |
| 33962 | 64 | lemma Inr_inject: "Inr x = Inr y \<Longrightarrow> x = y" | 
| 63400 | 65 | using inj_Inr by (rule injD) | 
| 15391 
797ed46d724b
converted Sum_Type to new-style theory: Inl, Inr are NO LONGER global
 paulson parents: 
11609diff
changeset | 66 | |
| 33962 | 67 | lemma Inl_not_Inr: "Inl a \<noteq> Inr b" | 
| 68 | proof - | |
| 63400 | 69 |   have "{Inl_Rep a, Inr_Rep b} \<subseteq> sum"
 | 
| 70 | using Inl_RepI [of a] Inr_RepI [of b] by auto | |
| 37388 | 71 |   with inj_on_Abs_sum have "inj_on Abs_sum {Inl_Rep a, Inr_Rep b}" .
 | 
| 63400 | 72 | with Inl_Rep_not_Inr_Rep [of a b] inj_on_contraD have "Abs_sum (Inl_Rep a) \<noteq> Abs_sum (Inr_Rep b)" | 
| 73 | by auto | |
| 74 | then show ?thesis | |
| 75 | by (simp add: Inl_def Inr_def) | |
| 33962 | 76 | qed | 
| 15391 
797ed46d724b
converted Sum_Type to new-style theory: Inl, Inr are NO LONGER global
 paulson parents: 
11609diff
changeset | 77 | |
| 63400 | 78 | lemma Inr_not_Inl: "Inr b \<noteq> Inl a" | 
| 33962 | 79 | using Inl_not_Inr by (rule not_sym) | 
| 15391 
797ed46d724b
converted Sum_Type to new-style theory: Inl, Inr are NO LONGER global
 paulson parents: 
11609diff
changeset | 80 | |
| 63400 | 81 | lemma sumE: | 
| 33962 | 82 | assumes "\<And>x::'a. s = Inl x \<Longrightarrow> P" | 
| 83 | and "\<And>y::'b. s = Inr y \<Longrightarrow> P" | |
| 84 | shows P | |
| 37388 | 85 | proof (rule Abs_sum_cases [of s]) | 
| 63400 | 86 | fix f | 
| 37388 | 87 | assume "s = Abs_sum f" and "f \<in> sum" | 
| 88 | with assms show P by (auto simp add: sum_def Inl_def Inr_def) | |
| 33962 | 89 | qed | 
| 33961 | 90 | |
| 55469 
b19dd108f0c2
aligned the syntax for 'free_constructors' on the 'datatype_new' and 'codatatype' syntax
 blanchet parents: 
55468diff
changeset | 91 | free_constructors case_sum for | 
| 63400 | 92 | isl: Inl projl | 
| 93 | | Inr projr | |
| 58189 
9d714be4f028
added 'plugins' option to control which hooks are enabled
 blanchet parents: 
55931diff
changeset | 94 | by (erule sumE, assumption) (auto dest: Inl_inject Inr_inject simp add: Inl_not_Inr) | 
| 55393 
ce5cebfaedda
 se 'wrap_free_constructors' to register 'sum' , 'prod', 'unit', 'bool' with their discriminators/selectors
 blanchet parents: 
53010diff
changeset | 95 | |
| 61799 | 96 | text \<open>Avoid name clashes by prefixing the output of \<open>old_rep_datatype\<close> with \<open>old\<close>.\<close> | 
| 55442 | 97 | |
| 60758 | 98 | setup \<open>Sign.mandatory_path "old"\<close> | 
| 55393 
ce5cebfaedda
 se 'wrap_free_constructors' to register 'sum' , 'prod', 'unit', 'bool' with their discriminators/selectors
 blanchet parents: 
53010diff
changeset | 99 | |
| 58306 
117ba6cbe414
renamed 'rep_datatype' to 'old_rep_datatype' (HOL)
 blanchet parents: 
58189diff
changeset | 100 | old_rep_datatype Inl Inr | 
| 33961 | 101 | proof - | 
| 102 | fix P | |
| 103 | fix s :: "'a + 'b" | |
| 61076 | 104 | assume x: "\<And>x::'a. P (Inl x)" and y: "\<And>y::'b. P (Inr y)" | 
| 33961 | 105 | then show "P s" by (auto intro: sumE [of s]) | 
| 33962 | 106 | qed (auto dest: Inl_inject Inr_inject simp add: Inl_not_Inr) | 
| 107 | ||
| 60758 | 108 | setup \<open>Sign.parent_path\<close> | 
| 55393 
ce5cebfaedda
 se 'wrap_free_constructors' to register 'sum' , 'prod', 'unit', 'bool' with their discriminators/selectors
 blanchet parents: 
53010diff
changeset | 109 | |
| 61799 | 110 | text \<open>But erase the prefix for properties that are not generated by \<open>free_constructors\<close>.\<close> | 
| 55442 | 111 | |
| 60758 | 112 | setup \<open>Sign.mandatory_path "sum"\<close> | 
| 55393 
ce5cebfaedda
 se 'wrap_free_constructors' to register 'sum' , 'prod', 'unit', 'bool' with their discriminators/selectors
 blanchet parents: 
53010diff
changeset | 113 | |
| 
ce5cebfaedda
 se 'wrap_free_constructors' to register 'sum' , 'prod', 'unit', 'bool' with their discriminators/selectors
 blanchet parents: 
53010diff
changeset | 114 | declare | 
| 
ce5cebfaedda
 se 'wrap_free_constructors' to register 'sum' , 'prod', 'unit', 'bool' with their discriminators/selectors
 blanchet parents: 
53010diff
changeset | 115 | old.sum.inject[iff del] | 
| 
ce5cebfaedda
 se 'wrap_free_constructors' to register 'sum' , 'prod', 'unit', 'bool' with their discriminators/selectors
 blanchet parents: 
53010diff
changeset | 116 | old.sum.distinct(1)[simp del, induct_simp del] | 
| 
ce5cebfaedda
 se 'wrap_free_constructors' to register 'sum' , 'prod', 'unit', 'bool' with their discriminators/selectors
 blanchet parents: 
53010diff
changeset | 117 | |
| 
ce5cebfaedda
 se 'wrap_free_constructors' to register 'sum' , 'prod', 'unit', 'bool' with their discriminators/selectors
 blanchet parents: 
53010diff
changeset | 118 | lemmas induct = old.sum.induct | 
| 
ce5cebfaedda
 se 'wrap_free_constructors' to register 'sum' , 'prod', 'unit', 'bool' with their discriminators/selectors
 blanchet parents: 
53010diff
changeset | 119 | lemmas inducts = old.sum.inducts | 
| 55642 
63beb38e9258
adapted to renaming of datatype 'cases' and 'recs' to 'case' and 'rec'
 blanchet parents: 
55575diff
changeset | 120 | lemmas rec = old.sum.rec | 
| 
63beb38e9258
adapted to renaming of datatype 'cases' and 'recs' to 'case' and 'rec'
 blanchet parents: 
55575diff
changeset | 121 | lemmas simps = sum.inject sum.distinct sum.case sum.rec | 
| 55393 
ce5cebfaedda
 se 'wrap_free_constructors' to register 'sum' , 'prod', 'unit', 'bool' with their discriminators/selectors
 blanchet parents: 
53010diff
changeset | 122 | |
| 60758 | 123 | setup \<open>Sign.parent_path\<close> | 
| 55393 
ce5cebfaedda
 se 'wrap_free_constructors' to register 'sum' , 'prod', 'unit', 'bool' with their discriminators/selectors
 blanchet parents: 
53010diff
changeset | 124 | |
| 63400 | 125 | primrec map_sum :: "('a \<Rightarrow> 'c) \<Rightarrow> ('b \<Rightarrow> 'd) \<Rightarrow> 'a + 'b \<Rightarrow> 'c + 'd"
 | 
| 126 | where | |
| 55931 | 127 | "map_sum f1 f2 (Inl a) = Inl (f1 a)" | 
| 128 | | "map_sum f1 f2 (Inr a) = Inr (f2 a)" | |
| 40610 | 129 | |
| 63400 | 130 | functor map_sum: map_sum | 
| 131 | proof - | |
| 132 | show "map_sum f g \<circ> map_sum h i = map_sum (f \<circ> h) (g \<circ> i)" for f g h i | |
| 41372 | 133 | proof | 
| 63400 | 134 | show "(map_sum f g \<circ> map_sum h i) s = map_sum (f \<circ> h) (g \<circ> i) s" for s | 
| 41372 | 135 | by (cases s) simp_all | 
| 136 | qed | |
| 55931 | 137 | show "map_sum id id = id" | 
| 41372 | 138 | proof | 
| 63400 | 139 | show "map_sum id id s = id s" for s | 
| 41372 | 140 | by (cases s) simp_all | 
| 141 | qed | |
| 40610 | 142 | qed | 
| 143 | ||
| 53010 | 144 | lemma split_sum_all: "(\<forall>x. P x) \<longleftrightarrow> (\<forall>x. P (Inl x)) \<and> (\<forall>x. P (Inr x))" | 
| 145 | by (auto intro: sum.induct) | |
| 146 | ||
| 147 | lemma split_sum_ex: "(\<exists>x. P x) \<longleftrightarrow> (\<exists>x. P (Inl x)) \<or> (\<exists>x. P (Inr x))" | |
| 63400 | 148 | using split_sum_all[of "\<lambda>x. \<not>P x"] by blast | 
| 149 | ||
| 33961 | 150 | |
| 60758 | 151 | subsection \<open>Projections\<close> | 
| 33962 | 152 | |
| 55414 
eab03e9cee8a
renamed '{prod,sum,bool,unit}_case' to 'case_...'
 blanchet parents: 
55403diff
changeset | 153 | lemma case_sum_KK [simp]: "case_sum (\<lambda>x. a) (\<lambda>x. a) = (\<lambda>x. a)" | 
| 33961 | 154 | by (rule ext) (simp split: sum.split) | 
| 155 | ||
| 55414 
eab03e9cee8a
renamed '{prod,sum,bool,unit}_case' to 'case_...'
 blanchet parents: 
55403diff
changeset | 156 | lemma surjective_sum: "case_sum (\<lambda>x::'a. f (Inl x)) (\<lambda>y::'b. f (Inr y)) = f" | 
| 33962 | 157 | proof | 
| 158 | fix s :: "'a + 'b" | |
| 61076 | 159 | show "(case s of Inl (x::'a) \<Rightarrow> f (Inl x) | Inr (y::'b) \<Rightarrow> f (Inr y)) = f s" | 
| 33962 | 160 | by (cases s) simp_all | 
| 161 | qed | |
| 33961 | 162 | |
| 55414 
eab03e9cee8a
renamed '{prod,sum,bool,unit}_case' to 'case_...'
 blanchet parents: 
55403diff
changeset | 163 | lemma case_sum_inject: | 
| 
eab03e9cee8a
renamed '{prod,sum,bool,unit}_case' to 'case_...'
 blanchet parents: 
55403diff
changeset | 164 | assumes a: "case_sum f1 f2 = case_sum g1 g2" | 
| 63400 | 165 | and r: "f1 = g1 \<Longrightarrow> f2 = g2 \<Longrightarrow> P" | 
| 33962 | 166 | shows P | 
| 167 | proof (rule r) | |
| 63400 | 168 | show "f1 = g1" | 
| 169 | proof | |
| 33962 | 170 | fix x :: 'a | 
| 55414 
eab03e9cee8a
renamed '{prod,sum,bool,unit}_case' to 'case_...'
 blanchet parents: 
55403diff
changeset | 171 | from a have "case_sum f1 f2 (Inl x) = case_sum g1 g2 (Inl x)" by simp | 
| 33962 | 172 | then show "f1 x = g1 x" by simp | 
| 173 | qed | |
| 63400 | 174 | show "f2 = g2" | 
| 175 | proof | |
| 33962 | 176 | fix y :: 'b | 
| 55414 
eab03e9cee8a
renamed '{prod,sum,bool,unit}_case' to 'case_...'
 blanchet parents: 
55403diff
changeset | 177 | from a have "case_sum f1 f2 (Inr y) = case_sum g1 g2 (Inr y)" by simp | 
| 33962 | 178 | then show "f2 y = g2 y" by simp | 
| 179 | qed | |
| 180 | qed | |
| 181 | ||
| 63400 | 182 | primrec Suml :: "('a \<Rightarrow> 'c) \<Rightarrow> 'a + 'b \<Rightarrow> 'c"
 | 
| 183 | where "Suml f (Inl x) = f x" | |
| 33962 | 184 | |
| 63400 | 185 | primrec Sumr :: "('b \<Rightarrow> 'c) \<Rightarrow> 'a + 'b \<Rightarrow> 'c"
 | 
| 186 | where "Sumr f (Inr x) = f x" | |
| 33962 | 187 | |
| 188 | lemma Suml_inject: | |
| 63400 | 189 | assumes "Suml f = Suml g" | 
| 190 | shows "f = g" | |
| 33962 | 191 | proof | 
| 192 | fix x :: 'a | |
| 61076 | 193 | let ?s = "Inl x :: 'a + 'b" | 
| 33962 | 194 | from assms have "Suml f ?s = Suml g ?s" by simp | 
| 195 | then show "f x = g x" by simp | |
| 33961 | 196 | qed | 
| 197 | ||
| 33962 | 198 | lemma Sumr_inject: | 
| 63400 | 199 | assumes "Sumr f = Sumr g" | 
| 200 | shows "f = g" | |
| 33962 | 201 | proof | 
| 202 | fix x :: 'b | |
| 61076 | 203 | let ?s = "Inr x :: 'a + 'b" | 
| 33962 | 204 | from assms have "Sumr f ?s = Sumr g ?s" by simp | 
| 205 | then show "f x = g x" by simp | |
| 206 | qed | |
| 33961 | 207 | |
| 33995 | 208 | |
| 60758 | 209 | subsection \<open>The Disjoint Sum of Sets\<close> | 
| 33961 | 210 | |
| 63400 | 211 | definition Plus :: "'a set \<Rightarrow> 'b set \<Rightarrow> ('a + 'b) set"  (infixr "<+>" 65)
 | 
| 212 | where "A <+> B = Inl ` A \<union> Inr ` B" | |
| 33962 | 213 | |
| 63400 | 214 | hide_const (open) Plus \<comment> "Valuable identifier" | 
| 40271 | 215 | |
| 33962 | 216 | lemma InlI [intro!]: "a \<in> A \<Longrightarrow> Inl a \<in> A <+> B" | 
| 63400 | 217 | by (simp add: Plus_def) | 
| 33961 | 218 | |
| 33962 | 219 | lemma InrI [intro!]: "b \<in> B \<Longrightarrow> Inr b \<in> A <+> B" | 
| 63400 | 220 | by (simp add: Plus_def) | 
| 33961 | 221 | |
| 60758 | 222 | text \<open>Exhaustion rule for sums, a degenerate form of induction\<close> | 
| 33962 | 223 | |
| 63400 | 224 | lemma PlusE [elim!]: | 
| 33962 | 225 | "u \<in> A <+> B \<Longrightarrow> (\<And>x. x \<in> A \<Longrightarrow> u = Inl x \<Longrightarrow> P) \<Longrightarrow> (\<And>y. y \<in> B \<Longrightarrow> u = Inr y \<Longrightarrow> P) \<Longrightarrow> P" | 
| 63400 | 226 | by (auto simp add: Plus_def) | 
| 33961 | 227 | |
| 33962 | 228 | lemma Plus_eq_empty_conv [simp]: "A <+> B = {} \<longleftrightarrow> A = {} \<and> B = {}"
 | 
| 63400 | 229 | by auto | 
| 33961 | 230 | |
| 33962 | 231 | lemma UNIV_Plus_UNIV [simp]: "UNIV <+> UNIV = UNIV" | 
| 39302 
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
 nipkow parents: 
39198diff
changeset | 232 | proof (rule set_eqI) | 
| 33962 | 233 | fix u :: "'a + 'b" | 
| 234 | show "u \<in> UNIV <+> UNIV \<longleftrightarrow> u \<in> UNIV" by (cases u) auto | |
| 235 | qed | |
| 33961 | 236 | |
| 63400 | 237 | lemma UNIV_sum: "UNIV = Inl ` UNIV \<union> Inr ` UNIV" | 
| 49948 
744934b818c7
moved quite generic material from theory Enum to more appropriate places
 haftmann parents: 
49834diff
changeset | 238 | proof - | 
| 63400 | 239 | have "x \<in> range Inl" if "x \<notin> range Inr" for x :: "'a + 'b" | 
| 240 | using that by (cases x) simp_all | |
| 241 | then show ?thesis by auto | |
| 49948 
744934b818c7
moved quite generic material from theory Enum to more appropriate places
 haftmann parents: 
49834diff
changeset | 242 | qed | 
| 
744934b818c7
moved quite generic material from theory Enum to more appropriate places
 haftmann parents: 
49834diff
changeset | 243 | |
| 55393 
ce5cebfaedda
 se 'wrap_free_constructors' to register 'sum' , 'prod', 'unit', 'bool' with their discriminators/selectors
 blanchet parents: 
53010diff
changeset | 244 | hide_const (open) Suml Sumr sum | 
| 45204 
5e4a1270c000
hide typedef-generated constants Product_Type.prod and Sum_Type.sum
 huffman parents: 
41505diff
changeset | 245 | |
| 10213 | 246 | end |