Metamath Proof Explorer


Theorem rabdif

Description: Move difference in and out of a restricted class abstraction. (Contributed by Steven Nguyen, 6-Jun-2023)

Ref Expression
Assertion rabdif ( { 𝑥𝐴𝜑 } ∖ 𝐵 ) = { 𝑥 ∈ ( 𝐴𝐵 ) ∣ 𝜑 }

Proof

Step Hyp Ref Expression
1 indif2 ( { 𝑥𝜑 } ∩ ( 𝐴𝐵 ) ) = ( ( { 𝑥𝜑 } ∩ 𝐴 ) ∖ 𝐵 )
2 dfrab2 { 𝑥 ∈ ( 𝐴𝐵 ) ∣ 𝜑 } = ( { 𝑥𝜑 } ∩ ( 𝐴𝐵 ) )
3 dfrab2 { 𝑥𝐴𝜑 } = ( { 𝑥𝜑 } ∩ 𝐴 )
4 3 difeq1i ( { 𝑥𝐴𝜑 } ∖ 𝐵 ) = ( ( { 𝑥𝜑 } ∩ 𝐴 ) ∖ 𝐵 )
5 1 2 4 3eqtr4ri ( { 𝑥𝐴𝜑 } ∖ 𝐵 ) = { 𝑥 ∈ ( 𝐴𝐵 ) ∣ 𝜑 }