src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy
changeset 66199 994322c17274
parent 66193 6e6eeef63589
child 66294 0442b3f45556
equal deleted inserted replaced
66198:4a5589dd8e1a 66199:994322c17274
  1768         assume "(x, k) \<in> p'"
  1768         assume "(x, k) \<in> p'"
  1769         then have "\<exists>i l. x \<in> i \<and> i \<in> d \<and> (x, l) \<in> p \<and> k = i \<inter> l"
  1769         then have "\<exists>i l. x \<in> i \<and> i \<in> d \<and> (x, l) \<in> p \<and> k = i \<inter> l"
  1770           unfolding p'_def by auto
  1770           unfolding p'_def by auto
  1771         then obtain i l where il: "x \<in> i" "i \<in> d" "(x, l) \<in> p" "k = i \<inter> l" by blast
  1771         then obtain i l where il: "x \<in> i" "i \<in> d" "(x, l) \<in> p" "k = i \<inter> l" by blast
  1772         then show "\<exists>y i l. (x, k) = (y, i \<inter> l) \<and> (y, l) \<in> p \<and> i \<in> d \<and> i \<inter> l \<noteq> {}"
  1772         then show "\<exists>y i l. (x, k) = (y, i \<inter> l) \<and> (y, l) \<in> p \<and> i \<in> d \<and> i \<inter> l \<noteq> {}"
  1773           apply (rule_tac x=x in exI)
  1773           using p'(2) by fastforce
  1774           apply (rule_tac x=i in exI)
       
  1775           apply (rule_tac x=l in exI)
       
  1776           using p'(2)[OF il(3)]
       
  1777           apply auto
       
  1778           done
       
  1779       qed
  1774       qed
  1780       have sum_p': "(\<Sum>(x, k)\<in>p'. norm (integral k f)) = (\<Sum>k\<in>snd ` p'. norm (integral k f))"
  1775       have sum_p': "(\<Sum>(x, k)\<in>p'. norm (integral k f)) = (\<Sum>k\<in>snd ` p'. norm (integral k f))"
  1781         apply (subst sum.over_tagged_division_lemma[OF p'',of "\<lambda>k. norm (integral k f)"])
  1776         apply (subst sum.over_tagged_division_lemma[OF p'',of "\<lambda>k. norm (integral k f)"])
  1782         unfolding norm_eq_zero
  1777          apply (auto intro: integral_null simp: content_eq_0_interior)
  1783          apply (rule integral_null)
       
  1784         apply (simp add: content_eq_0_interior)
       
  1785         apply rule
       
  1786         done
  1778         done
  1787       note snd_p = division_ofD[OF division_of_tagged_division[OF p(1)]]
  1779       note snd_p = division_ofD[OF division_of_tagged_division[OF p(1)]]
  1788 
  1780 
  1789       have *: "\<And>sni sni' sf sf'. \<bar>sf' - sni'\<bar> < e / 2 \<longrightarrow> ?S - e / 2 < sni \<and> sni' \<le> ?S \<and>
  1781       have *: "\<And>sni sni' sf sf'. \<bar>sf' - sni'\<bar> < e / 2 \<longrightarrow> ?S - e / 2 < sni \<and> sni' \<le> ?S \<and>
  1790         sni \<le> sni' \<and> sf' = sf \<longrightarrow> \<bar>sf - ?S\<bar> < e"
  1782         sni \<le> sni' \<and> sf' = sf \<longrightarrow> \<bar>sf - ?S\<bar> < e"
  1847             apply (rule p')
  1839             apply (rule p')
  1848           proof goal_cases
  1840           proof goal_cases
  1849             case prems: (1 l y)
  1841             case prems: (1 l y)
  1850             have "interior (k \<inter> l) \<subseteq> interior (l \<inter> y)"
  1842             have "interior (k \<inter> l) \<subseteq> interior (l \<inter> y)"
  1851               apply (subst(2) interior_Int)
  1843               apply (subst(2) interior_Int)
  1852               apply (rule Int_greatest)
  1844               by (metis Int_lower2 Int_subset_iff interior_mono prems(4))
  1853               defer
       
  1854               apply (subst prems(4))
       
  1855               apply auto
       
  1856               done
       
  1857             then have *: "interior (k \<inter> l) = {}"
  1845             then have *: "interior (k \<inter> l) = {}"
  1858               using snd_p(5)[OF prems(1-3)] by auto
  1846               using snd_p(5)[OF prems(1-3)] by auto
  1859             from d'(4)[OF k] snd_p(4)[OF prems(1)] guess u1 v1 u2 v2 by (elim exE) note uv=this
  1847             from d'(4)[OF k] snd_p(4)[OF prems(1)] guess u1 v1 u2 v2 by (elim exE) note uv=this
  1860             show ?case
  1848             show ?case
  1861               using *
  1849               using *
  1892             by auto from d'(4)[OF this(1)] *(1)[OF this(2)]
  1880             by auto from d'(4)[OF this(1)] *(1)[OF this(2)]
  1893           guess u1 v1 u2 v2 by (elim exE) note uv=this
  1881           guess u1 v1 u2 v2 by (elim exE) note uv=this
  1894           have "l1 \<noteq> l2 \<or> k1 \<noteq> k2"
  1882           have "l1 \<noteq> l2 \<or> k1 \<noteq> k2"
  1895             using as by auto
  1883             using as by auto
  1896           then have "interior k1 \<inter> interior k2 = {} \<or> interior l1 \<inter> interior l2 = {}"
  1884           then have "interior k1 \<inter> interior k2 = {} \<or> interior l1 \<inter> interior l2 = {}"
  1897             apply -
  1885             by (metis Pair_inject \<open>k1 \<in> snd ` p\<close> \<open>l1 \<in> d\<close> as(4) d'(5) snd_p(5))
  1898             apply (erule disjE)
       
  1899             apply (rule disjI2)
       
  1900             apply (rule d'(5))
       
  1901             prefer 4
       
  1902             apply (rule disjI1)
       
  1903             apply (rule *)
       
  1904             using as
       
  1905             apply auto
       
  1906             done
       
  1907           moreover have "interior (l1 \<inter> k1) = interior (l2 \<inter> k2)"
  1886           moreover have "interior (l1 \<inter> k1) = interior (l2 \<inter> k2)"
  1908             using as(2) by auto
  1887             using as(2) by auto
  1909           ultimately have "interior(l1 \<inter> k1) = {}"
  1888           ultimately have "interior(l1 \<inter> k1) = {}"
  1910             by auto
  1889             by auto
  1911           then show "norm (integral (l1 \<inter> k1) f) = 0"
  1890           then show "norm (integral (l1 \<inter> k1) f) = 0"
  1932             by auto
  1911             by auto
  1933         next
  1912         next
  1934           case (1 x a b)
  1913           case (1 x a b)
  1935           then show ?case
  1914           then show ?case
  1936             unfolding p'_def
  1915             unfolding p'_def
  1937             apply safe
  1916           proof -
  1938             apply (rule_tac x=i in exI)
  1917             assume "(a, b) \<in> {(x, k) |x k. \<exists>i l. x \<in> i \<and> i \<in> d \<and> (x, l) \<in> p \<and> k = i \<inter> l}"
  1939             apply (rule_tac x=l in exI)
  1918             then have "\<exists>n N. (a, b) = (n, N) \<and> (\<exists>Na Nb. n \<in> Na \<and> Na \<in> d \<and> (n, Nb) \<in> p \<and> N = Na \<inter> Nb)"
  1940             unfolding snd_conv image_iff
  1919               by force
  1941             apply safe
  1920             then show ?thesis
  1942             apply (rule_tac x="(a,l)" in bexI)
  1921               by (metis (no_types) image_iff snd_conv)
  1943             apply auto
  1922           qed
  1944             done
       
  1945         qed
  1923         qed
  1946         finally show ?case .
  1924         finally show ?case .
  1947       next
  1925       next
  1948         case 3
  1926         case 3
  1949         let ?S = "{(x, i \<inter> l) |x i l. (x, l) \<in> p \<and> i \<in> d}"
  1927         let ?S = "{(x, i \<inter> l) |x i l. (x, l) \<in> p \<and> i \<in> d}"
  2017           fix x l
  1995           fix x l
  2018           assume as: "(x, l) \<in> p"
  1996           assume as: "(x, l) \<in> p"
  2019           note xl = p'(2-4)[OF this]
  1997           note xl = p'(2-4)[OF this]
  2020           from this(3) guess u v by (elim exE) note uv=this
  1998           from this(3) guess u v by (elim exE) note uv=this
  2021           have "(\<Sum>i\<in>d. \<bar>content (l \<inter> i)\<bar>) = (\<Sum>k\<in>d. content (k \<inter> cbox u v))"
  1999           have "(\<Sum>i\<in>d. \<bar>content (l \<inter> i)\<bar>) = (\<Sum>k\<in>d. content (k \<inter> cbox u v))"
  2022             apply (rule sum.cong)
  2000             by (simp add: Int_commute uv)
  2023             apply (rule refl)
       
  2024             apply (drule d'(4))
       
  2025             apply safe
       
  2026             apply (subst Int_commute)
       
  2027             unfolding Int_interval uv
       
  2028             apply (subst abs_of_nonneg)
       
  2029             apply auto
       
  2030             done
       
  2031           also have "\<dots> = sum content {k \<inter> cbox u v| k. k \<in> d}"
  2001           also have "\<dots> = sum content {k \<inter> cbox u v| k. k \<in> d}"
  2032             unfolding Setcompr_eq_image
  2002             unfolding Setcompr_eq_image
  2033             apply (rule sum.reindex_nontrivial [unfolded o_def, symmetric])
  2003             apply (rule sum.reindex_nontrivial [unfolded o_def, symmetric])
  2034             apply (rule d')
  2004             apply (rule d')
  2035           proof goal_cases
  2005           proof goal_cases
  2093     by (rule elementary_interval) auto
  2063     by (rule elementary_interval) auto
  2094   have D_2: "bdd_above (?f`?D)"
  2064   have D_2: "bdd_above (?f`?D)"
  2095     by (intro bdd_aboveI2[where M=B] assms(2)[rule_format]) simp
  2065     by (intro bdd_aboveI2[where M=B] assms(2)[rule_format]) simp
  2096   note D = D_1 D_2
  2066   note D = D_1 D_2
  2097   let ?S = "SUP d:?D. ?f d"
  2067   let ?S = "SUP d:?D. ?f d"
  2098   have f_int: "\<And>a b. f absolutely_integrable_on cbox a b"
  2068   have "\<And>a b. f integrable_on cbox a b"
       
  2069     using assms(1) integrable_on_subcbox by blast
       
  2070   then have f_int: "\<And>a b. f absolutely_integrable_on cbox a b"
  2099     apply (rule bounded_variation_absolutely_integrable_interval[where B=B])
  2071     apply (rule bounded_variation_absolutely_integrable_interval[where B=B])
  2100     apply (rule integrable_on_subcbox[OF assms(1)])
  2072     using assms(2) apply blast
  2101     defer
       
  2102     apply safe
       
  2103     apply (rule assms(2)[rule_format])
       
  2104     apply auto
       
  2105     done
  2073     done
  2106   have "((\<lambda>x. norm (f x)) has_integral ?S) UNIV"
  2074   have "((\<lambda>x. norm (f x)) has_integral ?S) UNIV"
  2107     apply (subst has_integral_alt')
  2075     apply (subst has_integral_alt')
  2108     apply safe
  2076     apply safe
  2109   proof goal_cases
  2077   proof goal_cases