src/HOL/Analysis/Function_Topology.thy
changeset 64910 6108dddad9f0
parent 64845 e5d4bc2016a6
child 64911 f0e07600de47
equal deleted inserted replaced
64909:8007f10195af 64910:6108dddad9f0
    15 the sets which are products of open sets along finitely many coordinates, and the whole
    15 the sets which are products of open sets along finitely many coordinates, and the whole
    16 space along the other coordinates. This is the coarsest topology for which the projection
    16 space along the other coordinates. This is the coarsest topology for which the projection
    17 to each factor is continuous.
    17 to each factor is continuous.
    18 
    18 
    19 To form a product of objects in Isabelle/HOL, all these objects should be subsets of a common type
    19 To form a product of objects in Isabelle/HOL, all these objects should be subsets of a common type
    20 'a. The product is then @{term "PiE I X"}, the set of elements from 'i to 'a such that the $i$-th
    20 'a. The product is then @{term "Pi\<^sub>E I X"}, the set of elements from 'i to 'a such that the $i$-th
    21 coordinate belongs to $X\;i$ for all $i \in I$.
    21 coordinate belongs to $X\;i$ for all $i \in I$.
    22 
    22 
    23 Hence, to form a product of topological spaces, all these spaces should be subsets of a common type.
    23 Hence, to form a product of topological spaces, all these spaces should be subsets of a common type.
    24 This means that type classes can not be used to define such a product if one wants to take the
    24 This means that type classes can not be used to define such a product if one wants to take the
    25 product of different topological spaces (as the type 'a can only be given one structure of
    25 product of different topological spaces (as the type 'a can only be given one structure of
   694 qed
   694 qed
   695 
   695 
   696 lemma product_topology_countable_basis:
   696 lemma product_topology_countable_basis:
   697   shows "\<exists>K::(('a::countable \<Rightarrow> 'b::second_countable_topology) set set).
   697   shows "\<exists>K::(('a::countable \<Rightarrow> 'b::second_countable_topology) set set).
   698           topological_basis K \<and> countable K \<and>
   698           topological_basis K \<and> countable K \<and>
   699           (\<forall>k\<in>K. \<exists>X. (k = PiE UNIV X) \<and> (\<forall>i. open (X i)) \<and> finite {i. X i \<noteq> UNIV})"
   699           (\<forall>k\<in>K. \<exists>X. (k = Pi\<^sub>E UNIV X) \<and> (\<forall>i. open (X i)) \<and> finite {i. X i \<noteq> UNIV})"
   700 proof -
   700 proof -
   701   obtain B::"'b set set" where B: "countable B \<and> topological_basis B"
   701   obtain B::"'b set set" where B: "countable B \<and> topological_basis B"
   702     using ex_countable_basis by auto
   702     using ex_countable_basis by auto
   703   then have "B \<noteq> {}" by (meson UNIV_I empty_iff open_UNIV topological_basisE)
   703   then have "B \<noteq> {}" by (meson UNIV_I empty_iff open_UNIV topological_basisE)
   704   define B2 where "B2 = B \<union> {UNIV}"
   704   define B2 where "B2 = B \<union> {UNIV}"
   706     unfolding B2_def using B by auto
   706     unfolding B2_def using B by auto
   707   have "open U" if "U \<in> B2" for U
   707   have "open U" if "U \<in> B2" for U
   708     using that unfolding B2_def using B topological_basis_open by auto
   708     using that unfolding B2_def using B topological_basis_open by auto
   709 
   709 
   710   define K where "K = {Pi\<^sub>E UNIV X | X. (\<forall>i::'a. X i \<in> B2) \<and> finite {i. X i \<noteq> UNIV}}"
   710   define K where "K = {Pi\<^sub>E UNIV X | X. (\<forall>i::'a. X i \<in> B2) \<and> finite {i. X i \<noteq> UNIV}}"
   711   have i: "\<forall>k\<in>K. \<exists>X. (k = PiE UNIV X) \<and> (\<forall>i. open (X i)) \<and> finite {i. X i \<noteq> UNIV}"
   711   have i: "\<forall>k\<in>K. \<exists>X. (k = Pi\<^sub>E UNIV X) \<and> (\<forall>i. open (X i)) \<and> finite {i. X i \<noteq> UNIV}"
   712     unfolding K_def using `\<And>U. U \<in> B2 \<Longrightarrow> open U` by auto
   712     unfolding K_def using `\<And>U. U \<in> B2 \<Longrightarrow> open U` by auto
   713 
   713 
   714   have "countable {X. (\<forall>(i::'a). X i \<in> B2) \<and> finite {i. X i \<noteq> UNIV}}"
   714   have "countable {X. (\<forall>(i::'a). X i \<in> B2) \<and> finite {i. X i \<noteq> UNIV}}"
   715     apply (rule countable_product_event_const) using `countable B2` by auto
   715     apply (rule countable_product_event_const) using `countable B2` by auto
   716   moreover have "K = (\<lambda>X. Pi\<^sub>E UNIV X)`{X. (\<forall>i. X i \<in> B2) \<and> finite {i. X i \<noteq> UNIV}}"
   716   moreover have "K = (\<lambda>X. Pi\<^sub>E UNIV X)`{X. (\<forall>i. X i \<in> B2) \<and> finite {i. X i \<noteq> UNIV}}"
  1333 
  1333 
  1334 lemma sets_PiM_equal_borel:
  1334 lemma sets_PiM_equal_borel:
  1335   "sets (Pi\<^sub>M UNIV (\<lambda>i::('a::countable). borel::('b::second_countable_topology measure))) = sets borel"
  1335   "sets (Pi\<^sub>M UNIV (\<lambda>i::('a::countable). borel::('b::second_countable_topology measure))) = sets borel"
  1336 proof
  1336 proof
  1337   obtain K::"('a \<Rightarrow> 'b) set set" where K: "topological_basis K" "countable K"
  1337   obtain K::"('a \<Rightarrow> 'b) set set" where K: "topological_basis K" "countable K"
  1338             "\<And>k. k \<in> K \<Longrightarrow> \<exists>X. (k = PiE UNIV X) \<and> (\<forall>i. open (X i)) \<and> finite {i. X i \<noteq> UNIV}"
  1338             "\<And>k. k \<in> K \<Longrightarrow> \<exists>X. (k = Pi\<^sub>E UNIV X) \<and> (\<forall>i. open (X i)) \<and> finite {i. X i \<noteq> UNIV}"
  1339     using product_topology_countable_basis by fast
  1339     using product_topology_countable_basis by fast
  1340   have *: "k \<in> sets (Pi\<^sub>M UNIV (\<lambda>_. borel))" if "k \<in> K" for k
  1340   have *: "k \<in> sets (Pi\<^sub>M UNIV (\<lambda>_. borel))" if "k \<in> K" for k
  1341   proof -
  1341   proof -
  1342     obtain X where H: "k = PiE UNIV X" "\<And>i. open (X i)" "finite {i. X i \<noteq> UNIV}"
  1342     obtain X where H: "k = Pi\<^sub>E UNIV X" "\<And>i. open (X i)" "finite {i. X i \<noteq> UNIV}"
  1343       using K(3)[OF `k \<in> K`] by blast
  1343       using K(3)[OF `k \<in> K`] by blast
  1344     show ?thesis unfolding H(1) sets_PiM_finite space_borel using borel_open[OF H(2)] H(3) by auto
  1344     show ?thesis unfolding H(1) sets_PiM_finite space_borel using borel_open[OF H(2)] H(3) by auto
  1345   qed
  1345   qed
  1346   have **: "U \<in> sets (Pi\<^sub>M UNIV (\<lambda>_. borel))" if "open U" for U::"('a \<Rightarrow> 'b) set"
  1346   have **: "U \<in> sets (Pi\<^sub>M UNIV (\<lambda>_. borel))" if "open U" for U::"('a \<Rightarrow> 'b) set"
  1347   proof -
  1347   proof -