src/HOL/Multivariate_Analysis/Real_Integration.thy
author hoelzl
Mon Feb 22 20:41:49 2010 +0100 (2010-02-22)
changeset 35292 e4a431b6d9b7
permissions -rw-r--r--
Replaced Integration by Multivariate-Analysis/Real_Integration
     1 header{*Integration on real intervals*}
     2 
     3 theory Real_Integration
     4 imports Integration
     5 begin
     6 
     7 text{*We follow John Harrison in formalizing the Gauge integral.*}
     8 
     9 definition Integral :: "real set \<Rightarrow> (real \<Rightarrow> real) \<Rightarrow> real \<Rightarrow> bool" where
    10   "Integral s f k = (f o dest_vec1 has_integral k) (vec1 ` s)"
    11 
    12 lemmas integral_unfold = Integral_def split_conv o_def vec1_interval
    13 
    14 lemma Integral_unique:
    15     "[| Integral{a..b} f k1; Integral{a..b} f k2 |] ==> k1 = k2"
    16   unfolding integral_unfold apply(rule has_integral_unique) by assumption+
    17 
    18 lemma Integral_zero [simp]: "Integral{a..a} f 0"
    19   unfolding integral_unfold by auto
    20 
    21 lemma Integral_eq_diff_bounds: assumes "a \<le> b" shows "Integral{a..b} (%x. 1) (b - a)"
    22   unfolding integral_unfold using has_integral_const[of "1::real" "vec1 a" "vec1 b"]
    23   unfolding content_1'[OF assms] by auto
    24 
    25 lemma Integral_mult_const: assumes "a \<le> b" shows "Integral{a..b} (%x. c)  (c*(b - a))"
    26   unfolding integral_unfold using has_integral_const[of "c::real" "vec1 a" "vec1 b"]
    27   unfolding content_1'[OF assms] by(auto simp add:field_simps)
    28 
    29 lemma Integral_mult: assumes "Integral{a..b} f k" shows "Integral{a..b} (%x. c * f x) (c * k)"
    30   using assms unfolding integral_unfold  apply(drule_tac has_integral_cmul[where c=c]) by auto
    31 
    32 lemma Integral_add:
    33   assumes "Integral {a..b} f x1" "Integral {b..c} f x2"  "a \<le> b" and "b \<le> c"
    34   shows "Integral {a..c} f (x1 + x2)"
    35   using assms unfolding integral_unfold apply-
    36   apply(rule has_integral_combine[of "vec1 a" "vec1 b" "vec1 c"]) by  auto
    37 
    38 lemma FTC1: assumes "a \<le> b" "\<forall>x. a \<le> x & x \<le> b --> DERIV f x :> f'(x)"
    39   shows "Integral{a..b} f' (f(b) - f(a))"
    40 proof-note fundamental_theorem_of_calculus[OF assms(1), of"f o dest_vec1" "f' o dest_vec1"]
    41   note * = this[unfolded o_def vec1_dest_vec1]
    42   have **:"\<And>x. (\<lambda>xa\<Colon>real. xa * f' x) =  op * (f' x)" apply(rule ext) by(auto simp add:field_simps)
    43   show ?thesis unfolding integral_unfold apply(rule *)
    44     using assms(2) unfolding DERIV_conv_has_derivative has_vector_derivative_def
    45     apply safe apply(rule has_derivative_at_within) by(auto simp add:**) qed
    46 
    47 lemma Integral_subst: "[| Integral{a..b} f k1; k2=k1 |] ==> Integral{a..b} f k2"
    48 by simp
    49 
    50 subsection {* Additivity Theorem of Gauge Integral *}
    51 
    52 text{* Bartle/Sherbert: Theorem 10.1.5 p. 278 *}
    53 lemma Integral_add_fun: "[| Integral{a..b} f k1; Integral{a..b} g k2 |] ==> Integral{a..b} (%x. f x + g x) (k1 + k2)"
    54   unfolding integral_unfold apply(rule has_integral_add) by assumption+
    55 
    56 lemma norm_vec1'[simp]:"norm (vec1 x) = norm x"
    57   using norm_vector_1[of "vec1 x"] by auto
    58 
    59 lemma Integral_le: assumes "a \<le> b" "\<forall>x. a \<le> x & x \<le> b --> f(x) \<le> g(x)" "Integral{a..b} f k1" "Integral{a..b} g k2" shows "k1 \<le> k2"
    60 proof- note assms(3-4)[unfolded integral_unfold] note has_integral_vec1[OF this(1)] has_integral_vec1[OF this(2)]
    61   note has_integral_component_le[OF this,of 1] thus ?thesis using assms(2) by auto qed
    62 
    63 lemma monotonic_anti_derivative:
    64   fixes f g :: "real => real" shows
    65      "[| a \<le> b; \<forall>c. a \<le> c & c \<le> b --> f' c \<le> g' c;
    66          \<forall>x. DERIV f x :> f' x; \<forall>x. DERIV g x :> g' x |]
    67       ==> f b - f a \<le> g b - g a"
    68 apply (rule Integral_le, assumption)
    69 apply (auto intro: FTC1)
    70 done
    71 
    72 end