src/HOL/Word/BinInduct.thy
author huffman
Thu, 23 Aug 2007 18:47:08 +0200
changeset 24412 9c7bb416f344
parent 24410 2943ae5255d0
permissions -rw-r--r--
declare bin_rest_BIT_bin_last [simp]
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24410
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
     1
(*
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
     2
  ID:     $Id$
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
     3
  Author: Brian Huffman
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
     4
*)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
     5
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
     6
header {* Binary Integers as an Inductive Datatype *}
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
     7
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
     8
theory BinInduct imports Main begin
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
     9
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    10
subsection {* Injectivity and distinctness of constructors *}
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    11
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    12
lemma BIT_eq: "x BIT a = y BIT b \<Longrightarrow> x = y \<and> a = b"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    13
  by (simp add: eq_number_of_BIT_BIT [unfolded number_of_is_id])
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    14
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    15
lemma BIT_eq_iff: "(x BIT a = y BIT b) = (x = y \<and> a = b)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    16
  by (safe dest!: BIT_eq)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    17
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    18
lemma BIT_eq_Pls: "(w BIT b = Numeral.Pls) = (w = Numeral.Pls \<and> b = bit.B0)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    19
  by (subst Pls_0_eq [symmetric], simp only: BIT_eq_iff)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    20
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    21
lemma BIT_eq_Min: "(w BIT b = Numeral.Min) = (w = Numeral.Min \<and> b = bit.B1)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    22
  by (subst Min_1_eq [symmetric], simp only: BIT_eq_iff)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    23
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    24
lemma Pls_eq_BIT: "(Numeral.Pls = w BIT b) = (w = Numeral.Pls \<and> b = bit.B0)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    25
  by (subst eq_commute, rule BIT_eq_Pls)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    26
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    27
lemma Min_eq_BIT: "(Numeral.Min = w BIT b) = (w = Numeral.Min \<and> b = bit.B1)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    28
  by (subst eq_commute, rule BIT_eq_Min)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    29
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    30
lemma Min_neq_Pls: "Numeral.Min \<noteq> Numeral.Pls"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    31
  unfolding Min_def Pls_def by simp
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    32
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    33
lemma Pls_neq_Min: "Numeral.Pls \<noteq> Numeral.Min"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    34
  unfolding Min_def Pls_def by simp
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    35
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    36
lemmas bin_injects [simp] =
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    37
  BIT_eq_iff BIT_eq_Pls BIT_eq_Min
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    38
  Pls_eq_BIT Min_eq_BIT Min_neq_Pls Pls_neq_Min
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    39
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    40
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    41
subsection {* Induction and case analysis *}
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    42
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    43
inductive
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    44
  is_numeral :: "int \<Rightarrow> bool"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    45
where
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    46
  Pls: "is_numeral Numeral.Pls"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    47
| Min: "is_numeral Numeral.Min"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    48
| B0: "is_numeral z \<Longrightarrow> is_numeral (z BIT bit.B0)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    49
| B1: "is_numeral z \<Longrightarrow> is_numeral (z BIT bit.B1)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    50
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    51
lemma is_numeral_succ: "is_numeral z \<Longrightarrow> is_numeral (Numeral.succ z)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    52
  by (erule is_numeral.induct, simp_all add: is_numeral.intros)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    53
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    54
lemma is_numeral_pred: "is_numeral z \<Longrightarrow> is_numeral (Numeral.pred z)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    55
  by (erule is_numeral.induct, simp_all add: is_numeral.intros)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    56
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    57
lemma is_numeral_uminus: "is_numeral z \<Longrightarrow> is_numeral (uminus z)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    58
  by (erule is_numeral.induct, simp_all add: is_numeral.intros is_numeral_pred)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    59
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    60
lemma is_numeral_int: "is_numeral (int n)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    61
  apply (induct "n")
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    62
  apply (simp add: is_numeral.Pls [unfolded Numeral.Pls_def])
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    63
  apply (drule is_numeral_succ [unfolded Numeral.succ_def])
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    64
  apply (simp add: add_commute)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    65
  done
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    66
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    67
lemma is_numeral: "is_numeral z"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    68
  by (induct "z") (simp_all only: is_numeral_int is_numeral_uminus)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    69
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    70
lemma int_bin_induct [case_names Pls Min B0 B1]:
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    71
  assumes Pls: "P Numeral.Pls"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    72
  assumes Min: "P Numeral.Min"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    73
  assumes B0: "\<And>x. \<lbrakk>P x; x \<noteq> Numeral.Pls\<rbrakk> \<Longrightarrow> P (x BIT bit.B0)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    74
  assumes B1: "\<And>x. \<lbrakk>P x; x \<noteq> Numeral.Min\<rbrakk> \<Longrightarrow> P (x BIT bit.B1)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    75
  shows "P x"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    76
proof (induct x rule: is_numeral.induct [OF is_numeral])
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    77
  from Pls show "P Numeral.Pls" .
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    78
  from Min show "P Numeral.Min" .
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    79
  fix z
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    80
  show "P z \<Longrightarrow> P (z BIT bit.B0)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    81
    by (cases "z = Numeral.Pls", auto intro: Pls B0)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    82
  show "P z \<Longrightarrow> P (z BIT bit.B1)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    83
    by (cases "z = Numeral.Min", auto intro: Min B1)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    84
qed
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    85
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    86
lemma bin_induct [case_names Pls Min Bit]:
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    87
  assumes Pls: "P Numeral.Pls"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    88
  assumes Min: "P Numeral.Min"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    89
  assumes Bit: "\<And>bin bit. P bin \<Longrightarrow> P (bin BIT bit)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    90
  shows "P x"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    91
  by (induct x rule: int_bin_induct) (auto intro: assms)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    92
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    93
lemma BIT_exhausts: "\<exists>w b. x = w BIT b"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    94
  by (induct x rule: bin_induct)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    95
     (fast intro: Pls_0_eq [symmetric] Min_1_eq [symmetric])+
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    96
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    97
lemma BIT_cases: "(\<And>w b. x = w BIT b \<Longrightarrow> Q) \<Longrightarrow> Q"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    98
  by (insert BIT_exhausts [of x], auto)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
    99
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   100
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   101
subsection {* Destructors for BIT *}
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   102
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   103
definition
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   104
  bin_rest :: "int \<Rightarrow> int" where
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   105
  "bin_rest x = (THE w. \<exists>b. x = w BIT b)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   106
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   107
definition
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   108
  bin_last :: "int \<Rightarrow> bit" where
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   109
  "bin_last x = (THE b. \<exists>w. x = w BIT b)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   110
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   111
lemma bin_rest_BIT [simp]: "bin_rest (w BIT b) = w"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   112
  by (unfold bin_rest_def, rule the_equality, fast, simp)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   113
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   114
lemma bin_rest_Pls [simp]: "bin_rest Numeral.Pls = Numeral.Pls"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   115
  by (subst Pls_0_eq [symmetric], rule bin_rest_BIT)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   116
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   117
lemma bin_rest_Min [simp]: "bin_rest Numeral.Min = Numeral.Min"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   118
  by (subst Min_1_eq [symmetric], rule bin_rest_BIT)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   119
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   120
lemma bin_last_BIT [simp]: "bin_last (w BIT b) = b"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   121
  by (unfold bin_last_def, rule the_equality, fast, simp)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   122
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   123
lemma bin_last_Pls [simp]: "bin_last Numeral.Pls = bit.B0"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   124
  by (subst Pls_0_eq [symmetric], rule bin_last_BIT)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   125
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   126
lemma bin_last_Min [simp]: "bin_last Numeral.Min = bit.B1"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   127
  by (subst Min_1_eq [symmetric], rule bin_last_BIT)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   128
24412
9c7bb416f344 declare bin_rest_BIT_bin_last [simp]
huffman
parents: 24410
diff changeset
   129
lemma bin_rest_BIT_bin_last [simp]: "(bin_rest x) BIT (bin_last x) = x"
24410
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   130
  by (cases x rule: BIT_cases) simp
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   131
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   132
lemma wf_bin_rest:
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   133
  "wf {(bin_rest w, w) |w. w \<noteq> Numeral.Pls \<and> w \<noteq> Numeral.Min}"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   134
  apply (rule wfUNIVI, simp (no_asm_use))
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   135
  apply (rename_tac "z", induct_tac "z" rule: bin_induct)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   136
  apply (drule spec, erule mp, simp)+
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   137
  done
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   138
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   139
subsection {* Size function *}
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   140
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   141
function
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   142
  binsize :: "int \<Rightarrow> nat"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   143
where
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   144
  "binsize z = (if z = Numeral.Pls \<or> z = Numeral.Min
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   145
                 then 0 else Suc (binsize (bin_rest z)))"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   146
  by pat_completeness simp
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   147
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   148
termination binsize
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   149
  apply (relation "{(bin_rest w, w) |w. w \<noteq> Numeral.Pls \<and> w \<noteq> Numeral.Min}")
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   150
  apply (rule wf_bin_rest)
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   151
  apply simp
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   152
  done
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   153
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   154
instance int :: size
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   155
  int_size_def: "size \<equiv> binsize" ..
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   156
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   157
lemma int_size_simps [simp]:
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   158
  "size Numeral.Pls = 0"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   159
  "size Numeral.Min = 0"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   160
  "size (w BIT bit.B0) = (if w = Numeral.Pls then 0 else Suc (size w))"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   161
  "size (w BIT bit.B1) = (if w = Numeral.Min then 0 else Suc (size w))"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   162
  unfolding int_size_def by simp_all
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   163
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   164
lemma size_bin_rest [simp]: "size (bin_rest w) = size w - 1"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   165
  by (induct w rule: int_bin_induct) simp_all
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   166
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   167
lemma int_size_gt_zero_iff [simp]:
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   168
  "(0 < size w) = (w \<noteq> Numeral.Pls \<and> w \<noteq> Numeral.Min)"
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   169
  by (induct w rule: int_bin_induct) simp_all
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   170
2943ae5255d0 theory of integers as an inductive datatype
huffman
parents:
diff changeset
   171
end