Metamath Proof Explorer


Theorem rabun2

Description: Abstraction restricted to a union. (Contributed by Stefan O'Rear, 5-Feb-2015)

Ref Expression
Assertion rabun2 { 𝑥 ∈ ( 𝐴 ∪ 𝐵 ) ∣ 𝜑 } = ( { 𝑥 ∈ 𝐴 ∣ 𝜑 } ∪ { 𝑥 ∈ 𝐵 ∣ 𝜑 } )

Proof

Step Hyp Ref Expression
1 df-rab ⊢ { 𝑥 ∈ ( 𝐴 ∪ 𝐵 ) ∣ 𝜑 } = { 𝑥 ∣ ( 𝑥 ∈ ( 𝐴 ∪ 𝐵 ) ∧ 𝜑 ) }
2 df-rab ⊢ { 𝑥 ∈ 𝐴 ∣ 𝜑 } = { 𝑥 ∣ ( 𝑥 ∈ 𝐴 ∧ 𝜑 ) }
3 df-rab ⊢ { 𝑥 ∈ 𝐵 ∣ 𝜑 } = { 𝑥 ∣ ( 𝑥 ∈ 𝐵 ∧ 𝜑 ) }
4 2 3 uneq12i ⊢ ( { 𝑥 ∈ 𝐴 ∣ 𝜑 } ∪ { 𝑥 ∈ 𝐵 ∣ 𝜑 } ) = ( { 𝑥 ∣ ( 𝑥 ∈ 𝐴 ∧ 𝜑 ) } ∪ { 𝑥 ∣ ( 𝑥 ∈ 𝐵 ∧ 𝜑 ) } )
5 elun ⊢ ( 𝑥 ∈ ( 𝐴 ∪ 𝐵 ) ↔ ( 𝑥 ∈ 𝐴 ∨ 𝑥 ∈ 𝐵 ) )
6 5 anbi1i ⊢ ( ( 𝑥 ∈ ( 𝐴 ∪ 𝐵 ) ∧ 𝜑 ) ↔ ( ( 𝑥 ∈ 𝐴 ∨ 𝑥 ∈ 𝐵 ) ∧ 𝜑 ) )
7 andir ⊢ ( ( ( 𝑥 ∈ 𝐴 ∨ 𝑥 ∈ 𝐵 ) ∧ 𝜑 ) ↔ ( ( 𝑥 ∈ 𝐴 ∧ 𝜑 ) ∨ ( 𝑥 ∈ 𝐵 ∧ 𝜑 ) ) )
8 6 7 bitri ⊢ ( ( 𝑥 ∈ ( 𝐴 ∪ 𝐵 ) ∧ 𝜑 ) ↔ ( ( 𝑥 ∈ 𝐴 ∧ 𝜑 ) ∨ ( 𝑥 ∈ 𝐵 ∧ 𝜑 ) ) )
9 8 abbii ⊢ { 𝑥 ∣ ( 𝑥 ∈ ( 𝐴 ∪ 𝐵 ) ∧ 𝜑 ) } = { 𝑥 ∣ ( ( 𝑥 ∈ 𝐴 ∧ 𝜑 ) ∨ ( 𝑥 ∈ 𝐵 ∧ 𝜑 ) ) }
10 unab ⊢ ( { 𝑥 ∣ ( 𝑥 ∈ 𝐴 ∧ 𝜑 ) } ∪ { 𝑥 ∣ ( 𝑥 ∈ 𝐵 ∧ 𝜑 ) } ) = { 𝑥 ∣ ( ( 𝑥 ∈ 𝐴 ∧ 𝜑 ) ∨ ( 𝑥 ∈ 𝐵 ∧ 𝜑 ) ) }
11 9 10 eqtr4i ⊢ { 𝑥 ∣ ( 𝑥 ∈ ( 𝐴 ∪ 𝐵 ) ∧ 𝜑 ) } = ( { 𝑥 ∣ ( 𝑥 ∈ 𝐴 ∧ 𝜑 ) } ∪ { 𝑥 ∣ ( 𝑥 ∈ 𝐵 ∧ 𝜑 ) } )
12 4 11 eqtr4i ⊢ ( { 𝑥 ∈ 𝐴 ∣ 𝜑 } ∪ { 𝑥 ∈ 𝐵 ∣ 𝜑 } ) = { 𝑥 ∣ ( 𝑥 ∈ ( 𝐴 ∪ 𝐵 ) ∧ 𝜑 ) }
13 1 12 eqtr4i ⊢ { 𝑥 ∈ ( 𝐴 ∪ 𝐵 ) ∣ 𝜑 } = ( { 𝑥 ∈ 𝐴 ∣ 𝜑 } ∪ { 𝑥 ∈ 𝐵 ∣ 𝜑 } )