Metamath Proof Explorer


Theorem itgreval

Description: Decompose the integral of a real function into positive and negative parts. (Contributed by Mario Carneiro, 31-Jul-2014)

Ref Expression
Hypotheses iblrelem.1 φxAB
itgreval.2 φxAB𝐿1
Assertion itgreval φABdx=Aif0BB0dxAif0BB0dx

Proof

Step Hyp Ref Expression
1 iblrelem.1 φxAB
2 itgreval.2 φxAB𝐿1
3 1 2 itgrevallem1 φABdx=2xifxA0BB02xifxA0BB0
4 0re 0
5 ifcl B0if0BB0
6 1 4 5 sylancl φxAif0BB0
7 1 iblrelem φxAB𝐿1xABMblFn2xifxA0BB02xifxA0BB0
8 2 7 mpbid φxABMblFn2xifxA0BB02xifxA0BB0
9 8 simp1d φxABMblFn
10 1 9 mbfpos φxAif0BB0MblFn
11 ifan ifxA0BB0=ifxAif0BB00
12 11 mpteq2i xifxA0BB0=xifxAif0BB00
13 12 fveq2i 2xifxA0BB0=2xifxAif0BB00
14 8 simp2d φ2xifxA0BB0
15 13 14 eqeltrrid φ2xifxAif0BB00
16 max1 0B0if0BB0
17 4 1 16 sylancr φxA0if0BB0
18 6 17 iblpos φxAif0BB0𝐿1xAif0BB0MblFn2xifxAif0BB00
19 10 15 18 mpbir2and φxAif0BB0𝐿1
20 6 19 17 itgposval φAif0BB0dx=2xifxAif0BB00
21 20 13 eqtr4di φAif0BB0dx=2xifxA0BB0
22 1 renegcld φxAB
23 ifcl B0if0BB0
24 22 4 23 sylancl φxAif0BB0
25 1 9 mbfneg φxABMblFn
26 22 25 mbfpos φxAif0BB0MblFn
27 ifan ifxA0BB0=ifxAif0BB00
28 27 mpteq2i xifxA0BB0=xifxAif0BB00
29 28 fveq2i 2xifxA0BB0=2xifxAif0BB00
30 8 simp3d φ2xifxA0BB0
31 29 30 eqeltrrid φ2xifxAif0BB00
32 max1 0B0if0BB0
33 4 22 32 sylancr φxA0if0BB0
34 24 33 iblpos φxAif0BB0𝐿1xAif0BB0MblFn2xifxAif0BB00
35 26 31 34 mpbir2and φxAif0BB0𝐿1
36 24 35 33 itgposval φAif0BB0dx=2xifxAif0BB00
37 36 29 eqtr4di φAif0BB0dx=2xifxA0BB0
38 21 37 oveq12d φAif0BB0dxAif0BB0dx=2xifxA0BB02xifxA0BB0
39 3 38 eqtr4d φABdx=Aif0BB0dxAif0BB0dx