Metamath Proof Explorer


Theorem volico2

Description: The measure of left-closed right-open interval. (Contributed by Glauco Siliprandi, 3-Mar-2021)

Ref Expression
Assertion volico2 A B vol A B = if A B B A 0

Proof

Step Hyp Ref Expression
1 iftrue A < B if A < B B A 0 = B A
2 1 adantl A B A < B if A < B B A 0 = B A
3 volico A B vol A B = if A < B B A 0
4 3 adantr A B A < B vol A B = if A < B B A 0
5 simpll A B A < B A
6 simplr A B A < B B
7 simpr A B A < B A < B
8 5 6 7 ltled A B A < B A B
9 8 iftrued A B A < B if A B B A 0 = B A
10 2 4 9 3eqtr4d A B A < B vol A B = if A B B A 0
11 10 adantlr A B A B A < B vol A B = if A B B A 0
12 simpll A B A B ¬ A < B A B
13 12 simpld A B A B ¬ A < B A
14 12 simprd A B A B ¬ A < B B
15 simplr A B A B ¬ A < B A B
16 simpr A B A B ¬ A < B ¬ A < B
17 13 14 15 16 lenlteq A B A B ¬ A < B A = B
18 simplr A B A = B B
19 simpr A B A = B A = B
20 19 eqcomd A B A = B B = A
21 18 20 eqled A B A = B B A
22 simpll A B A = B A
23 18 22 lenltd A B A = B B A ¬ A < B
24 21 23 mpbid A B A = B ¬ A < B
25 24 iffalsed A B A = B if A < B B A 0 = 0
26 recn A A
27 26 subidd A A A = 0
28 27 eqcomd A 0 = A A
29 28 ad2antrr A B A = B 0 = A A
30 oveq1 A = B A A = B A
31 30 adantl A B A = B A A = B A
32 25 29 31 3eqtrd A B A = B if A < B B A 0 = B A
33 3 adantr A B A = B vol A B = if A < B B A 0
34 22 19 eqled A B A = B A B
35 34 iftrued A B A = B if A B B A 0 = B A
36 32 33 35 3eqtr4d A B A = B vol A B = if A B B A 0
37 12 17 36 syl2anc A B A B ¬ A < B vol A B = if A B B A 0
38 11 37 pm2.61dan A B A B vol A B = if A B B A 0
39 8 stoic1a A B ¬ A B ¬ A < B
40 39 iffalsed A B ¬ A B if A < B B A 0 = 0
41 3 adantr A B ¬ A B vol A B = if A < B B A 0
42 iffalse ¬ A B if A B B A 0 = 0
43 42 adantl A B ¬ A B if A B B A 0 = 0
44 40 41 43 3eqtr4d A B ¬ A B vol A B = if A B B A 0
45 38 44 pm2.61dan A B vol A B = if A B B A 0