src/HOLCF/Cprod.thy
author huffman
Mon Jan 14 21:16:06 2008 +0100 (2008-01-14)
changeset 25910 25533eb2b914
parent 25908 d8ce142f7e6e
child 25913 e1b6521c1f94
permissions -rw-r--r--
add bifinite instances
huffman@15600
     1
(*  Title:      HOLCF/Cprod.thy
huffman@15576
     2
    ID:         $Id$
huffman@15576
     3
    Author:     Franz Regensburger
huffman@15576
     4
wenzelm@16070
     5
Partial ordering for cartesian product of HOL products.
huffman@15576
     6
*)
huffman@15576
     7
huffman@15576
     8
header {* The cpo of cartesian products *}
huffman@15576
     9
huffman@15577
    10
theory Cprod
huffman@25910
    11
imports Bifinite
huffman@15577
    12
begin
huffman@15576
    13
huffman@15576
    14
defaultsort cpo
huffman@15576
    15
huffman@16008
    16
subsection {* Type @{typ unit} is a pcpo *}
huffman@16008
    17
huffman@25907
    18
instantiation unit :: po
huffman@25784
    19
begin
huffman@16008
    20
huffman@25784
    21
definition
huffman@16008
    22
  less_unit_def [simp]: "x \<sqsubseteq> (y::unit) \<equiv> True"
huffman@16008
    23
huffman@25907
    24
instance
huffman@25907
    25
by intro_classes simp_all
huffman@25784
    26
huffman@25907
    27
end
huffman@16008
    28
huffman@25815
    29
instance unit :: finite_po ..
huffman@16008
    30
huffman@16008
    31
instance unit :: pcpo
huffman@16008
    32
by intro_classes simp
huffman@16008
    33
wenzelm@25131
    34
definition
wenzelm@25131
    35
  unit_when :: "'a \<rightarrow> unit \<rightarrow> 'a" where
wenzelm@25131
    36
  "unit_when = (\<Lambda> a _. a)"
huffman@16008
    37
huffman@18289
    38
translations
wenzelm@25131
    39
  "\<Lambda>(). t" == "CONST unit_when\<cdot>t"
huffman@18289
    40
huffman@18289
    41
lemma unit_when [simp]: "unit_when\<cdot>a\<cdot>u = a"
huffman@18289
    42
by (simp add: unit_when_def)
huffman@18289
    43
huffman@18289
    44
huffman@18289
    45
subsection {* Product type is a partial order *}
huffman@15593
    46
huffman@25908
    47
instantiation "*" :: (po, po) po
huffman@25784
    48
begin
huffman@15576
    49
huffman@25784
    50
definition
huffman@16081
    51
  less_cprod_def: "(op \<sqsubseteq>) \<equiv> \<lambda>p1 p2. (fst p1 \<sqsubseteq> fst p2 \<and> snd p1 \<sqsubseteq> snd p2)"
huffman@15576
    52
huffman@25908
    53
instance
huffman@25784
    54
proof
huffman@25784
    55
  fix x :: "'a \<times> 'b"
huffman@25784
    56
  show "x \<sqsubseteq> x"
huffman@25784
    57
    unfolding less_cprod_def by simp
huffman@25784
    58
next
huffman@25784
    59
  fix x y :: "'a \<times> 'b"
huffman@25784
    60
  assume "x \<sqsubseteq> y" "y \<sqsubseteq> x" thus "x = y"
huffman@25784
    61
    unfolding less_cprod_def Pair_fst_snd_eq
huffman@25784
    62
    by (fast intro: antisym_less)
huffman@25784
    63
next
huffman@25784
    64
  fix x y z :: "'a \<times> 'b"
huffman@25784
    65
  assume "x \<sqsubseteq> y" "y \<sqsubseteq> z" thus "x \<sqsubseteq> z"
huffman@25784
    66
    unfolding less_cprod_def
huffman@25784
    67
    by (fast intro: trans_less)
huffman@25784
    68
qed
huffman@15576
    69
huffman@25908
    70
end
huffman@15576
    71
huffman@15593
    72
subsection {* Monotonicity of @{text "(_,_)"}, @{term fst}, @{term snd} *}
huffman@15576
    73
huffman@15593
    74
text {* Pair @{text "(_,_)"}  is monotone in both arguments *}
huffman@15576
    75
huffman@16081
    76
lemma monofun_pair1: "monofun (\<lambda>x. (x, y))"
huffman@16210
    77
by (simp add: monofun_def less_cprod_def)
huffman@15576
    78
huffman@16081
    79
lemma monofun_pair2: "monofun (\<lambda>y. (x, y))"
huffman@16210
    80
by (simp add: monofun_def less_cprod_def)
huffman@15576
    81
huffman@16081
    82
lemma monofun_pair:
huffman@16081
    83
  "\<lbrakk>x1 \<sqsubseteq> x2; y1 \<sqsubseteq> y2\<rbrakk> \<Longrightarrow> (x1, y1) \<sqsubseteq> (x2, y2)"
huffman@16081
    84
by (simp add: less_cprod_def)
huffman@15576
    85
huffman@15593
    86
text {* @{term fst} and @{term snd} are monotone *}
huffman@15576
    87
huffman@15576
    88
lemma monofun_fst: "monofun fst"
huffman@16210
    89
by (simp add: monofun_def less_cprod_def)
huffman@15576
    90
huffman@15576
    91
lemma monofun_snd: "monofun snd"
huffman@16210
    92
by (simp add: monofun_def less_cprod_def)
huffman@15576
    93
huffman@18289
    94
subsection {* Product type is a cpo *}
huffman@15576
    95
huffman@25784
    96
lemma lub_cprod:
huffman@25784
    97
  fixes S :: "nat \<Rightarrow> ('a::cpo \<times> 'b::cpo)"
huffman@25784
    98
  assumes S: "chain S"
huffman@25784
    99
  shows "range S <<| (\<Squnion>i. fst (S i), \<Squnion>i. snd (S i))"
huffman@15576
   100
apply (rule is_lubI)
huffman@15576
   101
apply (rule ub_rangeI)
huffman@15576
   102
apply (rule_tac t = "S i" in surjective_pairing [THEN ssubst])
huffman@15576
   103
apply (rule monofun_pair)
huffman@15576
   104
apply (rule is_ub_thelub)
huffman@25784
   105
apply (rule ch2ch_monofun [OF monofun_fst S])
huffman@15576
   106
apply (rule is_ub_thelub)
huffman@25784
   107
apply (rule ch2ch_monofun [OF monofun_snd S])
huffman@15576
   108
apply (rule_tac t = "u" in surjective_pairing [THEN ssubst])
huffman@15576
   109
apply (rule monofun_pair)
huffman@15576
   110
apply (rule is_lub_thelub)
huffman@25784
   111
apply (rule ch2ch_monofun [OF monofun_fst S])
huffman@15576
   112
apply (erule monofun_fst [THEN ub2ub_monofun])
huffman@15576
   113
apply (rule is_lub_thelub)
huffman@25784
   114
apply (rule ch2ch_monofun [OF monofun_snd S])
huffman@15576
   115
apply (erule monofun_snd [THEN ub2ub_monofun])
huffman@15576
   116
done
huffman@15576
   117
huffman@16081
   118
lemma thelub_cprod:
huffman@25784
   119
  "chain (S::nat \<Rightarrow> 'a::cpo \<times> 'b::cpo)
huffman@25784
   120
    \<Longrightarrow> lub (range S) = (\<Squnion>i. fst (S i), \<Squnion>i. snd (S i))"
huffman@16081
   121
by (rule lub_cprod [THEN thelubI])
huffman@15576
   122
huffman@25784
   123
instance "*" :: (cpo, cpo) cpo
huffman@25784
   124
proof
huffman@25784
   125
  fix S :: "nat \<Rightarrow> ('a \<times> 'b)"
huffman@25784
   126
  assume "chain S"
huffman@25784
   127
  hence "range S <<| (\<Squnion>i. fst (S i), \<Squnion>i. snd (S i))"
huffman@25784
   128
    by (rule lub_cprod)
huffman@25784
   129
  thus "\<exists>x. range S <<| x" ..
huffman@25784
   130
qed
huffman@15593
   131
huffman@25827
   132
instance "*" :: (finite_po, finite_po) finite_po ..
huffman@25827
   133
huffman@18289
   134
subsection {* Product type is pointed *}
huffman@15593
   135
huffman@16081
   136
lemma minimal_cprod: "(\<bottom>, \<bottom>) \<sqsubseteq> p"
huffman@16081
   137
by (simp add: less_cprod_def)
huffman@15593
   138
huffman@25908
   139
instance "*" :: (pcpo, pcpo) pcpo
huffman@25908
   140
by intro_classes (fast intro: minimal_cprod)
huffman@15593
   141
huffman@25908
   142
lemma inst_cprod_pcpo: "\<bottom> = (\<bottom>, \<bottom>)"
huffman@16081
   143
by (rule minimal_cprod [THEN UU_I, symmetric])
huffman@16081
   144
huffman@15593
   145
huffman@15593
   146
subsection {* Continuity of @{text "(_,_)"}, @{term fst}, @{term snd} *}
huffman@15593
   147
huffman@16916
   148
lemma contlub_pair1: "contlub (\<lambda>x. (x, y))"
huffman@16210
   149
apply (rule contlubI)
huffman@15593
   150
apply (subst thelub_cprod)
huffman@15593
   151
apply (erule monofun_pair1 [THEN ch2ch_monofun])
huffman@18077
   152
apply simp
huffman@15576
   153
done
huffman@15576
   154
huffman@16081
   155
lemma contlub_pair2: "contlub (\<lambda>y. (x, y))"
huffman@16210
   156
apply (rule contlubI)
huffman@15593
   157
apply (subst thelub_cprod)
huffman@15593
   158
apply (erule monofun_pair2 [THEN ch2ch_monofun])
huffman@18077
   159
apply simp
huffman@15593
   160
done
huffman@15593
   161
huffman@16081
   162
lemma cont_pair1: "cont (\<lambda>x. (x, y))"
huffman@15593
   163
apply (rule monocontlub2cont)
huffman@15593
   164
apply (rule monofun_pair1)
huffman@15593
   165
apply (rule contlub_pair1)
huffman@15593
   166
done
huffman@15593
   167
huffman@16081
   168
lemma cont_pair2: "cont (\<lambda>y. (x, y))"
huffman@15593
   169
apply (rule monocontlub2cont)
huffman@15593
   170
apply (rule monofun_pair2)
huffman@15593
   171
apply (rule contlub_pair2)
huffman@15593
   172
done
huffman@15576
   173
huffman@16081
   174
lemma contlub_fst: "contlub fst"
huffman@16210
   175
apply (rule contlubI)
huffman@16210
   176
apply (simp add: thelub_cprod)
huffman@15593
   177
done
huffman@15593
   178
huffman@16081
   179
lemma contlub_snd: "contlub snd"
huffman@16210
   180
apply (rule contlubI)
huffman@16210
   181
apply (simp add: thelub_cprod)
huffman@15593
   182
done
huffman@15576
   183
huffman@16081
   184
lemma cont_fst: "cont fst"
huffman@15593
   185
apply (rule monocontlub2cont)
huffman@15593
   186
apply (rule monofun_fst)
huffman@15593
   187
apply (rule contlub_fst)
huffman@15593
   188
done
huffman@15593
   189
huffman@16081
   190
lemma cont_snd: "cont snd"
huffman@15593
   191
apply (rule monocontlub2cont)
huffman@15593
   192
apply (rule monofun_snd)
huffman@15593
   193
apply (rule contlub_snd)
huffman@15593
   194
done
huffman@15593
   195
huffman@15593
   196
subsection {* Continuous versions of constants *}
huffman@15576
   197
wenzelm@25131
   198
definition
wenzelm@25131
   199
  cpair :: "'a \<rightarrow> 'b \<rightarrow> ('a * 'b)"  -- {* continuous pairing *}  where
wenzelm@25131
   200
  "cpair = (\<Lambda> x y. (x, y))"
wenzelm@25131
   201
wenzelm@25131
   202
definition
wenzelm@25131
   203
  cfst :: "('a * 'b) \<rightarrow> 'a" where
wenzelm@25131
   204
  "cfst = (\<Lambda> p. fst p)"
huffman@17834
   205
wenzelm@25131
   206
definition
wenzelm@25131
   207
  csnd :: "('a * 'b) \<rightarrow> 'b" where
wenzelm@25131
   208
  "csnd = (\<Lambda> p. snd p)"      
huffman@17834
   209
wenzelm@25131
   210
definition
wenzelm@25131
   211
  csplit :: "('a \<rightarrow> 'b \<rightarrow> 'c) \<rightarrow> ('a * 'b) \<rightarrow> 'c" where
wenzelm@25131
   212
  "csplit = (\<Lambda> f p. f\<cdot>(cfst\<cdot>p)\<cdot>(csnd\<cdot>p))"
huffman@15576
   213
huffman@15576
   214
syntax
huffman@17834
   215
  "_ctuple" :: "['a, args] \<Rightarrow> 'a * 'b"  ("(1<_,/ _>)")
huffman@17834
   216
huffman@17834
   217
syntax (xsymbols)
huffman@17834
   218
  "_ctuple" :: "['a, args] \<Rightarrow> 'a * 'b"  ("(1\<langle>_,/ _\<rangle>)")
huffman@15576
   219
huffman@15576
   220
translations
huffman@18078
   221
  "\<langle>x, y, z\<rangle>" == "\<langle>x, \<langle>y, z\<rangle>\<rangle>"
wenzelm@25131
   222
  "\<langle>x, y\<rangle>"    == "CONST cpair\<cdot>x\<cdot>y"
huffman@17834
   223
huffman@17816
   224
translations
wenzelm@25131
   225
  "\<Lambda>(CONST cpair\<cdot>x\<cdot>y). t" == "CONST csplit\<cdot>(\<Lambda> x y. t)"
huffman@17816
   226
huffman@15576
   227
huffman@15593
   228
subsection {* Convert all lemmas to the continuous versions *}
huffman@15576
   229
huffman@16081
   230
lemma cpair_eq_pair: "<x, y> = (x, y)"
huffman@16081
   231
by (simp add: cpair_def cont_pair1 cont_pair2)
huffman@16081
   232
huffman@25910
   233
lemma pair_eq_cpair: "(x, y) = <x, y>"
huffman@25910
   234
by (simp add: cpair_def cont_pair1 cont_pair2)
huffman@25910
   235
huffman@16081
   236
lemma inject_cpair: "<a,b> = <aa,ba> \<Longrightarrow> a = aa \<and> b = ba"
huffman@16081
   237
by (simp add: cpair_eq_pair)
huffman@15576
   238
huffman@16081
   239
lemma cpair_eq [iff]: "(<a, b> = <a', b'>) = (a = a' \<and> b = b')"
huffman@16081
   240
by (simp add: cpair_eq_pair)
huffman@15576
   241
huffman@18077
   242
lemma cpair_less [iff]: "(<a, b> \<sqsubseteq> <a', b'>) = (a \<sqsubseteq> a' \<and> b \<sqsubseteq> b')"
huffman@16081
   243
by (simp add: cpair_eq_pair less_cprod_def)
huffman@16057
   244
huffman@18077
   245
lemma cpair_defined_iff [iff]: "(<x, y> = \<bottom>) = (x = \<bottom> \<and> y = \<bottom>)"
huffman@16916
   246
by (simp add: inst_cprod_pcpo cpair_eq_pair)
huffman@16916
   247
huffman@16210
   248
lemma cpair_strict: "<\<bottom>, \<bottom>> = \<bottom>"
huffman@18077
   249
by simp
huffman@16210
   250
huffman@16081
   251
lemma inst_cprod_pcpo2: "\<bottom> = <\<bottom>, \<bottom>>"
huffman@16916
   252
by (rule cpair_strict [symmetric])
huffman@15576
   253
huffman@15576
   254
lemma defined_cpair_rev: 
huffman@16081
   255
 "<a,b> = \<bottom> \<Longrightarrow> a = \<bottom> \<and> b = \<bottom>"
huffman@18077
   256
by simp
huffman@16081
   257
huffman@16081
   258
lemma Exh_Cprod2: "\<exists>a b. z = <a, b>"
huffman@16081
   259
by (simp add: cpair_eq_pair)
huffman@16081
   260
huffman@16081
   261
lemma cprodE: "\<lbrakk>\<And>x y. p = <x, y> \<Longrightarrow> Q\<rbrakk> \<Longrightarrow> Q"
huffman@16081
   262
by (cut_tac Exh_Cprod2, auto)
huffman@16081
   263
huffman@16210
   264
lemma cfst_cpair [simp]: "cfst\<cdot><x, y> = x"
huffman@16081
   265
by (simp add: cpair_eq_pair cfst_def cont_fst)
huffman@15576
   266
huffman@16210
   267
lemma csnd_cpair [simp]: "csnd\<cdot><x, y> = y"
huffman@16081
   268
by (simp add: cpair_eq_pair csnd_def cont_snd)
huffman@16081
   269
huffman@16081
   270
lemma cfst_strict [simp]: "cfst\<cdot>\<bottom> = \<bottom>"
huffman@16081
   271
by (simp add: inst_cprod_pcpo2)
huffman@16081
   272
huffman@16081
   273
lemma csnd_strict [simp]: "csnd\<cdot>\<bottom> = \<bottom>"
huffman@16081
   274
by (simp add: inst_cprod_pcpo2)
huffman@16081
   275
huffman@25910
   276
lemma cpair_cfst_csnd: "\<langle>cfst\<cdot>p, csnd\<cdot>p\<rangle> = p"
huffman@25910
   277
by (cases p rule: cprodE, simp)
huffman@25910
   278
huffman@25910
   279
lemmas surjective_pairing_Cprod2 = cpair_cfst_csnd
huffman@15576
   280
huffman@16750
   281
lemma less_cprod: "x \<sqsubseteq> y = (cfst\<cdot>x \<sqsubseteq> cfst\<cdot>y \<and> csnd\<cdot>x \<sqsubseteq> csnd\<cdot>y)"
huffman@16315
   282
by (simp add: less_cprod_def cfst_def csnd_def cont_fst cont_snd)
huffman@16315
   283
huffman@16750
   284
lemma eq_cprod: "(x = y) = (cfst\<cdot>x = cfst\<cdot>y \<and> csnd\<cdot>x = csnd\<cdot>y)"
huffman@16750
   285
by (auto simp add: po_eq_conv less_cprod)
huffman@16750
   286
huffman@25879
   287
lemma cfst_less_iff: "cfst\<cdot>x \<sqsubseteq> y = x \<sqsubseteq> <y, csnd\<cdot>x>"
huffman@25879
   288
by (simp add: less_cprod)
huffman@25879
   289
huffman@25879
   290
lemma csnd_less_iff: "csnd\<cdot>x \<sqsubseteq> y = x \<sqsubseteq> <cfst\<cdot>x, y>"
huffman@25879
   291
by (simp add: less_cprod)
huffman@25879
   292
huffman@25879
   293
lemma compact_cfst: "compact x \<Longrightarrow> compact (cfst\<cdot>x)"
huffman@25879
   294
by (rule compactI, simp add: cfst_less_iff)
huffman@25879
   295
huffman@25879
   296
lemma compact_csnd: "compact x \<Longrightarrow> compact (csnd\<cdot>x)"
huffman@25879
   297
by (rule compactI, simp add: csnd_less_iff)
huffman@25879
   298
huffman@25879
   299
lemma compact_cpair: "\<lbrakk>compact x; compact y\<rbrakk> \<Longrightarrow> compact <x, y>"
huffman@17837
   300
by (rule compactI, simp add: less_cprod)
huffman@17837
   301
huffman@25879
   302
lemma compact_cpair_iff [simp]: "compact <x, y> = (compact x \<and> compact y)"
huffman@25879
   303
apply (safe intro!: compact_cpair)
huffman@25879
   304
apply (drule compact_cfst, simp)
huffman@25879
   305
apply (drule compact_csnd, simp)
huffman@25879
   306
done
huffman@25879
   307
huffman@25905
   308
instance "*" :: (chfin, chfin) chfin
huffman@25905
   309
apply (intro_classes, clarify)
huffman@25905
   310
apply (erule compact_imp_max_in_chain)
huffman@25905
   311
apply (rule_tac p="\<Squnion>i. Y i" in cprodE, simp)
huffman@25905
   312
done
huffman@25905
   313
huffman@15576
   314
lemma lub_cprod2: 
huffman@16081
   315
  "chain S \<Longrightarrow> range S <<| <\<Squnion>i. cfst\<cdot>(S i), \<Squnion>i. csnd\<cdot>(S i)>"
huffman@16081
   316
apply (simp add: cpair_eq_pair cfst_def csnd_def cont_fst cont_snd)
huffman@15593
   317
apply (erule lub_cprod)
huffman@15576
   318
done
huffman@15576
   319
huffman@16081
   320
lemma thelub_cprod2:
huffman@16081
   321
  "chain S \<Longrightarrow> lub (range S) = <\<Squnion>i. cfst\<cdot>(S i), \<Squnion>i. csnd\<cdot>(S i)>"
huffman@16081
   322
by (rule lub_cprod2 [THEN thelubI])
huffman@15576
   323
huffman@18077
   324
lemma csplit1 [simp]: "csplit\<cdot>f\<cdot>\<bottom> = f\<cdot>\<bottom>\<cdot>\<bottom>"
huffman@18077
   325
by (simp add: csplit_def)
huffman@18077
   326
huffman@16081
   327
lemma csplit2 [simp]: "csplit\<cdot>f\<cdot><x,y> = f\<cdot>x\<cdot>y"
huffman@15593
   328
by (simp add: csplit_def)
huffman@15576
   329
huffman@16553
   330
lemma csplit3 [simp]: "csplit\<cdot>cpair\<cdot>z = z"
huffman@25910
   331
by (simp add: csplit_def cpair_cfst_csnd)
huffman@15576
   332
huffman@16210
   333
lemmas Cprod_rews = cfst_cpair csnd_cpair csplit2
huffman@15576
   334
huffman@25910
   335
subsection {* Product type is a bifinite domain *}
huffman@25910
   336
huffman@25910
   337
instance "*" :: (bifinite_cpo, bifinite_cpo) approx ..
huffman@25910
   338
huffman@25910
   339
defs (overloaded)
huffman@25910
   340
  approx_cprod_def:
huffman@25910
   341
    "approx \<equiv> \<lambda>n. \<Lambda>\<langle>x, y\<rangle>. \<langle>approx n\<cdot>x, approx n\<cdot>y\<rangle>"
huffman@25910
   342
huffman@25910
   343
instance "*" :: (bifinite_cpo, bifinite_cpo) bifinite_cpo
huffman@25910
   344
proof
huffman@25910
   345
  fix i :: nat and x :: "'a \<times> 'b"
huffman@25910
   346
  show "chain (\<lambda>i. approx i\<cdot>x)"
huffman@25910
   347
    unfolding approx_cprod_def by simp
huffman@25910
   348
  show "(\<Squnion>i. approx i\<cdot>x) = x"
huffman@25910
   349
    unfolding approx_cprod_def
huffman@25910
   350
    by (simp add: lub_distribs eta_cfun)
huffman@25910
   351
  show "approx i\<cdot>(approx i\<cdot>x) = approx i\<cdot>x"
huffman@25910
   352
    unfolding approx_cprod_def csplit_def by simp
huffman@25910
   353
  have "{x::'a \<times> 'b. approx i\<cdot>x = x} \<subseteq>
huffman@25910
   354
        {x::'a. approx i\<cdot>x = x} \<times> {x::'b. approx i\<cdot>x = x}"
huffman@25910
   355
    unfolding approx_cprod_def
huffman@25910
   356
    by (clarsimp simp add: pair_eq_cpair)
huffman@25910
   357
  thus "finite {x::'a \<times> 'b. approx i\<cdot>x = x}"
huffman@25910
   358
    by (rule finite_subset,
huffman@25910
   359
        intro finite_cartesian_product finite_fixes_approx)
huffman@25910
   360
qed
huffman@25910
   361
huffman@25910
   362
instance "*" :: (bifinite, bifinite) bifinite ..
huffman@25910
   363
huffman@25910
   364
lemma approx_cpair [simp]:
huffman@25910
   365
  "approx i\<cdot>\<langle>x, y\<rangle> = \<langle>approx i\<cdot>x, approx i\<cdot>y\<rangle>"
huffman@25910
   366
unfolding approx_cprod_def by simp
huffman@25910
   367
huffman@25910
   368
lemma cfst_approx: "cfst\<cdot>(approx i\<cdot>p) = approx i\<cdot>(cfst\<cdot>p)"
huffman@25910
   369
by (cases p rule: cprodE, simp)
huffman@25910
   370
huffman@25910
   371
lemma csnd_approx: "csnd\<cdot>(approx i\<cdot>p) = approx i\<cdot>(csnd\<cdot>p)"
huffman@25910
   372
by (cases p rule: cprodE, simp)
huffman@25910
   373
huffman@15576
   374
end