src/HOL/UNITY/ELT.ML
author wenzelm
Fri, 18 Aug 2000 18:11:10 +0200
changeset 9653 2937a854e3d7
parent 9403 aad13b59b8d9
child 10064 1a77667b21ef
permissions -rw-r--r--
fixed RuleCases.make (invert flag);
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
     1
(*  Title:      HOL/UNITY/ELT
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
     2
    ID:         $Id$
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
     4
    Copyright   1999  University of Cambridge
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
     5
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
     6
leadsTo strengthened with a specification of the allowable sets transient parts
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
     7
*)
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
     8
8128
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
     9
(*** givenBy ***)
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    10
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    11
Goalw [givenBy_def] "givenBy id = UNIV";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    12
by Auto_tac;
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    13
qed "givenBy_id";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    14
Addsimps [givenBy_id];
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    15
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    16
Goalw [givenBy_def] "(givenBy v) = {A. ALL x:A. ALL y. v x = v y --> y: A}";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    17
by Safe_tac;
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    18
by (res_inst_tac [("x", "v `` ?u")] image_eqI 2);
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    19
by Auto_tac;
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    20
qed "givenBy_eq_all";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    21
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    22
val prems =
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    23
Goal "(!!x y. [| x:A;  v x = v y |] ==> y: A) ==> A: givenBy v";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    24
by (stac givenBy_eq_all 1);
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    25
by (blast_tac (claset() addIs prems) 1);
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    26
qed "givenByI";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    27
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    28
Goalw [givenBy_def] "[| A: givenBy v;  x:A;  v x = v y |] ==> y: A";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    29
by Auto_tac;
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    30
qed "givenByD";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    31
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    32
Goal "{} : givenBy v";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    33
by (blast_tac (claset() addSIs [givenByI]) 1);
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    34
qed "empty_mem_givenBy";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    35
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    36
AddIffs [empty_mem_givenBy];
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    37
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    38
Goal "A: givenBy v ==> EX P. A = {s. P(v s)}";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    39
by (res_inst_tac [("x", "%n. EX s. v s = n & s : A")] exI 1);
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    40
by (full_simp_tac (simpset() addsimps [givenBy_eq_all]) 1);
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    41
by (Blast_tac 1);
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    42
qed "givenBy_imp_eq_Collect";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    43
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    44
Goalw [givenBy_def] "{s. P(v s)} : givenBy v";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    45
by (Best_tac 1);
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    46
qed "Collect_mem_givenBy";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    47
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    48
Goal "givenBy v = {A. EX P. A = {s. P(v s)}}";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    49
by (blast_tac (claset() addIs [Collect_mem_givenBy,
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    50
			       givenBy_imp_eq_Collect]) 1);
9389
17c707841ad3 deleted redundant proof
paulson
parents: 9190
diff changeset
    51
qed "givenBy_eq_Collect";
8128
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    52
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    53
(*preserving v preserves properties given by v*)
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    54
Goal "[| F : preserves v;  D : givenBy v |] ==> F : stable D";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    55
by (force_tac (claset(), 
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    56
	       simpset() addsimps [impOfSubs preserves_subset_stable, 
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    57
				   givenBy_eq_Collect]) 1);
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    58
qed "preserves_givenBy_imp_stable";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    59
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    60
Goal "givenBy (w o v) <= givenBy v";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    61
by (simp_tac (simpset() addsimps [givenBy_eq_Collect]) 1);
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    62
by (Deepen_tac 0 1);
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    63
qed "givenBy_o_subset";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    64
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    65
Goal "[| A : givenBy v;  B : givenBy v |] ==> A-B : givenBy v";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    66
by (full_simp_tac (simpset() addsimps [givenBy_eq_Collect]) 1);
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    67
by Safe_tac;
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    68
by (res_inst_tac [("x", "%z. ?R z & ~ ?Q z")] exI 1);
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    69
by (deepen_tac (set_cs addSIs [equalityI]) 0 1);
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    70
qed "givenBy_DiffI";
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    71
3a5864b465e2 still working; a bit of polishing
paulson
parents: 8122
diff changeset
    72
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    73
(** Standard leadsTo rules **)
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    74
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
    75
Goalw [leadsETo_def]
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
    76
     "[| F: A ensures B;  A-B: insert {} CC |] ==> F : A leadsTo[CC] B";
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    77
by (blast_tac (claset() addIs [elt.Basis]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    78
qed "leadsETo_Basis";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    79
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    80
Goalw [leadsETo_def]
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    81
     "[| F : A leadsTo[CC] B;  F : B leadsTo[CC] C |] ==> F : A leadsTo[CC] C";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    82
by (blast_tac (claset() addIs [elt.Trans]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    83
qed "leadsETo_Trans";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    84
8122
b43ad07660b9 working version, with Alloc now working on the same state space as the whole
paulson
parents: 8110
diff changeset
    85
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    86
(*Useful with cancellation, disjunction*)
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    87
Goal "F : A leadsTo[CC] (A' Un A') ==> F : A leadsTo[CC] A'";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    88
by (asm_full_simp_tac (simpset() addsimps Un_ac) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    89
qed "leadsETo_Un_duplicate";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    90
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    91
Goal "F : A leadsTo[CC] (A' Un C Un C) ==> F : A leadsTo[CC] (A' Un C)";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    92
by (asm_full_simp_tac (simpset() addsimps Un_ac) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    93
qed "leadsETo_Un_duplicate2";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    94
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    95
(*The Union introduction rule as we should have liked to state it*)
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    96
val prems = Goalw [leadsETo_def]
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    97
    "(!!A. A : S ==> F : A leadsTo[CC] B) ==> F : (Union S) leadsTo[CC] B";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    98
by (blast_tac (claset() addIs [elt.Union] addDs prems) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
    99
qed "leadsETo_Union";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   100
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   101
val prems = Goal
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   102
    "(!!i. i : I ==> F : (A i) leadsTo[CC] B) \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   103
\    ==> F : (UN i:I. A i) leadsTo[CC] B";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   104
by (stac (Union_image_eq RS sym) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   105
by (blast_tac (claset() addIs leadsETo_Union::prems) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   106
qed "leadsETo_UN";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   107
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   108
(*The INDUCTION rule as we should have liked to state it*)
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   109
val major::prems = Goalw [leadsETo_def]
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   110
  "[| F : za leadsTo[CC] zb;  \
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   111
\     !!A B. [| F : A ensures B;  A-B : insert {} CC |] ==> P A B; \
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   112
\     !!A B C. [| F : A leadsTo[CC] B; P A B; F : B leadsTo[CC] C; P B C |] \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   113
\              ==> P A C; \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   114
\     !!B S. ALL A:S. F : A leadsTo[CC] B & P A B ==> P (Union S) B \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   115
\  |] ==> P za zb";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   116
by (rtac (major RS CollectD RS elt.induct) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   117
by (REPEAT (blast_tac (claset() addIs prems) 1));
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   118
qed "leadsETo_induct";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   119
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   120
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   121
(** New facts involving leadsETo **)
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   122
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   123
Goal "CC' <= CC ==> (A leadsTo[CC'] B) <= (A leadsTo[CC] B)";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   124
by Safe_tac;
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   125
by (etac leadsETo_induct 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   126
by (blast_tac (claset() addIs [leadsETo_Union]) 3);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   127
by (blast_tac (claset() addIs [leadsETo_Trans]) 2);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   128
by (blast_tac (claset() addIs [leadsETo_Basis]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   129
qed "leadsETo_mono";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   130
8122
b43ad07660b9 working version, with Alloc now working on the same state space as the whole
paulson
parents: 8110
diff changeset
   131
Goal "[| F : A leadsTo[CC] B;  F : B leadsTo[DD] C |] \
b43ad07660b9 working version, with Alloc now working on the same state space as the whole
paulson
parents: 8110
diff changeset
   132
\     ==> F : A leadsTo[CC Un DD] C";
b43ad07660b9 working version, with Alloc now working on the same state space as the whole
paulson
parents: 8110
diff changeset
   133
by (blast_tac (claset() addIs [impOfSubs leadsETo_mono, leadsETo_Trans]) 1);
b43ad07660b9 working version, with Alloc now working on the same state space as the whole
paulson
parents: 8110
diff changeset
   134
qed "leadsETo_Trans_Un";
b43ad07660b9 working version, with Alloc now working on the same state space as the whole
paulson
parents: 8110
diff changeset
   135
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   136
val prems = Goalw [leadsETo_def]
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   137
 "(!!A. A : S ==> F : (A Int C) leadsTo[CC] B) ==> F : (Union S Int C) leadsTo[CC] B";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   138
by (simp_tac (HOL_ss addsimps [Int_Union_Union]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   139
by (blast_tac (claset() addIs [elt.Union] addDs prems) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   140
qed "leadsETo_Union_Int";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   141
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   142
(*Binary union introduction rule*)
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   143
Goal "[| F : A leadsTo[CC] C; F : B leadsTo[CC] C |] ==> F : (A Un B) leadsTo[CC] C";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   144
by (stac Un_eq_Union 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   145
by (blast_tac (claset() addIs [leadsETo_Union]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   146
qed "leadsETo_Un";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   147
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   148
val prems = 
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   149
Goal "(!!x. x : A ==> F : {x} leadsTo[CC] B) ==> F : A leadsTo[CC] B";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   150
by (stac (UN_singleton RS sym) 1 THEN rtac leadsETo_UN 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   151
by (blast_tac (claset() addIs prems) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   152
qed "single_leadsETo_I";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   153
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   154
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   155
Goal "A<=B ==> F : A leadsTo[CC] B";
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   156
by (asm_simp_tac (simpset() addsimps [subset_imp_ensures RS leadsETo_Basis,
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   157
				      Diff_eq_empty_iff RS iffD2]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   158
qed "subset_imp_leadsETo";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   159
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   160
bind_thm ("empty_leadsETo", empty_subsetI RS subset_imp_leadsETo);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   161
Addsimps [empty_leadsETo];
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   162
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   163
8122
b43ad07660b9 working version, with Alloc now working on the same state space as the whole
paulson
parents: 8110
diff changeset
   164
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   165
(** Weakening laws **)
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   166
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   167
Goal "[| F : A leadsTo[CC] A';  A'<=B' |] ==> F : A leadsTo[CC] B'";
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   168
by (blast_tac (claset() addIs [subset_imp_leadsETo, leadsETo_Trans]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   169
qed "leadsETo_weaken_R";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   170
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   171
Goal "[| F : A leadsTo[CC] A'; B<=A |] ==> F : B leadsTo[CC] A'";
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   172
by (blast_tac (claset() addIs [leadsETo_Trans, subset_imp_leadsETo]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   173
qed_spec_mp "leadsETo_weaken_L";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   174
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   175
(*Distributes over binary unions*)
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   176
Goal "F : (A Un B) leadsTo[CC] C  =  \
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   177
\     (F : A leadsTo[CC] C & F : B leadsTo[CC] C)";
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   178
by (blast_tac (claset() addIs [leadsETo_Un, leadsETo_weaken_L]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   179
qed "leadsETo_Un_distrib";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   180
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   181
Goal "F : (UN i:I. A i) leadsTo[CC] B  =  \
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   182
\     (ALL i : I. F : (A i) leadsTo[CC] B)";
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   183
by (blast_tac (claset() addIs [leadsETo_UN, leadsETo_weaken_L]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   184
qed "leadsETo_UN_distrib";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   185
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   186
Goal "F : (Union S) leadsTo[CC] B  =  (ALL A : S. F : A leadsTo[CC] B)";
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   187
by (blast_tac (claset() addIs [leadsETo_Union, leadsETo_weaken_L]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   188
qed "leadsETo_Union_distrib";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   189
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   190
Goal "[| F : A leadsTo[CC'] A'; B<=A; A'<=B';  CC' <= CC |] \
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   191
\     ==> F : B leadsTo[CC] B'";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   192
by (dtac (impOfSubs leadsETo_mono) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   193
by (assume_tac 1);
8110
f7651ede12b7 moved some proofs from UNITY/ELT to UNITY/Project
paulson
parents: 8072
diff changeset
   194
by (blast_tac (claset() delrules [subsetCE]
f7651ede12b7 moved some proofs from UNITY/ELT to UNITY/Project
paulson
parents: 8072
diff changeset
   195
			addIs [leadsETo_weaken_R, leadsETo_weaken_L,
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   196
			       leadsETo_Trans]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   197
qed "leadsETo_weaken";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   198
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   199
Goal "[| F : A leadsTo[CC] A';  CC <= givenBy v |] \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   200
\     ==> F : A leadsTo[givenBy v] A'";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   201
by (blast_tac (claset() addIs [empty_mem_givenBy, leadsETo_weaken]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   202
qed "leadsETo_givenBy";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   203
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   204
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   205
(*Set difference*)
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   206
Goal "[| F : (A-B) leadsTo[CC] C; F : B leadsTo[CC] C |] \
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   207
\     ==> F : A leadsTo[CC] C";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   208
by (blast_tac (claset() addIs [leadsETo_Un, leadsETo_weaken]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   209
qed "leadsETo_Diff";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   210
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   211
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   212
(*Binary union version*)
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   213
Goal "[| F : A leadsTo[CC] A';  F : B leadsTo[CC] B' |] \
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   214
\     ==> F : (A Un B) leadsTo[CC] (A' Un B')";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   215
by (blast_tac (claset() addIs [leadsETo_Un, 
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   216
			       leadsETo_weaken_R]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   217
qed "leadsETo_Un_Un";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   218
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   219
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   220
(** The cancellation law **)
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   221
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   222
Goal "[| F : A leadsTo[CC] (A' Un B); F : B leadsTo[CC] B' |] \
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   223
\     ==> F : A leadsTo[CC] (A' Un B')";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   224
by (blast_tac (claset() addIs [leadsETo_Un_Un, 
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   225
			       subset_imp_leadsETo, leadsETo_Trans]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   226
qed "leadsETo_cancel2";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   227
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   228
Goal "[| F : A leadsTo[CC] (B Un A'); F : B leadsTo[CC] B' |] \
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   229
\   ==> F : A leadsTo[CC] (B' Un A')";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   230
by (asm_full_simp_tac (simpset() addsimps [Un_commute]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   231
by (blast_tac (claset() addSIs [leadsETo_cancel2]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   232
qed "leadsETo_cancel1";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   233
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   234
Goal "[| F : A leadsTo[CC] (B Un A'); F : (B-A') leadsTo[CC] B' |] \
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   235
\   ==> F : A leadsTo[CC] (B' Un A')";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   236
by (rtac leadsETo_cancel1 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   237
by (assume_tac 2);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   238
by (ALLGOALS Asm_simp_tac);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   239
qed "leadsETo_cancel_Diff1";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   240
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   241
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   242
(** The impossibility law **)
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   243
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   244
Goal "F : A leadsTo[CC] B ==> B={} --> A={}";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   245
by (etac leadsETo_induct 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   246
by (ALLGOALS Asm_simp_tac);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   247
by (rewrite_goals_tac [ensures_def, constrains_def, transient_def]);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   248
by (Blast_tac 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   249
val lemma = result() RS mp;
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   250
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   251
Goal "F : A leadsTo[CC] {} ==> A={}";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   252
by (blast_tac (claset() addSIs [lemma]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   253
qed "leadsETo_empty";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   254
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   255
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   256
(** PSP: Progress-Safety-Progress **)
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   257
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   258
(*Special case of PSP: Misra's "stable conjunction"*)
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   259
Goalw [stable_def]
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   260
   "[| F : A leadsTo[CC] A';  F : stable B;  ALL C:CC. C Int B : CC |] \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   261
\   ==> F : (A Int B) leadsTo[CC] (A' Int B)";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   262
by (etac leadsETo_induct 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   263
by (blast_tac (claset() addIs [leadsETo_Union_Int]) 3);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   264
by (blast_tac (claset() addIs [leadsETo_Trans]) 2);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   265
by (rtac leadsETo_Basis 1);
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   266
by (force_tac (claset(),
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   267
	       simpset() addsimps [Diff_Int_distrib2 RS sym]) 2);
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   268
by (asm_full_simp_tac
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   269
    (simpset() addsimps [ensures_def, 
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   270
			 Diff_Int_distrib2 RS sym, Int_Un_distrib2 RS sym]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   271
by (blast_tac (claset() addIs [transient_strengthen, constrains_Int]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   272
qed "e_psp_stable";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   273
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   274
Goal "[| F : A leadsTo[CC] A'; F : stable B;  ALL C:CC. C Int B : CC |] \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   275
\     ==> F : (B Int A) leadsTo[CC] (B Int A')";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   276
by (asm_simp_tac (simpset() addsimps e_psp_stable::Int_ac) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   277
qed "e_psp_stable2";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   278
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   279
Goal "[| F : A leadsTo[CC] A'; F : B co B';  \
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   280
\        ALL C:CC. C Int B Int B' : CC |] \
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   281
\     ==> F : (A Int B') leadsTo[CC] ((A' Int B) Un (B' - B))";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   282
by (etac leadsETo_induct 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   283
by (blast_tac (claset() addIs [leadsETo_Union_Int]) 3);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   284
(*Transitivity case has a delicate argument involving "cancellation"*)
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   285
by (rtac leadsETo_Un_duplicate2 2);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   286
by (etac leadsETo_cancel_Diff1 2);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   287
by (asm_full_simp_tac (simpset() addsimps [Int_Diff, Diff_triv]) 2);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   288
by (blast_tac (claset() addIs [leadsETo_weaken_L] 
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   289
                        addDs [constrains_imp_subset]) 2);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   290
(*Basis case*)
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   291
by (rtac leadsETo_Basis 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   292
by (blast_tac (claset() addIs [psp_ensures]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   293
by (subgoal_tac "A Int B' - (Ba Int B Un (B' - B)) = (A - Ba) Int B Int B'" 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   294
by Auto_tac;
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   295
qed "e_psp";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   296
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   297
Goal "[| F : A leadsTo[CC] A'; F : B co B';  \
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   298
\        ALL C:CC. C Int B Int B' : CC |] \
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   299
\     ==> F : (B' Int A) leadsTo[CC] ((B Int A') Un (B' - B))";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   300
by (asm_full_simp_tac (simpset() addsimps e_psp::Int_ac) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   301
qed "e_psp2";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   302
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   303
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   304
(*** Special properties involving the parameter [CC] ***)
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   305
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   306
(*??IS THIS NEEDED?? or is it just an example of what's provable??*)
8055
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   307
Goal "[| F: (A leadsTo[givenBy v] B);  G : preserves v;  \
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   308
\        F Join G : stable C |] \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   309
\     ==> F Join G : ((C Int A) leadsTo[(%D. C Int D) `` givenBy v] B)";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   310
by (etac leadsETo_induct 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   311
by (stac Int_Union 3);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   312
by (blast_tac (claset() addIs [leadsETo_UN]) 3);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   313
by (blast_tac (claset() addIs [e_psp_stable2 RS leadsETo_weaken_L, 
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   314
			       leadsETo_Trans]) 2);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   315
by (rtac leadsETo_Basis 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   316
by (auto_tac (claset(),
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   317
	      simpset() addsimps [Diff_eq_empty_iff RS iffD2,
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   318
				  Int_Diff, ensures_def,
9403
aad13b59b8d9 much tidying in connection with the 2nd UNITY paper
paulson
parents: 9389
diff changeset
   319
				  givenBy_eq_Collect, Join_transient]));
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   320
by (blast_tac (claset() addIs [transient_strengthen]) 3);
8055
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   321
by (ALLGOALS (dres_inst_tac [("P1","P")] (impOfSubs preserves_subset_stable)));
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   322
by (rewtac stable_def);
9190
b86ff604729f tidied proofs using default rule equalityCE
paulson
parents: 8334
diff changeset
   323
by (blast_tac (claset() addIs [constrains_Int RS constrains_weaken]) 2);
b86ff604729f tidied proofs using default rule equalityCE
paulson
parents: 8334
diff changeset
   324
by (blast_tac (claset() addIs [constrains_Int RS constrains_weaken]) 1);
8055
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   325
qed "gen_leadsETo_imp_Join_leadsETo";
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   326
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   327
(*useful??*)
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   328
Goal "[| F Join G : (A leadsTo[CC] B);  ALL C:CC. G : stable C |] \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   329
\     ==> F: (A leadsTo[CC] B)";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   330
by (etac leadsETo_induct 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   331
by (blast_tac (claset() addIs [leadsETo_Union]) 3);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   332
by (blast_tac (claset() addIs [leadsETo_Trans]) 2);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   333
by (rtac leadsETo_Basis 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   334
by (case_tac "A <= B" 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   335
by (etac subset_imp_ensures 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   336
by (auto_tac (claset() addIs [constrains_weaken],
9403
aad13b59b8d9 much tidying in connection with the 2nd UNITY paper
paulson
parents: 9389
diff changeset
   337
              simpset() addsimps [stable_def, ensures_def, Join_transient]));
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   338
by (REPEAT (thin_tac "?F : ?A co ?B" 1));
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   339
by (etac transientE 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   340
by (rewtac constrains_def);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   341
by (blast_tac (claset() addSDs [bspec]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   342
qed "Join_leadsETo_stable_imp_leadsETo";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   343
8067
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   344
(**** Relationship with traditional "leadsTo", strong & weak ****)
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   345
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   346
(** strong **)
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   347
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   348
Goal "(A leadsTo[CC] B) <= (A leadsTo B)";
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   349
by Safe_tac;
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   350
by (etac leadsETo_induct 1);
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   351
by (blast_tac (claset() addIs [leadsTo_Union]) 3);
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   352
by (blast_tac (claset() addIs [leadsTo_Trans]) 2);
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   353
by (blast_tac (claset() addIs [leadsTo_Basis]) 1);
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   354
qed "leadsETo_subset_leadsTo";
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   355
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   356
Goal "(A leadsTo[UNIV] B) = (A leadsTo B)";
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   357
by Safe_tac;
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   358
by (etac (impOfSubs leadsETo_subset_leadsTo) 1);
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   359
(*right-to-left case*)
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   360
by (etac leadsTo_induct 1);
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   361
by (blast_tac (claset() addIs [leadsETo_Union]) 3);
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   362
by (blast_tac (claset() addIs [leadsETo_Trans]) 2);
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   363
by (blast_tac (claset() addIs [leadsETo_Basis]) 1);
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   364
qed "leadsETo_UNIV_eq_leadsTo";
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   365
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   366
(**** weak ****)
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   367
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   368
Goalw [LeadsETo_def]
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   369
     "A LeadsTo[CC] B = \
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   370
\       {F. F : (reachable F Int A) leadsTo[(%C. reachable F Int C) `` CC] \
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   371
\       (reachable F Int B)}";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   372
by (blast_tac (claset() addDs [e_psp_stable2] addIs [leadsETo_weaken]) 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   373
qed "LeadsETo_eq_leadsETo";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   374
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   375
(*** Introduction rules: Basis, Trans, Union ***)
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   376
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   377
Goal "[| F : A LeadsTo[CC] B;  F : B LeadsTo[CC] C |] \
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   378
\     ==> F : A LeadsTo[CC] C";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   379
by (asm_full_simp_tac (simpset() addsimps [LeadsETo_eq_leadsETo]) 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   380
by (blast_tac (claset() addIs [leadsETo_Trans]) 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   381
qed "LeadsETo_Trans";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   382
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   383
val prems = Goalw [LeadsETo_def]
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   384
     "(!!A. A : S ==> F : A LeadsTo[CC] B) ==> F : (Union S) LeadsTo[CC] B";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   385
by (Simp_tac 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   386
by (stac Int_Union 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   387
by (blast_tac (claset() addIs [leadsETo_UN] addDs prems) 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   388
qed "LeadsETo_Union";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   389
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   390
val prems = 
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   391
Goal "(!!i. i : I ==> F : (A i) LeadsTo[CC] B) \
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   392
\     ==> F : (UN i:I. A i) LeadsTo[CC] B";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   393
by (simp_tac (HOL_ss addsimps [Union_image_eq RS sym]) 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   394
by (blast_tac (claset() addIs (LeadsETo_Union::prems)) 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   395
qed "LeadsETo_UN";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   396
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   397
(*Binary union introduction rule*)
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   398
Goal "[| F : A LeadsTo[CC] C; F : B LeadsTo[CC] C |] \
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   399
\     ==> F : (A Un B) LeadsTo[CC] C";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   400
by (stac Un_eq_Union 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   401
by (blast_tac (claset() addIs [LeadsETo_Union]) 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   402
qed "LeadsETo_Un";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   403
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   404
(*Lets us look at the starting state*)
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   405
val prems = 
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   406
Goal "(!!s. s : A ==> F : {s} LeadsTo[CC] B) ==> F : A LeadsTo[CC] B";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   407
by (stac (UN_singleton RS sym) 1 THEN rtac LeadsETo_UN 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   408
by (blast_tac (claset() addIs prems) 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   409
qed "single_LeadsETo_I";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   410
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   411
Goal "A <= B ==> F : A LeadsTo[CC] B";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   412
by (simp_tac (simpset() addsimps [LeadsETo_def]) 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   413
by (blast_tac (claset() addIs [subset_imp_leadsETo]) 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   414
qed "subset_imp_LeadsETo";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   415
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   416
bind_thm ("empty_LeadsETo", empty_subsetI RS subset_imp_LeadsETo);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   417
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   418
Goal "[| F : A LeadsTo[CC] A';  A' <= B' |] ==> F : A LeadsTo[CC] B'";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   419
by (full_simp_tac (simpset() addsimps [LeadsETo_def]) 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   420
by (blast_tac (claset() addIs [leadsETo_weaken_R]) 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   421
qed_spec_mp "LeadsETo_weaken_R";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   422
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   423
Goal "[| F : A LeadsTo[CC] A';  B <= A |] ==> F : B LeadsTo[CC] A'";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   424
by (full_simp_tac (simpset() addsimps [LeadsETo_def]) 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   425
by (blast_tac (claset() addIs [leadsETo_weaken_L]) 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   426
qed_spec_mp "LeadsETo_weaken_L";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   427
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   428
Goal "[| F : A LeadsTo[CC'] A';   \
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   429
\        B <= A;  A' <= B';  CC' <= CC |] \
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   430
\     ==> F : B LeadsTo[CC] B'";
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   431
by (full_simp_tac (simpset() addsimps [LeadsETo_def]) 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   432
by (blast_tac (claset() addIs [leadsETo_weaken]) 1);
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   433
qed "LeadsETo_weaken";
8067
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   434
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   435
Goalw [LeadsETo_def, LeadsTo_def] "(A LeadsTo[CC] B) <= (A LeadsTo B)";
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   436
by (blast_tac (claset() addIs [impOfSubs leadsETo_subset_leadsTo]) 1);
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   437
qed "LeadsETo_subset_LeadsTo";
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   438
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   439
(*Postcondition can be strengthened to (reachable F Int B) *)
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   440
Goal "F : A ensures B ==> F : (reachable F Int A) ensures B";
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   441
by (rtac (stable_ensures_Int RS ensures_weaken_R) 1);
8069
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   442
by Auto_tac;
8067
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   443
qed "reachable_ensures";
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   444
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   445
Goal "F : A leadsTo B ==> F : (reachable F Int A) leadsTo[Pow(reachable F)] B";
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   446
by (etac leadsTo_induct 1);
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   447
by (stac Int_Union 3);
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   448
by (blast_tac (claset() addIs [leadsETo_UN]) 3);
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   449
by (blast_tac (claset() addDs [e_psp_stable2] 
8069
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   450
                        addIs [leadsETo_Trans, leadsETo_weaken_L]) 2);
8067
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   451
by (blast_tac (claset() addIs [reachable_ensures, leadsETo_Basis]) 1);
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   452
val lemma = result();
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   453
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   454
Goal "(A LeadsTo[UNIV] B) = (A LeadsTo B)";
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   455
by Safe_tac;
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   456
by (etac (impOfSubs LeadsETo_subset_LeadsTo) 1);
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   457
(*right-to-left case*)
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   458
by (rewrite_goals_tac [LeadsETo_def, LeadsTo_def]);
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   459
by (fast_tac (claset() addEs [lemma RS leadsETo_weaken]) 1);
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   460
qed "LeadsETo_UNIV_eq_LeadsTo";
225e3b45b766 now workign as far as System_Alloc_Progress
paulson
parents: 8055
diff changeset
   461
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   462
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   463
(**** EXTEND/PROJECT PROPERTIES ****)
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   464
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   465
Open_locale "Extend";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   466
8334
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   467
(*givenBy laws that need to be in the locale*)
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   468
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   469
Goal "givenBy (v o f) = extend_set h `` (givenBy v)";
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   470
by (simp_tac (simpset() addsimps [givenBy_eq_Collect]) 1);
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   471
by (Deepen_tac 0 1);
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   472
qed "givenBy_o_eq_extend_set";
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   473
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   474
Goal "givenBy f = range (extend_set h)";
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   475
by (simp_tac (simpset() addsimps [givenBy_eq_Collect]) 1);
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   476
by (Deepen_tac 0 1);
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   477
qed "givenBy_eq_extend_set";
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   478
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   479
Goal "D : givenBy v ==> extend_set h D : givenBy (v o f)";
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   480
by (full_simp_tac (simpset() addsimps [givenBy_eq_all]) 1);
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   481
by (Blast_tac 1);
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   482
qed "extend_set_givenBy_I";
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   483
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   484
Goal "F : A leadsTo[CC] B \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   485
\     ==> extend h F : (extend_set h A) leadsTo[extend_set h `` CC] \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   486
\                      (extend_set h B)";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   487
by (etac leadsETo_induct 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   488
by (asm_simp_tac (simpset() addsimps [leadsETo_UN, extend_set_Union]) 3);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   489
by (blast_tac (claset() addIs [leadsETo_Trans]) 2);
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   490
by (force_tac (claset() addIs [leadsETo_Basis, subset_imp_ensures],
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   491
	       simpset() addsimps [extend_ensures,
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   492
				   extend_set_Diff_distrib RS sym]) 1);
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   493
qed "leadsETo_imp_extend_leadsETo";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   494
8055
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   495
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   496
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   497
(*NOT USED, but analogous to preserves_project_transient_empty in Project.ML*)
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   498
Goal "[| G : preserves (v o f);  project h C G : transient D;  \
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   499
\        D : givenBy v |] ==> D={}";
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   500
by (rtac stable_transient_empty 1);
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   501
by (assume_tac 2);
8055
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   502
(*If addIs then PROOF FAILED at depth 2*)
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   503
by (blast_tac (claset() addSIs [preserves_givenBy_imp_stable,
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   504
				project_preserves_I]) 1);
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   505
result();
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   506
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   507
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   508
(*This version's stronger in the "ensures" precondition
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   509
  BUT there's no ensures_weaken_L*)
8055
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   510
Goal "[| project h C G ~: transient (project_set h C Int (A-B)) | \
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   511
\          project_set h C Int (A - B) = {};  \
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   512
\        extend h F Join G : stable C;  \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   513
\        F Join project h C G : (project_set h C Int A) ensures B |] \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   514
\     ==> extend h F Join G : (C Int extend_set h A) ensures (extend_set h B)";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   515
by (stac (Int_extend_set_lemma RS sym) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   516
by (rtac Join_project_ensures 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   517
by (auto_tac (claset(), simpset() addsimps [Int_Diff]));
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   518
qed "Join_project_ensures_strong";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   519
8334
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   520
(*Generalizes preserves_project_transient_empty*)
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   521
Goal "[| G : preserves (v o f);  \
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   522
\        project h C G : transient (C' Int D);  \
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   523
\        project h C G : stable C';  D : givenBy v |]    \
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   524
\     ==> C' Int D = {}";
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   525
by (rtac stable_transient_empty 1);
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   526
by (assume_tac 2);
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   527
(*If addIs then PROOF FAILED at depth 3*)
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   528
by (blast_tac (claset() addSIs [stable_Int, preserves_givenBy_imp_stable,
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   529
				project_preserves_I]) 1);
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   530
qed "preserves_o_project_transient_empty";
7896bcbd8641 Added Tanja's Detects and Reachability theories. Also
paulson
parents: 8128
diff changeset
   531
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   532
Goal "[| extend h F Join G : stable C;  \
8055
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   533
\        F Join project h C G : (project_set h C Int A) leadsTo[(%D. project_set h C Int D)``givenBy v] B;  \
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   534
\        G : preserves (v o f) |] \
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   535
\     ==> extend h F Join G : \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   536
\           (C Int extend_set h (project_set h C Int A)) \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   537
\           leadsTo[(%D. C Int extend_set h D)``givenBy v]  (extend_set h B)";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   538
by (etac leadsETo_induct 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   539
by (asm_simp_tac (simpset() delsimps UN_simps
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   540
		  addsimps [Int_UN_distrib, leadsETo_UN, extend_set_Union]) 3);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   541
by (blast_tac (claset() addIs [e_psp_stable2 RS leadsETo_weaken_L, 
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   542
			       leadsETo_Trans]) 2);
8110
f7651ede12b7 moved some proofs from UNITY/ELT to UNITY/Project
paulson
parents: 8072
diff changeset
   543
by Auto_tac;
8072
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   544
by (force_tac (claset() addIs [leadsETo_Basis, subset_imp_ensures],
5b95377d7538 removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents: 8069
diff changeset
   545
	       simpset()) 1);
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   546
by (rtac leadsETo_Basis 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   547
by (asm_simp_tac (simpset() addsimps [Int_Diff, Int_extend_set_lemma,
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   548
				      extend_set_Diff_distrib RS sym]) 2);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   549
by (rtac Join_project_ensures_strong 1);
8055
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   550
by (auto_tac (claset() addDs [preserves_o_project_transient_empty]
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   551
		       addIs [project_stable_project_set], 
9403
aad13b59b8d9 much tidying in connection with the 2nd UNITY paper
paulson
parents: 9389
diff changeset
   552
	      simpset() addsimps [Int_left_absorb]));
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   553
by (asm_simp_tac
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   554
    (simpset() addsimps [stable_ensures_Int RS ensures_weaken_R,
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   555
			 Int_lower2, project_stable_project_set,
9403
aad13b59b8d9 much tidying in connection with the 2nd UNITY paper
paulson
parents: 9389
diff changeset
   556
			 extend_stable_project_set]) 1);
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   557
val lemma = result();
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   558
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   559
Goal "[| extend h F Join G : stable C;  \
8055
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   560
\        F Join project h C G : \
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   561
\            (project_set h C Int A) \
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   562
\            leadsTo[(%D. project_set h C Int D)``givenBy v] B;  \
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   563
\        G : preserves (v o f) |] \
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   564
\     ==> extend h F Join G : (C Int extend_set h A) \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   565
\           leadsTo[(%D. C Int extend_set h D)``givenBy v] (extend_set h B)";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   566
by (rtac (lemma RS leadsETo_weaken) 1);
8069
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   567
by (auto_tac (claset(), 
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   568
	      simpset() addsimps [split_extended_all]));
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   569
qed "project_leadsETo_D_lemma";
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   570
8055
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   571
Goal "[| F Join project h UNIV G : A leadsTo[givenBy v] B;  \
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   572
\        G : preserves (v o f) |]  \
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   573
\     ==> extend h F Join G : (extend_set h A) \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   574
\           leadsTo[givenBy (v o f)] (extend_set h B)";
8069
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   575
by (rtac (make_elim project_leadsETo_D_lemma) 1);
8055
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   576
by (stac stable_UNIV 1);
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   577
by Auto_tac;
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   578
by (etac leadsETo_givenBy 1);
8069
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   579
by (rtac (givenBy_o_eq_extend_set RS equalityD2) 1);
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   580
qed "project_leadsETo_D";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   581
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   582
Goal "[| F Join project h (reachable (extend h F Join G)) G \
8055
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   583
\            : A LeadsTo[givenBy v] B;  \
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   584
\        G : preserves (v o f) |] \
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   585
\     ==> extend h F Join G : \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   586
\           (extend_set h A) LeadsTo[givenBy (v o f)] (extend_set h B)";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   587
by (rtac (make_elim (subset_refl RS stable_reachable RS 
8069
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   588
		     project_leadsETo_D_lemma)) 1);
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   589
by (auto_tac (claset(), 
8055
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   590
	      simpset() addsimps [LeadsETo_def]));
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   591
by (asm_full_simp_tac 
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   592
    (simpset() addsimps [project_set_reachable_extend_eq RS sym]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   593
by (etac (impOfSubs leadsETo_mono) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   594
by (blast_tac (claset() addIs [extend_set_givenBy_I]) 1);
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   595
qed "project_LeadsETo_D";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   596
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   597
Goalw [extending_def]
8055
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   598
     "extending (v o f) (%G. UNIV) h F \
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   599
\               (extend_set h A leadsTo[givenBy (v o f)] extend_set h B) \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   600
\               (A leadsTo[givenBy v] B)";
8055
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   601
by (auto_tac (claset(), simpset() addsimps [project_leadsETo_D]));
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   602
qed "extending_leadsETo";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   603
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   604
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   605
Goalw [extending_def]
8055
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   606
     "extending (v o f) (%G. reachable (extend h F Join G)) h F \
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   607
\               (extend_set h A LeadsTo[givenBy (v o f)] extend_set h B) \
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   608
\               (A LeadsTo[givenBy v]  B)";
8055
bb15396278fb abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents: 8044
diff changeset
   609
by (blast_tac (claset() addIs [project_LeadsETo_D]) 1);
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   610
qed "extending_LeadsETo";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   611
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   612
8069
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   613
(*** leadsETo in the precondition ***)
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   614
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   615
(*Lemma for the Trans case*)
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   616
Goal "[| extend h F Join G : stable C;    \
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   617
\        F Join project h C G    \
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   618
\          : project_set h C Int project_set h A leadsTo project_set h B |] \
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   619
\     ==> F Join project h C G    \
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   620
\           : project_set h C Int project_set h A leadsTo    \
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   621
\             project_set h C Int project_set h B";
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   622
by (rtac (psp_stable2 RS leadsTo_weaken_L) 1);
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   623
by (auto_tac (claset(),
9403
aad13b59b8d9 much tidying in connection with the 2nd UNITY paper
paulson
parents: 9389
diff changeset
   624
	      simpset() addsimps [project_stable_project_set, 
8069
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   625
				  extend_stable_project_set]));
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   626
val lemma = result();
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   627
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   628
Goal "[| extend h F Join G : stable C;  \
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   629
\        extend h F Join G : \
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   630
\          (C Int A) leadsTo[(%D. C Int D)``givenBy f]  B |]  \
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   631
\ ==> F Join project h C G  \
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   632
\   : (project_set h C Int project_set h (C Int A)) leadsTo (project_set h B)";
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   633
by (etac leadsETo_induct 1);
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   634
by (asm_simp_tac (HOL_ss addsimps [Int_UN_distrib, project_set_Union]) 3);
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   635
by (blast_tac (claset() addIs [leadsTo_UN]) 3);
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   636
by (blast_tac (claset() addIs [leadsTo_Trans, lemma]) 2);
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   637
by (asm_full_simp_tac 
9403
aad13b59b8d9 much tidying in connection with the 2nd UNITY paper
paulson
parents: 9389
diff changeset
   638
    (simpset() addsimps [givenBy_eq_extend_set]) 1);
8069
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   639
by (rtac leadsTo_Basis 1);
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   640
by (blast_tac (claset() addIs [leadsTo_Basis,
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   641
			       ensures_extend_set_imp_project_ensures]) 1);
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   642
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   643
qed "project_leadsETo_I_lemma";
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   644
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   645
Goal "extend h F Join G : (extend_set h A) leadsTo[givenBy f] (extend_set h B)\
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   646
\     ==> F Join project h UNIV G : A leadsTo B";
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   647
by (rtac (project_leadsETo_I_lemma RS leadsTo_weaken) 1);
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   648
by Auto_tac;
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   649
qed "project_leadsETo_I";
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   650
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   651
Goal "extend h F Join G : (extend_set h A) LeadsTo[givenBy f] (extend_set h B)\
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   652
\     ==> F Join project h (reachable (extend h F Join G)) G  \
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   653
\          : A LeadsTo B";
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   654
by (full_simp_tac (simpset() addsimps [LeadsTo_def, LeadsETo_def]) 1);
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   655
by (rtac (project_leadsETo_I_lemma RS leadsTo_weaken) 1);
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   656
by (auto_tac (claset(), 
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   657
	      simpset() addsimps [project_set_reachable_extend_eq RS sym]));
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   658
qed "project_LeadsETo_I";
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   659
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   660
Goalw [projecting_def]
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   661
     "projecting (%G. UNIV) h F \
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   662
\                (extend_set h A leadsTo[givenBy f] extend_set h B) \
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   663
\                (A leadsTo B)";
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   664
by (force_tac (claset() addDs [project_leadsETo_I], simpset()) 1);
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   665
qed "projecting_leadsTo";
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   666
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   667
Goalw [projecting_def]
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   668
     "projecting (%G. reachable (extend h F Join G)) h F \
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   669
\                (extend_set h A LeadsTo[givenBy f] extend_set h B) \
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   670
\                (A LeadsTo B)";
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   671
by (force_tac (claset() addDs [project_LeadsETo_I], simpset()) 1);
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   672
qed "projecting_LeadsTo";
19b9f92ca503 working with weak LeadsTo in guarantees precondition\!
paulson
parents: 8067
diff changeset
   673
8044
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   674
Close_locale "Extend";
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   675
296b03b79505 new generalized leads-to theory
paulson
parents:
diff changeset
   676