src/HOL/Multivariate_Analysis/Path_Connected.thy
changeset 62390 842917225d56
parent 62087 44841d07ef1d
child 62393 a620a8756b7c
equal deleted inserted replaced
62380:29800666e526 62390:842917225d56
   502       done
   502       done
   503    } note ** = this
   503    } note ** = this
   504   show ?thesis
   504   show ?thesis
   505     using assms
   505     using assms
   506     apply (simp add: arc_def simple_path_def path_join, clarify)
   506     apply (simp add: arc_def simple_path_def path_join, clarify)
   507     apply (simp add: joinpaths_def split: split_if_asm)
   507     apply (simp add: joinpaths_def split: if_split_asm)
   508     apply (force dest: inj_onD [OF injg1])
   508     apply (force dest: inj_onD [OF injg1])
   509     apply (metis *)
   509     apply (metis *)
   510     apply (metis **)
   510     apply (metis **)
   511     apply (force dest: inj_onD [OF injg2])
   511     apply (force dest: inj_onD [OF injg2])
   512     done
   512     done
   540       by (auto dest: inj_onD [OF injg2])
   540       by (auto dest: inj_onD [OF injg2])
   541    } note * = this
   541    } note * = this
   542   show ?thesis
   542   show ?thesis
   543     apply (simp add: arc_def inj_on_def)
   543     apply (simp add: arc_def inj_on_def)
   544     apply (clarsimp simp add: arc_imp_path assms path_join)
   544     apply (clarsimp simp add: arc_imp_path assms path_join)
   545     apply (simp add: joinpaths_def split: split_if_asm)
   545     apply (simp add: joinpaths_def split: if_split_asm)
   546     apply (force dest: inj_onD [OF injg1])
   546     apply (force dest: inj_onD [OF injg1])
   547     apply (metis *)
   547     apply (metis *)
   548     apply (metis *)
   548     apply (metis *)
   549     apply (force dest: inj_onD [OF injg2])
   549     apply (force dest: inj_onD [OF injg2])
   550     done
   550     done
   640   { fix x y
   640   { fix x y
   641     assume "x \<in> closed_segment u v" "y \<in> closed_segment u v" "g x = g y"
   641     assume "x \<in> closed_segment u v" "y \<in> closed_segment u v" "g x = g y"
   642     then have "x = y \<or> x = u \<and> y = v \<or> x = v \<and> y = u"
   642     then have "x = y \<or> x = u \<and> y = v \<or> x = v \<and> y = u"
   643     using sim [of "(x-u)/(v-u)" "(y-u)/(v-u)"] p
   643     using sim [of "(x-u)/(v-u)" "(y-u)/(v-u)"] p
   644     by (auto simp: closed_segment_real_eq image_affinity_atLeastAtMost divide_simps
   644     by (auto simp: closed_segment_real_eq image_affinity_atLeastAtMost divide_simps
   645        split: split_if_asm)
   645        split: if_split_asm)
   646   } moreover
   646   } moreover
   647   have "path(subpath u v g) \<and> u\<noteq>v"
   647   have "path(subpath u v g) \<and> u\<noteq>v"
   648     using sim [of "1/3" "2/3"] p
   648     using sim [of "1/3" "2/3"] p
   649     by (auto simp: subpath_def)
   649     by (auto simp: subpath_def)
   650   ultimately show ?rhs
   650   ultimately show ?rhs
   676   { fix x y
   676   { fix x y
   677     assume "x \<in> closed_segment u v" "y \<in> closed_segment u v" "g x = g y"
   677     assume "x \<in> closed_segment u v" "y \<in> closed_segment u v" "g x = g y"
   678     then have "x = y"
   678     then have "x = y"
   679     using sim [of "(x-u)/(v-u)" "(y-u)/(v-u)"] p
   679     using sim [of "(x-u)/(v-u)" "(y-u)/(v-u)"] p
   680     by (force simp add: inj_on_def closed_segment_real_eq image_affinity_atLeastAtMost divide_simps
   680     by (force simp add: inj_on_def closed_segment_real_eq image_affinity_atLeastAtMost divide_simps
   681        split: split_if_asm)
   681        split: if_split_asm)
   682   } moreover
   682   } moreover
   683   have "path(subpath u v g) \<and> u\<noteq>v"
   683   have "path(subpath u v g) \<and> u\<noteq>v"
   684     using sim [of "1/3" "2/3"] p
   684     using sim [of "1/3" "2/3"] p
   685     by (auto simp: subpath_def)
   685     by (auto simp: subpath_def)
   686   ultimately show ?rhs
   686   ultimately show ?rhs
   805     using \<open>0 \<le> u\<close> g0 disj
   805     using \<open>0 \<le> u\<close> g0 disj
   806     apply (simp add: path_image_subpath_gen)
   806     apply (simp add: path_image_subpath_gen)
   807     apply (auto simp: closed_segment_eq_real_ivl pathstart_def pathfinish_def subpath_def)
   807     apply (auto simp: closed_segment_eq_real_ivl pathstart_def pathfinish_def subpath_def)
   808     apply (rename_tac y)
   808     apply (rename_tac y)
   809     apply (drule_tac x="y/u" in spec)
   809     apply (drule_tac x="y/u" in spec)
   810     apply (auto split: split_if_asm)
   810     apply (auto split: if_split_asm)
   811     done
   811     done
   812 qed
   812 qed
   813 
   813 
   814 lemma exists_path_subpath_to_frontier:
   814 lemma exists_path_subpath_to_frontier:
   815     fixes S :: "'a::real_normed_vector set"
   815     fixes S :: "'a::real_normed_vector set"
  1528     apply (rule set_eqI)
  1528     apply (rule set_eqI)
  1529     apply rule
  1529     apply rule
  1530     unfolding image_iff
  1530     unfolding image_iff
  1531     apply (rule_tac x=x in bexI)
  1531     apply (rule_tac x=x in bexI)
  1532     unfolding mem_Collect_eq
  1532     unfolding mem_Collect_eq
  1533     apply (auto split: split_if_asm)
  1533     apply (auto split: if_split_asm)
  1534     done
  1534     done
  1535   have "continuous_on (- {0}) (\<lambda>x::'a. 1 / norm x)"
  1535   have "continuous_on (- {0}) (\<lambda>x::'a. 1 / norm x)"
  1536     by (auto intro!: continuous_intros)
  1536     by (auto intro!: continuous_intros)
  1537   then show ?thesis
  1537   then show ?thesis
  1538     unfolding * **
  1538     unfolding * **