# HG changeset patch # User paulson # Date 1705412409 0 # Node ID c1b0f64eb8659d334956820b1a519f908d8b9b19 # Parent 1e19abf373ac590273e3d46044b4b56c730d826c A few new results (mostly brought in from other developments) diff -r 1e19abf373ac -r c1b0f64eb865 src/HOL/Analysis/Abstract_Topological_Spaces.thy --- a/src/HOL/Analysis/Abstract_Topological_Spaces.thy Sun Jan 14 20:02:58 2024 +0000 +++ b/src/HOL/Analysis/Abstract_Topological_Spaces.thy Tue Jan 16 13:40:09 2024 +0000 @@ -1033,11 +1033,8 @@ "\retraction_map X Y r; t0_space X\ \ t0_space Y" using hereditary_imp_retractive_property homeomorphic_t0_space t0_space_subtopology by blast -lemma XY: "{x}\{y} = {(x,y)}" - by simp - lemma t0_space_prod_topologyI: "\t0_space X; t0_space Y\ \ t0_space (prod_topology X Y)" - by (simp add: t0_space_closure_of_sing closure_of_Times closure_of_eq_empty_gen times_eq_iff flip: XY insert_Times_insert) + by (simp add: t0_space_closure_of_sing closure_of_Times closure_of_eq_empty_gen times_eq_iff flip: sing_Times_sing insert_Times_insert) lemma t0_space_prod_topology_iff: diff -r 1e19abf373ac -r c1b0f64eb865 src/HOL/Groups_Big.thy --- a/src/HOL/Groups_Big.thy Sun Jan 14 20:02:58 2024 +0000 +++ b/src/HOL/Groups_Big.thy Tue Jan 16 13:40:09 2024 +0000 @@ -409,6 +409,11 @@ qed qed +lemma cartesian_product': + "F g (A \ B) = F (\x. F (\y. g (x,y)) B) A" + unfolding cartesian_product by simp + + lemma inter_restrict: assumes "finite A" shows "F g (A \ B) = F (\x. if x \ B then g x else \<^bold>1) A" diff -r 1e19abf373ac -r c1b0f64eb865 src/HOL/Probability/Information.thy --- a/src/HOL/Probability/Information.thy Sun Jan 14 20:02:58 2024 +0000 +++ b/src/HOL/Probability/Information.thy Tue Jan 16 13:40:09 2024 +0000 @@ -10,20 +10,6 @@ Independent_Family begin -lemma log_le: "1 < a \ 0 < x \ x \ y \ log a x \ log a y" - by simp - -lemma log_less: "1 < a \ 0 < x \ x < y \ log a x < log a y" - by simp - -lemma sum_cartesian_product': - "(\x\A \ B. f x) = (\x\A. sum (\y. f (x, y)) B)" - unfolding sum.cartesian_product by simp - -lemma split_pairs: - "((A, B) = X) \ (fst X = A \ snd X = B)" and - "(X = (A, B)) \ (fst X = A \ snd X = B)" by auto - subsection "Information theory" locale information_space = prob_space + diff -r 1e19abf373ac -r c1b0f64eb865 src/HOL/Probability/ex/Koepf_Duermuth_Countermeasure.thy --- a/src/HOL/Probability/ex/Koepf_Duermuth_Countermeasure.thy Sun Jan 14 20:02:58 2024 +0000 +++ b/src/HOL/Probability/ex/Koepf_Duermuth_Countermeasure.thy Tue Jan 16 13:40:09 2024 +0000 @@ -96,7 +96,7 @@ by force+ show ?case unfolding * using Suc[of "\i. P (Suc i)"] - by (simp add: sum.reindex sum_cartesian_product' + by (simp add: sum.reindex sum.cartesian_product' lessThan_Suc_eq_insert_0 prod.reindex sum_distrib_right[symmetric] sum_distrib_left[symmetric]) qed @@ -157,7 +157,7 @@ note sum_distrib_left[symmetric, simp] note sum_distrib_right[symmetric, simp] - note sum_cartesian_product'[simp] + note sum.cartesian_product'[simp] have "(\ms | set ms \ messages \ length ms = n. \x(fst) {k}) = K k" apply (simp add: \'_eq) apply (simp add: * P_def) - apply (simp add: sum_cartesian_product') + apply (simp add: sum.cartesian_product') using prod_sum_distrib_lists[OF M.finite_space, of M n "\x x. True"] \k \ keys\ by (auto simp add: sum_distrib_left[symmetric] subset_eq prod.neutral_const) qed @@ -352,7 +352,7 @@ also have "\ = (\im\{m\messages. observe k m = obs ! i}. M m)" unfolding P_def using \K k \ 0\ \k \ keys\ - apply (simp add: sum_cartesian_product' sum_divide_distrib msgs_def ** cong: conj_cong) + apply (simp add: sum.cartesian_product' sum_divide_distrib msgs_def ** cong: conj_cong) apply (subst prod_sum_distrib_lists[OF M.finite_space]) .. finally have "(\

(OB ; fst) {(obs, k)}) / K k = (\im\{m\messages. observe k m = obs ! i}. M m)" . } diff -r 1e19abf373ac -r c1b0f64eb865 src/HOL/Product_Type.thy --- a/src/HOL/Product_Type.thy Sun Jan 14 20:02:58 2024 +0000 +++ b/src/HOL/Product_Type.thy Tue Jan 16 13:40:09 2024 +0000 @@ -987,6 +987,10 @@ lemma snd_swap [simp]: "snd (prod.swap x) = fst x" by (cases x) simp +lemma split_pairs: + "(A,B) = X \ fst X = A \ snd X = B" and "X = (A,B) \ fst X = A \ snd X = B" + by auto + text \Disjoint union of a family of sets -- Sigma.\ definition Sigma :: "'a set \ ('a \ 'b set) \ ('a \ 'b) set" @@ -1162,6 +1166,9 @@ "insert a A \ insert b B = insert (a,b) (A \ insert b B \ {a} \ B)" by blast +lemma sing_Times_sing: "{x}\{y} = {(x,y)}" + by simp + lemma vimage_Times: "f -` (A \ B) = (fst \ f) -` A \ (snd \ f) -` B" proof (rule set_eqI) show "x \ f -` (A \ B) \ x \ (fst \ f) -` A \ (snd \ f) -` B" for x diff -r 1e19abf373ac -r c1b0f64eb865 src/HOL/Transcendental.thy --- a/src/HOL/Transcendental.thy Sun Jan 14 20:02:58 2024 +0000 +++ b/src/HOL/Transcendental.thy Tue Jan 16 13:40:09 2024 +0000 @@ -2640,7 +2640,13 @@ qed lemma log_le_cancel_iff [simp]: "1 < a \ 0 < x \ 0 < y \ log a x \ log a y \ x \ y" - by (simp add: linorder_not_less [symmetric]) + by (simp flip: linorder_not_less) + +lemma log_le: "1 < a \ 0 < x \ x \ y \ log a x \ log a y" + by simp + +lemma log_less: "1 < a \ 0 < x \ x < y \ log a x < log a y" + by simp lemma zero_less_log_cancel_iff[simp]: "1 < a \ 0 < x \ 0 < log a x \ 1 < x" using log_less_cancel_iff[of a 1 x] by simp