# HG changeset patch # User wenzelm # Date 1688827695 -7200 # Node ID 45a9f5066e07bc5b93cb24109bbdcdf955585b04 # Parent 45381e6bd3adffeca8095125d0d2d048212d7c62# Parent 4be047eaee2ba8aa682614d82c0aa8f287eaf020 merged diff -r 4be047eaee2b -r 45a9f5066e07 src/HOL/Analysis/Abstract_Metric_Spaces.thy --- a/src/HOL/Analysis/Abstract_Metric_Spaces.thy Sat Jul 08 16:07:45 2023 +0200 +++ b/src/HOL/Analysis/Abstract_Metric_Spaces.thy Sat Jul 08 16:48:15 2023 +0200 @@ -144,24 +144,6 @@ by (auto simp: openin_mtopology) qed -(* -lemma metric_injective_image: - "\f m s. - f ` s \ M \ - (\x y. x \ s \ y \ s \ f x = f y \ x = y) - \ (mspace(metric(s,\(x,y). d (f x) (f y))) = s) \ - (d(metric(s,\(x,y). d (f x) (f y))) = - \(x,y). d (f x) (f y))" -oops - REWRITE_TAC[\; FORALL_IN_IMAGE; INJECTIVE_ON_ALT] THEN - REPEAT GEN_TAC THEN STRIP_TAC THEN - REWRITE_TAC[mspace; d; GSYM PAIR_EQ] THEN - REWRITE_TAC[GSYM(CONJUNCT2 metric_tybij); is_metric_space] THEN - REWRITE_TAC[GSYM mspace; GSYM d] THEN - ASM_SIMP_TAC[MDIST_POS_LE; MDIST_TRIANGLE; MDIST_0] THEN - ASM_MESON_TAC[MDIST_SYM]);; -*) - lemma mtopology_base: "mtopology = topology(arbitrary union_of (\U. \x \ M. \r>0. U = mball x r))" proof - @@ -266,8 +248,6 @@ by (metis centre_in_mball_iff gt0 openin_mball topspace_mtopology x y) qed - - subsection\Bounded sets\ definition mbounded where "mbounded S \ (\x B. S \ mcball x B)" @@ -656,6 +636,33 @@ lemma (in Metric_space) metrizable_space_mtopology: "metrizable_space mtopology" using local.Metric_space_axioms metrizable_space_def by blast +lemma (in Metric_space) first_countable_mtopology: "first_countable mtopology" +proof (clarsimp simp add: first_countable_def) + fix x + assume "x \ M" + define \ where "\ \ mball x ` {r \ \. 0 < r}" + show "\\. countable \ \ (\V\\. openin mtopology V) \ (\U. openin mtopology U \ x \ U \ (\V\\. x \ V \ V \ U))" + proof (intro exI conjI ballI) + show "countable \" + by (simp add: \_def countable_rat) + show "\U. openin mtopology U \ x \ U \ (\V\\. x \ V \ V \ U)" + proof clarify + fix U + assume "openin mtopology U" and "x \ U" + then obtain r where "r>0" and r: "mball x r \ U" + by (meson openin_mtopology) + then obtain q where "q \ Rats" "0 < q" "q < r" + using Rats_dense_in_real by blast + then show "\V\\. x \ V \ V \ U" + unfolding \_def using \x \ M\ r by fastforce + qed + qed (auto simp: \_def) +qed + +lemma metrizable_imp_first_countable: + "metrizable_space X \ first_countable X" + by (force simp add: metrizable_space_def Metric_space.first_countable_mtopology) + lemma openin_mtopology_eq_open [simp]: "openin Met_TC.mtopology = open" by (simp add: Met_TC.mtopology_def) diff -r 4be047eaee2b -r 45a9f5066e07 src/HOL/Analysis/Equivalence_Measurable_On_Borel.thy --- a/src/HOL/Analysis/Equivalence_Measurable_On_Borel.thy Sat Jul 08 16:07:45 2023 +0200 +++ b/src/HOL/Analysis/Equivalence_Measurable_On_Borel.thy Sat Jul 08 16:48:15 2023 +0200 @@ -8,10 +8,6 @@ imports Equivalence_Lebesgue_Henstock_Integration Improper_Integral Continuous_Extension begin -(*Borrowed from Ergodic_Theory/SG_Library_Complement*) -abbreviation sym_diff :: "'a set \ 'a set \ 'a set" where - "sym_diff A B \ ((A - B) \ (B-A))" - subsection\Austin's Lemma\ lemma Austin_Lemma: diff -r 4be047eaee2b -r 45a9f5066e07 src/HOL/Fun.thy --- a/src/HOL/Fun.thy Sat Jul 08 16:07:45 2023 +0200 +++ b/src/HOL/Fun.thy Sat Jul 08 16:48:15 2023 +0200 @@ -218,6 +218,10 @@ lemma inj_onI [intro?]: "(\x y. x \ A \ y \ A \ f x = f y \ x = y) \ inj_on f A" by (simp add: inj_on_def) +text \For those frequent proofs by contradiction\ +lemma inj_onCI: "(\x y. x \ A \ y \ A \ f x = f y \ x \ y \ False) \ inj_on f A" + by (force simp: inj_on_def) + lemma inj_on_inverseI: "(\x. x \ A \ g (f x) = x) \ inj_on f A" by (auto dest: arg_cong [of concl: g] simp add: inj_on_def) diff -r 4be047eaee2b -r 45a9f5066e07 src/HOL/Set.thy --- a/src/HOL/Set.thy Sat Jul 08 16:07:45 2023 +0200 +++ b/src/HOL/Set.thy Sat Jul 08 16:48:15 2023 +0200 @@ -719,6 +719,9 @@ lemma Compl_eq_Diff_UNIV: "- A = (UNIV - A)" by blast +abbreviation sym_diff :: "'a set \ 'a set \ 'a set" where + "sym_diff A B \ ((A - B) \ (B-A))" + subsubsection \Augmenting a set -- \<^const>\insert\\