14 |
14 |
15 definition Consq :: "'a \<Rightarrow> 'a Seq \<rightarrow> 'a Seq" |
15 definition Consq :: "'a \<Rightarrow> 'a Seq \<rightarrow> 'a Seq" |
16 where "Consq a = (LAM s. Def a ## s)" |
16 where "Consq a = (LAM s. Def a ## s)" |
17 |
17 |
18 definition Filter :: "('a \<Rightarrow> bool) \<Rightarrow> 'a Seq \<rightarrow> 'a Seq" |
18 definition Filter :: "('a \<Rightarrow> bool) \<Rightarrow> 'a Seq \<rightarrow> 'a Seq" |
19 where "Filter P = sfilter $ (flift2 P)" |
19 where "Filter P = sfilter \<cdot> (flift2 P)" |
20 |
20 |
21 definition Map :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a Seq \<rightarrow> 'b Seq" |
21 definition Map :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a Seq \<rightarrow> 'b Seq" |
22 where "Map f = smap $ (flift2 f)" |
22 where "Map f = smap \<cdot> (flift2 f)" |
23 |
23 |
24 definition Forall :: "('a \<Rightarrow> bool) \<Rightarrow> 'a Seq \<Rightarrow> bool" |
24 definition Forall :: "('a \<Rightarrow> bool) \<Rightarrow> 'a Seq \<Rightarrow> bool" |
25 where "Forall P = sforall (flift2 P)" |
25 where "Forall P = sforall (flift2 P)" |
26 |
26 |
27 definition Last :: "'a Seq \<rightarrow> 'a lift" |
27 definition Last :: "'a Seq \<rightarrow> 'a lift" |
28 where "Last = slast" |
28 where "Last = slast" |
29 |
29 |
30 definition Dropwhile :: "('a \<Rightarrow> bool) \<Rightarrow> 'a Seq \<rightarrow> 'a Seq" |
30 definition Dropwhile :: "('a \<Rightarrow> bool) \<Rightarrow> 'a Seq \<rightarrow> 'a Seq" |
31 where "Dropwhile P = sdropwhile $ (flift2 P)" |
31 where "Dropwhile P = sdropwhile \<cdot> (flift2 P)" |
32 |
32 |
33 definition Takewhile :: "('a \<Rightarrow> bool) \<Rightarrow> 'a Seq \<rightarrow> 'a Seq" |
33 definition Takewhile :: "('a \<Rightarrow> bool) \<Rightarrow> 'a Seq \<rightarrow> 'a Seq" |
34 where "Takewhile P = stakewhile $ (flift2 P)" |
34 where "Takewhile P = stakewhile \<cdot> (flift2 P)" |
35 |
35 |
36 definition Zip :: "'a Seq \<rightarrow> 'b Seq \<rightarrow> ('a * 'b) Seq" |
36 definition Zip :: "'a Seq \<rightarrow> 'b Seq \<rightarrow> ('a * 'b) Seq" |
37 where "Zip = |
37 where "Zip = |
38 (fix $ (LAM h t1 t2. |
38 (fix \<cdot> (LAM h t1 t2. |
39 case t1 of |
39 case t1 of |
40 nil \<Rightarrow> nil |
40 nil \<Rightarrow> nil |
41 | x ## xs \<Rightarrow> |
41 | x ## xs \<Rightarrow> |
42 (case t2 of |
42 (case t2 of |
43 nil \<Rightarrow> UU |
43 nil \<Rightarrow> UU |
85 |
85 |
86 subsection \<open>Recursive equations of operators\<close> |
86 subsection \<open>Recursive equations of operators\<close> |
87 |
87 |
88 subsubsection \<open>Map\<close> |
88 subsubsection \<open>Map\<close> |
89 |
89 |
90 lemma Map_UU: "Map f $ UU = UU" |
90 lemma Map_UU: "Map f \<cdot> UU = UU" |
91 by (simp add: Map_def) |
91 by (simp add: Map_def) |
92 |
92 |
93 lemma Map_nil: "Map f $ nil = nil" |
93 lemma Map_nil: "Map f \<cdot> nil = nil" |
94 by (simp add: Map_def) |
94 by (simp add: Map_def) |
95 |
95 |
96 lemma Map_cons: "Map f $ (x \<leadsto> xs) = (f x) \<leadsto> Map f $ xs" |
96 lemma Map_cons: "Map f \<cdot> (x \<leadsto> xs) = (f x) \<leadsto> Map f \<cdot> xs" |
97 by (simp add: Map_def Consq_def flift2_def) |
97 by (simp add: Map_def Consq_def flift2_def) |
98 |
98 |
99 |
99 |
100 subsubsection \<open>Filter\<close> |
100 subsubsection \<open>Filter\<close> |
101 |
101 |
102 lemma Filter_UU: "Filter P $ UU = UU" |
102 lemma Filter_UU: "Filter P \<cdot> UU = UU" |
103 by (simp add: Filter_def) |
103 by (simp add: Filter_def) |
104 |
104 |
105 lemma Filter_nil: "Filter P $ nil = nil" |
105 lemma Filter_nil: "Filter P \<cdot> nil = nil" |
106 by (simp add: Filter_def) |
106 by (simp add: Filter_def) |
107 |
107 |
108 lemma Filter_cons: "Filter P $ (x \<leadsto> xs) = (if P x then x \<leadsto> (Filter P $ xs) else Filter P $ xs)" |
108 lemma Filter_cons: "Filter P \<cdot> (x \<leadsto> xs) = (if P x then x \<leadsto> (Filter P \<cdot> xs) else Filter P \<cdot> xs)" |
109 by (simp add: Filter_def Consq_def flift2_def If_and_if) |
109 by (simp add: Filter_def Consq_def flift2_def If_and_if) |
110 |
110 |
111 |
111 |
112 subsubsection \<open>Forall\<close> |
112 subsubsection \<open>Forall\<close> |
113 |
113 |
127 by (simp add: Consq_def) |
127 by (simp add: Consq_def) |
128 |
128 |
129 |
129 |
130 subsubsection \<open>Takewhile\<close> |
130 subsubsection \<open>Takewhile\<close> |
131 |
131 |
132 lemma Takewhile_UU: "Takewhile P $ UU = UU" |
132 lemma Takewhile_UU: "Takewhile P \<cdot> UU = UU" |
133 by (simp add: Takewhile_def) |
133 by (simp add: Takewhile_def) |
134 |
134 |
135 lemma Takewhile_nil: "Takewhile P $ nil = nil" |
135 lemma Takewhile_nil: "Takewhile P \<cdot> nil = nil" |
136 by (simp add: Takewhile_def) |
136 by (simp add: Takewhile_def) |
137 |
137 |
138 lemma Takewhile_cons: |
138 lemma Takewhile_cons: |
139 "Takewhile P $ (x \<leadsto> xs) = (if P x then x \<leadsto> (Takewhile P $ xs) else nil)" |
139 "Takewhile P \<cdot> (x \<leadsto> xs) = (if P x then x \<leadsto> (Takewhile P \<cdot> xs) else nil)" |
140 by (simp add: Takewhile_def Consq_def flift2_def If_and_if) |
140 by (simp add: Takewhile_def Consq_def flift2_def If_and_if) |
141 |
141 |
142 |
142 |
143 subsubsection \<open>DropWhile\<close> |
143 subsubsection \<open>DropWhile\<close> |
144 |
144 |
145 lemma Dropwhile_UU: "Dropwhile P $ UU = UU" |
145 lemma Dropwhile_UU: "Dropwhile P \<cdot> UU = UU" |
146 by (simp add: Dropwhile_def) |
146 by (simp add: Dropwhile_def) |
147 |
147 |
148 lemma Dropwhile_nil: "Dropwhile P $ nil = nil" |
148 lemma Dropwhile_nil: "Dropwhile P \<cdot> nil = nil" |
149 by (simp add: Dropwhile_def) |
149 by (simp add: Dropwhile_def) |
150 |
150 |
151 lemma Dropwhile_cons: "Dropwhile P $ (x \<leadsto> xs) = (if P x then Dropwhile P $ xs else x \<leadsto> xs)" |
151 lemma Dropwhile_cons: "Dropwhile P \<cdot> (x \<leadsto> xs) = (if P x then Dropwhile P \<cdot> xs else x \<leadsto> xs)" |
152 by (simp add: Dropwhile_def Consq_def flift2_def If_and_if) |
152 by (simp add: Dropwhile_def Consq_def flift2_def If_and_if) |
153 |
153 |
154 |
154 |
155 subsubsection \<open>Last\<close> |
155 subsubsection \<open>Last\<close> |
156 |
156 |
157 lemma Last_UU: "Last $ UU =UU" |
157 lemma Last_UU: "Last \<cdot> UU = UU" |
158 by (simp add: Last_def) |
158 by (simp add: Last_def) |
159 |
159 |
160 lemma Last_nil: "Last $ nil =UU" |
160 lemma Last_nil: "Last \<cdot> nil = UU" |
161 by (simp add: Last_def) |
161 by (simp add: Last_def) |
162 |
162 |
163 lemma Last_cons: "Last $ (x \<leadsto> xs) = (if xs = nil then Def x else Last $ xs)" |
163 lemma Last_cons: "Last \<cdot> (x \<leadsto> xs) = (if xs = nil then Def x else Last \<cdot> xs)" |
164 by (cases xs) (simp_all add: Last_def Consq_def) |
164 by (cases xs) (simp_all add: Last_def Consq_def) |
165 |
165 |
166 |
166 |
167 subsubsection \<open>Flat\<close> |
167 subsubsection \<open>Flat\<close> |
168 |
168 |
169 lemma Flat_UU: "Flat $ UU = UU" |
169 lemma Flat_UU: "Flat \<cdot> UU = UU" |
170 by (simp add: Flat_def) |
170 by (simp add: Flat_def) |
171 |
171 |
172 lemma Flat_nil: "Flat $ nil = nil" |
172 lemma Flat_nil: "Flat \<cdot> nil = nil" |
173 by (simp add: Flat_def) |
173 by (simp add: Flat_def) |
174 |
174 |
175 lemma Flat_cons: "Flat $ (x ## xs) = x @@ (Flat $ xs)" |
175 lemma Flat_cons: "Flat \<cdot> (x ## xs) = x @@ (Flat \<cdot> xs)" |
176 by (simp add: Flat_def Consq_def) |
176 by (simp add: Flat_def Consq_def) |
177 |
177 |
178 |
178 |
179 subsubsection \<open>Zip\<close> |
179 subsubsection \<open>Zip\<close> |
180 |
180 |
190 (case x of |
190 (case x of |
191 UU \<Rightarrow> UU |
191 UU \<Rightarrow> UU |
192 | Def a \<Rightarrow> |
192 | Def a \<Rightarrow> |
193 (case y of |
193 (case y of |
194 UU \<Rightarrow> UU |
194 UU \<Rightarrow> UU |
195 | Def b \<Rightarrow> Def (a, b) ## (Zip $ xs $ ys)))))" |
195 | Def b \<Rightarrow> Def (a, b) ## (Zip \<cdot> xs \<cdot> ys)))))" |
196 apply (rule trans) |
196 apply (rule trans) |
197 apply (rule fix_eq4) |
197 apply (rule fix_eq4) |
198 apply (rule Zip_def) |
198 apply (rule Zip_def) |
199 apply (rule beta_cfun) |
199 apply (rule beta_cfun) |
200 apply simp |
200 apply simp |
201 done |
201 done |
202 |
202 |
203 lemma Zip_UU1: "Zip $ UU $ y = UU" |
203 lemma Zip_UU1: "Zip \<cdot> UU \<cdot> y = UU" |
204 apply (subst Zip_unfold) |
204 apply (subst Zip_unfold) |
205 apply simp |
205 apply simp |
206 done |
206 done |
207 |
207 |
208 lemma Zip_UU2: "x \<noteq> nil \<Longrightarrow> Zip $ x $ UU = UU" |
208 lemma Zip_UU2: "x \<noteq> nil \<Longrightarrow> Zip \<cdot> x \<cdot> UU = UU" |
209 apply (subst Zip_unfold) |
209 apply (subst Zip_unfold) |
210 apply simp |
210 apply simp |
211 apply (cases x) |
211 apply (cases x) |
212 apply simp_all |
212 apply simp_all |
213 done |
213 done |
214 |
214 |
215 lemma Zip_nil: "Zip $ nil $ y = nil" |
215 lemma Zip_nil: "Zip \<cdot> nil \<cdot> y = nil" |
216 apply (subst Zip_unfold) |
216 apply (subst Zip_unfold) |
217 apply simp |
217 apply simp |
218 done |
218 done |
219 |
219 |
220 lemma Zip_cons_nil: "Zip $ (x \<leadsto> xs) $ nil = UU" |
220 lemma Zip_cons_nil: "Zip \<cdot> (x \<leadsto> xs) \<cdot> nil = UU" |
221 apply (subst Zip_unfold) |
221 apply (subst Zip_unfold) |
222 apply (simp add: Consq_def) |
222 apply (simp add: Consq_def) |
223 done |
223 done |
224 |
224 |
225 lemma Zip_cons: "Zip $ (x \<leadsto> xs) $ (y \<leadsto> ys) = (x, y) \<leadsto> Zip $ xs $ ys" |
225 lemma Zip_cons: "Zip \<cdot> (x \<leadsto> xs) \<cdot> (y \<leadsto> ys) = (x, y) \<leadsto> Zip \<cdot> xs \<cdot> ys" |
226 apply (rule trans) |
226 apply (rule trans) |
227 apply (subst Zip_unfold) |
227 apply (subst Zip_unfold) |
228 apply simp |
228 apply simp |
229 apply (simp add: Consq_def) |
229 apply (simp add: Consq_def) |
230 done |
230 done |
443 done |
443 done |
444 |
444 |
445 |
445 |
446 subsection \<open>Last\<close> |
446 subsection \<open>Last\<close> |
447 |
447 |
448 lemma Finite_Last1: "Finite s \<Longrightarrow> s \<noteq> nil \<longrightarrow> Last $ s \<noteq> UU" |
448 lemma Finite_Last1: "Finite s \<Longrightarrow> s \<noteq> nil \<longrightarrow> Last \<cdot> s \<noteq> UU" |
449 by (erule Seq_Finite_ind) simp_all |
449 by (erule Seq_Finite_ind) simp_all |
450 |
450 |
451 lemma Finite_Last2: "Finite s \<Longrightarrow> Last $ s = UU \<longrightarrow> s = nil" |
451 lemma Finite_Last2: "Finite s \<Longrightarrow> Last \<cdot> s = UU \<longrightarrow> s = nil" |
452 by (erule Seq_Finite_ind) auto |
452 by (erule Seq_Finite_ind) auto |
453 |
453 |
454 |
454 |
455 subsection \<open>Filter, Conc\<close> |
455 subsection \<open>Filter, Conc\<close> |
456 |
456 |
457 lemma FilterPQ: "Filter P $ (Filter Q $ s) = Filter (\<lambda>x. P x \<and> Q x) $ s" |
457 lemma FilterPQ: "Filter P \<cdot> (Filter Q \<cdot> s) = Filter (\<lambda>x. P x \<and> Q x) \<cdot> s" |
458 by (rule_tac x="s" in Seq_induct) simp_all |
458 by (rule_tac x="s" in Seq_induct) simp_all |
459 |
459 |
460 lemma FilterConc: "Filter P $ (x @@ y) = (Filter P $ x @@ Filter P $ y)" |
460 lemma FilterConc: "Filter P \<cdot> (x @@ y) = (Filter P \<cdot> x @@ Filter P \<cdot> y)" |
461 by (simp add: Filter_def sfiltersconc) |
461 by (simp add: Filter_def sfiltersconc) |
462 |
462 |
463 |
463 |
464 subsection \<open>Map\<close> |
464 subsection \<open>Map\<close> |
465 |
465 |
466 lemma MapMap: "Map f $ (Map g $ s) = Map (f \<circ> g) $ s" |
466 lemma MapMap: "Map f \<cdot> (Map g \<cdot> s) = Map (f \<circ> g) \<cdot> s" |
467 by (rule_tac x="s" in Seq_induct) simp_all |
467 by (rule_tac x="s" in Seq_induct) simp_all |
468 |
468 |
469 lemma MapConc: "Map f $ (x @@ y) = (Map f $ x) @@ (Map f $ y)" |
469 lemma MapConc: "Map f \<cdot> (x @@ y) = (Map f \<cdot> x) @@ (Map f \<cdot> y)" |
470 by (rule_tac x="x" in Seq_induct) simp_all |
470 by (rule_tac x="x" in Seq_induct) simp_all |
471 |
471 |
472 lemma MapFilter: "Filter P $ (Map f $ x) = Map f $ (Filter (P \<circ> f) $ x)" |
472 lemma MapFilter: "Filter P \<cdot> (Map f \<cdot> x) = Map f \<cdot> (Filter (P \<circ> f) \<cdot> x)" |
473 by (rule_tac x="x" in Seq_induct) simp_all |
473 by (rule_tac x="x" in Seq_induct) simp_all |
474 |
474 |
475 lemma nilMap: "nil = (Map f $ s) \<longrightarrow> s = nil" |
475 lemma nilMap: "nil = (Map f \<cdot> s) \<longrightarrow> s = nil" |
476 by (rule_tac x="s" in Seq_cases) simp_all |
476 by (rule_tac x="s" in Seq_cases) simp_all |
477 |
477 |
478 lemma ForallMap: "Forall P (Map f $ s) = Forall (P \<circ> f) s" |
478 lemma ForallMap: "Forall P (Map f \<cdot> s) = Forall (P \<circ> f) s" |
479 apply (rule_tac x="s" in Seq_induct) |
479 apply (rule_tac x="s" in Seq_induct) |
480 apply (simp add: Forall_def sforall_def) |
480 apply (simp add: Forall_def sforall_def) |
481 apply simp_all |
481 apply simp_all |
482 done |
482 done |
483 |
483 |
535 lemma Forall_postfixclosed: "Finite h \<Longrightarrow> Forall P s \<Longrightarrow> s= h @@ t \<Longrightarrow> Forall P t" |
535 lemma Forall_postfixclosed: "Finite h \<Longrightarrow> Forall P s \<Longrightarrow> s= h @@ t \<Longrightarrow> Forall P t" |
536 by auto |
536 by auto |
537 |
537 |
538 |
538 |
539 lemma ForallPFilterQR1: |
539 lemma ForallPFilterQR1: |
540 "(\<forall>x. P x \<longrightarrow> Q x = R x) \<and> Forall P tr \<longrightarrow> Filter Q $ tr = Filter R $ tr" |
540 "(\<forall>x. P x \<longrightarrow> Q x = R x) \<and> Forall P tr \<longrightarrow> Filter Q \<cdot> tr = Filter R \<cdot> tr" |
541 apply (rule_tac x="tr" in Seq_induct) |
541 apply (rule_tac x="tr" in Seq_induct) |
542 apply (simp add: Forall_def sforall_def) |
542 apply (simp add: Forall_def sforall_def) |
543 apply simp_all |
543 apply simp_all |
544 done |
544 done |
545 |
545 |
546 lemmas ForallPFilterQR = ForallPFilterQR1 [THEN mp, OF conjI, OF allI] |
546 lemmas ForallPFilterQR = ForallPFilterQR1 [THEN mp, OF conjI, OF allI] |
547 |
547 |
548 |
548 |
549 subsection \<open>Forall, Filter\<close> |
549 subsection \<open>Forall, Filter\<close> |
550 |
550 |
551 lemma ForallPFilterP: "Forall P (Filter P $ x)" |
551 lemma ForallPFilterP: "Forall P (Filter P \<cdot> x)" |
552 by (simp add: Filter_def Forall_def forallPsfilterP) |
552 by (simp add: Filter_def Forall_def forallPsfilterP) |
553 |
553 |
554 (*holds also in other direction, then equal to forallPfilterP*) |
554 (*holds also in other direction, then equal to forallPfilterP*) |
555 lemma ForallPFilterPid1: "Forall P x \<longrightarrow> Filter P $ x = x" |
555 lemma ForallPFilterPid1: "Forall P x \<longrightarrow> Filter P \<cdot> x = x" |
556 apply (rule_tac x="x" in Seq_induct) |
556 apply (rule_tac x="x" in Seq_induct) |
557 apply (simp add: Forall_def sforall_def Filter_def) |
557 apply (simp add: Forall_def sforall_def Filter_def) |
558 apply simp_all |
558 apply simp_all |
559 done |
559 done |
560 |
560 |
561 lemmas ForallPFilterPid = ForallPFilterPid1 [THEN mp] |
561 lemmas ForallPFilterPid = ForallPFilterPid1 [THEN mp] |
562 |
562 |
563 (*holds also in other direction*) |
563 (*holds also in other direction*) |
564 lemma ForallnPFilterPnil1: "Finite ys \<Longrightarrow> Forall (\<lambda>x. \<not> P x) ys \<longrightarrow> Filter P $ ys = nil" |
564 lemma ForallnPFilterPnil1: "Finite ys \<Longrightarrow> Forall (\<lambda>x. \<not> P x) ys \<longrightarrow> Filter P \<cdot> ys = nil" |
565 by (erule Seq_Finite_ind) simp_all |
565 by (erule Seq_Finite_ind) simp_all |
566 |
566 |
567 lemmas ForallnPFilterPnil = ForallnPFilterPnil1 [THEN mp] |
567 lemmas ForallnPFilterPnil = ForallnPFilterPnil1 [THEN mp] |
568 |
568 |
569 |
569 |
570 (*holds also in other direction*) |
570 (*holds also in other direction*) |
571 lemma ForallnPFilterPUU1: "\<not> Finite ys \<and> Forall (\<lambda>x. \<not> P x) ys \<longrightarrow> Filter P $ ys = UU" |
571 lemma ForallnPFilterPUU1: "\<not> Finite ys \<and> Forall (\<lambda>x. \<not> P x) ys \<longrightarrow> Filter P \<cdot> ys = UU" |
572 apply (rule_tac x="ys" in Seq_induct) |
572 apply (rule_tac x="ys" in Seq_induct) |
573 apply (simp add: Forall_def sforall_def) |
573 apply (simp add: Forall_def sforall_def) |
574 apply simp_all |
574 apply simp_all |
575 done |
575 done |
576 |
576 |
577 lemmas ForallnPFilterPUU = ForallnPFilterPUU1 [THEN mp, OF conjI] |
577 lemmas ForallnPFilterPUU = ForallnPFilterPUU1 [THEN mp, OF conjI] |
578 |
578 |
579 |
579 |
580 (*inverse of ForallnPFilterPnil*) |
580 (*inverse of ForallnPFilterPnil*) |
581 lemma FilternPnilForallP [rule_format]: "Filter P $ ys = nil \<longrightarrow> Forall (\<lambda>x. \<not> P x) ys \<and> Finite ys" |
581 lemma FilternPnilForallP [rule_format]: "Filter P \<cdot> ys = nil \<longrightarrow> Forall (\<lambda>x. \<not> P x) ys \<and> Finite ys" |
582 apply (rule_tac x="ys" in Seq_induct) |
582 apply (rule_tac x="ys" in Seq_induct) |
583 text \<open>adm\<close> |
583 text \<open>adm\<close> |
584 apply (simp add: Forall_def sforall_def) |
584 apply (simp add: Forall_def sforall_def) |
585 text \<open>base cases\<close> |
585 text \<open>base cases\<close> |
586 apply simp |
586 apply simp |
589 apply simp |
589 apply simp |
590 done |
590 done |
591 |
591 |
592 (*inverse of ForallnPFilterPUU*) |
592 (*inverse of ForallnPFilterPUU*) |
593 lemma FilternPUUForallP: |
593 lemma FilternPUUForallP: |
594 assumes "Filter P $ ys = UU" |
594 assumes "Filter P \<cdot> ys = UU" |
595 shows "Forall (\<lambda>x. \<not> P x) ys \<and> \<not> Finite ys" |
595 shows "Forall (\<lambda>x. \<not> P x) ys \<and> \<not> Finite ys" |
596 proof |
596 proof |
597 show "Forall (\<lambda>x. \<not> P x) ys" |
597 show "Forall (\<lambda>x. \<not> P x) ys" |
598 proof (rule classical) |
598 proof (rule classical) |
599 assume "\<not> ?thesis" |
599 assume "\<not> ?thesis" |
600 then have "Filter P $ ys \<noteq> UU" |
600 then have "Filter P \<cdot> ys \<noteq> UU" |
601 apply (rule rev_mp) |
601 apply (rule rev_mp) |
602 apply (induct ys rule: Seq_induct) |
602 apply (induct ys rule: Seq_induct) |
603 apply (simp add: Forall_def sforall_def) |
603 apply (simp add: Forall_def sforall_def) |
604 apply simp_all |
604 apply simp_all |
605 done |
605 done |
606 with assms show ?thesis by contradiction |
606 with assms show ?thesis by contradiction |
607 qed |
607 qed |
608 show "\<not> Finite ys" |
608 show "\<not> Finite ys" |
609 proof |
609 proof |
610 assume "Finite ys" |
610 assume "Finite ys" |
611 then have "Filter P$ys \<noteq> UU" |
611 then have "Filter P\<cdot>ys \<noteq> UU" |
612 by (rule Seq_Finite_ind) simp_all |
612 by (rule Seq_Finite_ind) simp_all |
613 with assms show False by contradiction |
613 with assms show False by contradiction |
614 qed |
614 qed |
615 qed |
615 qed |
616 |
616 |
617 |
617 |
618 lemma ForallQFilterPnil: |
618 lemma ForallQFilterPnil: |
619 "Forall Q ys \<Longrightarrow> Finite ys \<Longrightarrow> (\<And>x. Q x \<Longrightarrow> \<not> P x) \<Longrightarrow> Filter P $ ys = nil" |
619 "Forall Q ys \<Longrightarrow> Finite ys \<Longrightarrow> (\<And>x. Q x \<Longrightarrow> \<not> P x) \<Longrightarrow> Filter P \<cdot> ys = nil" |
620 apply (erule ForallnPFilterPnil) |
620 apply (erule ForallnPFilterPnil) |
621 apply (erule ForallPForallQ) |
621 apply (erule ForallPForallQ) |
622 apply auto |
622 apply auto |
623 done |
623 done |
624 |
624 |
625 lemma ForallQFilterPUU: "\<not> Finite ys \<Longrightarrow> Forall Q ys \<Longrightarrow> (\<And>x. Q x \<Longrightarrow> \<not> P x) \<Longrightarrow> Filter P $ ys = UU" |
625 lemma ForallQFilterPUU: "\<not> Finite ys \<Longrightarrow> Forall Q ys \<Longrightarrow> (\<And>x. Q x \<Longrightarrow> \<not> P x) \<Longrightarrow> Filter P \<cdot> ys = UU" |
626 apply (erule ForallnPFilterPUU) |
626 apply (erule ForallnPFilterPUU) |
627 apply (erule ForallPForallQ) |
627 apply (erule ForallPForallQ) |
628 apply auto |
628 apply auto |
629 done |
629 done |
630 |
630 |
631 |
631 |
632 subsection \<open>Takewhile, Forall, Filter\<close> |
632 subsection \<open>Takewhile, Forall, Filter\<close> |
633 |
633 |
634 lemma ForallPTakewhileP [simp]: "Forall P (Takewhile P $ x)" |
634 lemma ForallPTakewhileP [simp]: "Forall P (Takewhile P \<cdot> x)" |
635 by (simp add: Forall_def Takewhile_def sforallPstakewhileP) |
635 by (simp add: Forall_def Takewhile_def sforallPstakewhileP) |
636 |
636 |
637 |
637 |
638 lemma ForallPTakewhileQ [simp]: "(\<And>x. Q x \<Longrightarrow> P x) \<Longrightarrow> Forall P (Takewhile Q $ x)" |
638 lemma ForallPTakewhileQ [simp]: "(\<And>x. Q x \<Longrightarrow> P x) \<Longrightarrow> Forall P (Takewhile Q \<cdot> x)" |
639 apply (rule ForallPForallQ) |
639 apply (rule ForallPForallQ) |
640 apply (rule ForallPTakewhileP) |
640 apply (rule ForallPTakewhileP) |
641 apply auto |
641 apply auto |
642 done |
642 done |
643 |
643 |
644 |
644 |
645 lemma FilterPTakewhileQnil [simp]: |
645 lemma FilterPTakewhileQnil [simp]: |
646 "Finite (Takewhile Q $ ys) \<Longrightarrow> (\<And>x. Q x \<Longrightarrow> \<not> P x) \<Longrightarrow> Filter P $ (Takewhile Q $ ys) = nil" |
646 "Finite (Takewhile Q \<cdot> ys) \<Longrightarrow> (\<And>x. Q x \<Longrightarrow> \<not> P x) \<Longrightarrow> Filter P \<cdot> (Takewhile Q \<cdot> ys) = nil" |
647 apply (erule ForallnPFilterPnil) |
647 apply (erule ForallnPFilterPnil) |
648 apply (rule ForallPForallQ) |
648 apply (rule ForallPForallQ) |
649 apply (rule ForallPTakewhileP) |
649 apply (rule ForallPTakewhileP) |
650 apply auto |
650 apply auto |
651 done |
651 done |
652 |
652 |
653 lemma FilterPTakewhileQid [simp]: |
653 lemma FilterPTakewhileQid [simp]: |
654 "(\<And>x. Q x \<Longrightarrow> P x) \<Longrightarrow> Filter P $ (Takewhile Q $ ys) = Takewhile Q $ ys" |
654 "(\<And>x. Q x \<Longrightarrow> P x) \<Longrightarrow> Filter P \<cdot> (Takewhile Q \<cdot> ys) = Takewhile Q \<cdot> ys" |
655 apply (rule ForallPFilterPid) |
655 apply (rule ForallPFilterPid) |
656 apply (rule ForallPForallQ) |
656 apply (rule ForallPForallQ) |
657 apply (rule ForallPTakewhileP) |
657 apply (rule ForallPTakewhileP) |
658 apply auto |
658 apply auto |
659 done |
659 done |
660 |
660 |
661 |
661 |
662 lemma Takewhile_idempotent: "Takewhile P $ (Takewhile P $ s) = Takewhile P $ s" |
662 lemma Takewhile_idempotent: "Takewhile P \<cdot> (Takewhile P \<cdot> s) = Takewhile P \<cdot> s" |
663 apply (rule_tac x="s" in Seq_induct) |
663 apply (rule_tac x="s" in Seq_induct) |
664 apply (simp add: Forall_def sforall_def) |
664 apply (simp add: Forall_def sforall_def) |
665 apply simp_all |
665 apply simp_all |
666 done |
666 done |
667 |
667 |
668 lemma ForallPTakewhileQnP [simp]: |
668 lemma ForallPTakewhileQnP [simp]: |
669 "Forall P s \<longrightarrow> Takewhile (\<lambda>x. Q x \<or> (\<not> P x)) $ s = Takewhile Q $ s" |
669 "Forall P s \<longrightarrow> Takewhile (\<lambda>x. Q x \<or> (\<not> P x)) \<cdot> s = Takewhile Q \<cdot> s" |
670 apply (rule_tac x="s" in Seq_induct) |
670 apply (rule_tac x="s" in Seq_induct) |
671 apply (simp add: Forall_def sforall_def) |
671 apply (simp add: Forall_def sforall_def) |
672 apply simp_all |
672 apply simp_all |
673 done |
673 done |
674 |
674 |
675 lemma ForallPDropwhileQnP [simp]: |
675 lemma ForallPDropwhileQnP [simp]: |
676 "Forall P s \<longrightarrow> Dropwhile (\<lambda>x. Q x \<or> (\<not> P x)) $ s = Dropwhile Q $ s" |
676 "Forall P s \<longrightarrow> Dropwhile (\<lambda>x. Q x \<or> (\<not> P x)) \<cdot> s = Dropwhile Q \<cdot> s" |
677 apply (rule_tac x="s" in Seq_induct) |
677 apply (rule_tac x="s" in Seq_induct) |
678 apply (simp add: Forall_def sforall_def) |
678 apply (simp add: Forall_def sforall_def) |
679 apply simp_all |
679 apply simp_all |
680 done |
680 done |
681 |
681 |
682 |
682 |
683 lemma TakewhileConc1: "Forall P s \<longrightarrow> Takewhile P $ (s @@ t) = s @@ (Takewhile P $ t)" |
683 lemma TakewhileConc1: "Forall P s \<longrightarrow> Takewhile P \<cdot> (s @@ t) = s @@ (Takewhile P \<cdot> t)" |
684 apply (rule_tac x="s" in Seq_induct) |
684 apply (rule_tac x="s" in Seq_induct) |
685 apply (simp add: Forall_def sforall_def) |
685 apply (simp add: Forall_def sforall_def) |
686 apply simp_all |
686 apply simp_all |
687 done |
687 done |
688 |
688 |
689 lemmas TakewhileConc = TakewhileConc1 [THEN mp] |
689 lemmas TakewhileConc = TakewhileConc1 [THEN mp] |
690 |
690 |
691 lemma DropwhileConc1: "Finite s \<Longrightarrow> Forall P s \<longrightarrow> Dropwhile P $ (s @@ t) = Dropwhile P $ t" |
691 lemma DropwhileConc1: "Finite s \<Longrightarrow> Forall P s \<longrightarrow> Dropwhile P \<cdot> (s @@ t) = Dropwhile P \<cdot> t" |
692 by (erule Seq_Finite_ind) simp_all |
692 by (erule Seq_Finite_ind) simp_all |
693 |
693 |
694 lemmas DropwhileConc = DropwhileConc1 [THEN mp] |
694 lemmas DropwhileConc = DropwhileConc1 [THEN mp] |
695 |
695 |
696 |
696 |
697 subsection \<open>Coinductive characterizations of Filter\<close> |
697 subsection \<open>Coinductive characterizations of Filter\<close> |
698 |
698 |
699 lemma divide_Seq_lemma: |
699 lemma divide_Seq_lemma: |
700 "HD $ (Filter P $ y) = Def x \<longrightarrow> |
700 "HD \<cdot> (Filter P \<cdot> y) = Def x \<longrightarrow> |
701 y = (Takewhile (\<lambda>x. \<not> P x) $ y) @@ (x \<leadsto> TL $ (Dropwhile (\<lambda>a. \<not> P a) $ y)) \<and> |
701 y = (Takewhile (\<lambda>x. \<not> P x) \<cdot> y) @@ (x \<leadsto> TL \<cdot> (Dropwhile (\<lambda>a. \<not> P a) \<cdot> y)) \<and> |
702 Finite (Takewhile (\<lambda>x. \<not> P x) $ y) \<and> P x" |
702 Finite (Takewhile (\<lambda>x. \<not> P x) \<cdot> y) \<and> P x" |
703 (* FIX: pay attention: is only admissible with chain-finite package to be added to |
703 (* FIX: pay attention: is only admissible with chain-finite package to be added to |
704 adm test and Finite f x admissibility *) |
704 adm test and Finite f x admissibility *) |
705 apply (rule_tac x="y" in Seq_induct) |
705 apply (rule_tac x="y" in Seq_induct) |
706 apply (simp add: adm_subst [OF _ adm_Finite]) |
706 apply (simp add: adm_subst [OF _ adm_Finite]) |
707 apply simp |
707 apply simp |
711 apply blast |
711 apply blast |
712 text \<open>\<open>\<not> P a\<close>\<close> |
712 text \<open>\<open>\<not> P a\<close>\<close> |
713 apply simp |
713 apply simp |
714 done |
714 done |
715 |
715 |
716 lemma divide_Seq: "(x \<leadsto> xs) \<sqsubseteq> Filter P $ y \<Longrightarrow> |
716 lemma divide_Seq: "(x \<leadsto> xs) \<sqsubseteq> Filter P \<cdot> y \<Longrightarrow> |
717 y = ((Takewhile (\<lambda>a. \<not> P a) $ y) @@ (x \<leadsto> TL $ (Dropwhile (\<lambda>a. \<not> P a) $ y))) \<and> |
717 y = ((Takewhile (\<lambda>a. \<not> P a) \<cdot> y) @@ (x \<leadsto> TL \<cdot> (Dropwhile (\<lambda>a. \<not> P a) \<cdot> y))) \<and> |
718 Finite (Takewhile (\<lambda>a. \<not> P a) $ y) \<and> P x" |
718 Finite (Takewhile (\<lambda>a. \<not> P a) \<cdot> y) \<and> P x" |
719 apply (rule divide_Seq_lemma [THEN mp]) |
719 apply (rule divide_Seq_lemma [THEN mp]) |
720 apply (drule_tac f="HD" and x="x \<leadsto> xs" in monofun_cfun_arg) |
720 apply (drule_tac f="HD" and x="x \<leadsto> xs" in monofun_cfun_arg) |
721 apply simp |
721 apply simp |
722 done |
722 done |
723 |
723 |
724 |
724 |
725 lemma nForall_HDFilter: "\<not> Forall P y \<longrightarrow> (\<exists>x. HD $ (Filter (\<lambda>a. \<not> P a) $ y) = Def x)" |
725 lemma nForall_HDFilter: "\<not> Forall P y \<longrightarrow> (\<exists>x. HD \<cdot> (Filter (\<lambda>a. \<not> P a) \<cdot> y) = Def x)" |
726 unfolding not_Undef_is_Def [symmetric] |
726 unfolding not_Undef_is_Def [symmetric] |
727 apply (induct y rule: Seq_induct) |
727 apply (induct y rule: Seq_induct) |
728 apply (simp add: Forall_def sforall_def) |
728 apply (simp add: Forall_def sforall_def) |
729 apply simp_all |
729 apply simp_all |
730 done |
730 done |
731 |
731 |
732 |
732 |
733 lemma divide_Seq2: |
733 lemma divide_Seq2: |
734 "\<not> Forall P y \<Longrightarrow> |
734 "\<not> Forall P y \<Longrightarrow> |
735 \<exists>x. y = Takewhile P$y @@ (x \<leadsto> TL $ (Dropwhile P $ y)) \<and> Finite (Takewhile P $ y) \<and> \<not> P x" |
735 \<exists>x. y = Takewhile P\<cdot>y @@ (x \<leadsto> TL \<cdot> (Dropwhile P \<cdot> y)) \<and> Finite (Takewhile P \<cdot> y) \<and> \<not> P x" |
736 apply (drule nForall_HDFilter [THEN mp]) |
736 apply (drule nForall_HDFilter [THEN mp]) |
737 apply safe |
737 apply safe |
738 apply (rule_tac x="x" in exI) |
738 apply (rule_tac x="x" in exI) |
739 apply (cut_tac P1="\<lambda>x. \<not> P x" in divide_Seq_lemma [THEN mp]) |
739 apply (cut_tac P1="\<lambda>x. \<not> P x" in divide_Seq_lemma [THEN mp]) |
740 apply auto |
740 apply auto |
750 lemmas [simp] = FilterPQ FilterConc Conc_cong |
750 lemmas [simp] = FilterPQ FilterConc Conc_cong |
751 |
751 |
752 |
752 |
753 subsection \<open>Take-lemma\<close> |
753 subsection \<open>Take-lemma\<close> |
754 |
754 |
755 lemma seq_take_lemma: "(\<forall>n. seq_take n $ x = seq_take n $ x') \<longleftrightarrow> x = x'" |
755 lemma seq_take_lemma: "(\<forall>n. seq_take n \<cdot> x = seq_take n \<cdot> x') \<longleftrightarrow> x = x'" |
756 apply (rule iffI) |
756 apply (rule iffI) |
757 apply (rule seq.take_lemma) |
757 apply (rule seq.take_lemma) |
758 apply auto |
758 apply auto |
759 done |
759 done |
760 |
760 |
761 lemma take_reduction1: |
761 lemma take_reduction1: |
762 "\<forall>n. ((\<forall>k. k < n \<longrightarrow> seq_take k $ y1 = seq_take k $ y2) \<longrightarrow> |
762 "\<forall>n. ((\<forall>k. k < n \<longrightarrow> seq_take k \<cdot> y1 = seq_take k \<cdot> y2) \<longrightarrow> |
763 seq_take n $ (x @@ (t \<leadsto> y1)) = seq_take n $ (x @@ (t \<leadsto> y2)))" |
763 seq_take n \<cdot> (x @@ (t \<leadsto> y1)) = seq_take n \<cdot> (x @@ (t \<leadsto> y2)))" |
764 apply (rule_tac x="x" in Seq_induct) |
764 apply (rule_tac x="x" in Seq_induct) |
765 apply simp_all |
765 apply simp_all |
766 apply (intro strip) |
766 apply (intro strip) |
767 apply (case_tac "n") |
767 apply (case_tac "n") |
768 apply auto |
768 apply auto |
769 apply (case_tac "n") |
769 apply (case_tac "n") |
770 apply auto |
770 apply auto |
771 done |
771 done |
772 |
772 |
773 lemma take_reduction: |
773 lemma take_reduction: |
774 "x = y \<Longrightarrow> s = t \<Longrightarrow> (\<And>k. k < n \<Longrightarrow> seq_take k $ y1 = seq_take k $ y2) |
774 "x = y \<Longrightarrow> s = t \<Longrightarrow> (\<And>k. k < n \<Longrightarrow> seq_take k \<cdot> y1 = seq_take k \<cdot> y2) |
775 \<Longrightarrow> seq_take n $ (x @@ (s \<leadsto> y1)) = seq_take n $ (y @@ (t \<leadsto> y2))" |
775 \<Longrightarrow> seq_take n \<cdot> (x @@ (s \<leadsto> y1)) = seq_take n \<cdot> (y @@ (t \<leadsto> y2))" |
776 by (auto intro!: take_reduction1 [rule_format]) |
776 by (auto intro!: take_reduction1 [rule_format]) |
777 |
777 |
778 |
778 |
779 text \<open> |
779 text \<open> |
780 Take-lemma and take-reduction for \<open>\<sqsubseteq>\<close> instead of \<open>=\<close>. |
780 Take-lemma and take-reduction for \<open>\<sqsubseteq>\<close> instead of \<open>=\<close>. |
781 \<close> |
781 \<close> |
782 |
782 |
783 lemma take_reduction_less1: |
783 lemma take_reduction_less1: |
784 "\<forall>n. ((\<forall>k. k < n \<longrightarrow> seq_take k $ y1 \<sqsubseteq> seq_take k$y2) \<longrightarrow> |
784 "\<forall>n. ((\<forall>k. k < n \<longrightarrow> seq_take k \<cdot> y1 \<sqsubseteq> seq_take k\<cdot>y2) \<longrightarrow> |
785 seq_take n $ (x @@ (t \<leadsto> y1)) \<sqsubseteq> seq_take n $ (x @@ (t \<leadsto> y2)))" |
785 seq_take n \<cdot> (x @@ (t \<leadsto> y1)) \<sqsubseteq> seq_take n \<cdot> (x @@ (t \<leadsto> y2)))" |
786 apply (rule_tac x="x" in Seq_induct) |
786 apply (rule_tac x="x" in Seq_induct) |
787 apply simp_all |
787 apply simp_all |
788 apply (intro strip) |
788 apply (intro strip) |
789 apply (case_tac "n") |
789 apply (case_tac "n") |
790 apply auto |
790 apply auto |
791 apply (case_tac "n") |
791 apply (case_tac "n") |
792 apply auto |
792 apply auto |
793 done |
793 done |
794 |
794 |
795 lemma take_reduction_less: |
795 lemma take_reduction_less: |
796 "x = y \<Longrightarrow> s = t \<Longrightarrow> (\<And>k. k < n \<Longrightarrow> seq_take k $ y1 \<sqsubseteq> seq_take k $ y2) \<Longrightarrow> |
796 "x = y \<Longrightarrow> s = t \<Longrightarrow> (\<And>k. k < n \<Longrightarrow> seq_take k \<cdot> y1 \<sqsubseteq> seq_take k \<cdot> y2) \<Longrightarrow> |
797 seq_take n $ (x @@ (s \<leadsto> y1)) \<sqsubseteq> seq_take n $ (y @@ (t \<leadsto> y2))" |
797 seq_take n \<cdot> (x @@ (s \<leadsto> y1)) \<sqsubseteq> seq_take n \<cdot> (y @@ (t \<leadsto> y2))" |
798 by (auto intro!: take_reduction_less1 [rule_format]) |
798 by (auto intro!: take_reduction_less1 [rule_format]) |
799 |
799 |
800 lemma take_lemma_less1: |
800 lemma take_lemma_less1: |
801 assumes "\<And>n. seq_take n $ s1 \<sqsubseteq> seq_take n $ s2" |
801 assumes "\<And>n. seq_take n \<cdot> s1 \<sqsubseteq> seq_take n \<cdot> s2" |
802 shows "s1 \<sqsubseteq> s2" |
802 shows "s1 \<sqsubseteq> s2" |
803 apply (rule_tac t="s1" in seq.reach [THEN subst]) |
803 apply (rule_tac t="s1" in seq.reach [THEN subst]) |
804 apply (rule_tac t="s2" in seq.reach [THEN subst]) |
804 apply (rule_tac t="s2" in seq.reach [THEN subst]) |
805 apply (rule lub_mono) |
805 apply (rule lub_mono) |
806 apply (rule seq.chain_take [THEN ch2ch_Rep_cfunL]) |
806 apply (rule seq.chain_take [THEN ch2ch_Rep_cfunL]) |
807 apply (rule seq.chain_take [THEN ch2ch_Rep_cfunL]) |
807 apply (rule seq.chain_take [THEN ch2ch_Rep_cfunL]) |
808 apply (rule assms) |
808 apply (rule assms) |
809 done |
809 done |
810 |
810 |
811 lemma take_lemma_less: "(\<forall>n. seq_take n $ x \<sqsubseteq> seq_take n $ x') \<longleftrightarrow> x \<sqsubseteq> x'" |
811 lemma take_lemma_less: "(\<forall>n. seq_take n \<cdot> x \<sqsubseteq> seq_take n \<cdot> x') \<longleftrightarrow> x \<sqsubseteq> x'" |
812 apply (rule iffI) |
812 apply (rule iffI) |
813 apply (rule take_lemma_less1) |
813 apply (rule take_lemma_less1) |
814 apply auto |
814 apply auto |
815 apply (erule monofun_cfun_arg) |
815 apply (erule monofun_cfun_arg) |
816 done |
816 done |
926 |
926 |
927 (*In general: How to do this case without the same adm problems |
927 (*In general: How to do this case without the same adm problems |
928 as for the entire proof?*) |
928 as for the entire proof?*) |
929 lemma Filter_lemma1: |
929 lemma Filter_lemma1: |
930 "Forall (\<lambda>x. \<not> (P x \<and> Q x)) s \<longrightarrow> |
930 "Forall (\<lambda>x. \<not> (P x \<and> Q x)) s \<longrightarrow> |
931 Filter P $ (Filter Q $ s) = Filter (\<lambda>x. P x \<and> Q x) $ s" |
931 Filter P \<cdot> (Filter Q \<cdot> s) = Filter (\<lambda>x. P x \<and> Q x) \<cdot> s" |
932 apply (rule_tac x="s" in Seq_induct) |
932 apply (rule_tac x="s" in Seq_induct) |
933 apply (simp add: Forall_def sforall_def) |
933 apply (simp add: Forall_def sforall_def) |
934 apply simp_all |
934 apply simp_all |
935 done |
935 done |
936 |
936 |
937 lemma Filter_lemma2: "Finite s \<Longrightarrow> |
937 lemma Filter_lemma2: "Finite s \<Longrightarrow> |
938 Forall (\<lambda>x. \<not> P x \<or> \<not> Q x) s \<longrightarrow> Filter P $ (Filter Q $ s) = nil" |
938 Forall (\<lambda>x. \<not> P x \<or> \<not> Q x) s \<longrightarrow> Filter P \<cdot> (Filter Q \<cdot> s) = nil" |
939 by (erule Seq_Finite_ind) simp_all |
939 by (erule Seq_Finite_ind) simp_all |
940 |
940 |
941 lemma Filter_lemma3: "Finite s \<Longrightarrow> |
941 lemma Filter_lemma3: "Finite s \<Longrightarrow> |
942 Forall (\<lambda>x. \<not> P x \<or> \<not> Q x) s \<longrightarrow> Filter (\<lambda>x. P x \<and> Q x) $ s = nil" |
942 Forall (\<lambda>x. \<not> P x \<or> \<not> Q x) s \<longrightarrow> Filter (\<lambda>x. P x \<and> Q x) \<cdot> s = nil" |
943 by (erule Seq_Finite_ind) simp_all |
943 by (erule Seq_Finite_ind) simp_all |
944 |
944 |
945 lemma FilterPQ_takelemma: "Filter P $ (Filter Q $ s) = Filter (\<lambda>x. P x \<and> Q x) $ s" |
945 lemma FilterPQ_takelemma: "Filter P \<cdot> (Filter Q \<cdot> s) = Filter (\<lambda>x. P x \<and> Q x) \<cdot> s" |
946 apply (rule_tac A1="\<lambda>x. True" and Q1="\<lambda>x. \<not> (P x \<and> Q x)" and x1="s" in |
946 apply (rule_tac A1="\<lambda>x. True" and Q1="\<lambda>x. \<not> (P x \<and> Q x)" and x1="s" in |
947 take_lemma_induct [THEN mp]) |
947 take_lemma_induct [THEN mp]) |
948 (*better support for A = \<lambda>x. True*) |
948 (*better support for A = \<lambda>x. True*) |
949 apply (simp add: Filter_lemma1) |
949 apply (simp add: Filter_lemma1) |
950 apply (simp add: Filter_lemma2 Filter_lemma3) |
950 apply (simp add: Filter_lemma2 Filter_lemma3) |