src/HOL/UNITY/ProgressSets.thy
author paulson
Mon, 10 Mar 2003 16:21:06 +0100
changeset 13853 89131afa9f01
child 13861 0c18f31d901a
permissions -rw-r--r--
New theory ProgressSets. Definition of closure sets
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13853
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
     1
(*  Title:      HOL/UNITY/ProgressSets
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
     2
    ID:         $Id$
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
     4
    Copyright   2003  University of Cambridge
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
     5
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
     6
Progress Sets.  From 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
     7
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
     8
    David Meier and Beverly Sanders,
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
     9
    Composing Leads-to Properties
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    10
    Theoretical Computer Science 243:1-2 (2000), 339-361.
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    11
*)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    12
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    13
header{*Progress Sets*}
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    14
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    15
theory ProgressSets = Transformers:
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    16
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    17
constdefs
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    18
  closure_set :: "'a set set => bool"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    19
   "closure_set C ==
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    20
	 (\<forall>D. D \<subseteq> C --> \<Inter>D \<in> C) & (\<forall>D. D \<subseteq> C --> \<Union>D \<in> C)"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    21
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    22
  cl :: "['a set set, 'a set] => 'a set"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    23
   --{*short for ``closure''*}
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    24
   "cl C r == \<Inter>{x. x\<in>C & r \<subseteq> x}"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    25
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    26
lemma UNIV_in_closure_set: "closure_set C ==> UNIV \<in> C"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    27
by (force simp add: closure_set_def)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    28
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    29
lemma empty_in_closure_set: "closure_set C ==> {} \<in> C"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    30
by (force simp add: closure_set_def)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    31
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    32
lemma Union_in_closure_set: "[|D \<subseteq> C; closure_set C|] ==> \<Union>D \<in> C"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    33
by (simp add: closure_set_def)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    34
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    35
lemma Inter_in_closure_set: "[|D \<subseteq> C; closure_set C|] ==> \<Inter>D \<in> C"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    36
by (simp add: closure_set_def)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    37
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    38
lemma UN_in_closure_set:
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    39
     "[|closure_set C; !!i. i\<in>I ==> r i \<in> C|] ==> (\<Union>i\<in>I. r i) \<in> C"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    40
apply (simp add: Set.UN_eq) 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    41
apply (blast intro: Union_in_closure_set) 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    42
done
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    43
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    44
lemma IN_in_closure_set:
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    45
     "[|closure_set C; !!i. i\<in>I ==> r i \<in> C|] ==> (\<Inter>i\<in>I. r i)  \<in> C"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    46
apply (simp add: INT_eq) 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    47
apply (blast intro: Inter_in_closure_set) 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    48
done
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    49
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    50
lemma Un_in_closure_set: "[|x\<in>C; y\<in>C; closure_set C|] ==> x\<union>y \<in> C"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    51
apply (simp only: Un_eq_Union) 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    52
apply (blast intro: Union_in_closure_set) 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    53
done
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    54
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    55
lemma Int_in_closure_set: "[|x\<in>C; y\<in>C; closure_set C|] ==> x\<inter>y \<in> C"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    56
apply (simp only: Int_eq_Inter) 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    57
apply (blast intro: Inter_in_closure_set) 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    58
done
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    59
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    60
lemma closure_set_stable: "closure_set {X. F \<in> stable X}"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    61
by (simp add: closure_set_def stable_def constrains_def, blast)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    62
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    63
text{*The next three results state that @{term "cl C r"} is the minimal
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    64
 element of @{term C} that includes @{term r}.*}
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    65
lemma cl_in_closure_set: "closure_set C ==> cl C r \<in> C"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    66
apply (simp add: closure_set_def cl_def)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    67
apply (erule conjE)  
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    68
apply (drule spec, erule mp, blast) 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    69
done
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    70
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    71
lemma cl_least: "[|c\<in>C; r\<subseteq>c|] ==> cl C r \<subseteq> c" 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    72
by (force simp add: cl_def)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    73
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    74
text{*The next three lemmas constitute assertion (4.61)*}
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    75
lemma cl_mono: "r \<subseteq> r' ==> cl C r \<subseteq> cl C r'"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    76
by (simp add: cl_def, blast)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    77
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    78
lemma subset_cl: "r \<subseteq> cl C r"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    79
by (simp add: cl_def, blast)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    80
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    81
lemma cl_UN_subset: "(\<Union>i\<in>I. cl C (r i)) \<subseteq> cl C (\<Union>i\<in>I. r i)"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    82
by (simp add: cl_def, blast)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    83
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    84
lemma cl_Un: "closure_set C ==> cl C (r\<union>s) = cl C r \<union> cl C s"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    85
apply (rule equalityI) 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    86
 prefer 2 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    87
  apply (simp add: cl_def, blast)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    88
apply (rule cl_least)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    89
 apply (blast intro: Un_in_closure_set cl_in_closure_set)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    90
apply (blast intro: subset_cl [THEN subsetD])  
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    91
done
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    92
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    93
lemma cl_UN: "closure_set C ==> cl C (\<Union>i\<in>I. r i) = (\<Union>i\<in>I. cl C (r i))"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    94
apply (rule equalityI) 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    95
 prefer 2 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    96
  apply (simp add: cl_def, blast)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    97
apply (rule cl_least)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    98
 apply (blast intro: UN_in_closure_set cl_in_closure_set)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
    99
apply (blast intro: subset_cl [THEN subsetD])  
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
   100
done
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
   101
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
   102
lemma cl_idem [simp]: "cl C (cl C r) = cl C r"
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
   103
by (simp add: cl_def, blast)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
   104
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
   105
lemma cl_ident: "r\<in>C ==> cl C r = r" 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
   106
by (force simp add: cl_def)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
   107
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
   108
text{*Assertion (4.62)*}
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
   109
lemma cl_ident_iff: "closure_set C ==> (cl C r = r) = (r\<in>C)" 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
   110
apply (rule iffI) 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
   111
 apply (erule subst)
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
   112
 apply (erule cl_in_closure_set)  
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
   113
apply (erule cl_ident) 
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
   114
done
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
   115
89131afa9f01 New theory ProgressSets. Definition of closure sets
paulson
parents:
diff changeset
   116
end