src/HOL/Library/Topology_Euclidean_Space.thy
changeset 31534 0de814d2ff95
parent 31533 2cce9283ba72
child 31535 f5bde0d3c385
equal deleted inserted replaced
31533:2cce9283ba72 31534:0de814d2ff95
  2449   hence "convergent f" by (rule Cauchy_convergent)
  2449   hence "convergent f" by (rule Cauchy_convergent)
  2450   hence "\<exists>l. f ----> l" unfolding convergent_def .  
  2450   hence "\<exists>l. f ----> l" unfolding convergent_def .  
  2451   thus "\<exists>l. (f ---> l) sequentially" unfolding LIMSEQ_conv_tendsto .
  2451   thus "\<exists>l. (f ---> l) sequentially" unfolding LIMSEQ_conv_tendsto .
  2452 qed
  2452 qed
  2453 
  2453 
       
  2454 lemma complete_imp_closed: assumes "complete s" shows "closed s"
       
  2455 proof -
       
  2456   { fix x assume "x islimpt s"
       
  2457     then obtain f where f: "\<forall>n. f n \<in> s - {x}" "(f ---> x) sequentially"
       
  2458       unfolding islimpt_sequential by auto
       
  2459     then obtain l where l: "l\<in>s" "(f ---> l) sequentially"
       
  2460       using `complete s`[unfolded complete_def] using convergent_imp_cauchy[of f x] by auto
       
  2461     hence "x \<in> s"  using Lim_unique[of sequentially f l x] trivial_limit_sequentially f(2) by auto
       
  2462   }
       
  2463   thus "closed s" unfolding closed_limpt by auto
       
  2464 qed
       
  2465 
  2454 lemma complete_eq_closed:
  2466 lemma complete_eq_closed:
  2455   fixes s :: "'a::complete_space set"
  2467   fixes s :: "'a::complete_space set"
  2456   shows "complete s \<longleftrightarrow> closed s" (is "?lhs = ?rhs")
  2468   shows "complete s \<longleftrightarrow> closed s" (is "?lhs = ?rhs")
  2457 proof
  2469 proof
  2458   assume ?lhs
  2470   assume ?lhs thus ?rhs by (rule complete_imp_closed)
  2459   { fix x assume "x islimpt s"
       
  2460     then obtain f where f:"\<forall>n. f n \<in> s - {x}" "(f ---> x) sequentially" unfolding islimpt_sequential by auto
       
  2461     then obtain l where l: "l\<in>s" "(f ---> l) sequentially" using `?lhs`[unfolded complete_def]  using convergent_imp_cauchy[of f x] by auto
       
  2462     hence "x \<in> s"  using Lim_unique[of sequentially f l x] trivial_limit_sequentially f(2) by auto  }
       
  2463   thus ?rhs unfolding closed_limpt by auto
       
  2464 next
  2471 next
  2465   assume ?rhs
  2472   assume ?rhs
  2466   { fix f assume as:"\<forall>n::nat. f n \<in> s" "Cauchy f"
  2473   { fix f assume as:"\<forall>n::nat. f n \<in> s" "Cauchy f"
  2467     then obtain l where "(f ---> l) sequentially" using complete_univ[unfolded complete_def, THEN spec[where x=f]] by auto
  2474     then obtain l where "(f ---> l) sequentially" using complete_univ[unfolded complete_def, THEN spec[where x=f]] by auto
  2468     hence "\<exists>l\<in>s. (f ---> l) sequentially" using `?rhs`[unfolded closed_sequential_limits, THEN spec[where x=f], THEN spec[where x=l]] using as(1) by auto  }
  2475     hence "\<exists>l\<in>s. (f ---> l) sequentially" using `?rhs`[unfolded closed_sequential_limits, THEN spec[where x=f], THEN spec[where x=l]] using as(1) by auto  }
  2723       case True note cas = this
  2730       case True note cas = this
  2724       with as(2) have "infinite {y. \<exists>n. y = x n}" using sequence_infinite_lemma[of x l] by auto
  2731       with as(2) have "infinite {y. \<exists>n. y = x n}" using sequence_infinite_lemma[of x l] by auto
  2725       then obtain l' where "l'\<in>s" "l' islimpt {y. \<exists>n. y = x n}" using assms[THEN spec[where x="{y. \<exists>n. y = x n}"]] as(1) by auto
  2732       then obtain l' where "l'\<in>s" "l' islimpt {y. \<exists>n. y = x n}" using assms[THEN spec[where x="{y. \<exists>n. y = x n}"]] as(1) by auto
  2726       thus "l\<in>s" using sequence_unique_limpt[of x l l'] using as cas by auto
  2733       thus "l\<in>s" using sequence_unique_limpt[of x l l'] using as cas by auto
  2727     qed  }
  2734     qed  }
  2728   thus ?thesis unfolding closed_sequential_limits by auto (* FIXME: simp_depth_limit exceeded *)
  2735   thus ?thesis unfolding closed_sequential_limits by fast
  2729 qed
  2736 qed
  2730 
  2737 
  2731 text{* Hence express everything as an equivalence.   *}
  2738 text{* Hence express everything as an equivalence.   *}
  2732 
  2739 
  2733 lemma compact_eq_heine_borel:
  2740 lemma compact_eq_heine_borel: