src/ZF/UNITY/UNITY.ML
author paulson
Fri, 25 Apr 2003 11:18:41 +0200
changeset 13923 019342d03d81
parent 13612 55d32e76ef4e
child 14046 6616e6c53d48
permissions -rw-r--r--
Auth: certified email protocol
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     1
(*  Title:      ZF/UNITY/UNITY.ML
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     2
    ID:         $Id$
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     3
    Author:     Sidi O Ehmety, Computer Laboratory
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     4
    Copyright   2001  University of Cambridge
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     5
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     6
The basic UNITY theory (revised version, based upon the "co" operator)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     7
From Misra, "A Logic for Concurrent Programming", 1994
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     8
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     9
Proofs ported from HOL
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    10
*)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    11
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    12
(** SKIP **)
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    13
Goalw [SKIP_def]  "SKIP:program";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    14
by (rewrite_goal_tac [program_def, mk_program_def] 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    15
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    16
qed "SKIP_in_program";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    17
AddIffs [SKIP_in_program];
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    18
AddTCs  [SKIP_in_program];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    19
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    20
(** programify: coersion from anything to program **)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    21
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    22
Goalw [programify_def]
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    23
"F:program ==> programify(F)=F";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    24
by Auto_tac;
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    25
qed "programify_program";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    26
Addsimps [programify_program];
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    27
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    28
Goalw [programify_def]
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    29
"programify(F):program";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    30
by Auto_tac;
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    31
qed "programify_in_program";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    32
AddIffs [programify_in_program];
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    33
AddTCs  [programify_in_program];
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    34
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    35
(** Collapsing rules: to remove programify from expressions **)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    36
Goalw [programify_def]
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    37
"programify(programify(F))=programify(F)";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    38
by Auto_tac;
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    39
qed "programify_idem";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    40
AddIffs [programify_idem];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    41
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    42
Goal
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    43
"Init(programify(F)) = Init(F)";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    44
by (simp_tac (simpset() addsimps [Init_def]) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    45
qed "Init_programify";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    46
AddIffs [Init_programify];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    47
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    48
Goal
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    49
"Acts(programify(F)) = Acts(F)";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    50
by (simp_tac (simpset() addsimps [Acts_def]) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    51
qed "Acts_programify";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    52
AddIffs [Acts_programify];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    53
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    54
Goal
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    55
"AllowedActs(programify(F)) = AllowedActs(F)";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    56
by (simp_tac (simpset() addsimps [AllowedActs_def]) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    57
qed "AllowedActs_programify";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    58
AddIffs [AllowedActs_programify];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    59
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    60
(** program's inspectors **)
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    61
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    62
Goal  "F:program ==>id(state):RawActs(F)";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    63
by (auto_tac (claset(), simpset() 
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    64
        addsimps [program_def, RawActs_def]));
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    65
qed "id_in_RawActs";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    66
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    67
Goal "id(state):Acts(F)";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    68
by (simp_tac (simpset() 
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    69
      addsimps [id_in_RawActs, Acts_def]) 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    70
qed "id_in_Acts";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    71
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    72
Goal  "F:program ==>id(state):RawAllowedActs(F)";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    73
by (auto_tac (claset(), simpset() 
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    74
         addsimps [program_def, RawAllowedActs_def]));
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    75
qed "id_in_RawAllowedActs";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    76
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    77
Goal   "id(state):AllowedActs(F)";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    78
by (simp_tac (simpset() 
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    79
     addsimps [id_in_RawAllowedActs, AllowedActs_def]) 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    80
qed "id_in_AllowedActs";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    81
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    82
AddIffs [id_in_Acts, id_in_AllowedActs];
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    83
AddTCs [id_in_Acts, id_in_AllowedActs];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    84
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    85
Goal "cons(id(state), Acts(F)) = Acts(F)";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    86
by (simp_tac (simpset() addsimps [cons_absorb]) 1);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    87
qed "cons_id_Acts";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    88
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    89
Goal "cons(id(state), AllowedActs(F)) = AllowedActs(F)";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    90
by (simp_tac (simpset() addsimps [cons_absorb]) 1);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    91
qed "cons_id_AllowedActs";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    92
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    93
AddIffs [cons_id_Acts, cons_id_AllowedActs];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    94
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    95
(** inspectors's types **)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    96
Goal
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
    97
"F:program ==> RawInit(F)<=state";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    98
by (auto_tac (claset(), simpset() 
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    99
        addsimps [program_def, RawInit_def]));
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   100
qed "RawInit_type";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   101
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   102
Goal
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   103
"F:program ==> RawActs(F)<=Pow(state*state)";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   104
by (auto_tac (claset(), simpset() 
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   105
       addsimps [program_def, RawActs_def]));
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   106
qed "RawActs_type";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   107
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   108
Goal
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   109
"F:program ==> RawAllowedActs(F)<=Pow(state*state)";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   110
by (auto_tac (claset(), simpset() 
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   111
         addsimps [program_def, RawAllowedActs_def]));
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   112
qed "RawAllowedActs_type";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   113
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   114
Goal "Init(F)<=state";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   115
by (simp_tac (simpset() 
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   116
    addsimps [RawInit_type, Init_def]) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   117
qed "Init_type";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   118
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   119
Goalw [st_set_def] "st_set(Init(F))";
12484
7ad150f5fc10 isatool expandshort;
wenzelm
parents: 12195
diff changeset
   120
by (rtac Init_type 1);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   121
qed "st_set_Init";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   122
AddIffs [st_set_Init];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   123
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   124
Goal
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   125
"Acts(F)<=Pow(state*state)";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   126
by (simp_tac (simpset() 
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   127
    addsimps [RawActs_type, Acts_def]) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   128
qed "Acts_type";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   129
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   130
Goal
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   131
"AllowedActs(F)<=Pow(state*state)";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   132
by (simp_tac (simpset() 
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   133
     addsimps [RawAllowedActs_type, AllowedActs_def]) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   134
qed "AllowedActs_type";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   135
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   136
(** More simplification rules involving state 
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   137
    and Init, Acts, and AllowedActs **)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   138
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   139
Goal "state <= Init(F) <-> Init(F)=state";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   140
by (cut_inst_tac [("F", "F")] Init_type 1);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   141
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   142
qed "state_subset_is_Init_iff";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   143
AddIffs [state_subset_is_Init_iff];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   144
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   145
Goal "Pow(state*state) <= Acts(F) <-> Acts(F)=Pow(state*state)";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   146
by (cut_inst_tac [("F", "F")] Acts_type 1);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   147
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   148
qed "Pow_state_times_state_is_subset_Acts_iff";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   149
AddIffs [Pow_state_times_state_is_subset_Acts_iff];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   150
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   151
Goal "Pow(state*state) <= AllowedActs(F) <-> AllowedActs(F)=Pow(state*state)";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   152
by (cut_inst_tac [("F", "F")] AllowedActs_type 1);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   153
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   154
qed "Pow_state_times_state_is_subset_AllowedActs_iff";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   155
AddIffs [Pow_state_times_state_is_subset_AllowedActs_iff];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   156
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   157
(** Eliminating `Int state' from expressions  **)
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   158
Goal "Init(F) Int state = Init(F)";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   159
by (cut_inst_tac [("F", "F")] Init_type 1);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   160
by (Blast_tac 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   161
qed "Init_Int_state";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   162
AddIffs [Init_Int_state];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   163
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   164
Goal "state Int Init(F) = Init(F)";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   165
by (cut_inst_tac [("F", "F")] Init_type 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   166
by (Blast_tac 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   167
qed "state_Int_Init";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   168
AddIffs [state_Int_Init];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   169
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   170
Goal "Acts(F) Int Pow(state*state) = Acts(F)";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   171
by (cut_inst_tac [("F", "F")] Acts_type 1);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   172
by (Blast_tac 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   173
qed "Acts_Int_Pow_state_times_state";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   174
AddIffs [Acts_Int_Pow_state_times_state];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   175
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   176
Goal "Pow(state*state) Int Acts(F) = Acts(F)";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   177
by (cut_inst_tac [("F", "F")] Acts_type 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   178
by (Blast_tac 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   179
qed "state_times_state_Int_Acts";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   180
AddIffs [state_times_state_Int_Acts];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   181
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   182
Goal "AllowedActs(F) Int Pow(state*state) = AllowedActs(F)";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   183
by (cut_inst_tac [("F", "F")] AllowedActs_type 1);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   184
by (Blast_tac 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   185
qed "AllowedActs_Int_Pow_state_times_state";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   186
AddIffs [AllowedActs_Int_Pow_state_times_state];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   187
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   188
Goal "Pow(state*state) Int AllowedActs(F) = AllowedActs(F)";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   189
by (cut_inst_tac [("F", "F")] AllowedActs_type 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   190
by (Blast_tac 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   191
qed "state_times_state_Int_AllowedActs";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   192
AddIffs [state_times_state_Int_AllowedActs];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   193
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   194
(** mk_program **)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   195
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   196
Goalw [mk_program_def, program_def] "mk_program(init, acts, allowed):program";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   197
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   198
qed "mk_program_in_program";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   199
AddIffs [mk_program_in_program];
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   200
AddTCs [mk_program_in_program];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   201
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   202
Goalw [RawInit_def, mk_program_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   203
  "RawInit(mk_program(init, acts, allowed)) = init Int state";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   204
by Auto_tac;
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   205
qed "RawInit_eq";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   206
AddIffs [RawInit_eq];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   207
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   208
Goalw [RawActs_def, mk_program_def] 
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   209
"RawActs(mk_program(init, acts, allowed)) = cons(id(state), acts Int Pow(state*state))";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   210
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   211
qed "RawActs_eq";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   212
AddIffs [RawActs_eq];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   213
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   214
Goalw [RawAllowedActs_def, mk_program_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   215
"RawAllowedActs(mk_program(init, acts, allowed)) = \
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   216
\ cons(id(state), allowed Int Pow(state*state))";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   217
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   218
qed "RawAllowedActs_eq";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   219
AddIffs [RawAllowedActs_eq];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   220
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   221
Goalw [Init_def]  "Init(mk_program(init, acts, allowed)) = init Int state";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   222
by (Simp_tac 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   223
qed "Init_eq";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   224
AddIffs [Init_eq];
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   225
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   226
Goalw [Acts_def] 
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   227
"Acts(mk_program(init, acts, allowed)) = cons(id(state), acts  Int Pow(state*state))";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   228
by (Simp_tac 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   229
qed "Acts_eq";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   230
AddIffs [Acts_eq];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   231
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   232
Goalw [AllowedActs_def]
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   233
"AllowedActs(mk_program(init, acts, allowed))= \
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   234
\ cons(id(state), allowed Int Pow(state*state))";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   235
by (Simp_tac 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   236
qed "AllowedActs_eq";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   237
AddIffs [AllowedActs_eq];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   238
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   239
(**Init, Acts, and AlowedActs  of SKIP **)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   240
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   241
Goalw [SKIP_def] "RawInit(SKIP) = state";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   242
by Auto_tac;
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   243
qed "RawInit_SKIP";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   244
AddIffs [RawInit_SKIP];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   245
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   246
Goalw [SKIP_def] "RawAllowedActs(SKIP) = Pow(state*state)";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   247
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   248
qed "RawAllowedActs_SKIP";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   249
AddIffs [RawAllowedActs_SKIP];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   250
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   251
Goalw [SKIP_def] "RawActs(SKIP) = {id(state)}";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   252
by Auto_tac;
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   253
qed "RawActs_SKIP";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   254
AddIffs [RawActs_SKIP];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   255
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   256
Goalw [Init_def] "Init(SKIP) = state";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   257
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   258
qed "Init_SKIP";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   259
AddIffs [Init_SKIP];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   260
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   261
Goalw [Acts_def] "Acts(SKIP) = {id(state)}";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   262
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   263
qed "Acts_SKIP";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   264
AddIffs [Acts_SKIP];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   265
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   266
Goalw [AllowedActs_def] "AllowedActs(SKIP) = Pow(state*state)";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   267
by Auto_tac;
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   268
qed "AllowedActs_SKIP";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   269
AddIffs [AllowedActs_SKIP];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   270
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   271
(** Equality of UNITY programs **)
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   272
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   273
Goal 
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   274
"F:program ==> mk_program(RawInit(F), RawActs(F), RawAllowedActs(F))=F";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   275
by (rewrite_goal_tac [program_def, mk_program_def,RawInit_def,
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   276
                      RawActs_def, RawAllowedActs_def] 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   277
by Auto_tac;
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   278
by (REPEAT(Blast_tac 1));
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   279
qed "raw_surjective_mk_program";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   280
Addsimps [raw_surjective_mk_program];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   281
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   282
Goalw [Init_def, Acts_def, AllowedActs_def]
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   283
  "mk_program(Init(F), Acts(F), AllowedActs(F)) = programify(F)";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   284
by Auto_tac;
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   285
qed "surjective_mk_program";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   286
AddIffs [surjective_mk_program];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   287
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   288
Goal "[|Init(F) = Init(G); Acts(F) = Acts(G); \
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   289
\ AllowedActs(F) = AllowedActs(G); F:program; G:program |] ==> F = G";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   290
by (stac (programify_program RS sym) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   291
by (rtac sym 2);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   292
by (stac  (programify_program RS sym) 2);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   293
by (stac (surjective_mk_program RS sym) 3);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   294
by (stac (surjective_mk_program RS sym) 3);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   295
by (ALLGOALS(Asm_simp_tac));
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   296
qed "program_equalityI";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   297
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   298
val [major,minor] =
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   299
Goal "[| F = G; \
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   300
\        [| Init(F) = Init(G); Acts(F) = Acts(G); AllowedActs(F) = AllowedActs(G) |]\
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   301
\        ==> P |] ==> P";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   302
by (rtac minor 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   303
by (auto_tac (claset(), simpset() addsimps [major]));
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   304
qed "program_equalityE";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   305
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   306
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   307
Goal "[| F:program; G:program |] ==>(F=G)  <->  \
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   308
\     (Init(F) = Init(G) & Acts(F) = Acts(G) & AllowedActs(F) = AllowedActs(G))";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   309
by (blast_tac (claset() addIs [program_equalityI, program_equalityE]) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   310
qed "program_equality_iff";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   311
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   312
(*** These rules allow "lazy" definition expansion 
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   313
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   314
...skipping 1 line
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   315
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   316
***)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   317
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   318
Goal "F == mk_program (init,acts,allowed) ==> Init(F) = init Int state";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   319
by Auto_tac;
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   320
qed "def_prg_Init";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   321
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   322
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   323
Goal "F == mk_program (init,acts,allowed) ==> \
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   324
\ Acts(F) = cons(id(state), acts Int Pow(state*state))";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   325
by Auto_tac;
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   326
qed "def_prg_Acts";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   327
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   328
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   329
Goal "F == mk_program (init,acts,allowed) ==> \
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   330
\    AllowedActs(F) = cons(id(state), allowed Int Pow(state*state))";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   331
by Auto_tac;
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   332
qed "def_prg_AllowedActs";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   333
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   334
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   335
val [rew] = goal thy
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   336
    "[| F == mk_program (init,acts,allowed) |] \
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   337
\ ==> Init(F) = init Int state & Acts(F) = cons(id(state), acts Int Pow(state*state)) & \
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   338
\     AllowedActs(F) = cons(id(state), allowed Int Pow(state*state)) ";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   339
by (rewtac rew);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   340
by Auto_tac;
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   341
qed "def_prg_simps";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   342
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   343
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   344
(*An action is expanded only if a pair of states is being tested against it*)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   345
Goal "[| act == {<s,s'>:A*B. P(s, s')} |] ==> \
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   346
\ (<s,s'>:act) <-> (<s,s'>:A*B & P(s, s'))";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   347
by Auto_tac;
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   348
qed "def_act_simp";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   349
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   350
fun simp_of_act def = def RS def_act_simp;
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   351
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   352
(*A set is expanded only if an element is being tested against it*)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   353
Goal "A == B ==> (x : A) <-> (x : B)";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   354
by Auto_tac;
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   355
qed "def_set_simp";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   356
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   357
fun simp_of_set def = def RS def_set_simp;
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   358
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   359
(*** co ***)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   360
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   361
Goalw [constrains_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   362
"A co B <= program";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   363
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   364
qed "constrains_type";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   365
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   366
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   367
val prems = Goalw [constrains_def]
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   368
    "[|(!!act s s'. [| act: Acts(F);  <s,s'>:act; s:A|] ==> s':A'); \
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   369
    \   F:program; st_set(A) |]  ==> F:A co A'";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   370
by (auto_tac (claset() delrules [subsetI], simpset()));
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   371
by (ALLGOALS(asm_full_simp_tac (simpset() addsimps prems)));
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   372
by (Clarify_tac 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   373
by (blast_tac(claset() addIs prems) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   374
qed "constrainsI";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   375
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   376
Goalw [constrains_def]
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   377
   "F:A co B ==> ALL act:Acts(F). act``A<=B";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   378
by (Blast_tac 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   379
qed "constrainsD";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   380
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   381
Goalw [constrains_def]
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   382
   "F:A co B ==> F:program & st_set(A)";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   383
by (Blast_tac 1);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   384
qed "constrainsD2"; 
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   385
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   386
Goalw [constrains_def, st_set_def] "F : 0 co B <-> F:program";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   387
by (Blast_tac 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   388
qed "constrains_empty";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   389
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   390
Goalw [constrains_def, st_set_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   391
    "(F : A co 0) <-> (A=0 & F:program)";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   392
by (cut_inst_tac [("F", "F")] Acts_type 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   393
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   394
by (Blast_tac 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   395
qed "constrains_empty2";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   396
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   397
Goalw [constrains_def, st_set_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   398
"(F: state co B) <-> (state<=B & F:program)";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   399
by (cut_inst_tac [("F", "F")] Acts_type 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   400
by (Blast_tac 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   401
qed "constrains_state";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   402
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   403
Goalw [constrains_def, st_set_def] "F:A co state <-> (F:program & st_set(A))";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   404
by (cut_inst_tac [("F", "F")] Acts_type 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   405
by (Blast_tac 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   406
qed "constrains_state2";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   407
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   408
AddIffs [constrains_empty, constrains_empty2, 
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   409
         constrains_state, constrains_state2];
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   410
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   411
(*monotonic in 2nd argument*)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   412
Goalw [constrains_def]
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   413
    "[| F:A co A'; A'<=B' |] ==> F : A co B'";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   414
by (Blast_tac 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   415
qed "constrains_weaken_R";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   416
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   417
(*anti-monotonic in 1st argument*)
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   418
Goalw [constrains_def, st_set_def]
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   419
    "[| F : A co A'; B<=A |] ==> F : B co A'";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   420
by (Blast_tac 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   421
qed "constrains_weaken_L";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   422
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   423
Goal
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   424
   "[| F : A co A'; B<=A; A'<=B' |] ==> F : B co B'";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   425
by (dtac constrains_weaken_R 1);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   426
by (dtac constrains_weaken_L 2);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   427
by (REPEAT(Blast_tac 1));
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   428
qed "constrains_weaken";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   429
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   430
(** Union **)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   431
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   432
Goalw [constrains_def, st_set_def]
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   433
    "[| F : A co A'; F:B co B' |] ==> F:(A Un B) co (A' Un B')";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   434
by Auto_tac;
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   435
by (Force_tac 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   436
qed "constrains_Un";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   437
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   438
val major::minor::_ = Goalw [constrains_def, st_set_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   439
"[|(!!i. i:I ==> F:A(i) co A'(i)); F:program |]==> F:(UN i:I. A(i)) co (UN i:I. A'(i))";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   440
by (cut_facts_tac [minor] 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   441
by Safe_tac;
12484
7ad150f5fc10 isatool expandshort;
wenzelm
parents: 12195
diff changeset
   442
by (ALLGOALS(ftac major ));
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   443
by (ALLGOALS(Asm_full_simp_tac));
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   444
by (REPEAT(Blast_tac 1));
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   445
qed "constrains_UN";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   446
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   447
Goalw [constrains_def, st_set_def]
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   448
     "(A Un B) co C = (A co C) Int (B co C)";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   449
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   450
by (Force_tac 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   451
qed "constrains_Un_distrib";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   452
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   453
Goalw [constrains_def, st_set_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   454
   "i:I ==> (UN i:I. A(i)) co B = (INT i:I. A(i) co B)";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   455
by (rtac equalityI 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   456
by (REPEAT(Force_tac 1));
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   457
qed "constrains_UN_distrib";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   458
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   459
(** Intersection **)
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   460
Goalw [constrains_def, st_set_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   461
 "C co (A Int B) = (C co A) Int (C co B)";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   462
by (rtac equalityI 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   463
by (ALLGOALS(Clarify_tac)); (* to speed up the proof *)
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   464
by (REPEAT(Blast_tac 1));
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   465
qed "constrains_Int_distrib";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   466
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   467
Goalw [constrains_def, st_set_def] 
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   468
"x:I ==> A co (INT i:I. B(i)) = (INT i:I. A co B(i))";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   469
by (rtac equalityI 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   470
by Safe_tac;
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   471
by (REPEAT(Blast_tac 1));
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   472
qed "constrains_INT_distrib";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   473
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   474
Goalw [constrains_def, st_set_def]
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   475
    "[| F : A co A'; F : B co B' |] ==> F : (A Int B) co (A' Int B')";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   476
by (Clarify_tac 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   477
by (Blast_tac 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   478
qed "constrains_Int";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   479
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   480
val major::minor::_ = Goalw [constrains_def, st_set_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   481
"[| (!!i. i:I==>F:A(i) co A'(i)); F:program|]==> F:(INT i:I. A(i)) co (INT i:I. A'(i))";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   482
by (cut_facts_tac [minor] 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   483
by (cut_inst_tac [("F", "F")] Acts_type 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   484
by (case_tac "I=0" 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   485
by (asm_full_simp_tac (simpset() addsimps [Inter_def]) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   486
by (etac not_emptyE 1);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   487
by Safe_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   488
by (forw_inst_tac [("i", "xd")] major 1);
12484
7ad150f5fc10 isatool expandshort;
wenzelm
parents: 12195
diff changeset
   489
by (ftac major 2);
7ad150f5fc10 isatool expandshort;
wenzelm
parents: 12195
diff changeset
   490
by (ftac major 3);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   491
by (REPEAT(Force_tac 1));
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   492
qed "constrains_INT";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   493
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   494
(* The rule below simulates the HOL's one for (INT z. A i) co (INT z. B i) *)
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   495
Goalw [constrains_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   496
"[| ALL z. F:{s:state. P(s, z)} co {s:state. Q(s, z)}; F:program |]==>\
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   497
\   F:{s:state. ALL z. P(s, z)} co {s:state. ALL z. Q(s, z)}";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   498
by (Blast_tac 1);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   499
qed "constrains_All";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   500
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   501
Goalw [constrains_def, st_set_def] 
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   502
  "[| F:A co A' |] ==> A <= A'";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   503
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   504
by (Blast_tac 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   505
qed "constrains_imp_subset";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   506
(*The reasoning is by subsets since "co" refers to single actions
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   507
  only.  So this rule isn't that useful.*)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   508
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   509
Goalw [constrains_def, st_set_def]
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   510
    "[| F : A co B; F : B co C |] ==> F : A co C";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   511
by Auto_tac;
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   512
by (Blast_tac 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   513
qed "constrains_trans";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   514
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   515
Goal
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   516
"[| F : A co (A' Un B); F : B co B' |] ==> F:A co (A' Un B')";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   517
by (dres_inst_tac [("A", "B")] constrains_imp_subset 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   518
by (blast_tac (claset() addIs [constrains_weaken_R]) 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   519
qed "constrains_cancel";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   520
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   521
(*** unless ***)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   522
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   523
Goalw [unless_def, constrains_def] 
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   524
     "A unless B <= program";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   525
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   526
qed "unless_type";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   527
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   528
Goalw [unless_def] "[| F:(A-B) co (A Un B) |] ==> F : A unless B";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   529
by (blast_tac (claset() addDs [constrainsD2]) 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   530
qed "unlessI";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   531
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   532
Goalw [unless_def] "F :A unless B ==> F : (A-B) co (A Un B)";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   533
by Auto_tac;
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   534
qed "unlessD";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   535
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   536
(*** initially ***)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   537
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   538
Goalw [initially_def]
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   539
"initially(A) <= program";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   540
by (Blast_tac 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   541
qed "initially_type";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   542
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   543
Goalw [initially_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   544
"[| F:program; Init(F)<=A |] ==> F:initially(A)";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   545
by (Blast_tac 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   546
qed "initiallyI";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   547
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   548
Goalw [initially_def]
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   549
"F:initially(A) ==> Init(F)<=A";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   550
by (Blast_tac 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   551
qed "initiallyD";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   552
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   553
(*** stable ***)
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   554
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   555
Goalw [stable_def, constrains_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   556
   "stable(A)<=program";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   557
by (Blast_tac 1);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   558
qed "stable_type";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   559
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   560
Goalw [stable_def] 
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   561
    "F : A co A ==> F : stable(A)";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   562
by (assume_tac 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   563
qed "stableI";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   564
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   565
Goalw [stable_def] "F:stable(A) ==> F : A co A";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   566
by (assume_tac 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   567
qed "stableD";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   568
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   569
Goalw [stable_def, constrains_def] "F:stable(A) ==> F:program & st_set(A)";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   570
by Auto_tac;
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   571
qed "stableD2";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   572
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   573
Goalw [stable_def, constrains_def] "stable(state) = program";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   574
by (auto_tac (claset() addDs [Acts_type RS subsetD], simpset()));
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   575
qed "stable_state";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   576
AddIffs [stable_state];
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   577
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   578
(** Union **)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   579
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   580
Goalw [stable_def]
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   581
    "[| F : stable(A); F:stable(A') |] ==> F : stable(A Un A')";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   582
by (blast_tac (claset() addIs [constrains_Un]) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   583
qed "stable_Un";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   584
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   585
val [major, minor] = Goalw [stable_def]
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   586
"[|(!!i. i:I ==> F : stable(A(i))); F:program |] ==> F:stable (UN i:I. A(i))";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   587
by (cut_facts_tac [minor] 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   588
by (blast_tac (claset() addIs [constrains_UN, major]) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   589
qed "stable_UN";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   590
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   591
Goalw [stable_def]
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   592
    "[| F : stable(A);  F : stable(A') |] ==> F : stable (A Int A')";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   593
by (blast_tac (claset() addIs [constrains_Int]) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   594
qed "stable_Int";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   595
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   596
val [major, minor] = Goalw [stable_def]
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   597
"[| (!!i. i:I ==> F:stable(A(i))); F:program |] ==> F : stable (INT i:I. A(i))";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   598
by (cut_facts_tac [minor] 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   599
by (blast_tac (claset() addIs [constrains_INT, major]) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   600
qed "stable_INT";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   601
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   602
Goalw [stable_def]
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   603
"[|ALL z. F:stable({s:state. P(s, z)}); F:program|]==>F:stable({s:state. ALL z. P(s, z)})";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   604
by (rtac constrains_All 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   605
by Auto_tac;
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   606
qed "stable_All";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   607
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   608
Goalw [stable_def, constrains_def, st_set_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   609
"[| F : stable(C); F : A co (C Un A') |] ==> F : (C Un A) co (C Un A')";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   610
by (cut_inst_tac [("F", "F")] Acts_type 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   611
by Auto_tac;
13612
55d32e76ef4e Adapted to new simplifier.
berghofe
parents: 13176
diff changeset
   612
by (Blast.depth_tac (claset()) 10 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   613
qed "stable_constrains_Un";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   614
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   615
Goalw [stable_def, constrains_def, st_set_def]
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   616
  "[| F : stable(C); F :  (C Int A) co A' |] ==> F : (C Int A) co (C Int A')";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   617
by (Clarify_tac 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   618
by (Blast_tac 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   619
qed "stable_constrains_Int";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   620
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   621
(* [| F:stable(C); F :(C Int A) co A |] ==> F:stable(C Int A) *)
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   622
bind_thm ("stable_constrains_stable", stable_constrains_Int RS stableI);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   623
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   624
(** invariant **)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   625
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   626
Goalw [invariant_def] 
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   627
  "invariant(A) <= program";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   628
by (blast_tac (claset() addDs [stable_type RS subsetD]) 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   629
qed "invariant_type";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   630
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   631
Goalw [invariant_def, initially_def]
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   632
 "[| Init(F)<=A;  F:stable(A) |] ==> F : invariant(A)";
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   633
by (forward_tac [stable_type RS subsetD] 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   634
by Auto_tac;
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   635
qed "invariantI";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   636
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   637
Goalw [invariant_def, initially_def]
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   638
"F:invariant(A) ==> Init(F)<=A & F:stable(A)";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   639
by Auto_tac;
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   640
qed "invariantD";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   641
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   642
Goalw [invariant_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   643
 "F:invariant(A) ==> F:program & st_set(A)";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   644
by (blast_tac (claset() addDs [stableD2]) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   645
qed "invariantD2";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   646
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   647
(*Could also say "invariant A Int invariant B <= invariant (A Int B)"*)
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   648
Goalw [invariant_def, initially_def]
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   649
  "[| F : invariant(A);  F : invariant(B) |] ==> F : invariant(A Int B)";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   650
by (asm_full_simp_tac (simpset() addsimps [stable_Int]) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   651
by (Blast_tac 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   652
qed "invariant_Int";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   653
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   654
(** The Elimination Theorem.  The "free" m has become universally quantified!
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   655
 Should the premise be !!m instead of ALL m ? Would make it harder 
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   656
 to use in forward proof. **)
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   657
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   658
(* The general case easier to prove that le special case! *)
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   659
Goalw [constrains_def, st_set_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   660
    "[| ALL m:M. F : {s:A. x(s) = m} co B(m); F:program  |] \
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   661
\    ==> F:{s:A. x(s):M} co (UN m:M. B(m))";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   662
by Safe_tac;
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   663
by Auto_tac;
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   664
by (Blast_tac 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   665
qed "elimination";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   666
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   667
(* As above, but for the special case of A=state *)
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   668
Goal "[| ALL m:M. F : {s:state. x(s) = m} co B(m); F:program  |] \
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   669
\    ==> F:{s:state. x(s):M} co (UN m:M. B(m))";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   670
by (rtac elimination  1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   671
by (ALLGOALS(Clarify_tac));
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   672
qed "eliminiation2";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   673
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   674
(** strongest_rhs **)
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   675
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   676
Goalw [constrains_def, strongest_rhs_def, st_set_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   677
    "[| F:program; st_set(A) |] ==> F:A co (strongest_rhs(F,A))";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   678
by (auto_tac (claset() addDs [Acts_type RS subsetD], simpset()));
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   679
qed "constrains_strongest_rhs";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   680
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   681
Goalw [constrains_def, strongest_rhs_def, st_set_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   682
"[| F:A co B; st_set(B) |] ==> strongest_rhs(F,A) <= B";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   683
by Safe_tac;
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   684
by (dtac InterD 1);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   685
by Auto_tac;
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   686
qed "strongest_rhs_is_strongest";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   687
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   688
(*** increasing ***)
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   689
Goalw [increasing_def] "increasing(A, r, f) <= program";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   690
by (case_tac "A=0" 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   691
by (etac not_emptyE 2);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   692
by (Clarify_tac 2);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   693
by (ALLGOALS(asm_full_simp_tac (simpset() addsimps [Inter_iff, Inter_0])));
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   694
by (blast_tac (claset() addDs [stable_type RS subsetD]) 1); 
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   695
qed "increasing_type";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   696
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   697
Goalw [increasing_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   698
   "[| F:increasing(A, r, f); a:A |] ==> F:stable({s:state. <a, f`s>:r})";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   699
by (Blast_tac 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   700
qed "increasingD";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   701
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   702
Goalw [increasing_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   703
"F:increasing(A, r, f) ==> F:program & (EX a. a:A)";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   704
by (auto_tac (claset() addDs [stable_type RS subsetD],
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   705
              simpset() addsimps [INT_iff]));
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   706
qed "increasingD2";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   707
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   708
Goalw [increasing_def, stable_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   709
 "F:increasing(A, r, lam s:state. c) <-> F:program & (EX a. a:A)";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   710
by (auto_tac (claset() addDs [constrains_type RS subsetD],
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   711
               simpset() addsimps [INT_iff]));
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   712
qed "increasing_constant";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   713
AddIffs [increasing_constant];
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   714
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   715
Goalw [increasing_def, stable_def, constrains_def, st_set_def, part_order_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   716
"[| g:mono_map(A,r,A,r); part_order(A, r); f:state->A |] \
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   717
\  ==> increasing(A, r,f) <= increasing(A, r,g O f)";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   718
by (case_tac "A=0" 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   719
by (Asm_full_simp_tac 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   720
by (etac not_emptyE 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   721
by (Clarify_tac 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   722
by (cut_inst_tac [("F", "xa")] Acts_type 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   723
by (asm_full_simp_tac (simpset() addsimps [Inter_iff, mono_map_def]) 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   724
by Auto_tac;
13176
312bd350579b conversion of Perm to Isar. Strengthening of comp_fun_apply
paulson
parents: 12537
diff changeset
   725
by (rename_tac "xa xc xd act xe xf" 1);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   726
by (dres_inst_tac [("psi", "ALL x:A. ALL xa:A. ?u(x,xa)")] asm_rl 1); 
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   727
by (dres_inst_tac [("x", "f`xf")] bspec 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   728
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   729
by (dres_inst_tac [("psi", "ALL x:A. ALL xa:A. ?u(x,xa)")] asm_rl 1); 
12152
46f128d8133c Renamed some bound variables due to changes in simplifier.
berghofe
parents: 11479
diff changeset
   730
by (dres_inst_tac [("x", "act")] bspec 1);
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   731
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   732
by (dres_inst_tac [("psi", "Acts(?u) <= ?v")] asm_rl 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   733
by (dres_inst_tac [("psi", "?u <= state")] asm_rl 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   734
by (dres_inst_tac [("c", "xe")] subsetD 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   735
by (rtac imageI 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   736
by Auto_tac;
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   737
by (asm_full_simp_tac (simpset() addsimps [refl_def, apply_type]) 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   738
by (dres_inst_tac [("x1", "f`xf"), ("x", "f`xe")] (bspec RS bspec) 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   739
by (ALLGOALS(asm_full_simp_tac (simpset() addsimps [apply_type])));
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   740
by (res_inst_tac [("b", "g ` (f ` xf)")] trans_onD 1);
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   741
by (ALLGOALS(asm_full_simp_tac (simpset() addsimps [apply_type])));
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   742
qed "mono_increasing_comp";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   743
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   744
(*Holds by the theorem (succ(m) le n) = (m < n) *)
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   745
Goalw [increasing_def]
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   746
     "[| F:increasing(nat, {<m,n>:nat*nat. m le n}, f); f:state->nat; k:nat |] \
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   747
\  ==> F: stable({s:state. k < f`s})";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   748
by (Clarify_tac 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   749
by (asm_full_simp_tac (simpset() addsimps [INT_iff]) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   750
by Safe_tac;
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   751
by (dres_inst_tac [("x", "succ(k)")] bspec 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   752
by (auto_tac (claset(), simpset() addsimps [apply_type, Collect_conj_eq]));
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   753
by (subgoal_tac "{x: state . f`x : nat} = state" 1);
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
   754
by Auto_tac;
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   755
qed "strict_increasingD";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   756
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   757
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   758
(* Used in WFair.thy *)
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   759
Goal "A:Pow(Pow(B)) ==> Union(A):Pow(B)";
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   760
by Auto_tac;
ed2893765a08 *** empty log message ***
ehmety
parents: 12152
diff changeset
   761
qed "Union_PowI";