src/HOL/UNITY/Guar.thy
author paulson
Fri, 31 Jan 2003 20:12:44 +0100
changeset 13798 4c1a53627500
parent 13792 d1811693899c
child 13805 3786b2fd6808
permissions -rw-r--r--
conversion to new-style theories and tidying
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7400
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
     1
(*  Title:      HOL/UNITY/Guar.thy
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
     2
    ID:         $Id$
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
     4
    Copyright   1999  University of Cambridge
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
     5
11190
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
     6
From Chandy and Sanders, "Reasoning About Program Composition",
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
     7
Technical Report 2000-003, University of Florida, 2000.
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
     8
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
     9
Revised by Sidi Ehmety on January 2001
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    10
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    11
Added: Compatibility, weakest guarantees, etc.
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    12
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    13
and Weakest existential property,
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    14
from Charpentier and Chandy "Theorems about Composition",
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    15
Fifth International Conference on Mathematics of Program, 2000.
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    16
7400
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
    17
*)
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
    18
13798
4c1a53627500 conversion to new-style theories and tidying
paulson
parents: 13792
diff changeset
    19
header{*Guarantees Specifications*}
4c1a53627500 conversion to new-style theories and tidying
paulson
parents: 13792
diff changeset
    20
13792
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    21
theory Guar = Comp:
7400
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
    22
12338
de0f4a63baa5 renamed class "term" to "type" (actually "HOL.type");
wenzelm
parents: 11190
diff changeset
    23
instance program :: (type) order
13792
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    24
  by (intro_classes,
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    25
      (assumption | rule component_refl component_trans component_antisym
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    26
                     program_less_le)+)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    27
7400
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
    28
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
    29
constdefs
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
    30
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
    31
  (*Existential and Universal properties.  I formalize the two-program
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
    32
    case, proving equivalence with Chandy and Sanders's n-ary definitions*)
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
    33
13792
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    34
  ex_prop  :: "'a program set => bool"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    35
   "ex_prop X == \<forall>F G. F ok G -->F:X | G: X --> (F Join G) : X"
7400
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
    36
13792
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    37
  strict_ex_prop  :: "'a program set => bool"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    38
   "strict_ex_prop X == \<forall>F G.  F ok G --> (F:X | G: X) = (F Join G : X)"
7400
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
    39
13792
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    40
  uv_prop  :: "'a program set => bool"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    41
   "uv_prop X == SKIP : X & (\<forall>F G. F ok G --> F:X & G: X --> (F Join G) : X)"
7400
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
    42
13792
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    43
  strict_uv_prop  :: "'a program set => bool"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    44
   "strict_uv_prop X == 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    45
      SKIP : X & (\<forall>F G. F ok G --> (F:X & G: X) = (F Join G : X))"
7400
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
    46
13792
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    47
  guar :: "['a program set, 'a program set] => 'a program set"
10064
1a77667b21ef added compatibility relation: AllowedActs, Allowed, ok,
paulson
parents: 9337
diff changeset
    48
          (infixl "guarantees" 55)  (*higher than membership, lower than Co*)
13792
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    49
   "X guarantees Y == {F. \<forall>G. F ok G --> F Join G : X --> F Join G : Y}"
11190
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    50
  
7400
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
    51
11190
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    52
  (* Weakest guarantees *)
13792
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    53
   wg :: "['a program, 'a program set] =>  'a program set"
11190
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    54
  "wg F Y == Union({X. F:X guarantees Y})"
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    55
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    56
   (* Weakest existential property stronger than X *)
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    57
   wx :: "('a program) set => ('a program)set"
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    58
   "wx X == Union({Y. Y<=X & ex_prop Y})"
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    59
  
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    60
  (*Ill-defined programs can arise through "Join"*)
13792
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    61
  welldef :: "'a program set"
11190
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    62
  "welldef == {F. Init F ~= {}}"
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    63
  
13792
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    64
  refines :: "['a program, 'a program, 'a program set] => bool"
7400
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
    65
			("(3_ refines _ wrt _)" [10,10,10] 10)
11190
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    66
  "G refines F wrt X ==
13792
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    67
     \<forall>H. (F ok H  & G ok H & F Join H : welldef Int X) --> 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    68
         (G Join H : welldef Int X)"
7400
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
    69
13792
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    70
  iso_refines :: "['a program, 'a program, 'a program set] => bool"
11190
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    71
                              ("(3_ iso'_refines _ wrt _)" [10,10,10] 10)
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    72
  "G iso_refines F wrt X ==
44e157622cb2 *** empty log message ***
ehmety
parents: 10064
diff changeset
    73
   F : welldef Int X --> G : welldef Int X"
7400
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
    74
13792
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    75
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    76
lemma OK_insert_iff:
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    77
     "(OK (insert i I) F) = 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    78
      (if i:I then OK I F else OK I F & (F i ok JOIN I F))"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    79
by (auto intro: ok_sym simp add: OK_iff_ok)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    80
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    81
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    82
(*** existential properties ***)
13798
4c1a53627500 conversion to new-style theories and tidying
paulson
parents: 13792
diff changeset
    83
lemma ex1 [rule_format]: 
13792
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    84
 "[| ex_prop X; finite GG |] ==>  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    85
     GG Int X ~= {}--> OK GG (%G. G) -->(JN G:GG. G) : X"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    86
apply (unfold ex_prop_def)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    87
apply (erule finite_induct)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    88
apply (auto simp add: OK_insert_iff Int_insert_left)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    89
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    90
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    91
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    92
lemma ex2: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    93
     "\<forall>GG. finite GG & GG Int X ~= {} --> OK GG (%G. G) -->(JN G:GG. G):X 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    94
      ==> ex_prop X"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    95
apply (unfold ex_prop_def, clarify)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    96
apply (drule_tac x = "{F,G}" in spec)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    97
apply (auto dest: ok_sym simp add: OK_iff_ok)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    98
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
    99
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   100
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   101
(*Chandy & Sanders take this as a definition*)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   102
lemma ex_prop_finite:
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   103
     "ex_prop X = 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   104
      (\<forall>GG. finite GG & GG Int X ~= {} & OK GG (%G. G)--> (JN G:GG. G) : X)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   105
by (blast intro: ex1 ex2)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   106
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   107
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   108
(*Their "equivalent definition" given at the end of section 3*)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   109
lemma ex_prop_equiv: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   110
     "ex_prop X = (\<forall>G. G:X = (\<forall>H. (G component_of H) --> H: X))"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   111
apply auto
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   112
apply (unfold ex_prop_def component_of_def, safe)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   113
apply blast 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   114
apply blast 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   115
apply (subst Join_commute) 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   116
apply (drule ok_sym, blast) 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   117
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   118
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   119
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   120
(*** universal properties ***)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   121
lemma uv1 [rule_format]: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   122
     "[| uv_prop X; finite GG |] 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   123
      ==> GG <= X & OK GG (%G. G) --> (JN G:GG. G) : X"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   124
apply (unfold uv_prop_def)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   125
apply (erule finite_induct)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   126
apply (auto simp add: Int_insert_left OK_insert_iff)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   127
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   128
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   129
lemma uv2: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   130
     "\<forall>GG. finite GG & GG <= X & OK GG (%G. G) --> (JN G:GG. G) : X  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   131
      ==> uv_prop X"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   132
apply (unfold uv_prop_def)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   133
apply (rule conjI)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   134
 apply (drule_tac x = "{}" in spec)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   135
 prefer 2
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   136
 apply clarify 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   137
 apply (drule_tac x = "{F,G}" in spec)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   138
apply (auto dest: ok_sym simp add: OK_iff_ok)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   139
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   140
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   141
(*Chandy & Sanders take this as a definition*)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   142
lemma uv_prop_finite:
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   143
     "uv_prop X = 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   144
      (\<forall>GG. finite GG & GG <= X & OK GG (%G. G) --> (JN G:GG. G): X)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   145
by (blast intro: uv1 uv2)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   146
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   147
(*** guarantees ***)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   148
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   149
lemma guaranteesI:
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   150
     "(!!G. [| F ok G; F Join G : X |] ==> F Join G : Y)  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   151
      ==> F : X guarantees Y"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   152
by (simp add: guar_def component_def)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   153
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   154
lemma guaranteesD: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   155
     "[| F : X guarantees Y;  F ok G;  F Join G : X |]  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   156
      ==> F Join G : Y"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   157
by (unfold guar_def component_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   158
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   159
(*This version of guaranteesD matches more easily in the conclusion
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   160
  The major premise can no longer be  F<=H since we need to reason about G*)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   161
lemma component_guaranteesD: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   162
     "[| F : X guarantees Y;  F Join G = H;  H : X;  F ok G |]  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   163
      ==> H : Y"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   164
by (unfold guar_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   165
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   166
lemma guarantees_weaken: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   167
     "[| F: X guarantees X'; Y <= X; X' <= Y' |] ==> F: Y guarantees Y'"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   168
by (unfold guar_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   169
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   170
lemma subset_imp_guarantees_UNIV: "X <= Y ==> X guarantees Y = UNIV"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   171
by (unfold guar_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   172
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   173
(*Equivalent to subset_imp_guarantees_UNIV but more intuitive*)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   174
lemma subset_imp_guarantees: "X <= Y ==> F : X guarantees Y"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   175
by (unfold guar_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   176
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   177
(*Remark at end of section 4.1 *)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   178
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   179
lemma ex_prop_imp: "ex_prop Y ==> (Y = UNIV guarantees Y)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   180
apply (simp (no_asm_use) add: guar_def ex_prop_equiv)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   181
apply safe
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   182
 apply (drule_tac x = x in spec)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   183
 apply (drule_tac [2] x = x in spec)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   184
 apply (drule_tac [2] sym)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   185
apply (auto simp add: component_of_def)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   186
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   187
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   188
lemma guarantees_imp: "(Y = UNIV guarantees Y) ==> ex_prop(Y)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   189
apply (simp (no_asm_use) add: guar_def ex_prop_equiv)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   190
apply safe
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   191
apply (auto simp add: component_of_def dest: sym)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   192
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   193
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   194
lemma ex_prop_equiv2: "(ex_prop Y) = (Y = UNIV guarantees Y)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   195
apply (rule iffI)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   196
apply (rule ex_prop_imp)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   197
apply (auto simp add: guarantees_imp) 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   198
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   199
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   200
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   201
(** Distributive laws.  Re-orient to perform miniscoping **)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   202
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   203
lemma guarantees_UN_left: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   204
     "(UN i:I. X i) guarantees Y = (INT i:I. X i guarantees Y)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   205
by (unfold guar_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   206
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   207
lemma guarantees_Un_left: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   208
     "(X Un Y) guarantees Z = (X guarantees Z) Int (Y guarantees Z)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   209
by (unfold guar_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   210
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   211
lemma guarantees_INT_right: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   212
     "X guarantees (INT i:I. Y i) = (INT i:I. X guarantees Y i)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   213
by (unfold guar_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   214
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   215
lemma guarantees_Int_right: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   216
     "Z guarantees (X Int Y) = (Z guarantees X) Int (Z guarantees Y)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   217
by (unfold guar_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   218
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   219
lemma guarantees_Int_right_I:
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   220
     "[| F : Z guarantees X;  F : Z guarantees Y |]  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   221
     ==> F : Z guarantees (X Int Y)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   222
by (simp add: guarantees_Int_right)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   223
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   224
lemma guarantees_INT_right_iff:
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   225
     "(F : X guarantees (INTER I Y)) = (\<forall>i\<in>I. F : X guarantees (Y i))"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   226
by (simp add: guarantees_INT_right)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   227
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   228
lemma shunting: "(X guarantees Y) = (UNIV guarantees (-X Un Y))"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   229
by (unfold guar_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   230
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   231
lemma contrapositive: "(X guarantees Y) = -Y guarantees -X"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   232
by (unfold guar_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   233
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   234
(** The following two can be expressed using intersection and subset, which
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   235
    is more faithful to the text but looks cryptic.
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   236
**)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   237
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   238
lemma combining1: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   239
    "[| F : V guarantees X;  F : (X Int Y) guarantees Z |] 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   240
     ==> F : (V Int Y) guarantees Z"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   241
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   242
by (unfold guar_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   243
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   244
lemma combining2: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   245
    "[| F : V guarantees (X Un Y);  F : Y guarantees Z |] 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   246
     ==> F : V guarantees (X Un Z)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   247
by (unfold guar_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   248
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   249
(** The following two follow Chandy-Sanders, but the use of object-quantifiers
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   250
    does not suit Isabelle... **)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   251
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   252
(*Premise should be (!!i. i: I ==> F: X guarantees Y i) *)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   253
lemma all_guarantees: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   254
     "\<forall>i\<in>I. F : X guarantees (Y i) ==> F : X guarantees (INT i:I. Y i)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   255
by (unfold guar_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   256
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   257
(*Premises should be [| F: X guarantees Y i; i: I |] *)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   258
lemma ex_guarantees: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   259
     "\<exists>i\<in>I. F : X guarantees (Y i) ==> F : X guarantees (UN i:I. Y i)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   260
by (unfold guar_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   261
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   262
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   263
(*** Additional guarantees laws, by lcp ***)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   264
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   265
lemma guarantees_Join_Int: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   266
    "[| F: U guarantees V;  G: X guarantees Y; F ok G |]  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   267
     ==> F Join G: (U Int X) guarantees (V Int Y)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   268
apply (unfold guar_def)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   269
apply (simp (no_asm))
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   270
apply safe
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   271
apply (simp add: Join_assoc)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   272
apply (subgoal_tac "F Join G Join Ga = G Join (F Join Ga) ")
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   273
apply (simp add: ok_commute)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   274
apply (simp (no_asm_simp) add: Join_ac)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   275
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   276
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   277
lemma guarantees_Join_Un: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   278
    "[| F: U guarantees V;  G: X guarantees Y; F ok G |]   
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   279
     ==> F Join G: (U Un X) guarantees (V Un Y)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   280
apply (unfold guar_def)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   281
apply (simp (no_asm))
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   282
apply safe
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   283
apply (simp add: Join_assoc)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   284
apply (subgoal_tac "F Join G Join Ga = G Join (F Join Ga) ")
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   285
apply (simp add: ok_commute)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   286
apply (simp (no_asm_simp) add: Join_ac)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   287
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   288
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   289
lemma guarantees_JN_INT: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   290
     "[| \<forall>i\<in>I. F i : X i guarantees Y i;  OK I F |]  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   291
      ==> (JOIN I F) : (INTER I X) guarantees (INTER I Y)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   292
apply (unfold guar_def, auto)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   293
apply (drule bspec, assumption)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   294
apply (rename_tac "i")
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   295
apply (drule_tac x = "JOIN (I-{i}) F Join G" in spec)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   296
apply (auto intro: OK_imp_ok
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   297
            simp add: Join_assoc [symmetric] JN_Join_diff JN_absorb)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   298
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   299
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   300
lemma guarantees_JN_UN: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   301
    "[| \<forall>i\<in>I. F i : X i guarantees Y i;  OK I F |]  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   302
     ==> (JOIN I F) : (UNION I X) guarantees (UNION I Y)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   303
apply (unfold guar_def, auto)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   304
apply (drule bspec, assumption)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   305
apply (rename_tac "i")
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   306
apply (drule_tac x = "JOIN (I-{i}) F Join G" in spec)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   307
apply (auto intro: OK_imp_ok
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   308
            simp add: Join_assoc [symmetric] JN_Join_diff JN_absorb)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   309
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   310
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   311
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   312
(*** guarantees laws for breaking down the program, by lcp ***)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   313
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   314
lemma guarantees_Join_I1: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   315
     "[| F: X guarantees Y;  F ok G |] ==> F Join G: X guarantees Y"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   316
apply (unfold guar_def)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   317
apply (simp (no_asm))
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   318
apply safe
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   319
apply (simp add: Join_assoc)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   320
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   321
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   322
lemma guarantees_Join_I2:
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   323
     "[| G: X guarantees Y;  F ok G |] ==> F Join G: X guarantees Y"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   324
apply (simp add: Join_commute [of _ G] ok_commute [of _ G])
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   325
apply (blast intro: guarantees_Join_I1)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   326
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   327
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   328
lemma guarantees_JN_I: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   329
     "[| i : I;  F i: X guarantees Y;  OK I F |]  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   330
      ==> (JN i:I. (F i)) : X guarantees Y"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   331
apply (unfold guar_def, clarify)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   332
apply (drule_tac x = "JOIN (I-{i}) F Join G" in spec)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   333
apply (auto intro: OK_imp_ok simp add: JN_Join_diff JN_Join_diff Join_assoc [symmetric])
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   334
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   335
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   336
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   337
(*** well-definedness ***)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   338
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   339
lemma Join_welldef_D1: "F Join G: welldef ==> F: welldef"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   340
by (unfold welldef_def, auto)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   341
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   342
lemma Join_welldef_D2: "F Join G: welldef ==> G: welldef"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   343
by (unfold welldef_def, auto)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   344
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   345
(*** refinement ***)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   346
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   347
lemma refines_refl: "F refines F wrt X"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   348
by (unfold refines_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   349
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   350
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   351
(* Goalw [refines_def]
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   352
     "[| H refines G wrt X;  G refines F wrt X |] ==> H refines F wrt X"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   353
by Auto_tac
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   354
qed "refines_trans"; *)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   355
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   356
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   357
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   358
lemma strict_ex_refine_lemma: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   359
     "strict_ex_prop X  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   360
      ==> (\<forall>H. F ok H & G ok H & F Join H : X --> G Join H : X)  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   361
              = (F:X --> G:X)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   362
by (unfold strict_ex_prop_def, auto)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   363
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   364
lemma strict_ex_refine_lemma_v: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   365
     "strict_ex_prop X  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   366
      ==> (\<forall>H. F ok H & G ok H & F Join H : welldef & F Join H : X --> G Join H : X) =  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   367
          (F: welldef Int X --> G:X)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   368
apply (unfold strict_ex_prop_def, safe)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   369
apply (erule_tac x = SKIP and P = "%H. ?PP H --> ?RR H" in allE)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   370
apply (auto dest: Join_welldef_D1 Join_welldef_D2)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   371
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   372
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   373
lemma ex_refinement_thm:
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   374
     "[| strict_ex_prop X;   
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   375
         \<forall>H. F ok H & G ok H & F Join H : welldef Int X --> G Join H : welldef |]  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   376
      ==> (G refines F wrt X) = (G iso_refines F wrt X)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   377
apply (rule_tac x = SKIP in allE, assumption)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   378
apply (simp add: refines_def iso_refines_def strict_ex_refine_lemma_v)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   379
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   380
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   381
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   382
lemma strict_uv_refine_lemma: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   383
     "strict_uv_prop X ==> 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   384
      (\<forall>H. F ok H & G ok H & F Join H : X --> G Join H : X) = (F:X --> G:X)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   385
by (unfold strict_uv_prop_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   386
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   387
lemma strict_uv_refine_lemma_v: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   388
     "strict_uv_prop X  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   389
      ==> (\<forall>H. F ok H & G ok H & F Join H : welldef & F Join H : X --> G Join H : X) =  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   390
          (F: welldef Int X --> G:X)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   391
apply (unfold strict_uv_prop_def, safe)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   392
apply (erule_tac x = SKIP and P = "%H. ?PP H --> ?RR H" in allE)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   393
apply (auto dest: Join_welldef_D1 Join_welldef_D2)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   394
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   395
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   396
lemma uv_refinement_thm:
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   397
     "[| strict_uv_prop X;   
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   398
         \<forall>H. F ok H & G ok H & F Join H : welldef Int X --> 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   399
             G Join H : welldef |]  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   400
      ==> (G refines F wrt X) = (G iso_refines F wrt X)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   401
apply (rule_tac x = SKIP in allE, assumption)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   402
apply (simp add: refines_def iso_refines_def strict_uv_refine_lemma_v)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   403
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   404
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   405
(* Added by Sidi Ehmety from Chandy & Sander, section 6 *)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   406
lemma guarantees_equiv: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   407
    "(F:X guarantees Y) = (\<forall>H. H:X \<longrightarrow> (F component_of H \<longrightarrow> H:Y))"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   408
by (unfold guar_def component_of_def, auto)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   409
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   410
lemma wg_weakest: "!!X. F:(X guarantees Y) ==> X <= (wg F Y)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   411
by (unfold wg_def, auto)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   412
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   413
lemma wg_guarantees: "F:((wg F Y) guarantees Y)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   414
by (unfold wg_def guar_def, blast)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   415
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   416
lemma wg_equiv: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   417
  "(H: wg F X) = (F component_of H --> H:X)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   418
apply (unfold wg_def)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   419
apply (simp (no_asm) add: guarantees_equiv)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   420
apply (rule iffI)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   421
apply (rule_tac [2] x = "{H}" in exI)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   422
apply (blast+)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   423
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   424
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   425
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   426
lemma component_of_wg: "F component_of H ==> (H:wg F X) = (H:X)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   427
by (simp add: wg_equiv)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   428
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   429
lemma wg_finite: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   430
    "\<forall>FF. finite FF & FF Int X ~= {} --> OK FF (%F. F)  
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   431
          --> (\<forall>F\<in>FF. ((JN F:FF. F): wg F X) = ((JN F:FF. F):X))"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   432
apply clarify
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   433
apply (subgoal_tac "F component_of (JN F:FF. F) ")
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   434
apply (drule_tac X = X in component_of_wg, simp)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   435
apply (simp add: component_of_def)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   436
apply (rule_tac x = "JN F: (FF-{F}) . F" in exI)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   437
apply (auto intro: JN_Join_diff dest: ok_sym simp add: OK_iff_ok)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   438
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   439
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   440
lemma wg_ex_prop: "ex_prop X ==> (F:X) = (\<forall>H. H : wg F X)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   441
apply (simp (no_asm_use) add: ex_prop_equiv wg_equiv)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   442
apply blast
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   443
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   444
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   445
(** From Charpentier and Chandy "Theorems About Composition" **)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   446
(* Proposition 2 *)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   447
lemma wx_subset: "(wx X)<=X"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   448
by (unfold wx_def, auto)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   449
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   450
lemma wx_ex_prop: "ex_prop (wx X)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   451
apply (unfold wx_def)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   452
apply (simp (no_asm) add: ex_prop_equiv)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   453
apply safe
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   454
apply blast
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   455
apply auto
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   456
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   457
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   458
lemma wx_weakest: "\<forall>Z. Z<= X --> ex_prop Z --> Z <= wx X"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   459
by (unfold wx_def, auto)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   460
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   461
(* Proposition 6 *)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   462
lemma wx'_ex_prop: "ex_prop({F. \<forall>G. F ok G --> F Join G:X})"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   463
apply (unfold ex_prop_def, safe)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   464
apply (drule_tac x = "G Join Ga" in spec)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   465
apply (force simp add: ok_Join_iff1 Join_assoc)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   466
apply (drule_tac x = "F Join Ga" in spec)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   467
apply (simp (no_asm_use) add: ok_Join_iff1)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   468
apply safe
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   469
apply (simp (no_asm_simp) add: ok_commute)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   470
apply (subgoal_tac "F Join G = G Join F")
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   471
apply (simp (no_asm_simp) add: Join_assoc)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   472
apply (simp (no_asm) add: Join_commute)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   473
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   474
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   475
(* Equivalence with the other definition of wx *)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   476
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   477
lemma wx_equiv: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   478
 "wx X = {F. \<forall>G. F ok G --> (F Join G):X}"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   479
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   480
apply (unfold wx_def, safe)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   481
apply (simp (no_asm_use) add: ex_prop_def)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   482
apply (drule_tac x = x in spec)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   483
apply (drule_tac x = G in spec)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   484
apply (frule_tac c = "x Join G" in subsetD, safe)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   485
apply (simp (no_asm))
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   486
apply (rule_tac x = "{F. \<forall>G. F ok G --> F Join G:X}" in exI, safe)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   487
apply (rule_tac [2] wx'_ex_prop)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   488
apply (rotate_tac 1)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   489
apply (drule_tac x = SKIP in spec, auto)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   490
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   491
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   492
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   493
(* Propositions 7 to 11 are about this second definition of wx. And
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   494
   they are the same as the ones proved for the first definition of wx by equivalence *)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   495
   
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   496
(* Proposition 12 *)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   497
(* Main result of the paper *)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   498
lemma guarantees_wx_eq: 
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   499
   "(X guarantees Y) = wx(-X Un Y)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   500
apply (unfold guar_def)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   501
apply (simp (no_asm) add: wx_equiv)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   502
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   503
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   504
(* {* Corollary, but this result has already been proved elsewhere *}
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   505
 "ex_prop(X guarantees Y)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   506
  by (simp_tac (simpset() addsimps [guar_wx_iff, wx_ex_prop]) 1);
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   507
  qed "guarantees_ex_prop";
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   508
*)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   509
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   510
(* Rules given in section 7 of Chandy and Sander's
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   511
    Reasoning About Program composition paper *)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   512
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   513
lemma stable_guarantees_Always:
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   514
     "Init F <= A ==> F:(stable A) guarantees (Always A)"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   515
apply (rule guaranteesI)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   516
apply (simp (no_asm) add: Join_commute)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   517
apply (rule stable_Join_Always1)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   518
apply (simp_all add: invariant_def Join_stable)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   519
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   520
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   521
(* To be moved to WFair.ML *)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   522
lemma leadsTo_Basis': "[| F:A co A Un B; F:transient A |] ==> F:A leadsTo B"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   523
apply (drule_tac B = "A-B" in constrains_weaken_L)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   524
apply (drule_tac [2] B = "A-B" in transient_strengthen)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   525
apply (rule_tac [3] ensuresI [THEN leadsTo_Basis])
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   526
apply (blast+)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   527
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   528
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   529
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   530
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   531
lemma constrains_guarantees_leadsTo:
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   532
     "F : transient A ==> F: (A co A Un B) guarantees (A leadsTo (B-A))"
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   533
apply (rule guaranteesI)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   534
apply (rule leadsTo_Basis')
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   535
apply (drule constrains_weaken_R)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   536
prefer 2 apply assumption
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   537
apply blast
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   538
apply (blast intro: Join_transient_I1)
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   539
done
d1811693899c converted more UNITY theories to new-style
paulson
parents: 12338
diff changeset
   540
7400
fbd5582761e6 new files HOL/UNITY/Guar.{thy,ML}: theory file gets the instance declaration
paulson
parents:
diff changeset
   541
end