777 shows "Sup A = fold sup bot A" |
777 shows "Sup A = fold sup bot A" |
778 using assms sup_Sup_fold_sup [of A bot] by (simp add: sup_absorb2) |
778 using assms sup_Sup_fold_sup [of A bot] by (simp add: sup_absorb2) |
779 |
779 |
780 lemma inf_INFI_fold_inf: |
780 lemma inf_INFI_fold_inf: |
781 assumes "finite A" |
781 assumes "finite A" |
782 shows "inf B (INFI A f) = fold (\<lambda>A. inf (f A)) B A" (is "?inf = ?fold") |
782 shows "inf B (INFI A f) = fold (inf \<circ> f) B A" (is "?inf = ?fold") |
783 proof (rule sym) |
783 proof (rule sym) |
784 interpret comp_fun_idem inf by (fact comp_fun_idem_inf) |
784 interpret comp_fun_idem inf by (fact comp_fun_idem_inf) |
785 interpret comp_fun_idem "inf \<circ> f" by (fact comp_comp_fun_idem) |
785 interpret comp_fun_idem "inf \<circ> f" by (fact comp_comp_fun_idem) |
786 from `finite A` have "fold (inf \<circ> f) B A = ?inf" |
786 from `finite A` show "?fold = ?inf" |
787 by (induct A arbitrary: B) |
787 by (induct A arbitrary: B) |
788 (simp_all add: INFI_def Inf_insert inf_left_commute) |
788 (simp_all add: INFI_def Inf_insert inf_left_commute) |
789 then show "?fold = ?inf" by (simp add: comp_def) |
|
790 qed |
789 qed |
791 |
790 |
792 lemma sup_SUPR_fold_sup: |
791 lemma sup_SUPR_fold_sup: |
793 assumes "finite A" |
792 assumes "finite A" |
794 shows "sup B (SUPR A f) = fold (\<lambda>A. sup (f A)) B A" (is "?sup = ?fold") |
793 shows "sup B (SUPR A f) = fold (sup \<circ> f) B A" (is "?sup = ?fold") |
795 proof (rule sym) |
794 proof (rule sym) |
796 interpret comp_fun_idem sup by (fact comp_fun_idem_sup) |
795 interpret comp_fun_idem sup by (fact comp_fun_idem_sup) |
797 interpret comp_fun_idem "sup \<circ> f" by (fact comp_comp_fun_idem) |
796 interpret comp_fun_idem "sup \<circ> f" by (fact comp_comp_fun_idem) |
798 from `finite A` have "fold (sup \<circ> f) B A = ?sup" |
797 from `finite A` show "?fold = ?sup" |
799 by (induct A arbitrary: B) |
798 by (induct A arbitrary: B) |
800 (simp_all add: SUPR_def Sup_insert sup_left_commute) |
799 (simp_all add: SUPR_def Sup_insert sup_left_commute) |
801 then show "?fold = ?sup" by (simp add: comp_def) |
|
802 qed |
800 qed |
803 |
801 |
804 lemma INFI_fold_inf: |
802 lemma INFI_fold_inf: |
805 assumes "finite A" |
803 assumes "finite A" |
806 shows "INFI A f = fold (\<lambda>A. inf (f A)) top A" |
804 shows "INFI A f = fold (inf \<circ> f) top A" |
807 using assms inf_INFI_fold_inf [of A top] by simp |
805 using assms inf_INFI_fold_inf [of A top] by simp |
808 |
806 |
809 lemma SUPR_fold_sup: |
807 lemma SUPR_fold_sup: |
810 assumes "finite A" |
808 assumes "finite A" |
811 shows "SUPR A f = fold (\<lambda>A. sup (f A)) bot A" |
809 shows "SUPR A f = fold (sup \<circ> f) bot A" |
812 using assms sup_SUPR_fold_sup [of A bot] by simp |
810 using assms sup_SUPR_fold_sup [of A bot] by simp |
813 |
811 |
814 end |
812 end |
815 |
813 |
816 |
814 |