src/HOLCF/Pcpo.thy
author huffman
Mon, 14 Jan 2008 20:28:59 +0100
changeset 25906 2179c6661218
parent 25826 f9aa43287e42
child 25920 8df5eabda5f6
permissions -rw-r--r--
class bifinite supersedes class dcpo; remove unnecessary dcpo stuff
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2394
diff changeset
     1
(*  Title:      HOLCF/Pcpo.thy
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2394
diff changeset
     2
    ID:         $Id$
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2394
diff changeset
     3
    Author:     Franz Regensburger
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2394
diff changeset
     4
*)
15576
efb95d0d01f7 converted to new-style theories, and combined numbered files
huffman
parents: 15563
diff changeset
     5
efb95d0d01f7 converted to new-style theories, and combined numbered files
huffman
parents: 15563
diff changeset
     6
header {* Classes cpo and pcpo *}
efb95d0d01f7 converted to new-style theories, and combined numbered files
huffman
parents: 15563
diff changeset
     7
15577
e16da3068ad6 fix headers
huffman
parents: 15576
diff changeset
     8
theory Pcpo
e16da3068ad6 fix headers
huffman
parents: 15576
diff changeset
     9
imports Porder
e16da3068ad6 fix headers
huffman
parents: 15576
diff changeset
    10
begin
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    11
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
    12
subsection {* Complete partial orders *}
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
    13
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
    14
text {* The class cpo of chain complete partial orders *}
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
    15
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2394
diff changeset
    16
axclass cpo < po
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
    17
        -- {* class axiom: *}
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    18
  cpo:   "chain S \<Longrightarrow> \<exists>x. range S <<| x" 
2394
91d8abf108be adaptions for symbol font
oheimb
parents: 2291
diff changeset
    19
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
    20
text {* in cpo's everthing equal to THE lub has lub properties for every chain *}
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    21
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    22
lemma thelubE: "\<lbrakk>chain S; (\<Squnion>i. S i) = (l::'a::cpo)\<rbrakk> \<Longrightarrow> range S <<| l"
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
    23
by (blast dest: cpo intro: lubI)
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    24
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
    25
text {* Properties of the lub *}
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    26
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    27
lemma is_ub_thelub: "chain (S::nat \<Rightarrow> 'a::cpo) \<Longrightarrow> S x \<sqsubseteq> (\<Squnion>i. S i)"
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
    28
by (blast dest: cpo intro: lubI [THEN is_ub_lub])
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    29
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    30
lemma is_lub_thelub:
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    31
  "\<lbrakk>chain (S::nat \<Rightarrow> 'a::cpo); range S <| x\<rbrakk> \<Longrightarrow> (\<Squnion>i. S i) \<sqsubseteq> x"
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
    32
by (blast dest: cpo intro: lubI [THEN is_lub_lub])
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    33
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    34
lemma lub_range_mono:
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    35
  "\<lbrakk>range X \<subseteq> range Y; chain Y; chain (X::nat \<Rightarrow> 'a::cpo)\<rbrakk>
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    36
    \<Longrightarrow> (\<Squnion>i. X i) \<sqsubseteq> (\<Squnion>i. Y i)"
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    37
apply (erule is_lub_thelub)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    38
apply (rule ub_rangeI)
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    39
apply (subgoal_tac "\<exists>j. X i = Y j")
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    40
apply  clarsimp
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    41
apply  (erule is_ub_thelub)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    42
apply auto
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    43
done
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    44
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    45
lemma lub_range_shift:
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    46
  "chain (Y::nat \<Rightarrow> 'a::cpo) \<Longrightarrow> (\<Squnion>i. Y (i + j)) = (\<Squnion>i. Y i)"
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    47
apply (rule antisym_less)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    48
apply (rule lub_range_mono)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    49
apply    fast
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    50
apply   assumption
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    51
apply (erule chain_shift)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    52
apply (rule is_lub_thelub)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    53
apply assumption
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    54
apply (rule ub_rangeI)
17813
03133f6606a1 cleaned up
huffman
parents: 16739
diff changeset
    55
apply (rule_tac y="Y (i + j)" in trans_less)
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    56
apply (erule chain_mono3)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    57
apply (rule le_add1)
17813
03133f6606a1 cleaned up
huffman
parents: 16739
diff changeset
    58
apply (rule is_ub_thelub)
03133f6606a1 cleaned up
huffman
parents: 16739
diff changeset
    59
apply (erule chain_shift)
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    60
done
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    61
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    62
lemma maxinch_is_thelub:
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    63
  "chain Y \<Longrightarrow> max_in_chain i Y = ((\<Squnion>i. Y i) = ((Y i)::'a::cpo))"
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    64
apply (rule iffI)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    65
apply (fast intro!: thelubI lub_finch1)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    66
apply (unfold max_in_chain_def)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    67
apply (safe intro!: antisym_less)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    68
apply (fast elim!: chain_mono3)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    69
apply (drule sym)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    70
apply (force elim!: is_ub_thelub)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    71
done
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    72
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    73
text {* the @{text "\<sqsubseteq>"} relation between two chains is preserved by their lubs *}
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    74
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    75
lemma lub_mono:
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    76
  "\<lbrakk>chain (X::nat \<Rightarrow> 'a::cpo); chain Y; \<forall>k. X k \<sqsubseteq> Y k\<rbrakk> 
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    77
    \<Longrightarrow> (\<Squnion>i. X i) \<sqsubseteq> (\<Squnion>i. Y i)"
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    78
apply (erule is_lub_thelub)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    79
apply (rule ub_rangeI)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    80
apply (rule trans_less)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    81
apply (erule spec)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    82
apply (erule is_ub_thelub)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    83
done
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    84
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
    85
text {* the = relation between two chains is preserved by their lubs *}
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    86
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    87
lemma lub_equal:
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    88
  "\<lbrakk>chain (X::nat \<Rightarrow> 'a::cpo); chain Y; \<forall>k. X k = Y k\<rbrakk>
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    89
    \<Longrightarrow> (\<Squnion>i. X i) = (\<Squnion>i. Y i)"
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
    90
by (simp only: expand_fun_eq [symmetric])
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    91
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
    92
text {* more results about mono and = of lubs of chains *}
3326
930c9bed5a09 Moved the classes flat chfin from Fix to Pcpo.
slotosch
parents: 2640
diff changeset
    93
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    94
lemma lub_mono2:
17813
03133f6606a1 cleaned up
huffman
parents: 16739
diff changeset
    95
  "\<lbrakk>\<exists>j. \<forall>i>j. X i = Y i; chain (X::nat \<Rightarrow> 'a::cpo); chain Y\<rbrakk>
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
    96
    \<Longrightarrow> (\<Squnion>i. X i) \<sqsubseteq> (\<Squnion>i. Y i)"
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
    97
apply (erule exE)
17813
03133f6606a1 cleaned up
huffman
parents: 16739
diff changeset
    98
apply (subgoal_tac "(\<Squnion>i. X (i + Suc j)) \<sqsubseteq> (\<Squnion>i. Y (i + Suc j))")
03133f6606a1 cleaned up
huffman
parents: 16739
diff changeset
    99
apply (thin_tac "\<forall>i>j. X i = Y i")
03133f6606a1 cleaned up
huffman
parents: 16739
diff changeset
   100
apply (simp only: lub_range_shift)
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   101
apply simp
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   102
done
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   103
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   104
lemma lub_equal2:
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   105
  "\<lbrakk>\<exists>j. \<forall>i>j. X i = Y i; chain (X::nat \<Rightarrow> 'a::cpo); chain Y\<rbrakk>
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   106
    \<Longrightarrow> (\<Squnion>i. X i) = (\<Squnion>i. Y i)"
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   107
by (blast intro: antisym_less lub_mono2 sym)
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   108
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   109
lemma lub_mono3:
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   110
  "\<lbrakk>chain (Y::nat \<Rightarrow> 'a::cpo); chain X; \<forall>i. \<exists>j. Y i \<sqsubseteq> X j\<rbrakk>
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   111
    \<Longrightarrow> (\<Squnion>i. Y i) \<sqsubseteq> (\<Squnion>i. X i)"
17813
03133f6606a1 cleaned up
huffman
parents: 16739
diff changeset
   112
apply (erule is_lub_thelub)
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   113
apply (rule ub_rangeI)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   114
apply (erule allE)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   115
apply (erule exE)
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   116
apply (erule trans_less)
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   117
apply (erule is_ub_thelub)
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   118
done
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   119
16203
b3268fe39838 added theorem ch2ch_lub
huffman
parents: 16201
diff changeset
   120
lemma ch2ch_lub:
b3268fe39838 added theorem ch2ch_lub
huffman
parents: 16201
diff changeset
   121
  fixes Y :: "nat \<Rightarrow> nat \<Rightarrow> 'a::cpo"
b3268fe39838 added theorem ch2ch_lub
huffman
parents: 16201
diff changeset
   122
  assumes 1: "\<And>j. chain (\<lambda>i. Y i j)"
b3268fe39838 added theorem ch2ch_lub
huffman
parents: 16201
diff changeset
   123
  assumes 2: "\<And>i. chain (\<lambda>j. Y i j)"
b3268fe39838 added theorem ch2ch_lub
huffman
parents: 16201
diff changeset
   124
  shows "chain (\<lambda>i. \<Squnion>j. Y i j)"
b3268fe39838 added theorem ch2ch_lub
huffman
parents: 16201
diff changeset
   125
apply (rule chainI)
b3268fe39838 added theorem ch2ch_lub
huffman
parents: 16201
diff changeset
   126
apply (rule lub_mono [rule_format, OF 2 2])
b3268fe39838 added theorem ch2ch_lub
huffman
parents: 16201
diff changeset
   127
apply (rule chainE [OF 1])
b3268fe39838 added theorem ch2ch_lub
huffman
parents: 16201
diff changeset
   128
done
b3268fe39838 added theorem ch2ch_lub
huffman
parents: 16201
diff changeset
   129
16201
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   130
lemma diag_lub:
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   131
  fixes Y :: "nat \<Rightarrow> nat \<Rightarrow> 'a::cpo"
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   132
  assumes 1: "\<And>j. chain (\<lambda>i. Y i j)"
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   133
  assumes 2: "\<And>i. chain (\<lambda>j. Y i j)"
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   134
  shows "(\<Squnion>i. \<Squnion>j. Y i j) = (\<Squnion>i. Y i i)"
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   135
proof (rule antisym_less)
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   136
  have 3: "chain (\<lambda>i. Y i i)"
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   137
    apply (rule chainI)
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   138
    apply (rule trans_less)
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   139
    apply (rule chainE [OF 1])
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   140
    apply (rule chainE [OF 2])
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   141
    done
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   142
  have 4: "chain (\<lambda>i. \<Squnion>j. Y i j)"
16203
b3268fe39838 added theorem ch2ch_lub
huffman
parents: 16201
diff changeset
   143
    by (rule ch2ch_lub [OF 1 2])
16201
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   144
  show "(\<Squnion>i. \<Squnion>j. Y i j) \<sqsubseteq> (\<Squnion>i. Y i i)"
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   145
    apply (rule is_lub_thelub [OF 4])
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   146
    apply (rule ub_rangeI)
16203
b3268fe39838 added theorem ch2ch_lub
huffman
parents: 16201
diff changeset
   147
    apply (rule lub_mono3 [rule_format, OF 2 3])
16201
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   148
    apply (rule exI)
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   149
    apply (rule trans_less)
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   150
    apply (rule chain_mono3 [OF 1 le_maxI1])
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   151
    apply (rule chain_mono3 [OF 2 le_maxI2])
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   152
    done
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   153
  show "(\<Squnion>i. Y i i) \<sqsubseteq> (\<Squnion>i. \<Squnion>j. Y i j)"
16203
b3268fe39838 added theorem ch2ch_lub
huffman
parents: 16201
diff changeset
   154
    apply (rule lub_mono [rule_format, OF 3 4])
16201
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   155
    apply (rule is_ub_thelub [OF 2])
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   156
    done
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   157
qed
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   158
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   159
lemma ex_lub:
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   160
  fixes Y :: "nat \<Rightarrow> nat \<Rightarrow> 'a::cpo"
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   161
  assumes 1: "\<And>j. chain (\<lambda>i. Y i j)"
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   162
  assumes 2: "\<And>i. chain (\<lambda>j. Y i j)"
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   163
  shows "(\<Squnion>i. \<Squnion>j. Y i j) = (\<Squnion>j. \<Squnion>i. Y i j)"
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   164
by (simp add: diag_lub 1 2)
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   165
7bb51c8196cb added theorems diag_lub and ex_lub
huffman
parents: 16070
diff changeset
   166
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   167
subsection {* Pointed cpos *}
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   168
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   169
text {* The class pcpo of pointed cpos *}
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   170
25723
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   171
axclass pcpo < cpo
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   172
  least: "\<exists>x. \<forall>y. x \<sqsubseteq> y"
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   173
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   174
definition
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   175
  UU :: "'a::pcpo" where
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   176
  "UU = (THE x. \<forall>y. x \<sqsubseteq> y)"
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   177
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   178
notation (xsymbols)
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   179
  UU  ("\<bottom>")
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   180
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   181
text {* derive the old rule minimal *}
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   182
 
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   183
lemma UU_least: "\<forall>z. \<bottom> \<sqsubseteq> z"
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   184
apply (unfold UU_def)
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   185
apply (rule theI')
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   186
apply (rule ex_ex1I)
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   187
apply (rule least)
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   188
apply (blast intro: antisym_less)
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   189
done
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   190
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   191
lemma minimal [iff]: "\<bottom> \<sqsubseteq> x"
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   192
by (rule UU_least [THEN spec])
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   193
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   194
lemma UU_reorient: "(\<bottom> = x) = (x = \<bottom>)"
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   195
by auto
16739
9ffd706ae402 add UU_reorient_simproc
huffman
parents: 16627
diff changeset
   196
25723
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   197
ML_setup {*
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   198
local
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   199
  val meta_UU_reorient = thm "UU_reorient" RS eq_reflection;
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   200
  fun reorient_proc sg _ (_ $ t $ u) =
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   201
    case u of
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   202
        Const("Pcpo.UU",_) => NONE
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   203
      | Const("HOL.zero", _) => NONE
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   204
      | Const("HOL.one", _) => NONE
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   205
      | Const("Numeral.number_of", _) $ _ => NONE
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   206
      | _ => SOME meta_UU_reorient;
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   207
in
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   208
  val UU_reorient_simproc = 
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   209
    Simplifier.simproc @{theory} "UU_reorient_simproc" ["UU=x"] reorient_proc
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   210
end;
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   211
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   212
Addsimprocs [UU_reorient_simproc];
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   213
*}
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   214
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   215
text {* useful lemmas about @{term \<bottom>} *}
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   216
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   217
lemma less_UU_iff [simp]: "(x \<sqsubseteq> \<bottom>) = (x = \<bottom>)"
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   218
by (simp add: po_eq_conv)
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   219
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   220
lemma eq_UU_iff: "(x = \<bottom>) = (x \<sqsubseteq> \<bottom>)"
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   221
by simp
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   222
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   223
lemma UU_I: "x \<sqsubseteq> \<bottom> \<Longrightarrow> x = \<bottom>"
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   224
by (subst eq_UU_iff)
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   225
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   226
lemma not_less2not_eq: "\<not> (x::'a::po) \<sqsubseteq> y \<Longrightarrow> x \<noteq> y"
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   227
by auto
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   228
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   229
lemma chain_UU_I: "\<lbrakk>chain Y; (\<Squnion>i. Y i) = \<bottom>\<rbrakk> \<Longrightarrow> \<forall>i. Y i = \<bottom>"
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   230
apply (rule allI)
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   231
apply (rule UU_I)
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   232
apply (erule subst)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   233
apply (erule is_ub_thelub)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   234
done
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   235
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   236
lemma chain_UU_I_inverse: "\<forall>i::nat. Y i = \<bottom> \<Longrightarrow> (\<Squnion>i. Y i) = \<bottom>"
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   237
apply (rule lub_chain_maxelem)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   238
apply (erule spec)
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   239
apply simp
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   240
done
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   241
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   242
lemma chain_UU_I_inverse2: "(\<Squnion>i. Y i) \<noteq> \<bottom> \<Longrightarrow> \<exists>i::nat. Y i \<noteq> \<bottom>"
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   243
by (blast intro: chain_UU_I_inverse)
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   244
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   245
lemma notUU_I: "\<lbrakk>x \<sqsubseteq> y; x \<noteq> \<bottom>\<rbrakk> \<Longrightarrow> y \<noteq> \<bottom>"
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   246
by (blast intro: UU_I)
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   247
16627
a2844e212da4 cleaned up
huffman
parents: 16626
diff changeset
   248
lemma chain_mono2: "\<lbrakk>\<exists>j. Y j \<noteq> \<bottom>; chain Y\<rbrakk> \<Longrightarrow> \<exists>j. \<forall>i>j. Y i \<noteq> \<bottom>"
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   249
by (blast dest: notUU_I chain_mono)
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   250
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   251
subsection {* Chain-finite and flat cpos *}
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   252
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   253
text {* further useful classes for HOLCF domains *}
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   254
25814
eb181909e7a4 new axclass finite_po < finite, po
huffman
parents: 25781
diff changeset
   255
axclass finite_po < finite, po
eb181909e7a4 new axclass finite_po < finite, po
huffman
parents: 25781
diff changeset
   256
15640
2d1d6ea579a1 chfin now a subclass of po, proved instance chfin < cpo
huffman
parents: 15588
diff changeset
   257
axclass chfin < po
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   258
  chfin: "\<forall>Y. chain Y \<longrightarrow> (\<exists>n. max_in_chain n Y)"
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   259
25723
80c06e4d4db6 move bottom-related stuff back into Pcpo.thy
huffman
parents: 25701
diff changeset
   260
axclass flat < pcpo
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   261
  ax_flat: "\<forall>x y. x \<sqsubseteq> y \<longrightarrow> (x = \<bottom>) \<or> (x = y)"
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   262
25814
eb181909e7a4 new axclass finite_po < finite, po
huffman
parents: 25781
diff changeset
   263
text {* finite partial orders are chain-finite and directed-complete *}
eb181909e7a4 new axclass finite_po < finite, po
huffman
parents: 25781
diff changeset
   264
eb181909e7a4 new axclass finite_po < finite, po
huffman
parents: 25781
diff changeset
   265
instance finite_po < chfin
eb181909e7a4 new axclass finite_po < finite, po
huffman
parents: 25781
diff changeset
   266
apply (intro_classes, clarify)
eb181909e7a4 new axclass finite_po < finite, po
huffman
parents: 25781
diff changeset
   267
apply (drule finite_range_imp_finch)
eb181909e7a4 new axclass finite_po < finite, po
huffman
parents: 25781
diff changeset
   268
apply (rule finite)
eb181909e7a4 new axclass finite_po < finite, po
huffman
parents: 25781
diff changeset
   269
apply (simp add: finite_chain_def)
eb181909e7a4 new axclass finite_po < finite, po
huffman
parents: 25781
diff changeset
   270
done
eb181909e7a4 new axclass finite_po < finite, po
huffman
parents: 25781
diff changeset
   271
25906
2179c6661218 class bifinite supersedes class dcpo; remove unnecessary dcpo stuff
huffman
parents: 25826
diff changeset
   272
instance finite_po < cpo
25814
eb181909e7a4 new axclass finite_po < finite, po
huffman
parents: 25781
diff changeset
   273
apply intro_classes
25906
2179c6661218 class bifinite supersedes class dcpo; remove unnecessary dcpo stuff
huffman
parents: 25826
diff changeset
   274
apply (drule directed_chain)
25814
eb181909e7a4 new axclass finite_po < finite, po
huffman
parents: 25781
diff changeset
   275
apply (drule directed_finiteD [OF _ finite subset_refl])
eb181909e7a4 new axclass finite_po < finite, po
huffman
parents: 25781
diff changeset
   276
apply (erule bexE, rule exI)
eb181909e7a4 new axclass finite_po < finite, po
huffman
parents: 25781
diff changeset
   277
apply (erule (1) is_lub_maximal)
eb181909e7a4 new axclass finite_po < finite, po
huffman
parents: 25781
diff changeset
   278
done
eb181909e7a4 new axclass finite_po < finite, po
huffman
parents: 25781
diff changeset
   279
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   280
text {* some properties for chfin and flat *}
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   281
15640
2d1d6ea579a1 chfin now a subclass of po, proved instance chfin < cpo
huffman
parents: 15588
diff changeset
   282
text {* chfin types are cpo *}
2d1d6ea579a1 chfin now a subclass of po, proved instance chfin < cpo
huffman
parents: 15588
diff changeset
   283
2d1d6ea579a1 chfin now a subclass of po, proved instance chfin < cpo
huffman
parents: 15588
diff changeset
   284
lemma chfin_imp_cpo:
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   285
  "chain (S::nat \<Rightarrow> 'a::chfin) \<Longrightarrow> \<exists>x. range S <<| x"
15640
2d1d6ea579a1 chfin now a subclass of po, proved instance chfin < cpo
huffman
parents: 15588
diff changeset
   286
apply (frule chfin [rule_format])
2d1d6ea579a1 chfin now a subclass of po, proved instance chfin < cpo
huffman
parents: 15588
diff changeset
   287
apply (blast intro: lub_finch1)
2d1d6ea579a1 chfin now a subclass of po, proved instance chfin < cpo
huffman
parents: 15588
diff changeset
   288
done
2d1d6ea579a1 chfin now a subclass of po, proved instance chfin < cpo
huffman
parents: 15588
diff changeset
   289
2d1d6ea579a1 chfin now a subclass of po, proved instance chfin < cpo
huffman
parents: 15588
diff changeset
   290
instance chfin < cpo
2d1d6ea579a1 chfin now a subclass of po, proved instance chfin < cpo
huffman
parents: 15588
diff changeset
   291
by intro_classes (rule chfin_imp_cpo)
2d1d6ea579a1 chfin now a subclass of po, proved instance chfin < cpo
huffman
parents: 15588
diff changeset
   292
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   293
text {* flat types are chfin *}
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   294
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   295
lemma flat_imp_chfin: 
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   296
     "\<forall>Y::nat \<Rightarrow> 'a::flat. chain Y \<longrightarrow> (\<exists>n. max_in_chain n Y)"
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   297
apply (unfold max_in_chain_def)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   298
apply clarify
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   299
apply (case_tac "\<forall>i. Y i = \<bottom>")
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   300
apply simp
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   301
apply simp
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   302
apply (erule exE)
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   303
apply (rule_tac x="i" in exI)
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   304
apply clarify
17813
03133f6606a1 cleaned up
huffman
parents: 16739
diff changeset
   305
apply (blast dest: chain_mono3 ax_flat [rule_format])
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   306
done
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   307
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   308
instance flat < chfin
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   309
by intro_classes (rule flat_imp_chfin)
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   310
16627
a2844e212da4 cleaned up
huffman
parents: 16626
diff changeset
   311
text {* flat subclass of chfin; @{text adm_flat} not needed *}
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   312
25826
f9aa43287e42 new lemma flat_less_iff
huffman
parents: 25814
diff changeset
   313
lemma flat_less_iff:
f9aa43287e42 new lemma flat_less_iff
huffman
parents: 25814
diff changeset
   314
  fixes x y :: "'a::flat"
f9aa43287e42 new lemma flat_less_iff
huffman
parents: 25814
diff changeset
   315
  shows "(x \<sqsubseteq> y) = (x = \<bottom> \<or> x = y)"
f9aa43287e42 new lemma flat_less_iff
huffman
parents: 25814
diff changeset
   316
by (safe dest!: ax_flat [rule_format])
f9aa43287e42 new lemma flat_less_iff
huffman
parents: 25814
diff changeset
   317
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   318
lemma flat_eq: "(a::'a::flat) \<noteq> \<bottom> \<Longrightarrow> a \<sqsubseteq> b = (a = b)"
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   319
by (safe dest!: ax_flat [rule_format])
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   320
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   321
lemma chfin2finch: "chain (Y::nat \<Rightarrow> 'a::chfin) \<Longrightarrow> finite_chain Y"
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   322
by (simp add: chfin finite_chain_def)
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   323
15588
14e3228f18cc arranged for document generation, cleaned up some proofs
huffman
parents: 15577
diff changeset
   324
text {* lemmata for improved admissibility introdution rule *}
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   325
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   326
lemma infinite_chain_adm_lemma:
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   327
  "\<lbrakk>chain Y; \<forall>i. P (Y i);  
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   328
    \<And>Y. \<lbrakk>chain Y; \<forall>i. P (Y i); \<not> finite_chain Y\<rbrakk> \<Longrightarrow> P (\<Squnion>i. Y i)\<rbrakk>
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   329
      \<Longrightarrow> P (\<Squnion>i. Y i)"
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   330
apply (case_tac "finite_chain Y")
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   331
prefer 2 apply fast
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   332
apply (unfold finite_chain_def)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   333
apply safe
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   334
apply (erule lub_finch1 [THEN thelubI, THEN ssubst])
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   335
apply assumption
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   336
apply (erule spec)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   337
done
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   338
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   339
lemma increasing_chain_adm_lemma:
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   340
  "\<lbrakk>chain Y;  \<forall>i. P (Y i); \<And>Y. \<lbrakk>chain Y; \<forall>i. P (Y i);
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   341
    \<forall>i. \<exists>j>i. Y i \<noteq> Y j \<and> Y i \<sqsubseteq> Y j\<rbrakk> \<Longrightarrow> P (\<Squnion>i. Y i)\<rbrakk>
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   342
      \<Longrightarrow> P (\<Squnion>i. Y i)"
15563
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   343
apply (erule infinite_chain_adm_lemma)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   344
apply assumption
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   345
apply (erule thin_rl)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   346
apply (unfold finite_chain_def)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   347
apply (unfold max_in_chain_def)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   348
apply (fast dest: le_imp_less_or_eq elim: chain_mono)
9e125b675253 converted to new-style theory
huffman
parents: 14981
diff changeset
   349
done
15576
efb95d0d01f7 converted to new-style theories, and combined numbered files
huffman
parents: 15563
diff changeset
   350
16626
d28314d2dce3 cleaned up
huffman
parents: 16203
diff changeset
   351
end