134 ,("Q1","%x.~ P (f x)"), ("x1","s")] |
134 ,("Q1","%x.~ P (f x)"), ("x1","s")] |
135 (take_lemma_less_induct RS mp) 1); |
135 (take_lemma_less_induct RS mp) 1); |
136 by (Fast_tac 3); |
136 by (Fast_tac 3); |
137 by (case_tac "Finite s" 1); |
137 by (case_tac "Finite s" 1); |
138 by (asm_full_simp_tac (!simpset addsimps [Cut_nil]) 1); |
138 by (asm_full_simp_tac (!simpset addsimps [Cut_nil]) 1); |
139 br (Cut_nil RS sym) 1; |
139 by (rtac (Cut_nil RS sym) 1); |
140 by (asm_full_simp_tac (!simpset addsimps [ForallMap,o_def]) 1); |
140 by (asm_full_simp_tac (!simpset addsimps [ForallMap,o_def]) 1); |
141 by (asm_full_simp_tac (!simpset addsimps [Map2Finite]) 1); |
141 by (asm_full_simp_tac (!simpset addsimps [Map2Finite]) 1); |
142 (* csae ~ Finite s *) |
142 (* csae ~ Finite s *) |
143 by (asm_full_simp_tac (!simpset addsimps [Cut_UU]) 1); |
143 by (asm_full_simp_tac (!simpset addsimps [Cut_UU]) 1); |
144 br (Cut_UU RS sym) 1; |
144 by (rtac (Cut_UU RS sym) 1); |
145 by (asm_full_simp_tac (!simpset addsimps [ForallMap,o_def]) 1); |
145 by (asm_full_simp_tac (!simpset addsimps [ForallMap,o_def]) 1); |
146 by (asm_full_simp_tac (!simpset addsimps [Map2Finite]) 1); |
146 by (asm_full_simp_tac (!simpset addsimps [Map2Finite]) 1); |
147 (* main case *) |
147 (* main case *) |
148 by (asm_full_simp_tac (!simpset addsimps [Cut_Cons,MapConc, |
148 by (asm_full_simp_tac (!simpset addsimps [Cut_Cons,MapConc, |
149 ForallMap,FiniteMap1,o_def]) 1); |
149 ForallMap,FiniteMap1,o_def]) 1); |
150 br take_reduction 1; |
150 by (rtac take_reduction 1); |
151 auto(); |
151 by (Auto_tac()); |
152 qed"MapCut"; |
152 qed"MapCut"; |
153 |
153 |
154 |
154 |
155 goal thy "~Finite s --> Cut P s << s"; |
155 goal thy "~Finite s --> Cut P s << s"; |
156 by (strip_tac 1); |
156 by (strip_tac 1); |
157 br (take_lemma_less RS iffD1) 1; |
157 by (rtac (take_lemma_less RS iffD1) 1); |
158 by (strip_tac 1); |
158 by (strip_tac 1); |
159 br mp 1; |
159 by (rtac mp 1); |
160 ba 2; |
160 by (assume_tac 2); |
161 by (thin_tac' 1 1); |
161 by (thin_tac' 1 1); |
162 by (res_inst_tac [("x","s")] spec 1); |
162 by (res_inst_tac [("x","s")] spec 1); |
163 br less_induct 1; |
163 by (rtac less_induct 1); |
164 by (strip_tac 1); |
164 by (strip_tac 1); |
165 ren "na n s" 1; |
165 ren "na n s" 1; |
166 by (case_tac "Forall (%x. ~ P x) s" 1); |
166 by (case_tac "Forall (%x. ~ P x) s" 1); |
167 br (take_lemma_less RS iffD2 RS spec) 1; |
167 by (rtac (take_lemma_less RS iffD2 RS spec) 1); |
168 by (asm_full_simp_tac (!simpset addsimps [Cut_UU]) 1); |
168 by (asm_full_simp_tac (!simpset addsimps [Cut_UU]) 1); |
169 (* main case *) |
169 (* main case *) |
170 bd divide_Seq3 1; |
170 by (dtac divide_Seq3 1); |
171 by (REPEAT (etac exE 1)); |
171 by (REPEAT (etac exE 1)); |
172 by (REPEAT (etac conjE 1)); |
172 by (REPEAT (etac conjE 1)); |
173 by (hyp_subst_tac 1); |
173 by (hyp_subst_tac 1); |
174 by (asm_full_simp_tac (!simpset addsimps [Cut_Cons]) 1); |
174 by (asm_full_simp_tac (!simpset addsimps [Cut_Cons]) 1); |
175 br take_reduction_less 1; |
175 by (rtac take_reduction_less 1); |
176 (* auto makes also reasoning about Finiteness of parts of s ! *) |
176 (* auto makes also reasoning about Finiteness of parts of s ! *) |
177 auto(); |
177 by (Auto_tac()); |
178 qed_spec_mp"Cut_prefixcl_nFinite"; |
178 qed_spec_mp"Cut_prefixcl_nFinite"; |
179 |
179 |
180 |
180 |
181 |
181 |
182 (* |
182 (* |
183 |
183 |
184 goal thy "Finite s --> (? y. s = Cut P s @@ y)"; |
184 goal thy "Finite s --> (? y. s = Cut P s @@ y)"; |
185 by (strip_tac 1); |
185 by (strip_tac 1); |
186 by (rtac exI 1); |
186 by (rtac exI 1); |
187 br seq.take_lemma 1; |
187 by (rtac seq.take_lemma 1); |
188 br mp 1; |
188 by (rtac mp 1); |
189 ba 2; |
189 by (assume_tac 2); |
190 by (thin_tac' 1 1); |
190 by (thin_tac' 1 1); |
191 by (res_inst_tac [("x","s")] spec 1); |
191 by (res_inst_tac [("x","s")] spec 1); |
192 br less_induct 1; |
192 by (rtac less_induct 1); |
193 by (strip_tac 1); |
193 by (strip_tac 1); |
194 ren "na n s" 1; |
194 ren "na n s" 1; |
195 by (case_tac "Forall (%x. ~ P x) s" 1); |
195 by (case_tac "Forall (%x. ~ P x) s" 1); |
196 br (seq_take_lemma RS iffD2 RS spec) 1; |
196 by (rtac (seq_take_lemma RS iffD2 RS spec) 1); |
197 by (asm_full_simp_tac (!simpset addsimps [Cut_nil]) 1); |
197 by (asm_full_simp_tac (!simpset addsimps [Cut_nil]) 1); |
198 (* main case *) |
198 (* main case *) |
199 bd divide_Seq3 1; |
199 by (dtac divide_Seq3 1); |
200 by (REPEAT (etac exE 1)); |
200 by (REPEAT (etac exE 1)); |
201 by (REPEAT (etac conjE 1)); |
201 by (REPEAT (etac conjE 1)); |
202 by (hyp_subst_tac 1); |
202 by (hyp_subst_tac 1); |
203 by (asm_full_simp_tac (!simpset addsimps [Cut_Cons,Conc_assoc]) 1); |
203 by (asm_full_simp_tac (!simpset addsimps [Cut_Cons,Conc_assoc]) 1); |
204 br take_reduction 1; |
204 by (rtac take_reduction 1); |
205 |
205 |
206 qed_spec_mp"Cut_prefixcl_Finite"; |
206 qed_spec_mp"Cut_prefixcl_Finite"; |
207 |
207 |
208 *) |
208 *) |
209 |
209 |
210 |
210 |
211 |
211 |
212 goal thy "!!ex .is_exec_frag A (s,ex) ==> is_exec_frag A (s,Cut P ex)"; |
212 goal thy "!!ex .is_exec_frag A (s,ex) ==> is_exec_frag A (s,Cut P ex)"; |
213 by (case_tac "Finite ex" 1); |
213 by (case_tac "Finite ex" 1); |
214 by (cut_inst_tac [("s","ex"),("P","P")] Cut_prefixcl_Finite 1); |
214 by (cut_inst_tac [("s","ex"),("P","P")] Cut_prefixcl_Finite 1); |
215 ba 1; |
215 by (assume_tac 1); |
216 be exE 1; |
216 by (etac exE 1); |
217 br exec_prefix2closed 1; |
217 by (rtac exec_prefix2closed 1); |
218 by (eres_inst_tac [("s","ex"),("t","Cut P ex @@ y")] subst 1); |
218 by (eres_inst_tac [("s","ex"),("t","Cut P ex @@ y")] subst 1); |
219 ba 1; |
219 by (assume_tac 1); |
220 be exec_prefixclosed 1; |
220 by (etac exec_prefixclosed 1); |
221 be Cut_prefixcl_nFinite 1; |
221 by (etac Cut_prefixcl_nFinite 1); |
222 qed"execThruCut"; |
222 qed"execThruCut"; |
223 |
223 |
224 |
224 |
225 |
225 |
226 (* ---------------------------------------------------------------- *) |
226 (* ---------------------------------------------------------------- *) |
249 |
249 |
250 (* Subgoal 2: Lemma: Filter P s = Filter P (Cut P s) *) |
250 (* Subgoal 2: Lemma: Filter P s = Filter P (Cut P s) *) |
251 |
251 |
252 by (simp_tac (!simpset addsimps [filter_act_def]) 1); |
252 by (simp_tac (!simpset addsimps [filter_act_def]) 1); |
253 by (subgoal_tac "Map fst`(Cut (%a.fst a: ext A) y)= Cut (%a.a:ext A) (Map fst`y)" 1); |
253 by (subgoal_tac "Map fst`(Cut (%a.fst a: ext A) y)= Cut (%a.a:ext A) (Map fst`y)" 1); |
254 br (rewrite_rule [o_def] MapCut) 2; |
254 by (rtac (rewrite_rule [o_def] MapCut) 2); |
255 by (asm_full_simp_tac (!simpset addsimps [FilterCut RS sym]) 1); |
255 by (asm_full_simp_tac (!simpset addsimps [FilterCut RS sym]) 1); |
256 |
256 |
257 (* Subgoal 3: Lemma: Cut idempotent *) |
257 (* Subgoal 3: Lemma: Cut idempotent *) |
258 |
258 |
259 by (simp_tac (!simpset addsimps [LastActExtsch_def,filter_act_def]) 1); |
259 by (simp_tac (!simpset addsimps [LastActExtsch_def,filter_act_def]) 1); |
260 by (subgoal_tac "Map fst`(Cut (%a.fst a: ext A) y)= Cut (%a.a:ext A) (Map fst`y)" 1); |
260 by (subgoal_tac "Map fst`(Cut (%a.fst a: ext A) y)= Cut (%a.a:ext A) (Map fst`y)" 1); |
261 br (rewrite_rule [o_def] MapCut) 2; |
261 by (rtac (rewrite_rule [o_def] MapCut) 2); |
262 by (asm_full_simp_tac (!simpset addsimps [Cut_idemp]) 1); |
262 by (asm_full_simp_tac (!simpset addsimps [Cut_idemp]) 1); |
263 qed"exists_LastActExtsch"; |
263 qed"exists_LastActExtsch"; |
264 |
264 |
265 |
265 |
266 (* ---------------------------------------------------------------- *) |
266 (* ---------------------------------------------------------------- *) |