src/HOL/Multivariate_Analysis/Fashoda.thy
changeset 61165 8020249565fb
parent 60420 884f54e01427
child 61166 5976fe402824
equal deleted inserted replaced
61164:2a03ae772c60 61165:8020249565fb
   173         done
   173         done
   174     qed
   174     qed
   175   qed
   175   qed
   176   have 3: "(negatex \<circ> sqprojection \<circ> ?F) ` cbox (-1) 1 \<subseteq> cbox (-1) 1"
   176   have 3: "(negatex \<circ> sqprojection \<circ> ?F) ` cbox (-1) 1 \<subseteq> cbox (-1) 1"
   177     unfolding subset_eq
   177     unfolding subset_eq
   178     apply rule
   178   proof (rule, goals)
   179   proof -
   179     case (1 x)
   180     case goal1
       
   181     then obtain y :: "real^2" where y:
   180     then obtain y :: "real^2" where y:
   182         "y \<in> cbox (- 1) 1"
   181         "y \<in> cbox (- 1) 1"
   183         "x = (negatex \<circ> sqprojection \<circ> (\<lambda>w. (f \<circ> (\<lambda>x. x $ 1)) w - (g \<circ> (\<lambda>x. x $ 2)) w)) y"
   182         "x = (negatex \<circ> sqprojection \<circ> (\<lambda>w. (f \<circ> (\<lambda>x. x $ 1)) w - (g \<circ> (\<lambda>x. x $ 2)) w)) y"
   184       unfolding image_iff ..
   183       unfolding image_iff ..
   185     have "?F y \<noteq> 0"
   184     have "?F y \<noteq> 0"
   196     then show "x \<in> cbox (-1) 1"
   195     then show "x \<in> cbox (-1) 1"
   197       unfolding mem_interval_cart interval_cbox_cart infnorm_2
   196       unfolding mem_interval_cart interval_cbox_cart infnorm_2
   198       apply -
   197       apply -
   199       apply rule
   198       apply rule
   200     proof -
   199     proof -
   201       case goal1
   200       fix i
   202       then show ?case
   201       assume "max \<bar>x $ 1\<bar> \<bar>x $ 2\<bar> = 1"
       
   202       then show "(- 1) $ i \<le> x $ i \<and> x $ i \<le> 1 $ i"
   203         apply (cases "i = 1")
   203         apply (cases "i = 1")
   204         defer
   204         defer
   205         apply (drule 21)
   205         apply (drule 21)
   206         apply auto
   206         apply auto
   207         done
   207         done
   832       z \<in> closed_segment (vector [pathfinish f $ 1, a $ 2 - 2]) (vector [b $ 1 + 2, a $ 2 - 2]) \<Longrightarrow>
   832       z \<in> closed_segment (vector [pathfinish f $ 1, a $ 2 - 2]) (vector [b $ 1 + 2, a $ 2 - 2]) \<Longrightarrow>
   833     (((z \<in> closed_segment (vector [pathstart g $ 1, pathstart g $ 2 - 3]) (pathstart g)) \<or>
   833     (((z \<in> closed_segment (vector [pathstart g $ 1, pathstart g $ 2 - 3]) (pathstart g)) \<or>
   834       z \<in> closed_segment (pathfinish g) (vector [pathfinish g $ 1, a $ 2 - 1])) \<or>
   834       z \<in> closed_segment (pathfinish g) (vector [pathfinish g $ 1, a $ 2 - 1])) \<or>
   835       z \<in> closed_segment (vector [pathfinish g $ 1, a $ 2 - 1]) (vector [b $ 1 + 1, a $ 2 - 1])) \<or>
   835       z \<in> closed_segment (vector [pathfinish g $ 1, a $ 2 - 1]) (vector [b $ 1 + 1, a $ 2 - 1])) \<or>
   836       z \<in> closed_segment (vector [b $ 1 + 1, a $ 2 - 1]) (vector [b $ 1 + 1, b $ 2 + 3]) \<Longrightarrow> False"
   836       z \<in> closed_segment (vector [b $ 1 + 1, a $ 2 - 1]) (vector [b $ 1 + 1, b $ 2 + 3]) \<Longrightarrow> False"
   837       apply (simp only: segment_vertical segment_horizontal vector_2)
   837     proof (simp only: segment_vertical segment_horizontal vector_2, goals)
   838     proof -
   838       case as: 1
   839       case goal1 note as=this
       
   840       have "pathfinish f \<in> cbox a b"
   839       have "pathfinish f \<in> cbox a b"
   841         using assms(3) pathfinish_in_path_image[of f] by auto 
   840         using assms(3) pathfinish_in_path_image[of f] by auto 
   842       then have "1 + b $ 1 \<le> pathfinish f $ 1 \<Longrightarrow> False"
   841       then have "1 + b $ 1 \<le> pathfinish f $ 1 \<Longrightarrow> False"
   843         unfolding mem_interval_cart forall_2 by auto
   842         unfolding mem_interval_cart forall_2 by auto
   844       then have "z$1 \<noteq> pathfinish f$1"
   843       then have "z$1 \<noteq> pathfinish f$1"
   853         by auto
   852         by auto
   854       then have "z$1 \<noteq> pathstart f$1"
   853       then have "z$1 \<noteq> pathstart f$1"
   855         using as(2) using assms ab
   854         using as(2) using assms ab
   856         by (auto simp add: field_simps)
   855         by (auto simp add: field_simps)
   857       ultimately have *: "z$2 = a$2 - 2"
   856       ultimately have *: "z$2 = a$2 - 2"
   858         using goal1(1)
   857         using as(1)
   859         by auto
   858         by auto
   860       have "z$1 \<noteq> pathfinish g$1"
   859       have "z$1 \<noteq> pathfinish g$1"
   861         using as(2)
   860         using as(2)
   862         using assms ab
   861         using assms ab
   863         by (auto simp add: field_simps *)
   862         by (auto simp add: field_simps *)