Metamath Proof Explorer


Theorem itg11

Description: The integral of an indicator function is the volume of the set. (Contributed by Mario Carneiro, 18-Jun-2014) (Revised by Mario Carneiro, 23-Aug-2014)

Ref Expression
Hypothesis i1f1.1 F = x if x A 1 0
Assertion itg11 A dom vol vol A 1 F = vol A

Proof

Step Hyp Ref Expression
1 i1f1.1 F = x if x A 1 0
2 ovol0 vol * = 0
3 0mbl dom vol
4 mblvol dom vol vol = vol *
5 3 4 ax-mp vol = vol *
6 itg10 1 × 0 = 0
7 2 5 6 3eqtr4ri 1 × 0 = vol
8 noel ¬ x
9 eleq2 A = x A x
10 8 9 mtbiri A = ¬ x A
11 10 iffalsed A = if x A 1 0 = 0
12 11 mpteq2dv A = x if x A 1 0 = x 0
13 fconstmpt × 0 = x 0
14 12 1 13 3eqtr4g A = F = × 0
15 14 fveq2d A = 1 F = 1 × 0
16 fveq2 A = vol A = vol
17 7 15 16 3eqtr4a A = 1 F = vol A
18 17 a1i A dom vol vol A A = 1 F = vol A
19 n0 A y y A
20 1 i1f1 A dom vol vol A F dom 1
21 20 adantr A dom vol vol A y A F dom 1
22 itg1val F dom 1 1 F = z ran F 0 z vol F -1 z
23 21 22 syl A dom vol vol A y A 1 F = z ran F 0 z vol F -1 z
24 1 i1f1lem F : 0 1 A dom vol F -1 1 = A
25 24 simpli F : 0 1
26 frn F : 0 1 ran F 0 1
27 25 26 ax-mp ran F 0 1
28 ssdif ran F 0 1 ran F 0 0 1 0
29 27 28 ax-mp ran F 0 0 1 0
30 difprsnss 0 1 0 1
31 29 30 sstri ran F 0 1
32 31 a1i A dom vol vol A y A ran F 0 1
33 mblss A dom vol A
34 33 adantr A dom vol vol A A
35 34 sselda A dom vol vol A y A y
36 eleq1w x = y x A y A
37 36 ifbid x = y if x A 1 0 = if y A 1 0
38 1ex 1 V
39 c0ex 0 V
40 38 39 ifex if y A 1 0 V
41 37 1 40 fvmpt y F y = if y A 1 0
42 35 41 syl A dom vol vol A y A F y = if y A 1 0
43 iftrue y A if y A 1 0 = 1
44 43 adantl A dom vol vol A y A if y A 1 0 = 1
45 42 44 eqtrd A dom vol vol A y A F y = 1
46 ffn F : 0 1 F Fn
47 25 46 ax-mp F Fn
48 fnfvelrn F Fn y F y ran F
49 47 35 48 sylancr A dom vol vol A y A F y ran F
50 45 49 eqeltrrd A dom vol vol A y A 1 ran F
51 ax-1ne0 1 0
52 eldifsn 1 ran F 0 1 ran F 1 0
53 50 51 52 sylanblrc A dom vol vol A y A 1 ran F 0
54 53 snssd A dom vol vol A y A 1 ran F 0
55 32 54 eqssd A dom vol vol A y A ran F 0 = 1
56 55 sumeq1d A dom vol vol A y A z ran F 0 z vol F -1 z = z 1 z vol F -1 z
57 1re 1
58 24 simpri A dom vol F -1 1 = A
59 58 ad2antrr A dom vol vol A y A F -1 1 = A
60 59 fveq2d A dom vol vol A y A vol F -1 1 = vol A
61 60 oveq2d A dom vol vol A y A 1 vol F -1 1 = 1 vol A
62 simplr A dom vol vol A y A vol A
63 62 recnd A dom vol vol A y A vol A
64 63 mulid2d A dom vol vol A y A 1 vol A = vol A
65 61 64 eqtrd A dom vol vol A y A 1 vol F -1 1 = vol A
66 65 63 eqeltrd A dom vol vol A y A 1 vol F -1 1
67 id z = 1 z = 1
68 sneq z = 1 z = 1
69 68 imaeq2d z = 1 F -1 z = F -1 1
70 69 fveq2d z = 1 vol F -1 z = vol F -1 1
71 67 70 oveq12d z = 1 z vol F -1 z = 1 vol F -1 1
72 71 sumsn 1 1 vol F -1 1 z 1 z vol F -1 z = 1 vol F -1 1
73 57 66 72 sylancr A dom vol vol A y A z 1 z vol F -1 z = 1 vol F -1 1
74 73 65 eqtrd A dom vol vol A y A z 1 z vol F -1 z = vol A
75 56 74 eqtrd A dom vol vol A y A z ran F 0 z vol F -1 z = vol A
76 23 75 eqtrd A dom vol vol A y A 1 F = vol A
77 76 ex A dom vol vol A y A 1 F = vol A
78 77 exlimdv A dom vol vol A y y A 1 F = vol A
79 19 78 syl5bi A dom vol vol A A 1 F = vol A
80 18 79 pm2.61dne A dom vol vol A 1 F = vol A