src/HOL/Analysis/Cauchy_Integral_Theorem.thy
changeset 63955 51a3d38d2281
parent 63938 f6ce08859d4c
child 63969 f4b4fba60b1d
equal deleted inserted replaced
63954:fb03766658f4 63955:51a3d38d2281
   127   { fix x
   127   { fix x
   128     assume x: "x \<in> {a..b} - ({a,b,c} \<union> (s \<union> t))"
   128     assume x: "x \<in> {a..b} - ({a,b,c} \<union> (s \<union> t))"
   129     have "(\<lambda>x. if x \<le> c then f x else g x) differentiable at x within {a..b}" (is "?diff_fg")
   129     have "(\<lambda>x. if x \<le> c then f x else g x) differentiable at x within {a..b}" (is "?diff_fg")
   130     proof (cases x c rule: le_cases)
   130     proof (cases x c rule: le_cases)
   131       case le show ?diff_fg
   131       case le show ?diff_fg
   132         apply (rule differentiable_transform_within [where d = "dist x c" and f = f])
   132       proof (rule differentiable_transform_within [where d = "dist x c" and f = f])
   133         using x le st
   133         have "f differentiable at x within ({a<..<c} - s)"
   134         apply (simp_all add: dist_real_def)
   134           apply (rule differentiable_at_withinI)
   135         apply (rule differentiable_at_withinI)
   135           using x le st
   136         apply (rule differentiable_within_open [where s = "{a<..<c} - s", THEN iffD1], simp_all)
   136           by (metis (no_types, lifting) DiffD1 DiffD2 DiffI UnCI atLeastAtMost_diff_ends atLeastAtMost_iff at_within_interior insert_iff interior_atLeastAtMost le st(3) x)
   137         apply (blast intro: open_greaterThanLessThan finite_imp_closed)
   137         moreover have "open ({a<..<c} - s)"
   138         apply (force elim!: differentiable_subset)+
   138           by (blast intro: open_greaterThanLessThan \<open>finite s\<close> finite_imp_closed)
   139         done
   139         ultimately show "f differentiable at x within {a..b}"
       
   140           using x le by (auto simp add: at_within_open_NO_MATCH differentiable_at_withinI) 
       
   141       qed (use x le st dist_real_def in auto)
   140     next
   142     next
   141       case ge show ?diff_fg
   143       case ge show ?diff_fg
   142         apply (rule differentiable_transform_within [where d = "dist x c" and f = g])
   144       proof (rule differentiable_transform_within [where d = "dist x c" and f = g])
   143         using x ge st
   145         have "g differentiable at x within ({c<..<b} - t)"
   144         apply (simp_all add: dist_real_def)
   146           apply (rule differentiable_at_withinI)
   145         apply (rule differentiable_at_withinI)
   147           using x ge st
   146         apply (rule differentiable_within_open [where s = "{c<..<b} - t", THEN iffD1], simp_all)
   148           by (metis DiffD1 DiffD2 DiffI UnCI atLeastAtMost_diff_ends atLeastAtMost_iff at_within_interior insert_iff interior_atLeastAtMost)
   147         apply (blast intro: open_greaterThanLessThan finite_imp_closed)
   149         moreover have "open ({c<..<b} - t)"
   148         apply (force elim!: differentiable_subset)+
   150           by (blast intro: open_greaterThanLessThan \<open>finite t\<close> finite_imp_closed)
   149         done
   151         ultimately show "g differentiable at x within {a..b}"
       
   152           using x ge by (auto simp add: at_within_open_NO_MATCH differentiable_at_withinI) 
       
   153       qed (use x ge st dist_real_def in auto)
   150     qed
   154     qed
   151   }
   155   }
   152   then have "\<exists>s. finite s \<and>
   156   then have "\<exists>s. finite s \<and>
   153                  (\<forall>x\<in>{a..b} - s. (\<lambda>x. if x \<le> c then f x else g x) differentiable at x within {a..b})"
   157                  (\<forall>x\<in>{a..b} - s. (\<lambda>x. if x \<le> c then f x else g x) differentiable at x within {a..b})"
   154     by (meson finabc)
   158     by (meson finabc)
  3799   have o: "open ({a<..<b} - k)"
  3803   have o: "open ({a<..<b} - k)"
  3800     using \<open>finite k\<close> by (simp add: finite_imp_closed open_Diff)
  3804     using \<open>finite k\<close> by (simp add: finite_imp_closed open_Diff)
  3801   moreover have "{a<..<b} - k \<subseteq> {a..b} - k"
  3805   moreover have "{a<..<b} - k \<subseteq> {a..b} - k"
  3802     by force
  3806     by force
  3803   ultimately have g_diff_at: "\<And>x. \<lbrakk>x \<notin> k; x \<in> {a<..<b}\<rbrakk> \<Longrightarrow> \<gamma> differentiable at x"
  3807   ultimately have g_diff_at: "\<And>x. \<lbrakk>x \<notin> k; x \<in> {a<..<b}\<rbrakk> \<Longrightarrow> \<gamma> differentiable at x"
  3804     by (metis Diff_iff differentiable_on_subset C1_diff_imp_diff [OF g_C1_diff] differentiable_on_def differentiable_within_open)
  3808     by (metis Diff_iff differentiable_on_subset C1_diff_imp_diff [OF g_C1_diff] differentiable_on_def at_within_open)
  3805   { fix w
  3809   { fix w
  3806     assume "w \<noteq> z"
  3810     assume "w \<noteq> z"
  3807     have "continuous_on (ball w (cmod (w - z))) (\<lambda>w. 1 / (w - z))"
  3811     have "continuous_on (ball w (cmod (w - z))) (\<lambda>w. 1 / (w - z))"
  3808       by (auto simp: dist_norm intro!: continuous_intros)
  3812       by (auto simp: dist_norm intro!: continuous_intros)
  3809     moreover have "\<And>x. cmod (w - x) < cmod (w - z) \<Longrightarrow> \<exists>f'. ((\<lambda>w. 1 / (w - z)) has_field_derivative f') (at x)"
  3813     moreover have "\<And>x. cmod (w - x) < cmod (w - z) \<Longrightarrow> \<exists>f'. ((\<lambda>w. 1 / (w - z)) has_field_derivative f') (at x)"
  7525             "\<And>w. w \<notin> s \<Longrightarrow> w \<in> outside(path_image \<gamma>)"
  7529             "\<And>w. w \<notin> s \<Longrightarrow> w \<in> outside(path_image \<gamma>)"
  7526       shows "(f has_contour_integral 0) \<gamma>"
  7530       shows "(f has_contour_integral 0) \<gamma>"
  7527 by (metis Cauchy_theorem_global assms winding_number_zero_in_outside valid_path_imp_path)
  7531 by (metis Cauchy_theorem_global assms winding_number_zero_in_outside valid_path_imp_path)
  7528 
  7532 
  7529 
  7533 
       
  7534 lemma simply_connected_imp_winding_number_zero:
       
  7535   assumes "simply_connected s" "path g"
       
  7536            "path_image g \<subseteq> s" "pathfinish g = pathstart g" "z \<notin> s"
       
  7537     shows "winding_number g z = 0"
       
  7538 proof -
       
  7539   have "winding_number g z = winding_number(linepath (pathstart g) (pathstart g)) z"
       
  7540     apply (rule winding_number_homotopic_paths)
       
  7541     apply (rule homotopic_loops_imp_homotopic_paths_null [where a = "pathstart g"])
       
  7542     apply (rule homotopic_loops_subset [of s])
       
  7543     using assms
       
  7544     apply (auto simp: homotopic_paths_imp_homotopic_loops path_defs simply_connected_eq_contractible_path)
       
  7545     done
       
  7546   also have "... = 0"
       
  7547     using assms by (force intro: winding_number_trivial)
       
  7548   finally show ?thesis .
       
  7549 qed
       
  7550 
       
  7551 lemma Cauchy_theorem_simply_connected:
       
  7552   assumes "open s" "simply_connected s" "f holomorphic_on s" "valid_path g"
       
  7553            "path_image g \<subseteq> s" "pathfinish g = pathstart g"
       
  7554     shows "(f has_contour_integral 0) g"
       
  7555 using assms
       
  7556 apply (simp add: simply_connected_eq_contractible_path)
       
  7557 apply (auto intro!: Cauchy_theorem_null_homotopic [where a = "pathstart g"]
       
  7558                          homotopic_paths_imp_homotopic_loops)
       
  7559 using valid_path_imp_path by blast
       
  7560 
       
  7561 
  7530 end
  7562 end