Metamath Proof Explorer


Theorem inuni

Description: The intersection of a union U. A with a class B is equal to the union of the intersections of each element of A with B . (Contributed by FL, 24-Mar-2007)

Ref Expression
Assertion inuni ( 𝐴𝐵 ) = { 𝑥 ∣ ∃ 𝑦𝐴 𝑥 = ( 𝑦𝐵 ) }

Proof

Step Hyp Ref Expression
1 eluni2 ( 𝑧 𝐴 ↔ ∃ 𝑦𝐴 𝑧𝑦 )
2 1 anbi1i ( ( 𝑧 𝐴𝑧𝐵 ) ↔ ( ∃ 𝑦𝐴 𝑧𝑦𝑧𝐵 ) )
3 elin ( 𝑧 ∈ ( 𝐴𝐵 ) ↔ ( 𝑧 𝐴𝑧𝐵 ) )
4 ancom ( ( 𝑧𝑥 ∧ ∃ 𝑦𝐴 𝑥 = ( 𝑦𝐵 ) ) ↔ ( ∃ 𝑦𝐴 𝑥 = ( 𝑦𝐵 ) ∧ 𝑧𝑥 ) )
5 r19.41v ( ∃ 𝑦𝐴 ( 𝑥 = ( 𝑦𝐵 ) ∧ 𝑧𝑥 ) ↔ ( ∃ 𝑦𝐴 𝑥 = ( 𝑦𝐵 ) ∧ 𝑧𝑥 ) )
6 4 5 bitr4i ( ( 𝑧𝑥 ∧ ∃ 𝑦𝐴 𝑥 = ( 𝑦𝐵 ) ) ↔ ∃ 𝑦𝐴 ( 𝑥 = ( 𝑦𝐵 ) ∧ 𝑧𝑥 ) )
7 6 exbii ( ∃ 𝑥 ( 𝑧𝑥 ∧ ∃ 𝑦𝐴 𝑥 = ( 𝑦𝐵 ) ) ↔ ∃ 𝑥𝑦𝐴 ( 𝑥 = ( 𝑦𝐵 ) ∧ 𝑧𝑥 ) )
8 rexcom4 ( ∃ 𝑦𝐴𝑥 ( 𝑥 = ( 𝑦𝐵 ) ∧ 𝑧𝑥 ) ↔ ∃ 𝑥𝑦𝐴 ( 𝑥 = ( 𝑦𝐵 ) ∧ 𝑧𝑥 ) )
9 7 8 bitr4i ( ∃ 𝑥 ( 𝑧𝑥 ∧ ∃ 𝑦𝐴 𝑥 = ( 𝑦𝐵 ) ) ↔ ∃ 𝑦𝐴𝑥 ( 𝑥 = ( 𝑦𝐵 ) ∧ 𝑧𝑥 ) )
10 vex 𝑦 ∈ V
11 10 inex1 ( 𝑦𝐵 ) ∈ V
12 eleq2 ( 𝑥 = ( 𝑦𝐵 ) → ( 𝑧𝑥𝑧 ∈ ( 𝑦𝐵 ) ) )
13 11 12 ceqsexv ( ∃ 𝑥 ( 𝑥 = ( 𝑦𝐵 ) ∧ 𝑧𝑥 ) ↔ 𝑧 ∈ ( 𝑦𝐵 ) )
14 elin ( 𝑧 ∈ ( 𝑦𝐵 ) ↔ ( 𝑧𝑦𝑧𝐵 ) )
15 13 14 bitri ( ∃ 𝑥 ( 𝑥 = ( 𝑦𝐵 ) ∧ 𝑧𝑥 ) ↔ ( 𝑧𝑦𝑧𝐵 ) )
16 15 rexbii ( ∃ 𝑦𝐴𝑥 ( 𝑥 = ( 𝑦𝐵 ) ∧ 𝑧𝑥 ) ↔ ∃ 𝑦𝐴 ( 𝑧𝑦𝑧𝐵 ) )
17 r19.41v ( ∃ 𝑦𝐴 ( 𝑧𝑦𝑧𝐵 ) ↔ ( ∃ 𝑦𝐴 𝑧𝑦𝑧𝐵 ) )
18 16 17 bitri ( ∃ 𝑦𝐴𝑥 ( 𝑥 = ( 𝑦𝐵 ) ∧ 𝑧𝑥 ) ↔ ( ∃ 𝑦𝐴 𝑧𝑦𝑧𝐵 ) )
19 9 18 bitri ( ∃ 𝑥 ( 𝑧𝑥 ∧ ∃ 𝑦𝐴 𝑥 = ( 𝑦𝐵 ) ) ↔ ( ∃ 𝑦𝐴 𝑧𝑦𝑧𝐵 ) )
20 2 3 19 3bitr4i ( 𝑧 ∈ ( 𝐴𝐵 ) ↔ ∃ 𝑥 ( 𝑧𝑥 ∧ ∃ 𝑦𝐴 𝑥 = ( 𝑦𝐵 ) ) )
21 eluniab ( 𝑧 { 𝑥 ∣ ∃ 𝑦𝐴 𝑥 = ( 𝑦𝐵 ) } ↔ ∃ 𝑥 ( 𝑧𝑥 ∧ ∃ 𝑦𝐴 𝑥 = ( 𝑦𝐵 ) ) )
22 20 21 bitr4i ( 𝑧 ∈ ( 𝐴𝐵 ) ↔ 𝑧 { 𝑥 ∣ ∃ 𝑦𝐴 𝑥 = ( 𝑦𝐵 ) } )
23 22 eqriv ( 𝐴𝐵 ) = { 𝑥 ∣ ∃ 𝑦𝐴 𝑥 = ( 𝑦𝐵 ) }