Metamath Proof Explorer


Theorem meadif

Description: The measure of the difference of two sets. (Contributed by Glauco Siliprandi, 8-Apr-2021)

Ref Expression
Hypotheses meadif.m ( 𝜑𝑀 ∈ Meas )
meadif.a ( 𝜑𝐴 ∈ dom 𝑀 )
meadif.r ( 𝜑 → ( 𝑀𝐴 ) ∈ ℝ )
meadif.b ( 𝜑𝐵 ∈ dom 𝑀 )
meadif.s ( 𝜑𝐵𝐴 )
Assertion meadif ( 𝜑 → ( 𝑀 ‘ ( 𝐴𝐵 ) ) = ( ( 𝑀𝐴 ) − ( 𝑀𝐵 ) ) )

Proof

Step Hyp Ref Expression
1 meadif.m ( 𝜑𝑀 ∈ Meas )
2 meadif.a ( 𝜑𝐴 ∈ dom 𝑀 )
3 meadif.r ( 𝜑 → ( 𝑀𝐴 ) ∈ ℝ )
4 meadif.b ( 𝜑𝐵 ∈ dom 𝑀 )
5 meadif.s ( 𝜑𝐵𝐴 )
6 undif ( 𝐵𝐴 ↔ ( 𝐵 ∪ ( 𝐴𝐵 ) ) = 𝐴 )
7 5 6 sylib ( 𝜑 → ( 𝐵 ∪ ( 𝐴𝐵 ) ) = 𝐴 )
8 7 eqcomd ( 𝜑𝐴 = ( 𝐵 ∪ ( 𝐴𝐵 ) ) )
9 8 fveq2d ( 𝜑 → ( 𝑀𝐴 ) = ( 𝑀 ‘ ( 𝐵 ∪ ( 𝐴𝐵 ) ) ) )
10 eqid dom 𝑀 = dom 𝑀
11 1 10 dmmeasal ( 𝜑 → dom 𝑀 ∈ SAlg )
12 saldifcl2 ( ( dom 𝑀 ∈ SAlg ∧ 𝐴 ∈ dom 𝑀𝐵 ∈ dom 𝑀 ) → ( 𝐴𝐵 ) ∈ dom 𝑀 )
13 11 2 4 12 syl3anc ( 𝜑 → ( 𝐴𝐵 ) ∈ dom 𝑀 )
14 disjdif ( 𝐵 ∩ ( 𝐴𝐵 ) ) = ∅
15 14 a1i ( 𝜑 → ( 𝐵 ∩ ( 𝐴𝐵 ) ) = ∅ )
16 1 2 3 5 4 meassre ( 𝜑 → ( 𝑀𝐵 ) ∈ ℝ )
17 difssd ( 𝜑 → ( 𝐴𝐵 ) ⊆ 𝐴 )
18 1 2 3 17 13 meassre ( 𝜑 → ( 𝑀 ‘ ( 𝐴𝐵 ) ) ∈ ℝ )
19 1 10 4 13 15 16 18 meadjunre ( 𝜑 → ( 𝑀 ‘ ( 𝐵 ∪ ( 𝐴𝐵 ) ) ) = ( ( 𝑀𝐵 ) + ( 𝑀 ‘ ( 𝐴𝐵 ) ) ) )
20 9 19 eqtr2d ( 𝜑 → ( ( 𝑀𝐵 ) + ( 𝑀 ‘ ( 𝐴𝐵 ) ) ) = ( 𝑀𝐴 ) )
21 16 recnd ( 𝜑 → ( 𝑀𝐵 ) ∈ ℂ )
22 18 recnd ( 𝜑 → ( 𝑀 ‘ ( 𝐴𝐵 ) ) ∈ ℂ )
23 3 recnd ( 𝜑 → ( 𝑀𝐴 ) ∈ ℂ )
24 21 22 23 addrsub ( 𝜑 → ( ( ( 𝑀𝐵 ) + ( 𝑀 ‘ ( 𝐴𝐵 ) ) ) = ( 𝑀𝐴 ) ↔ ( 𝑀 ‘ ( 𝐴𝐵 ) ) = ( ( 𝑀𝐴 ) − ( 𝑀𝐵 ) ) ) )
25 20 24 mpbid ( 𝜑 → ( 𝑀 ‘ ( 𝐴𝐵 ) ) = ( ( 𝑀𝐴 ) − ( 𝑀𝐵 ) ) )