src/HOL/IOA/Solve.ML
changeset 6916 4957978b6f9e
parent 5184 9b8547a9496a
child 7499 23e090051cb8
equal deleted inserted replaced
6915:4ab8e31a8421 6916:4957978b6f9e
    71 by (res_inst_tac [("x",
    71 by (res_inst_tac [("x",
    72    "(filter_oseq (%a. a:actions(asig_of(C1))) \
    72    "(filter_oseq (%a. a:actions(asig_of(C1))) \
    73 \                (fst ex),                                                \
    73 \                (fst ex),                                                \
    74 \    %i. fst (snd ex i))")]  bexI 1);
    74 \    %i. fst (snd ex i))")]  bexI 1);
    75 (* fst(s) is in projected execution *)
    75 (* fst(s) is in projected execution *)
    76  by (Simp_tac 1);
    76  by (Force_tac 1);
    77  by (fast_tac (claset() delSWrapper"split_all_tac")1);
       
    78 (* projected execution is indeed an execution *)
    77 (* projected execution is indeed an execution *)
    79 by (asm_full_simp_tac
    78 by (asm_full_simp_tac
    80       (simpset() addsimps [executions_def,is_execution_fragment_def,
    79       (simpset() delcongs [if_weak_cong]
    81                           par_def,starts_of_def,trans_of_def,filter_oseq_def]
    80 		 addsimps [executions_def,is_execution_fragment_def,
    82                 addsplits [option.split]) 1);
    81 			   par_def,starts_of_def,trans_of_def,filter_oseq_def]
       
    82                  addsplits [option.split]) 1);
    83 qed"comp1_reachable";
    83 qed"comp1_reachable";
    84 
    84 
    85 
    85 
    86 (* Exact copy of proof of comp1_reachable for the second 
    86 (* Exact copy of proof of comp1_reachable for the second 
    87    component of a parallel composition.     *)
    87    component of a parallel composition.     *)
    91 by (res_inst_tac [("x",
    91 by (res_inst_tac [("x",
    92    "(filter_oseq (%a. a:actions(asig_of(C2)))\
    92    "(filter_oseq (%a. a:actions(asig_of(C2)))\
    93 \                (fst ex),                                                \
    93 \                (fst ex),                                                \
    94 \    %i. snd (snd ex i))")]  bexI 1);
    94 \    %i. snd (snd ex i))")]  bexI 1);
    95 (* fst(s) is in projected execution *)
    95 (* fst(s) is in projected execution *)
    96  by (Simp_tac 1);
    96  by (Force_tac 1);
    97  by (fast_tac (claset() delSWrapper"split_all_tac")1);
       
    98 (* projected execution is indeed an execution *)
    97 (* projected execution is indeed an execution *)
    99 by (asm_full_simp_tac
    98 by (asm_full_simp_tac
   100       (simpset() addsimps [executions_def,is_execution_fragment_def,
    99       (simpset() delcongs [if_weak_cong]
   101                           par_def,starts_of_def,trans_of_def,filter_oseq_def]
   100 		 addsimps [executions_def,is_execution_fragment_def,
   102                 addsplits [option.split]) 1);
   101 			   par_def,starts_of_def,trans_of_def,filter_oseq_def]
       
   102                  addsplits [option.split]) 1);
   103 qed"comp2_reachable";
   103 qed"comp2_reachable";
   104 
   104 
   105 Delsplits [split_if];
   105 Delsplits [split_if]; Delcongs [if_weak_cong];
   106 
   106 
   107 (* Composition of possibility-mappings *)
   107 (* THIS THEOREM IS NEVER USED (lcp)
   108 Goalw [is_weak_pmap_def] "[| is_weak_pmap f C1 A1 & \
   108    Composition of possibility-mappings *)
   109 \               externals(asig_of(A1))=externals(asig_of(C1)) &\
   109 Goalw [is_weak_pmap_def]
   110 \               is_weak_pmap g C2 A2 &  \
   110      "[| is_weak_pmap f C1 A1; \
   111 \               externals(asig_of(A2))=externals(asig_of(C2)) & \
   111 \        externals(asig_of(A1))=externals(asig_of(C1));\
   112 \               compat_ioas C1 C2 & compat_ioas A1 A2  |]     \
   112 \        is_weak_pmap g C2 A2;  \
       
   113 \        externals(asig_of(A2))=externals(asig_of(C2)); \
       
   114 \        compat_ioas C1 C2; compat_ioas A1 A2  |]     \
   113 \  ==> is_weak_pmap (%p.(f(fst(p)),g(snd(p)))) (C1||C2) (A1||A2)";
   115 \  ==> is_weak_pmap (%p.(f(fst(p)),g(snd(p)))) (C1||C2) (A1||A2)";
   114  by (rtac conjI 1);
   116  by (rtac conjI 1);
   115 (* start_states *)
   117 (* start_states *)
   116  by (asm_full_simp_tac (simpset() addsimps [par_def, starts_of_def]) 1);
   118  by (asm_full_simp_tac (simpset() addsimps [par_def, starts_of_def]) 1);
   117 (* transitions *)
   119 (* transitions *)
   118 by (REPEAT (rtac allI 1));
   120 by (REPEAT (rtac allI 1));
   119 by (rtac imp_conj_lemma 1);
   121 by (rtac imp_conj_lemma 1);
   120 by (REPEAT(etac conjE 1));
       
   121 by (simp_tac (simpset() addsimps [externals_of_par_extra]) 1);
   122 by (simp_tac (simpset() addsimps [externals_of_par_extra]) 1);
   122 by (simp_tac (simpset() addsimps [par_def]) 1);
   123 by (simp_tac (simpset() addsimps [par_def]) 1);
   123 by (asm_full_simp_tac (simpset() addsimps [trans_of_def]) 1);
   124 by (asm_full_simp_tac (simpset() addsimps [trans_of_def]) 1);
   124 by (stac split_if 1);
   125 by (stac split_if 1);
   125 by (rtac conjI 1);
   126 by (rtac conjI 1);
   142 by (Asm_full_simp_tac 2);
   143 by (Asm_full_simp_tac 2);
   143 by (Fast_tac 2);
   144 by (Fast_tac 2);
   144 by (simp_tac (simpset() addsimps [conj_disj_distribR] addcongs [conj_cong]
   145 by (simp_tac (simpset() addsimps [conj_disj_distribR] addcongs [conj_cong]
   145                  addsplits [split_if]) 1);
   146                  addsplits [split_if]) 1);
   146 by (REPEAT((resolve_tac [conjI,impI] 1 ORELSE etac conjE 1) THEN
   147 by (REPEAT((resolve_tac [conjI,impI] 1 ORELSE etac conjE 1) THEN
   147         asm_full_simp_tac(simpset() addsimps[comp1_reachable,
   148 	   asm_full_simp_tac(simpset() addsimps[comp1_reachable,
   148                                       comp2_reachable])1));
   149 						comp2_reachable])1));
   149 qed"fxg_is_weak_pmap_of_product_IOA";
   150 qed"fxg_is_weak_pmap_of_product_IOA";
   150 
   151 
   151 
   152 
   152 Goal "[| reachable (rename C g) s |] ==> reachable C s";
   153 Goal "[| reachable (rename C g) s |] ==> reachable C s";
   153 by (asm_full_simp_tac (simpset() addsimps [reachable_def]) 1); 
   154 by (asm_full_simp_tac (simpset() addsimps [reachable_def]) 1); 
   208 by (cut_inst_tac [("C","C"),("g","g"),("s","s")] reachable_rename_ioa 1);
   209 by (cut_inst_tac [("C","C"),("g","g"),("s","s")] reachable_rename_ioa 1);
   209 by Auto_tac;
   210 by Auto_tac;
   210 qed"rename_through_pmap";
   211 qed"rename_through_pmap";
   211 
   212 
   212 Addsplits [split_if];
   213 Addsplits [split_if];
       
   214 Addcongs  [if_weak_cong];