src/HOL/HOLCF/FOCUS/Stream_adm.thy
author wenzelm
Wed, 13 Jan 2016 23:07:06 +0100
changeset 62175 8ffc4d0e652d
parent 60172 423273355b55
child 66453 cc19f7ca2ed6
permissions -rw-r--r--
isabelle update_cartouches -c -t;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
42151
4da4fc77664b tuned headers;
wenzelm
parents: 41413
diff changeset
     1
(*  Title:      HOL/HOLCF/FOCUS/Stream_adm.thy
17293
ecf182ccc3ca converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
     2
    Author:     David von Oheimb, TU Muenchen
11350
4c55b020d6ee added FOCUS including the One-Element Buffer by Manfred Broy
oheimb
parents:
diff changeset
     3
*)
4c55b020d6ee added FOCUS including the One-Element Buffer by Manfred Broy
oheimb
parents:
diff changeset
     4
62175
8ffc4d0e652d isabelle update_cartouches -c -t;
wenzelm
parents: 60172
diff changeset
     5
section \<open>Admissibility for streams\<close>
11350
4c55b020d6ee added FOCUS including the One-Element Buffer by Manfred Broy
oheimb
parents:
diff changeset
     6
17293
ecf182ccc3ca converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
     7
theory Stream_adm
56020
f92479477c52 introduced antimono; incseq, decseq are now abbreviations for mono and antimono; renamed Library/Continuity to Library/Order_Continuity; removed up_cont; renamed down_cont to down_continuity and generalized to complete_lattices
hoelzl
parents: 46008
diff changeset
     8
imports "~~/src/HOL/HOLCF/Library/Stream" "~~/src/HOL/Library/Order_Continuity"
17293
ecf182ccc3ca converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
     9
begin
11350
4c55b020d6ee added FOCUS including the One-Element Buffer by Manfred Broy
oheimb
parents:
diff changeset
    10
19763
wenzelm
parents: 19759
diff changeset
    11
definition
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 19763
diff changeset
    12
  stream_monoP  :: "(('a stream) set \<Rightarrow> ('a stream) set) \<Rightarrow> bool" where
43924
1165fe965da8 rename Fin to enat
hoelzl
parents: 43921
diff changeset
    13
  "stream_monoP F = (\<exists>Q i. \<forall>P s. enat i \<le> #s \<longrightarrow>
19763
wenzelm
parents: 19759
diff changeset
    14
                    (s \<in> F P) = (stream_take i\<cdot>s \<in> Q \<and> iterate i\<cdot>rt\<cdot>s \<in> P))"
17293
ecf182ccc3ca converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    15
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 19763
diff changeset
    16
definition
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 19763
diff changeset
    17
  stream_antiP  :: "(('a stream) set \<Rightarrow> ('a stream) set) \<Rightarrow> bool" where
19763
wenzelm
parents: 19759
diff changeset
    18
  "stream_antiP F = (\<forall>P x. \<exists>Q i.
43924
1165fe965da8 rename Fin to enat
hoelzl
parents: 43921
diff changeset
    19
                (#x  < enat i \<longrightarrow> (\<forall>y. x \<sqsubseteq> y \<longrightarrow> y \<in> F P \<longrightarrow> x \<in> F P)) \<and>
1165fe965da8 rename Fin to enat
hoelzl
parents: 43921
diff changeset
    20
                (enat i <= #x \<longrightarrow> (\<forall>y. x \<sqsubseteq> y \<longrightarrow>
19763
wenzelm
parents: 19759
diff changeset
    21
                (y \<in> F P) = (stream_take i\<cdot>y \<in> Q \<and> iterate i\<cdot>rt\<cdot>y \<in> P))))"
17293
ecf182ccc3ca converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    22
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 19763
diff changeset
    23
definition
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 19763
diff changeset
    24
  antitonP :: "'a set => bool" where
19763
wenzelm
parents: 19759
diff changeset
    25
  "antitonP P = (\<forall>x y. x \<sqsubseteq> y \<longrightarrow> y\<in>P \<longrightarrow> x\<in>P)"
17293
ecf182ccc3ca converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    26
ecf182ccc3ca converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    27
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    28
(* ----------------------------------------------------------------------- *)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    29
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    30
section "admissibility"
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    31
40430
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    32
lemma infinite_chain_adm_lemma:
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    33
  "\<lbrakk>Porder.chain Y; \<forall>i. P (Y i);  
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    34
    \<And>Y. \<lbrakk>Porder.chain Y; \<forall>i. P (Y i); \<not> finite_chain Y\<rbrakk> \<Longrightarrow> P (\<Squnion>i. Y i)\<rbrakk>
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    35
      \<Longrightarrow> P (\<Squnion>i. Y i)"
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    36
apply (case_tac "finite_chain Y")
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    37
prefer 2 apply fast
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    38
apply (unfold finite_chain_def)
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    39
apply safe
40771
1c6f7d4b110e renamed several HOLCF theorems (listed in NEWS)
huffman
parents: 40431
diff changeset
    40
apply (erule lub_finch1 [THEN lub_eqI, THEN ssubst])
40430
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    41
apply assumption
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    42
apply (erule spec)
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    43
done
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    44
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    45
lemma increasing_chain_adm_lemma:
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    46
  "\<lbrakk>Porder.chain Y;  \<forall>i. P (Y i); \<And>Y. \<lbrakk>Porder.chain Y; \<forall>i. P (Y i);
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    47
    \<forall>i. \<exists>j>i. Y i \<noteq> Y j \<and> Y i \<sqsubseteq> Y j\<rbrakk> \<Longrightarrow> P (\<Squnion>i. Y i)\<rbrakk>
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    48
      \<Longrightarrow> P (\<Squnion>i. Y i)"
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    49
apply (erule infinite_chain_adm_lemma)
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    50
apply assumption
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    51
apply (erule thin_rl)
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    52
apply (unfold finite_chain_def)
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    53
apply (unfold max_in_chain_def)
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    54
apply (fast dest: le_imp_less_or_eq elim: chain_mono_less)
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    55
done
483a4876e428 move a few admissibility lemmas into FOCUS/Stream_adm.thy
huffman
parents: 37110
diff changeset
    56
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    57
lemma flatstream_adm_lemma:
26451
f8a615f3bb31 avoid amiguity of Continuity.chain vs. Porder.chain;
wenzelm
parents: 26102
diff changeset
    58
  assumes 1: "Porder.chain Y"
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    59
  assumes 2: "!i. P (Y i)"
43924
1165fe965da8 rename Fin to enat
hoelzl
parents: 43921
diff changeset
    60
  assumes 3: "(!!Y. [| Porder.chain Y; !i. P (Y i); !k. ? j. enat k < #((Y j)::'a::flat stream)|]
27413
3154f3765cc7 replace lub (range Y) with (LUB i. Y i)
huffman
parents: 27101
diff changeset
    61
  ==> P(LUB i. Y i))"
3154f3765cc7 replace lub (range Y) with (LUB i. Y i)
huffman
parents: 27101
diff changeset
    62
  shows "P(LUB i. Y i)"
46008
c296c75f4cf4 reverted some changes for set->predicate transition, according to "hg log -u berghofe -r Isabelle2007:Isabelle2008";
wenzelm
parents: 44019
diff changeset
    63
apply (rule increasing_chain_adm_lemma [OF 1 2])
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    64
apply (erule 3, assumption)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    65
apply (erule thin_rl)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    66
apply (rule allI)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    67
apply (case_tac "!j. stream_finite (Y j)")
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    68
apply ( rule chain_incr)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    69
apply ( rule allI)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    70
apply ( drule spec)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    71
apply ( safe)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    72
apply ( rule exI)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    73
apply ( rule slen_strict_mono)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    74
apply (   erule spec)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    75
apply (  assumption)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    76
apply ( assumption)
43919
a7e4fb1a0502 rename Nat_Infinity (inat) to Extended_Nat (enat)
hoelzl
parents: 42151
diff changeset
    77
apply (metis enat_ord_code(4) slen_infinite)
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    78
done
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    79
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    80
(* should be without reference to stream length? *)
26451
f8a615f3bb31 avoid amiguity of Continuity.chain vs. Porder.chain;
wenzelm
parents: 26102
diff changeset
    81
lemma flatstream_admI: "[|(!!Y. [| Porder.chain Y; !i. P (Y i); 
43924
1165fe965da8 rename Fin to enat
hoelzl
parents: 43921
diff changeset
    82
 !k. ? j. enat k < #((Y j)::'a::flat stream)|] ==> P(LUB i. Y i))|]==> adm P"
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    83
apply (unfold adm_def)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    84
apply (intro strip)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    85
apply (erule (1) flatstream_adm_lemma)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    86
apply (fast)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    87
done
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    88
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    89
43921
e8511be08ddd Introduce infinity type class
hoelzl
parents: 43919
diff changeset
    90
(* context (theory "Extended_Nat");*)
43924
1165fe965da8 rename Fin to enat
hoelzl
parents: 43921
diff changeset
    91
lemma ile_lemma: "enat (i + j) <= x ==> enat i <= x"
27101
864d29f11c9d slightly tuning of some proofs involving case distinction and induction on natural numbers and similar
haftmann
parents: 26838
diff changeset
    92
  by (rule order_trans) auto
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    93
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    94
lemma stream_monoP2I:
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    95
"!!X. stream_monoP F ==> !i. ? l. !x y. 
56020
f92479477c52 introduced antimono; incseq, decseq are now abbreviations for mono and antimono; renamed Library/Continuity to Library/Order_Continuity; removed up_cont; renamed down_cont to down_continuity and generalized to complete_lattices
hoelzl
parents: 46008
diff changeset
    96
  enat l <= #x --> (x::'a::flat stream) << y --> x:(F ^^ i) top --> y:(F ^^ i) top"
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    97
apply (unfold stream_monoP_def)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    98
apply (safe)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
    99
apply (rule_tac x="i*ia" in exI)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   100
apply (induct_tac "ia")
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   101
apply ( simp)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   102
apply (simp)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   103
apply (intro strip)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   104
apply (erule allE, erule all_dupE, drule mp, erule ile_lemma)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   105
apply (drule_tac P="%x. x" in subst, assumption)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   106
apply (erule allE, drule mp, rule ile_lemma) back
27101
864d29f11c9d slightly tuning of some proofs involving case distinction and induction on natural numbers and similar
haftmann
parents: 26838
diff changeset
   107
apply ( erule order_trans)
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   108
apply ( erule slen_mono)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   109
apply (erule ssubst)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   110
apply (safe)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   111
apply ( erule (2) ile_lemma [THEN slen_take_lemma3, THEN subst])
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   112
apply (erule allE)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   113
apply (drule mp)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   114
apply ( erule slen_rt_mult)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   115
apply (erule allE)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   116
apply (drule mp)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   117
apply (erule monofun_rt_mult)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   118
apply (drule (1) mp)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   119
apply (assumption)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   120
done
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   121
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   122
lemma stream_monoP2_gfp_admI: "[| !i. ? l. !x y. 
56020
f92479477c52 introduced antimono; incseq, decseq are now abbreviations for mono and antimono; renamed Library/Continuity to Library/Order_Continuity; removed up_cont; renamed down_cont to down_continuity and generalized to complete_lattices
hoelzl
parents: 46008
diff changeset
   123
 enat l <= #x --> (x::'a::flat stream) << y --> x:(F ^^ i) top --> y:(F ^^ i) top;
60172
423273355b55 rename continuous and down_continuous in Order_Continuity to sup_/inf_continuous; relate them with topological continuity
hoelzl
parents: 58880
diff changeset
   124
    inf_continuous F |] ==> adm (%x. x:gfp F)"
423273355b55 rename continuous and down_continuous in Order_Continuity to sup_/inf_continuous; relate them with topological continuity
hoelzl
parents: 58880
diff changeset
   125
apply (erule inf_continuous_gfp[of F, THEN ssubst])
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   126
apply (simp (no_asm))
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   127
apply (rule adm_lemmas)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   128
apply (rule flatstream_admI)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   129
apply (erule allE)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   130
apply (erule exE)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   131
apply (erule allE, erule exE)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   132
apply (erule allE, erule allE, drule mp) (* stream_monoP *)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   133
apply ( drule ileI1)
27101
864d29f11c9d slightly tuning of some proofs involving case distinction and induction on natural numbers and similar
haftmann
parents: 26838
diff changeset
   134
apply ( drule order_trans)
44019
ee784502aed5 Extended_Nat.thy: renamed iSuc to eSuc, standardized theorem names
huffman
parents: 43924
diff changeset
   135
apply (  rule ile_eSuc)
ee784502aed5 Extended_Nat.thy: renamed iSuc to eSuc, standardized theorem names
huffman
parents: 43924
diff changeset
   136
apply ( drule eSuc_ile_mono [THEN iffD1])
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   137
apply ( assumption)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   138
apply (drule mp)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   139
apply ( erule is_ub_thelub)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   140
apply (fast)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   141
done
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   142
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   143
lemmas fstream_gfp_admI = stream_monoP2I [THEN stream_monoP2_gfp_admI]
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   144
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   145
lemma stream_antiP2I:
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   146
"!!X. [|stream_antiP (F::(('a::flat stream)set => ('a stream set)))|]
56020
f92479477c52 introduced antimono; incseq, decseq are now abbreviations for mono and antimono; renamed Library/Continuity to Library/Order_Continuity; removed up_cont; renamed down_cont to down_continuity and generalized to complete_lattices
hoelzl
parents: 46008
diff changeset
   147
  ==> !i x y. x << y --> y:(F ^^ i) top --> x:(F ^^ i) top"
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   148
apply (unfold stream_antiP_def)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   149
apply (rule allI)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   150
apply (induct_tac "i")
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   151
apply ( simp)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   152
apply (simp)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   153
apply (intro strip)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   154
apply (erule allE, erule all_dupE, erule exE, erule exE)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   155
apply (erule conjE)
43924
1165fe965da8 rename Fin to enat
hoelzl
parents: 43921
diff changeset
   156
apply (case_tac "#x < enat i")
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   157
apply ( fast)
26102
2ae572207783 fix proofs involving ile_def
huffman
parents: 24107
diff changeset
   158
apply (unfold linorder_not_less)
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   159
apply (drule (1) mp)
40431
682d6c455670 discontinue a bunch of legacy theorem names
huffman
parents: 40430
diff changeset
   160
apply (erule all_dupE, drule mp, rule below_refl)
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   161
apply (erule ssubst)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   162
apply (erule allE, drule (1) mp)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   163
apply (drule_tac P="%x. x" in subst, assumption)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   164
apply (erule conjE, rule conjI)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   165
apply ( erule slen_take_lemma3 [THEN ssubst], assumption)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   166
apply ( assumption)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   167
apply (erule allE, erule allE, drule mp, erule monofun_rt_mult)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   168
apply (drule (1) mp)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   169
apply (assumption)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   170
done
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   171
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   172
lemma stream_antiP2_non_gfp_admI:
60172
423273355b55 rename continuous and down_continuous in Order_Continuity to sup_/inf_continuous; relate them with topological continuity
hoelzl
parents: 58880
diff changeset
   173
"!!X. [|!i x y. x << y --> y:(F ^^ i) top --> x:(F ^^ i) top; inf_continuous F |] 
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   174
  ==> adm (%u. ~ u:gfp F)"
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   175
apply (unfold adm_def)
60172
423273355b55 rename continuous and down_continuous in Order_Continuity to sup_/inf_continuous; relate them with topological continuity
hoelzl
parents: 58880
diff changeset
   176
apply (simp add: inf_continuous_gfp)
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   177
apply (fast dest!: is_ub_thelub)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   178
done
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   179
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   180
lemmas fstream_non_gfp_admI = stream_antiP2I [THEN stream_antiP2_non_gfp_admI]
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   181
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   182
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   183
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   184
(**new approach for adm********************************************************)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   185
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   186
section "antitonP"
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   187
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   188
lemma antitonPD: "[| antitonP P; y:P; x<<y |] ==> x:P"
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   189
apply (unfold antitonP_def)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   190
apply auto
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   191
done
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   192
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   193
lemma antitonPI: "!x y. y:P --> x<<y --> x:P ==> antitonP P"
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   194
apply (unfold antitonP_def)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   195
apply (fast)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   196
done
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   197
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   198
lemma antitonP_adm_non_P: "antitonP P ==> adm (%u. u~:P)"
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   199
apply (unfold adm_def)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   200
apply (auto dest: antitonPD elim: is_ub_thelub)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   201
done
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   202
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   203
lemma def_gfp_adm_nonP: "P \<equiv> gfp F \<Longrightarrow> {y. \<exists>x::'a::pcpo. y \<sqsubseteq> x \<and> x \<in> P} \<subseteq> F {y. \<exists>x. y \<sqsubseteq> x \<and> x \<in> P} \<Longrightarrow> 
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   204
  adm (\<lambda>u. u\<notin>P)"
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   205
apply (simp)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   206
apply (rule antitonP_adm_non_P)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   207
apply (rule antitonPI)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   208
apply (drule gfp_upperbound)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   209
apply (fast)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   210
done
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   211
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   212
lemma adm_set:
27413
3154f3765cc7 replace lub (range Y) with (LUB i. Y i)
huffman
parents: 27101
diff changeset
   213
"{\<Squnion>i. Y i |Y. Porder.chain Y & (\<forall>i. Y i \<in> P)} \<subseteq> P \<Longrightarrow> adm (\<lambda>x. x\<in>P)"
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   214
apply (unfold adm_def)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   215
apply (fast)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   216
done
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   217
27413
3154f3765cc7 replace lub (range Y) with (LUB i. Y i)
huffman
parents: 27101
diff changeset
   218
lemma def_gfp_admI: "P \<equiv> gfp F \<Longrightarrow> {\<Squnion>i. Y i |Y. Porder.chain Y \<and> (\<forall>i. Y i \<in> P)} \<subseteq> 
3154f3765cc7 replace lub (range Y) with (LUB i. Y i)
huffman
parents: 27101
diff changeset
   219
  F {\<Squnion>i. Y i |Y. Porder.chain Y \<and> (\<forall>i. Y i \<in> P)} \<Longrightarrow> adm (\<lambda>x. x\<in>P)"
19759
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   220
apply (simp)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   221
apply (rule adm_set)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   222
apply (erule gfp_upperbound)
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   223
done
2d0896653e7a removed legacy ML scripts
huffman
parents: 18075
diff changeset
   224
11350
4c55b020d6ee added FOCUS including the One-Element Buffer by Manfred Broy
oheimb
parents:
diff changeset
   225
end