Skip to content

Commit e6035f5

Browse files
committed
fundamental system of entourages for uniformity defined by family of pseudometrics
1 parent a8204e5 commit e6035f5

File tree

4 files changed

+129
-26
lines changed

4 files changed

+129
-26
lines changed

IsarMathLib/Finite_ZF.thy

+8-3
Original file line numberDiff line numberDiff line change
@@ -452,16 +452,21 @@ proof -
452452
ultimately show "\<Union>N \<in> C" by (rule FinPow_induct)
453453
qed
454454

455-
text\<open>Empty set is in finite power set.\<close>
455+
text\<open>Empty set is in finite power set, hence finite power set is never empty.\<close>
456456

457-
lemma empty_in_finpow: shows "0 \<in> FinPow(X)"
458-
using FinPow_def by simp
457+
lemma empty_in_finpow: shows "\<emptyset> \<in> FinPow(X)" and "FinPow(X)\<noteq>\<emptyset>"
458+
using FinPow_def by auto
459459

460460
text\<open>Singleton is in the finite powerset.\<close>
461461

462462
lemma singleton_in_finpow: assumes "x \<in> X"
463463
shows "{x} \<in> FinPow(X)" using assms FinPow_def by simp
464464

465+
text\<open>If a set is nonempty then its finite power set contains a nonempty set.\<close>
466+
467+
lemma finpow_nempty_nempty: assumes "X\<noteq>\<emptyset>" shows "FinPow(X)\<setminus>{\<emptyset>} \<noteq> \<emptyset>"
468+
using assms singleton_in_finpow by blast
469+
465470
text\<open>Union of two finite subsets is a finite subset.\<close>
466471

467472
lemma union_finpow: assumes "A \<in> FinPow(X)" and "B \<in> FinPow(X)"

IsarMathLib/MetricSpace_ZF.thy

+27-18
Original file line numberDiff line numberDiff line change
@@ -596,34 +596,43 @@ lemma (in pmetric_space) is_halfable_def_alt:
596596
shows "\<exists>b\<^sub>2\<in>L\<^sub>+. b\<^sub>2\<ra>b\<^sub>2 \<lsq> b\<^sub>1"
597597
using assms unfolding IsHalfable_def by simp
598598

599+
text\<open>If $B_i = d^{-1}(\{c \in L_+: c\leq b_i\})$ for $i=1,2$
600+
and $b_2+b_2\leq b1$ then $B_2\circ B_2 \leq B_1$. The proof uses the triangle
601+
inequality so it's not really a property of ordered loops only.\<close>
602+
603+
lemma (in pmetric_space) half_vimage_square:
604+
assumes "b\<^sub>2\<in>L\<^sub>+" and "b\<^sub>2\<ra>b\<^sub>2 \<lsq> b\<^sub>1"
605+
defines "B\<^sub>1 \<equiv> d-``({c\<in>L\<^sup>+. c\<lsq>b\<^sub>1})" and "B\<^sub>2 \<equiv> d-``({c\<in>L\<^sup>+. c\<lsq>b\<^sub>2})"
606+
shows "B\<^sub>2 O B\<^sub>2 \<subseteq> B\<^sub>1"
607+
proof
608+
from assms(1,4) have "B\<^sub>2\<subseteq>X\<times>X" using pmetric_properties(1) func1_1_L3 by simp
609+
fix p assume "p \<in> B\<^sub>2 O B\<^sub>2"
610+
with \<open>B\<^sub>2\<subseteq>X\<times>X\<close> obtain x y where "x\<in>X" "y\<in>X" and "p=\<langle>x,y\<rangle>"
611+
by blast
612+
from \<open>p \<in> B\<^sub>2 O B\<^sub>2\<close> \<open>p=\<langle>x,y\<rangle>\<close> obtain z where "\<langle>x,z\<rangle> \<in> B\<^sub>2" and "\<langle>z,y\<rangle> \<in> B\<^sub>2"
613+
using rel_compdef by auto
614+
with \<open>B\<^sub>2\<subseteq>X\<times>X\<close> have "z\<in>X" by auto
615+
from assms(4) \<open>\<langle>x,z\<rangle> \<in> B\<^sub>2\<close> \<open>\<langle>z,y\<rangle> \<in> B\<^sub>2\<close> have "d`\<langle>x,z\<rangle> \<ra> d`\<langle>z,y\<rangle> \<lsq> b\<^sub>2\<ra> b\<^sub>2"
616+
using pmetric_properties(1) func1_1_L15 add_ineq by simp
617+
with \<open>b\<^sub>2\<ra>b\<^sub>2 \<lsq> b\<^sub>1\<close> have "d`\<langle>x,z\<rangle> \<ra> d`\<langle>z,y\<rangle> \<lsq> b\<^sub>1"
618+
using loop_ord_trans by simp
619+
with assms(3) \<open>x\<in>X\<close> \<open>y\<in>X\<close> \<open>z\<in>X\<close> \<open>p=\<langle>x,y\<rangle>\<close> show "p\<in>B\<^sub>1"
620+
using pmetric_properties(4) loop_ord_trans gauge_members by blast
621+
qed
622+
599623
text\<open>If the loop order is halfable then for every set $B_1$ of the form $d^{-1}([0,b_1])$
600624
for some $b_1>0$ we can find another one $B_2 = d^{-1}([0,b_2])$ such that $B_2$
601625
composed with itself is contained in $B_1$.\<close>
602626

603627
lemma (in pmetric_space) gauge_4thCond:
604-
assumes "IsHalfable(L,A,r)" "B\<^sub>1\<in>\<BB>" shows "\<exists>B\<^sub>2\<in>\<BB>.\<exists>B\<^sub>2\<in>\<BB>. B\<^sub>2 O B\<^sub>2 \<subseteq> B\<^sub>1"
628+
assumes "IsHalfable(L,A,r)" "B\<^sub>1\<in>\<BB>" shows "\<exists>B\<^sub>2\<in>\<BB>. B\<^sub>2 O B\<^sub>2 \<subseteq> B\<^sub>1"
605629
proof -
606630
from assms(2) obtain b\<^sub>1 where "b\<^sub>1\<in>L\<^sub>+" and "B\<^sub>1 = d-``({c\<in>L\<^sup>+. c\<lsq>b\<^sub>1})"
607631
using uniform_gauge_def_alt by auto
608632
from assms(1) \<open>b\<^sub>1\<in>L\<^sub>+\<close> obtain b\<^sub>2 where "b\<^sub>2\<in>L\<^sub>+" and "b\<^sub>2\<ra>b\<^sub>2 \<lsq> b\<^sub>1"
609633
using is_halfable_def_alt by auto
610-
let ?B\<^sub>2 = "d-``({c\<in>L\<^sup>+. c\<lsq>b\<^sub>2})"
611-
from \<open>b\<^sub>2\<in>L\<^sub>+\<close> have "?B\<^sub>2\<in>\<BB>" unfolding UniformGauge_def by auto
612-
{ fix p assume "p \<in> ?B\<^sub>2 O ?B\<^sub>2"
613-
with \<open>?B\<^sub>2\<in>\<BB>\<close> obtain x y where "x\<in>X" "y\<in>X" and "p=\<langle>x,y\<rangle>"
614-
using gauge_5thCond by blast
615-
from \<open>p \<in> ?B\<^sub>2 O ?B\<^sub>2\<close> \<open>p=\<langle>x,y\<rangle>\<close> obtain z where
616-
"\<langle>x,z\<rangle> \<in> ?B\<^sub>2" and "\<langle>z,y\<rangle> \<in> ?B\<^sub>2"
617-
using rel_compdef by auto
618-
with \<open>?B\<^sub>2\<in>\<BB>\<close> have "z\<in>X" using gauge_5thCond by auto
619-
from \<open>\<langle>x,z\<rangle> \<in> ?B\<^sub>2\<close> \<open>\<langle>z,y\<rangle> \<in> ?B\<^sub>2\<close> have "d`\<langle>x,z\<rangle> \<ra> d`\<langle>z,y\<rangle> \<lsq> b\<^sub>2\<ra> b\<^sub>2"
620-
using pmetric_properties(1) func1_1_L15 add_ineq by simp
621-
with \<open>b\<^sub>2\<ra>b\<^sub>2 \<lsq> b\<^sub>1\<close> have "d`\<langle>x,z\<rangle> \<ra> d`\<langle>z,y\<rangle> \<lsq> b\<^sub>1"
622-
using loop_ord_trans by simp
623-
with \<open>x\<in>X\<close> \<open>y\<in>X\<close> \<open>z\<in>X\<close> \<open>p=\<langle>x,y\<rangle>\<close> \<open>B\<^sub>1 = d-``({c\<in>L\<^sup>+. c\<lsq>b\<^sub>1})\<close> have "p\<in>B\<^sub>1"
624-
using pmetric_properties(4) loop_ord_trans gauge_members by blast
625-
} hence "?B\<^sub>2 O ?B\<^sub>2 \<subseteq> B\<^sub>1" by auto
626-
with \<open>?B\<^sub>2\<in>\<BB>\<close> show ?thesis by auto
634+
with \<open>B\<^sub>1 = d-``({c\<in>L\<^sup>+. c\<lsq>b\<^sub>1})\<close> show ?thesis
635+
using half_vimage_square unfolding UniformGauge_def by force
627636
qed
628637

629638
text\<open>If $X$ and $L_+$ are not empty, the order relation $r$

IsarMathLib/MetricUniform_ZF.thy

+83-5
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,20 @@ text\<open>The next lemma just shows the definition of $\mathfrak{B}$ in notatio
9797
used in the \<open>muliple_pmetric\<close>. \<close>
9898

9999
lemma (in muliple_pmetric) mgauge_def_alt: shows
100-
"UniformGaugeSets(X,L,A,r,M) = {(\<Inter>d\<in>M. d-``({c\<in>L\<^sup>+. c\<lsq>f`(d)})). f\<in>M\<rightarrow>L\<^sub>+}"
101100
"\<BB> = (\<Union>M\<in>FinPow(\<M>)\<setminus>{\<emptyset>}. {(\<Inter>d\<in>M. d-``({c\<in>L\<^sup>+. c\<lsq>f`(d)})). f\<in>M\<rightarrow>L\<^sub>+})"
102-
unfolding UniformGaugeSets_def UniformGauges_def by simp_all
101+
unfolding UniformGaugeSets_def UniformGauges_def by simp
102+
103+
text\<open>$\mathfrak{B}$ consists of (finite) intersections of sets of the
104+
form $d^{-1}(\{c\in L^+:c\leq f(d)\})$ where $f:M\rightarrow L_+$
105+
some finite subset $M\subseteq \mathcal{M}$.
106+
More precisely, if $M$ is a nonempty finite subset of $\mathcal{M}$ and $f$ maps
107+
$M$ to the positive set of the loop $L$, then the set
108+
$\bigcap_{d\in M} d^{-1}(\{c\in L^+:c\leq f(d)\}$ is in $\mathfrak{B}$.\<close>
109+
110+
lemma (in muliple_pmetric) mgauge_finset_fun:
111+
assumes "M\<in>FinPow(\<M>)" "M\<noteq>\<emptyset>" "f:M\<rightarrow>L\<^sub>+"
112+
shows "(\<Inter>d\<in>M. d-``({c\<in>L\<^sup>+. c\<lsq>f`(d)})) \<in> \<BB>"
113+
using assms mgauge_def_alt by auto
103114

104115
text\<open>If $d$ is one of the pseudometrics from $\mathcal{M}$ then theorems
105116
proven in \<open>pmetric_space\<close> can are valid. \<close>
@@ -157,7 +168,7 @@ proof -
157168
with I show "?L\<subseteq>?R" by (rule subset_trans)
158169
qed
159170

160-
text\<open>For any two sets $B_1,B_2$ in $\mathcal{B}$ there exist a third one
171+
text\<open>For any two sets $B_1,B_2$ in $\mathfrak{B}$ there exist a third one
161172
that is contained in both. \<close>
162173

163174
lemma (in muliple_pmetric) mgauge_1st_cond:
@@ -179,7 +190,7 @@ proof -
179190
by auto
180191
let ?B\<^sub>3 = "\<Inter>d\<in>?M\<^sub>3. d-``({c\<in>L\<^sup>+. c\<lsq>f\<^sub>3`(d)})"
181192
from I(1,2) \<open>M\<^sub>1\<noteq>\<emptyset>\<close> \<open>f\<^sub>3:?M\<^sub>3\<rightarrow>L\<^sub>+\<close> have "?B\<^sub>3\<in>\<BB>"
182-
using union_finpow mgauge_def_alt(2) by auto
193+
using union_finpow mgauge_def_alt by auto
183194
moreover have "?B\<^sub>3\<subseteq>B\<^sub>1\<inter>B\<^sub>2"
184195
proof -
185196
from I(1,2) have "M\<^sub>1\<subseteq>\<M>" "M\<^sub>1\<subseteq>?M\<^sub>3" "M\<^sub>2\<subseteq>\<M>" "M\<^sub>2\<subseteq>?M\<^sub>3"
@@ -190,5 +201,72 @@ proof -
190201
qed
191202
ultimately show "\<exists>B\<in>\<BB>. B\<subseteq>B\<^sub>1\<inter>B\<^sub>2" by (rule witness_exists)
192203
qed
193-
204+
205+
text\<open>Sets in $\mathfrak{B}$ contain the diagonal and are symmetric,
206+
hence contain a symmetric subset from $\mathfrak{B}$.\<close>
207+
208+
lemma (in muliple_pmetric) mgauge_2nd_and_3rd_cond: assumes "B\<in>\<BB>"
209+
shows "id(X)\<subseteq>B" "B = converse(B)" "\<exists>B\<^sub>2\<in>\<BB>. B\<^sub>2 \<subseteq> converse(B)"
210+
proof -
211+
from assms obtain M f where "M\<in>FinPow(\<M>)" "M\<noteq>\<emptyset>" "f:M\<rightarrow>L\<^sub>+" and
212+
I: "B = (\<Inter>d\<in>M. d-``({c\<in>L\<^sup>+. c\<lsq>f`(d)}))"
213+
using mgauge_def_alt by auto
214+
{ fix d assume "d\<in>M"
215+
let ?B\<^sub>d = "d-``({c\<in>L\<^sup>+. c\<lsq>f`(d)})"
216+
from \<open>d\<in>M\<close> \<open>f:M\<rightarrow>L\<^sub>+\<close> \<open>M\<in>FinPow(\<M>)\<close> have
217+
"pmetric_space(L,A,r,d,X)" and "?B\<^sub>d \<in> UniformGauge(X,L,A,r,d)"
218+
unfolding FinPow_def UniformGauge_def
219+
using apply_funtype pmetric_space_valid_in_mpm by auto
220+
then have "id(X)\<subseteq>?B\<^sub>d" and "?B\<^sub>d = converse(?B\<^sub>d)"
221+
using pmetric_space.gauge_2nd_cond pmetric_space.gauge_symmetric
222+
by simp_all
223+
} with I \<open>M\<noteq>\<emptyset>\<close> show "id(X)\<subseteq>B" and "B = converse(B)" by auto
224+
from assms \<open>B = converse(B)\<close> show "\<exists>B\<^sub>2\<in>\<BB>. B\<^sub>2 \<subseteq> converse(B)"
225+
by auto
226+
qed
227+
228+
text\<open>$\mathfrak{B}$ is a subset of the power set of $X\times X$.\<close>
229+
230+
lemma (in muliple_pmetric) mgauge_5thCond: shows "\<BB>\<subseteq>Pow(X\<times>X)"
231+
using muniform_gauge_relations by auto
232+
233+
text\<open>If $\mathcal{M}$ and $L_+$ are nonempty then $\mathfrak{B}$ is also nonempty.\<close>
234+
235+
lemma (in muliple_pmetric) mgauge_6thCond:
236+
assumes "\<M>\<noteq>\<emptyset>" and "L\<^sub>+\<noteq>\<emptyset>" shows "\<BB>\<noteq>\<emptyset>"
237+
proof -
238+
from assms obtain M y where "M\<in>FinPow(\<M>)" "M\<noteq>\<emptyset>" and "y\<in>L\<^sub>+"
239+
using finpow_nempty_nempty by blast
240+
from \<open>y\<in>L\<^sub>+\<close> have "ConstantFunction(M,y):M\<rightarrow>L\<^sub>+" using func1_3_L1 by simp
241+
with \<open>M\<in>FinPow(\<M>)\<close> \<open>M\<noteq>\<emptyset>\<close> show "\<BB>\<noteq>\<emptyset>" using mgauge_finset_fun by auto
242+
qed
243+
244+
text\<open>If the loop order is halfable then for every set $B_1\in \mathfrak{B}$
245+
there is another set $B_2\in \mathfrak{B}$ such that $B_2\circ B_2 \subseteq B_1$.\<close>
246+
247+
lemma (in muliple_pmetric) mgauge_4thCond:
248+
assumes "IsHalfable(L,A,r)" "B\<^sub>1\<in>\<BB>" shows "\<exists>B\<^sub>2\<in>\<BB>. B\<^sub>2 O B\<^sub>2 \<subseteq> B\<^sub>1"
249+
proof -
250+
from assms(2) obtain M f\<^sub>1 where "M\<in>FinPow(\<M>)" "M\<noteq>\<emptyset>" "f\<^sub>1:M\<rightarrow>L\<^sub>+" and
251+
I: "B\<^sub>1 = (\<Inter>d\<in>M. d-``({c\<in>L\<^sup>+. c\<lsq>f\<^sub>1`(d)}))"
252+
using mgauge_def_alt by auto
253+
from assms(1) \<open>f\<^sub>1:M\<rightarrow>L\<^sub>+\<close> have "\<forall>d\<in>M. \<exists>b\<^sub>2\<in>L\<^sub>+. b\<^sub>2\<ra>b\<^sub>2 \<lsq> f\<^sub>1`(d)"
254+
using apply_funtype unfolding IsHalfable_def by simp
255+
with \<open>M\<in>FinPow(\<M>)\<close> have "\<exists>f\<^sub>2\<in>M\<rightarrow>L\<^sub>+. \<forall>d\<in>M. f\<^sub>2`(d) \<ra> f\<^sub>2`(d) \<lsq> f\<^sub>1`(d)"
256+
unfolding FinPow_def using finite_choice_fun by auto
257+
then obtain f\<^sub>2 where "f\<^sub>2\<in>M\<rightarrow>L\<^sub>+" and II: "\<forall>d\<in>M. f\<^sub>2`(d) \<ra> f\<^sub>2`(d) \<lsq> f\<^sub>1`(d)"
258+
by auto
259+
let ?B\<^sub>2 = "\<Inter>d\<in>M. d-``({c\<in>L\<^sup>+. c\<lsq>f\<^sub>2`(d)})"
260+
{ fix d assume "d\<in>M"
261+
let ?A\<^sub>2 = "d-``({c\<in>L\<^sup>+. c\<lsq>f\<^sub>2`(d)})"
262+
from \<open>d\<in>M\<close> \<open>M\<in>FinPow(\<M>)\<close> have "pmetric_space(L,A,r,d,X)"
263+
unfolding FinPow_def using pmetric_space_valid_in_mpm by auto
264+
with \<open>f\<^sub>2\<in>M\<rightarrow>L\<^sub>+\<close> \<open>d\<in>M\<close> II have "?A\<^sub>2 O ?A\<^sub>2 \<subseteq> d-``({c\<in>L\<^sup>+. c\<lsq>f\<^sub>1`(d)})"
265+
using apply_funtype pmetric_space.half_vimage_square by simp
266+
}
267+
with \<open>M\<noteq>\<emptyset>\<close> I have "?B\<^sub>2 O ?B\<^sub>2 \<subseteq> B\<^sub>1" using square_incl_product by simp
268+
with \<open>M\<in>FinPow(\<M>)\<close> \<open>M\<noteq>\<emptyset>\<close> \<open>f\<^sub>2\<in>M\<rightarrow>L\<^sub>+\<close> show ?thesis
269+
using mgauge_finset_fun by auto
270+
qed
271+
194272
end

IsarMathLib/ZF1.thy

+11
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,17 @@ proof -
476476
with assms(1) \<open>\<langle>x,t\<rangle> \<in> R O W\<close> show ?thesis by auto
477477
qed
478478

479+
text\<open>Suppose we have two families of sets $\{ A(i)\}_{i\in I}$
480+
and $\{ B(i)\}_{i\in I}$, indexed by a nonepty set of indices $I$
481+
and such that for every index $i\in I$ we have inclusion
482+
$A(i)\circ A(i) \subseteq B(i)$. Then a similar inclusion holds
483+
for the products of the families, namely
484+
$(\bigcap_{i\in I}A(i))\circ (\bigcap_{i\in I}A(i)) \subseteq (\bigcap_{i\in I}B(i)$.\<close>
485+
486+
lemma square_incl_product: assumes "I\<noteq>\<emptyset>" "\<forall>i\<in>I. A(i) O A(i) \<subseteq> B(i)"
487+
shows "(\<Inter>i\<in>I. A(i)) O (\<Inter>i\<in>I. A(i)) \<subseteq> (\<Inter>i\<in>I. B(i))"
488+
using assms by force
489+
479490
text\<open> It's hard to believe but there are cases where we have to reference this rule. \<close>
480491

481492
lemma set_mem_eq: assumes "x\<in>A" "A=B" shows "x\<in>B" using assms by simp

0 commit comments

Comments
 (0)