equal
deleted
inserted
replaced
261 |
261 |
262 lemmas (in ACeD) AC = assoc commute left_commute |
262 lemmas (in ACeD) AC = assoc commute left_commute |
263 |
263 |
264 lemma (in ACeD) left_ident [simp]: "x \<in> D ==> e \<cdot> x = x" |
264 lemma (in ACeD) left_ident [simp]: "x \<in> D ==> e \<cdot> x = x" |
265 proof - |
265 proof - |
266 assume D: "x \<in> D" |
266 assume "x \<in> D" |
267 have "x \<cdot> e = x" by (rule ident) |
267 then have "x \<cdot> e = x" by (rule ident) |
268 with D show ?thesis by (simp add: commute) |
268 with `x \<in> D` show ?thesis by (simp add: commute) |
269 qed |
269 qed |
270 |
270 |
271 lemma (in ACeD) foldD_Un_Int: |
271 lemma (in ACeD) foldD_Un_Int: |
272 "[| finite A; finite B; A \<subseteq> D; B \<subseteq> D |] ==> |
272 "[| finite A; finite B; A \<subseteq> D; B \<subseteq> D |] ==> |
273 foldD D f e A \<cdot> foldD D f e B = |
273 foldD D f e A \<cdot> foldD D f e B = |
422 next |
422 next |
423 case (insert x B) |
423 case (insert x B) |
424 then have "finprod G f A = finprod G f (insert x B)" by simp |
424 then have "finprod G f A = finprod G f (insert x B)" by simp |
425 also from insert have "... = f x \<otimes> finprod G f B" |
425 also from insert have "... = f x \<otimes> finprod G f B" |
426 proof (intro finprod_insert) |
426 proof (intro finprod_insert) |
427 show "finite B" . |
427 show "finite B" by fact |
428 next |
428 next |
429 show "x ~: B" . |
429 show "x ~: B" by fact |
430 next |
430 next |
431 assume "x ~: B" "!!i. i \<in> insert x B \<Longrightarrow> f i = g i" |
431 assume "x ~: B" "!!i. i \<in> insert x B \<Longrightarrow> f i = g i" |
432 "g \<in> insert x B \<rightarrow> carrier G" |
432 "g \<in> insert x B \<rightarrow> carrier G" |
433 thus "f \<in> B -> carrier G" by fastsimp |
433 thus "f \<in> B -> carrier G" by fastsimp |
434 next |
434 next |