11 begin |
11 begin |
12 |
12 |
13 text{*We follow John Harrison in formalizing the Gauge integral.*} |
13 text{*We follow John Harrison in formalizing the Gauge integral.*} |
14 |
14 |
15 definition |
15 definition |
16 |
|
17 --{*Partitions and tagged partitions etc.*} |
16 --{*Partitions and tagged partitions etc.*} |
18 |
17 |
19 partition :: "[(real*real),nat => real] => bool" |
18 partition :: "[(real*real),nat => real] => bool" where |
20 "partition = (%(a,b) D. D 0 = a & |
19 "partition = (%(a,b) D. D 0 = a & |
21 (\<exists>N. (\<forall>n < N. D(n) < D(Suc n)) & |
20 (\<exists>N. (\<forall>n < N. D(n) < D(Suc n)) & |
22 (\<forall>n \<ge> N. D(n) = b)))" |
21 (\<forall>n \<ge> N. D(n) = b)))" |
23 |
22 |
24 psize :: "(nat => real) => nat" |
23 definition |
|
24 psize :: "(nat => real) => nat" where |
25 "psize D = (SOME N. (\<forall>n < N. D(n) < D(Suc n)) & |
25 "psize D = (SOME N. (\<forall>n < N. D(n) < D(Suc n)) & |
26 (\<forall>n \<ge> N. D(n) = D(N)))" |
26 (\<forall>n \<ge> N. D(n) = D(N)))" |
27 |
27 |
28 tpart :: "[(real*real),((nat => real)*(nat =>real))] => bool" |
28 definition |
|
29 tpart :: "[(real*real),((nat => real)*(nat =>real))] => bool" where |
29 "tpart = (%(a,b) (D,p). partition(a,b) D & |
30 "tpart = (%(a,b) (D,p). partition(a,b) D & |
30 (\<forall>n. D(n) \<le> p(n) & p(n) \<le> D(Suc n)))" |
31 (\<forall>n. D(n) \<le> p(n) & p(n) \<le> D(Suc n)))" |
31 |
32 |
32 --{*Gauges and gauge-fine divisions*} |
33 --{*Gauges and gauge-fine divisions*} |
33 |
34 |
34 gauge :: "[real => bool, real => real] => bool" |
35 definition |
|
36 gauge :: "[real => bool, real => real] => bool" where |
35 "gauge E g = (\<forall>x. E x --> 0 < g(x))" |
37 "gauge E g = (\<forall>x. E x --> 0 < g(x))" |
36 |
38 |
37 fine :: "[real => real, ((nat => real)*(nat => real))] => bool" |
39 definition |
|
40 fine :: "[real => real, ((nat => real)*(nat => real))] => bool" where |
38 "fine = (%g (D,p). \<forall>n. n < (psize D) --> D(Suc n) - D(n) < g(p n))" |
41 "fine = (%g (D,p). \<forall>n. n < (psize D) --> D(Suc n) - D(n) < g(p n))" |
39 |
42 |
40 --{*Riemann sum*} |
43 --{*Riemann sum*} |
41 |
44 |
42 rsum :: "[((nat=>real)*(nat=>real)),real=>real] => real" |
45 definition |
|
46 rsum :: "[((nat=>real)*(nat=>real)),real=>real] => real" where |
43 "rsum = (%(D,p) f. \<Sum>n=0..<psize(D). f(p n) * (D(Suc n) - D(n)))" |
47 "rsum = (%(D,p) f. \<Sum>n=0..<psize(D). f(p n) * (D(Suc n) - D(n)))" |
44 |
48 |
45 --{*Gauge integrability (definite)*} |
49 --{*Gauge integrability (definite)*} |
46 |
50 |
47 Integral :: "[(real*real),real=>real,real] => bool" |
51 definition |
|
52 Integral :: "[(real*real),real=>real,real] => bool" where |
48 "Integral = (%(a,b) f k. \<forall>e > 0. |
53 "Integral = (%(a,b) f k. \<forall>e > 0. |
49 (\<exists>g. gauge(%x. a \<le> x & x \<le> b) g & |
54 (\<exists>g. gauge(%x. a \<le> x & x \<le> b) g & |
50 (\<forall>D p. tpart(a,b) (D,p) & fine(g)(D,p) --> |
55 (\<forall>D p. tpart(a,b) (D,p) & fine(g)(D,p) --> |
51 \<bar>rsum(D,p) f - k\<bar> < e)))" |
56 \<bar>rsum(D,p) f - k\<bar> < e)))" |
52 |
57 |