src/ZF/UNITY/Union.ML
changeset 12220 9dc4e8fec63d
parent 12215 55c084921240
child 12484 7ad150f5fc10
equal deleted inserted replaced
12219:ae54aa9f6d08 12220:9dc4e8fec63d
    83 by (simp_tac (simpset() 
    83 by (simp_tac (simpset() 
    84          addsimps [Int_assoc, Join_def]) 1);
    84          addsimps [Int_assoc, Join_def]) 1);
    85 qed "Init_Join";
    85 qed "Init_Join";
    86 
    86 
    87 Goal "Acts(F Join G) = Acts(F) Un Acts(G)";
    87 Goal "Acts(F Join G) = Acts(F) Un Acts(G)";
    88 by (simp_tac (simpset() 
    88 by (simp_tac (simpset() addsimps [Int_Un_distrib2, cons_absorb, Join_def]) 1);
    89      addsimps [Int_Un_distrib2,cons_absorb,Join_def]) 1);
       
    90 qed "Acts_Join";
    89 qed "Acts_Join";
    91 
    90 
    92 Goal "AllowedActs(F Join G) = \
    91 Goal "AllowedActs(F Join G) = \
    93 \ AllowedActs(F) Int AllowedActs(G)";
    92 \ AllowedActs(F) Int AllowedActs(G)";
    94 by (simp_tac (simpset() 
    93 by (simp_tac (simpset() 
   102 by (simp_tac (simpset() addsimps 
   101 by (simp_tac (simpset() addsimps 
   103      [Join_def, Un_commute, Int_commute]) 1);
   102      [Join_def, Un_commute, Int_commute]) 1);
   104 qed "Join_commute";
   103 qed "Join_commute";
   105 
   104 
   106 Goal "A Join (B Join C) = B Join (A Join C)";
   105 Goal "A Join (B Join C) = B Join (A Join C)";
   107 by (asm_simp_tac (simpset() addsimps  
   106 by (asm_simp_tac (simpset() addsimps 
   108        Un_ac@Int_ac@[Join_def,Int_Un_distrib2, cons_absorb]) 1);
   107      Un_ac@Int_ac@[Join_def,Int_Un_distrib2, cons_absorb]) 1);
   109 qed "Join_left_commute";
   108 qed "Join_left_commute";
   110 
   109 
   111 Goal "(F Join G) Join H = F Join (G Join H)";
   110 Goal "(F Join G) Join H = F Join (G Join H)";
   112 by (asm_simp_tac (simpset() addsimps 
   111 by (asm_simp_tac (simpset() addsimps 
   113           Un_ac@[Join_def, cons_absorb, Int_assoc, Int_Un_distrib2]) 1);
   112           Un_ac@[Join_def, cons_absorb, Int_assoc, Int_Un_distrib2]) 1);
   164 qed "JN_empty";
   163 qed "JN_empty";
   165 AddIffs [JN_empty];
   164 AddIffs [JN_empty];
   166 AddSEs [not_emptyE];
   165 AddSEs [not_emptyE];
   167 Addsimps [Inter_0];
   166 Addsimps [Inter_0];
   168 
   167 
   169 Goalw [JOIN_def]
   168 Goal "Init(JN i:I. F(i)) = (if I=0 then state else (INT i:I. Init(F(i))))";
   170    "Init(JN i:I. F(i)) = (if I=0 then state else (INT i:I. Init(F(i))))";
   169 by (simp_tac (simpset() addsimps [JOIN_def]) 1);
   171 by (auto_tac (claset(), simpset() addsimps [INT_Int_distrib]));
   170 by (auto_tac (claset(), simpset() addsimps [INT_Int_distrib]));
   172 qed "Init_JN";
   171 qed "Init_JN";
   173 
   172 
   174 Goalw [JOIN_def]
   173 Goalw [JOIN_def]
   175 "Acts(JOIN(I,F)) = cons(id(state), UN i:I.  Acts(F(i)))";
   174      "Acts(JOIN(I,F)) = cons(id(state), UN i:I.  Acts(F(i)))";
   176 by (auto_tac (claset(), simpset() delsimps (INT_simps@UN_simps)));
   175 by (auto_tac (claset(), simpset() delsimps (INT_simps@UN_simps)));
   177 by (rtac equalityI 1);
   176 by (rtac equalityI 1);
   178 by (auto_tac (claset() addDs [Acts_type RS subsetD], simpset()));
   177 by (auto_tac (claset() addDs [Acts_type RS subsetD], simpset()));
   179 qed "Acts_JN";
   178 qed "Acts_JN";
   180 
   179 
   206 by (stac (JN_cons RS sym) 1);
   205 by (stac (JN_cons RS sym) 1);
   207 by (auto_tac (claset(), 
   206 by (auto_tac (claset(), 
   208            simpset() addsimps [cons_absorb]));
   207            simpset() addsimps [cons_absorb]));
   209 qed "JN_absorb";
   208 qed "JN_absorb";
   210 
   209 
   211 Goalw [Inter_def] "[| i:I; j:J |] ==> \
       
   212 \  (INT i:I Un J. A(i)) = ((INT i:I. A(i)) Int  (INT j:J. A(j)))";
       
   213 by Auto_tac;
       
   214 by (Blast_tac 1);
       
   215 qed "INT_Un";
       
   216   
       
   217 Goal "(JN i: I Un J. F(i)) = ((JN i: I. F(i)) Join (JN i:J. F(i)))";
   210 Goal "(JN i: I Un J. F(i)) = ((JN i: I. F(i)) Join (JN i:J. F(i)))";
   218 by (rtac program_equalityI 1);
   211 by (rtac program_equalityI 1);
   219 by (ALLGOALS(Asm_full_simp_tac));
   212 by (ALLGOALS(asm_full_simp_tac (simpset() addsimps [UN_Un,INT_Un])));
   220 by Safe_tac;
   213 by (ALLGOALS(asm_full_simp_tac (simpset() delsimps INT_simps
   221 by (ALLGOALS(asm_full_simp_tac (simpset() addsimps [Int_absorb])));
   214 		                          addsimps INT_extend_simps)));
   222 by (ALLGOALS(rtac equalityI));
   215 by (Blast_tac 1); 
   223 by (auto_tac (claset() addDs [Init_type RS subsetD,
       
   224                               Acts_type RS subsetD,
       
   225                               AllowedActs_type RS subsetD], simpset()));
       
   226 qed "JN_Un";
   216 qed "JN_Un";
   227 
   217 
   228 Goal "(JN i:I. c) = (if I=0 then SKIP else programify(c))";
   218 Goal "(JN i:I. c) = (if I=0 then SKIP else programify(c))";
   229 by (rtac program_equalityI 1);
   219 by (rtac program_equalityI 1);
   230 by Auto_tac;
   220 by Auto_tac;
   231 qed "JN_constant";
   221 qed "JN_constant";
   232 
   222 
   233 Goal 
   223 Goal "(JN i:I. F(i) Join G(i)) = (JN i:I. F(i))  Join  (JN i:I. G(i))";
   234 "(JN i:I. F(i) Join G(i)) = (JN i:I. F(i))  Join  (JN i:I. G(i))";
       
   235 by (rtac program_equalityI 1);
   224 by (rtac program_equalityI 1);
   236 by (ALLGOALS(simp_tac (simpset() addsimps [Int_absorb])));
   225 by (ALLGOALS(simp_tac (simpset() addsimps [Int_absorb])));
   237 by Safe_tac;
   226 by Safe_tac;
   238 by (ALLGOALS(asm_full_simp_tac (simpset() addsimps 
   227 by (ALLGOALS(asm_full_simp_tac (simpset() addsimps 
   239               [INT_Int_distrib, Int_absorb])));
   228               [INT_Int_distrib, Int_absorb])));
   240 by (Force_tac 1);
   229 by (Force_tac 1);
   241 qed "JN_Join_distrib";
   230 qed "JN_Join_distrib";
   242 
   231 
   243 Goal 
   232 Goal "(JN i:I. F(i) Join G) = ((JN i:I. F(i) Join G))";
   244 "(JN i:I. F(i) Join G) = ((JN i:I. F(i) Join G))";
       
   245 by (asm_simp_tac (simpset() 
   233 by (asm_simp_tac (simpset() 
   246     addsimps [JN_Join_distrib, JN_constant]) 1);
   234     addsimps [JN_Join_distrib, JN_constant]) 1);
   247 qed "JN_Join_miniscope";
   235 qed "JN_Join_miniscope";
   248 
   236 
   249 (*Used to prove guarantees_JN_I*)
   237 (*Used to prove guarantees_JN_I*)
   383 qed "JN_transient";
   371 qed "JN_transient";
   384 
   372 
   385 Goal "F Join G : transient(A) <-> \
   373 Goal "F Join G : transient(A) <-> \
   386 \     (programify(F) : transient(A) | programify(G):transient(A))";
   374 \     (programify(F) : transient(A) | programify(G):transient(A))";
   387 by (auto_tac (claset(),
   375 by (auto_tac (claset(),
   388               simpset() addsimps [transient_def,
   376               simpset() addsimps [transient_def, Join_def, Int_Un_distrib2]));
   389                                   Join_def, Int_Un_distrib2]));
       
   390 qed "Join_transient";
   377 qed "Join_transient";
   391 
   378 
   392 AddIffs [Join_transient];
   379 AddIffs [Join_transient];
   393 
   380 
   394 
   381