src/HOL/Analysis/Derivative.thy
changeset 68072 493b818e8e10
parent 67979 53323937ee25
child 68073 fad29d2a17a5
equal deleted inserted replaced
68001:0a2a1b6507c1 68072:493b818e8e10
   398     by (metis trivial_limit_within)
   398     by (metis trivial_limit_within)
   399   show ?thesis
   399   show ?thesis
   400     apply (rule linear_eq_stdbasis)
   400     apply (rule linear_eq_stdbasis)
   401     unfolding linear_conv_bounded_linear
   401     unfolding linear_conv_bounded_linear
   402     apply (rule as(1,2)[THEN conjunct1])+
   402     apply (rule as(1,2)[THEN conjunct1])+
   403   proof (rule, rule ccontr)
   403   proof (rule ccontr)
   404     fix i :: 'a
   404     fix i :: 'a
   405     assume i: "i \<in> Basis"
   405     assume i: "i \<in> Basis"
   406     define e where "e = norm (f' i - f'' i)"
   406     define e where "e = norm (f' i - f'' i)"
   407     assume "f' i \<noteq> f'' i"
   407     assume "f' i \<noteq> f'' i"
   408     then have "e > 0"
   408     then have "e > 0"
  1603 text \<open>Hence the following eccentric variant of the inverse function theorem.
  1603 text \<open>Hence the following eccentric variant of the inverse function theorem.
  1604   This has no continuity assumptions, but we do need the inverse function.
  1604   This has no continuity assumptions, but we do need the inverse function.
  1605   We could put \<open>f' \<circ> g = I\<close> but this happens to fit with the minimal linear
  1605   We could put \<open>f' \<circ> g = I\<close> but this happens to fit with the minimal linear
  1606   algebra theory I've set up so far.\<close>
  1606   algebra theory I've set up so far.\<close>
  1607 
  1607 
  1608 (* move  before left_inverse_linear in Euclidean_Space*)
       
  1609 
       
  1610 lemma right_inverse_linear:
       
  1611   fixes f :: "'a::euclidean_space \<Rightarrow> 'a"
       
  1612   assumes lf: "linear f"
       
  1613     and gf: "f \<circ> g = id"
       
  1614   shows "linear g"
       
  1615 proof -
       
  1616   from gf have fi: "surj f"
       
  1617     by (auto simp add: surj_def o_def id_def) metis
       
  1618   from linear_surjective_isomorphism[OF lf fi]
       
  1619   obtain h:: "'a \<Rightarrow> 'a" where h: "linear h" "\<forall>x. h (f x) = x" "\<forall>x. f (h x) = x"
       
  1620     by blast
       
  1621   have "h = g"
       
  1622     apply (rule ext)
       
  1623     using gf h(2,3)
       
  1624     apply (simp add: o_def id_def fun_eq_iff)
       
  1625     apply metis
       
  1626     done
       
  1627   with h(1) show ?thesis by blast
       
  1628 qed
       
  1629 
       
  1630 lemma has_derivative_inverse_strong:
  1608 lemma has_derivative_inverse_strong:
  1631   fixes f :: "'n::euclidean_space \<Rightarrow> 'n"
  1609   fixes f :: "'n::euclidean_space \<Rightarrow> 'n"
  1632   assumes "open s"
  1610   assumes "open s"
  1633     and "x \<in> s"
  1611     and "x \<in> s"
  1634     and "continuous_on s f"
  1612     and "continuous_on s f"
  2776     by (metis eventually_gt_at_top)
  2754     by (metis eventually_gt_at_top)
  2777   then have
  2755   then have
  2778     "\<forall>\<^sub>F n in sequentially. ((\<lambda>x. \<Sum>i<n. ?e i x) \<longlongrightarrow> A) ?F"
  2756     "\<forall>\<^sub>F n in sequentially. ((\<lambda>x. \<Sum>i<n. ?e i x) \<longlongrightarrow> A) ?F"
  2779     by eventually_elim
  2757     by eventually_elim
  2780       (auto intro!: tendsto_eq_intros
  2758       (auto intro!: tendsto_eq_intros
  2781         simp: power_0_left if_distrib cond_application_beta sum.delta
  2759         simp: power_0_left if_distrib if_distribR sum.delta
  2782         cong: if_cong)
  2760         cong: if_cong)
  2783   ultimately
  2761   ultimately
  2784   have [tendsto_intros]: "((\<lambda>x. \<Sum>i. ?e i x) \<longlongrightarrow> A) ?F"
  2762   have [tendsto_intros]: "((\<lambda>x. \<Sum>i. ?e i x) \<longlongrightarrow> A) ?F"
  2785     by (auto intro!: swap_uniform_limit[where f="\<lambda>n x. \<Sum>i < n. ?e i x" and F = sequentially])
  2763     by (auto intro!: swap_uniform_limit[where f="\<lambda>n x. \<Sum>i < n. ?e i x" and F = sequentially])
  2786   have [tendsto_intros]: "((\<lambda>x. if x = t then 0 else 1) \<longlongrightarrow> 1) ?F"
  2764   have [tendsto_intros]: "((\<lambda>x. if x = t then 0 else 1) \<longlongrightarrow> 1) ?F"