src/HOL/Topological_Spaces.thy
changeset 61306 9dd394c866fc
parent 61245 b77bf45efe21
child 61342 b98cd131e2b5
equal deleted inserted replaced
61305:12378df46752 61306:9dd394c866fc
  1824 lemma connectedI:
  1824 lemma connectedI:
  1825   "(\<And>A B. open A \<Longrightarrow> open B \<Longrightarrow> A \<inter> U \<noteq> {} \<Longrightarrow> B \<inter> U \<noteq> {} \<Longrightarrow> A \<inter> B \<inter> U = {} \<Longrightarrow> U \<subseteq> A \<union> B \<Longrightarrow> False)
  1825   "(\<And>A B. open A \<Longrightarrow> open B \<Longrightarrow> A \<inter> U \<noteq> {} \<Longrightarrow> B \<inter> U \<noteq> {} \<Longrightarrow> A \<inter> B \<inter> U = {} \<Longrightarrow> U \<subseteq> A \<union> B \<Longrightarrow> False)
  1826   \<Longrightarrow> connected U"
  1826   \<Longrightarrow> connected U"
  1827   by (auto simp: connected_def)
  1827   by (auto simp: connected_def)
  1828 
  1828 
  1829 lemma connected_empty[simp]: "connected {}"
  1829 lemma connected_empty [simp]: "connected {}"
       
  1830   by (auto intro!: connectedI)
       
  1831 
       
  1832 lemma connected_sing [simp]: "connected {x}"
  1830   by (auto intro!: connectedI)
  1833   by (auto intro!: connectedI)
  1831 
  1834 
  1832 lemma connectedD:
  1835 lemma connectedD:
  1833   "connected A \<Longrightarrow> open U \<Longrightarrow> open V \<Longrightarrow> U \<inter> V \<inter> A = {} \<Longrightarrow> A \<subseteq> U \<union> V \<Longrightarrow> U \<inter> A = {} \<or> V \<inter> A = {}" 
  1836   "connected A \<Longrightarrow> open U \<Longrightarrow> open V \<Longrightarrow> U \<inter> V \<inter> A = {} \<Longrightarrow> A \<subseteq> U \<union> V \<Longrightarrow> U \<inter> A = {} \<or> V \<inter> A = {}" 
  1834   by (auto simp: connected_def)
  1837   by (auto simp: connected_def)
  1835 
  1838 
  1836 end
  1839 end
       
  1840 
       
  1841 lemma connected_closed:
       
  1842     "connected s \<longleftrightarrow>
       
  1843      ~ (\<exists>A B. closed A \<and> closed B \<and> s \<subseteq> A \<union> B \<and> A \<inter> B \<inter> s = {} \<and> A \<inter> s \<noteq> {} \<and> B \<inter> s \<noteq> {})"
       
  1844 apply (simp add: connected_def del: ex_simps, safe)
       
  1845 apply (drule_tac x="-A" in spec)
       
  1846 apply (drule_tac x="-B" in spec)
       
  1847 apply (fastforce simp add: closed_def [symmetric])
       
  1848 apply (drule_tac x="-A" in spec)
       
  1849 apply (drule_tac x="-B" in spec)
       
  1850 apply (fastforce simp add: open_closed [symmetric])
       
  1851 done
       
  1852 
       
  1853 
       
  1854 lemma connected_Union:
       
  1855   assumes cs: "\<And>s. s \<in> S \<Longrightarrow> connected s" and ne: "\<Inter>S \<noteq> {}"
       
  1856     shows "connected(\<Union>S)"
       
  1857 proof (rule connectedI)
       
  1858   fix A B
       
  1859   assume A: "open A" and B: "open B" and Alap: "A \<inter> \<Union>S \<noteq> {}" and Blap: "B \<inter> \<Union>S \<noteq> {}"
       
  1860      and disj: "A \<inter> B \<inter> \<Union>S = {}" and cover: "\<Union>S \<subseteq> A \<union> B"
       
  1861   have disjs:"\<And>s. s \<in> S \<Longrightarrow> A \<inter> B \<inter> s = {}"
       
  1862     using disj by auto
       
  1863   obtain sa where sa: "sa \<in> S" "A \<inter> sa \<noteq> {}"
       
  1864     using Alap by auto
       
  1865   obtain sb where sb: "sb \<in> S" "B \<inter> sb \<noteq> {}"
       
  1866     using Blap by auto
       
  1867   obtain x where x: "\<And>s. s \<in> S \<Longrightarrow> x \<in> s"
       
  1868     using ne by auto
       
  1869   then have "x \<in> \<Union>S"
       
  1870     using `sa \<in> S` by blast
       
  1871   then have "x \<in> A \<or> x \<in> B"
       
  1872     using cover by auto
       
  1873   then show False
       
  1874     using cs [unfolded connected_def]
       
  1875     by (metis A B IntI Sup_upper sa sb disjs x cover empty_iff subset_trans)
       
  1876 qed
       
  1877 
       
  1878 lemma connected_Un: "\<lbrakk>connected s; connected t; s \<inter> t \<noteq> {}\<rbrakk> \<Longrightarrow> connected (s \<union> t)"
       
  1879   using connected_Union [of "{s,t}"] by auto
       
  1880 
       
  1881 lemma connected_diff_open_from_closed:
       
  1882   assumes st: "s \<subseteq> t" and tu: "t \<subseteq> u" and s: "open s"
       
  1883       and t: "closed t" and u: "connected u" and ts: "connected (t - s)"
       
  1884   shows "connected(u - s)"
       
  1885 proof (rule connectedI)
       
  1886   fix A B
       
  1887   assume AB: "open A" "open B" "A \<inter> (u - s) \<noteq> {}" "B \<inter> (u - s) \<noteq> {}"
       
  1888      and disj: "A \<inter> B \<inter> (u - s) = {}" and cover: "u - s \<subseteq> A \<union> B"
       
  1889   then consider "A \<inter> (t - s) = {}" | "B \<inter> (t - s) = {}"
       
  1890     using st ts tu connectedD [of "t-s" "A" "B"]
       
  1891     by auto
       
  1892   then show False
       
  1893   proof cases
       
  1894     case 1
       
  1895     then have "(A - t) \<inter> (B \<union> s) \<inter> u = {}"
       
  1896       using disj st by auto
       
  1897     moreover have  "u \<subseteq> (A - t) \<union> (B \<union> s)" using 1 cover by auto
       
  1898     ultimately show False
       
  1899       using connectedD [of u "A - t" "B \<union> s"] AB s t 1 u
       
  1900       by auto
       
  1901   next
       
  1902     case 2
       
  1903     then have "(A \<union> s) \<inter> (B - t) \<inter> u = {}"
       
  1904       using disj st
       
  1905       by auto
       
  1906     moreover have "u \<subseteq> (A \<union> s) \<union> (B - t)" using 2 cover by auto
       
  1907     ultimately show False
       
  1908       using connectedD [of u "A \<union> s" "B - t"] AB s t 2 u
       
  1909       by auto
       
  1910   qed
       
  1911 qed
  1837 
  1912 
  1838 lemma connected_iff_const:
  1913 lemma connected_iff_const:
  1839   fixes S :: "'a::topological_space set"
  1914   fixes S :: "'a::topological_space set"
  1840   shows "connected S \<longleftrightarrow> (\<forall>P::'a \<Rightarrow> bool. continuous_on S P \<longrightarrow> (\<exists>c. \<forall>s\<in>S. P s = c))"
  1915   shows "connected S \<longleftrightarrow> (\<forall>P::'a \<Rightarrow> bool. continuous_on S P \<longrightarrow> (\<exists>c. \<forall>s\<in>S. P s = c))"
  1841 proof safe
  1916 proof safe
  1936     by (rule continuous_on_compose[OF *])
  2011     by (rule continuous_on_compose[OF *])
  1937   from connectedD_const[OF \<open>connected s\<close> this] show "\<exists>c. \<forall>s\<in>f ` s. P s = c"
  2012   from connectedD_const[OF \<open>connected s\<close> this] show "\<exists>c. \<forall>s\<in>f ` s. P s = c"
  1938     by auto
  2013     by auto
  1939 qed
  2014 qed
  1940 
  2015 
  1941 section \<open>Connectedness\<close>
  2016 
       
  2017 section \<open>Linear Continuum Topologies\<close>
  1942 
  2018 
  1943 class linear_continuum_topology = linorder_topology + linear_continuum
  2019 class linear_continuum_topology = linorder_topology + linear_continuum
  1944 begin
  2020 begin
  1945 
  2021 
  1946 lemma Inf_notin_open:
  2022 lemma Inf_notin_open: