src/HOL/Multivariate_Analysis/Integration.thy
changeset 63170 eae6549dbea2
parent 63092 a949b2a5f51d
child 63295 52792bb9126e
equal deleted inserted replaced
63169:d36c7dc40000 63170:eae6549dbea2
  2557 
  2557 
  2558 lemma has_integral_sub:
  2558 lemma has_integral_sub:
  2559   "(f has_integral k) s \<Longrightarrow> (g has_integral l) s \<Longrightarrow>
  2559   "(f has_integral k) s \<Longrightarrow> (g has_integral l) s \<Longrightarrow>
  2560     ((\<lambda>x. f x - g x) has_integral (k - l)) s"
  2560     ((\<lambda>x. f x - g x) has_integral (k - l)) s"
  2561   using has_integral_add[OF _ has_integral_neg, of f k s g l]
  2561   using has_integral_add[OF _ has_integral_neg, of f k s g l]
  2562   unfolding algebra_simps
  2562   by (auto simp: algebra_simps) 
  2563   by auto
       
  2564 
  2563 
  2565 lemma integral_0 [simp]:
  2564 lemma integral_0 [simp]:
  2566   "integral s (\<lambda>x::'n::euclidean_space. 0::'m::real_normed_vector) = 0"
  2565   "integral s (\<lambda>x::'n::euclidean_space. 0::'m::real_normed_vector) = 0"
  2567   by (rule integral_unique has_integral_0)+
  2566   by (rule integral_unique has_integral_0)+
  2568 
  2567 
  6701         note ** = d(2)[OF this]
  6700         note ** = d(2)[OF this]
  6702         have *: "inj_on (\<lambda>(x, k). (g x, g ` k)) p"
  6701         have *: "inj_on (\<lambda>(x, k). (g x, g ` k)) p"
  6703           using inj(1) unfolding inj_on_def by fastforce
  6702           using inj(1) unfolding inj_on_def by fastforce
  6704         have "(\<Sum>(x, k)\<in>(\<lambda>(x, k). (g x, g ` k)) ` p. content k *\<^sub>R f x) - i = r *\<^sub>R (\<Sum>(x, k)\<in>p. content k *\<^sub>R f (g x)) - i" (is "?l = _")
  6703         have "(\<Sum>(x, k)\<in>(\<lambda>(x, k). (g x, g ` k)) ` p. content k *\<^sub>R f x) - i = r *\<^sub>R (\<Sum>(x, k)\<in>p. content k *\<^sub>R f (g x)) - i" (is "?l = _")
  6705           using assms(7)
  6704           using assms(7)
  6706           unfolding algebra_simps add_left_cancel scaleR_right.setsum
  6705           apply (simp only: algebra_simps add_left_cancel scaleR_right.setsum)
  6707           by (subst setsum.reindex_bij_betw[symmetric, where h="\<lambda>(x, k). (g x, g ` k)" and S=p])
  6706           apply (subst setsum.reindex_bij_betw[symmetric, where h="\<lambda>(x, k). (g x, g ` k)" and S=p])
  6708              (auto intro!: * setsum.cong simp: bij_betw_def dest!: p(4))
  6707           apply (auto intro!: * setsum.cong simp: bij_betw_def dest!: p(4))
       
  6708           done
  6709       also have "\<dots> = r *\<^sub>R ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f (g x)) - (1 / r) *\<^sub>R i)" (is "_ = ?r")
  6709       also have "\<dots> = r *\<^sub>R ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f (g x)) - (1 / r) *\<^sub>R i)" (is "_ = ?r")
  6710         unfolding scaleR_diff_right scaleR_scaleR
  6710         unfolding scaleR_diff_right scaleR_scaleR
  6711         using assms(1)
  6711         using assms(1)
  6712         by auto
  6712         by auto
  6713       finally have *: "?l = ?r" .
  6713       finally have *: "?l = ?r" .
  7757       using d(1) assms(3) by auto
  7757       using d(1) assms(3) by auto
  7758     fix t :: real
  7758     fix t :: real
  7759     assume as: "c \<le> t" "t < c + ?d"
  7759     assume as: "c \<le> t" "t < c + ?d"
  7760     have *: "integral {a .. c} f = integral {a .. b} f - integral {c .. b} f"
  7760     have *: "integral {a .. c} f = integral {a .. b} f - integral {c .. b} f"
  7761       "integral {a .. t} f = integral {a .. b} f - integral {t .. b} f"
  7761       "integral {a .. t} f = integral {a .. b} f - integral {t .. b} f"
  7762       unfolding algebra_simps
  7762       apply (simp_all only: algebra_simps)
  7763       apply (rule_tac[!] integral_combine)
  7763       apply (rule_tac[!] integral_combine)
  7764       using assms as
  7764       using assms as
  7765       apply auto
  7765       apply auto
  7766       done
  7766       done
  7767     have "(- c) - d < (- t) \<and> - t \<le> - c"
  7767     have "(- c) - d < (- t) \<and> - t \<le> - c"