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