Metamath Proof Explorer


Theorem bj-restuni

Description: The union of an elementwise intersection by a set is equal to the intersection with that set of the union of the family. See also restuni and restuni2 . (Contributed by BJ, 27-Apr-2021)

Ref Expression
Assertion bj-restuni ( ( 𝑋𝑉𝐴𝑊 ) → ( 𝑋t 𝐴 ) = ( 𝑋𝐴 ) )

Proof

Step Hyp Ref Expression
1 eluni ( 𝑥 ( 𝑋t 𝐴 ) ↔ ∃ 𝑦 ( 𝑥𝑦𝑦 ∈ ( 𝑋t 𝐴 ) ) )
2 elrest ( ( 𝑋𝑉𝐴𝑊 ) → ( 𝑦 ∈ ( 𝑋t 𝐴 ) ↔ ∃ 𝑧𝑋 𝑦 = ( 𝑧𝐴 ) ) )
3 2 anbi2d ( ( 𝑋𝑉𝐴𝑊 ) → ( ( 𝑥𝑦𝑦 ∈ ( 𝑋t 𝐴 ) ) ↔ ( 𝑥𝑦 ∧ ∃ 𝑧𝑋 𝑦 = ( 𝑧𝐴 ) ) ) )
4 3 exbidv ( ( 𝑋𝑉𝐴𝑊 ) → ( ∃ 𝑦 ( 𝑥𝑦𝑦 ∈ ( 𝑋t 𝐴 ) ) ↔ ∃ 𝑦 ( 𝑥𝑦 ∧ ∃ 𝑧𝑋 𝑦 = ( 𝑧𝐴 ) ) ) )
5 eluni ( 𝑥 𝑋 ↔ ∃ 𝑧 ( 𝑥𝑧𝑧𝑋 ) )
6 5 bicomi ( ∃ 𝑧 ( 𝑥𝑧𝑧𝑋 ) ↔ 𝑥 𝑋 )
7 6 anbi1i ( ( ∃ 𝑧 ( 𝑥𝑧𝑧𝑋 ) ∧ 𝑥𝐴 ) ↔ ( 𝑥 𝑋𝑥𝐴 ) )
8 7 a1i ( ( 𝑋𝑉𝐴𝑊 ) → ( ( ∃ 𝑧 ( 𝑥𝑧𝑧𝑋 ) ∧ 𝑥𝐴 ) ↔ ( 𝑥 𝑋𝑥𝐴 ) ) )
9 df-rex ( ∃ 𝑧𝑋 𝑦 = ( 𝑧𝐴 ) ↔ ∃ 𝑧 ( 𝑧𝑋𝑦 = ( 𝑧𝐴 ) ) )
10 9 anbi2i ( ( 𝑥𝑦 ∧ ∃ 𝑧𝑋 𝑦 = ( 𝑧𝐴 ) ) ↔ ( 𝑥𝑦 ∧ ∃ 𝑧 ( 𝑧𝑋𝑦 = ( 𝑧𝐴 ) ) ) )
11 19.42v ( ∃ 𝑧 ( 𝑥𝑦 ∧ ( 𝑧𝑋𝑦 = ( 𝑧𝐴 ) ) ) ↔ ( 𝑥𝑦 ∧ ∃ 𝑧 ( 𝑧𝑋𝑦 = ( 𝑧𝐴 ) ) ) )
12 11 bicomi ( ( 𝑥𝑦 ∧ ∃ 𝑧 ( 𝑧𝑋𝑦 = ( 𝑧𝐴 ) ) ) ↔ ∃ 𝑧 ( 𝑥𝑦 ∧ ( 𝑧𝑋𝑦 = ( 𝑧𝐴 ) ) ) )
13 10 12 bitri ( ( 𝑥𝑦 ∧ ∃ 𝑧𝑋 𝑦 = ( 𝑧𝐴 ) ) ↔ ∃ 𝑧 ( 𝑥𝑦 ∧ ( 𝑧𝑋𝑦 = ( 𝑧𝐴 ) ) ) )
14 13 exbii ( ∃ 𝑦 ( 𝑥𝑦 ∧ ∃ 𝑧𝑋 𝑦 = ( 𝑧𝐴 ) ) ↔ ∃ 𝑦𝑧 ( 𝑥𝑦 ∧ ( 𝑧𝑋𝑦 = ( 𝑧𝐴 ) ) ) )
15 excom ( ∃ 𝑦𝑧 ( 𝑥𝑦 ∧ ( 𝑧𝑋𝑦 = ( 𝑧𝐴 ) ) ) ↔ ∃ 𝑧𝑦 ( 𝑥𝑦 ∧ ( 𝑧𝑋𝑦 = ( 𝑧𝐴 ) ) ) )
16 an12 ( ( 𝑥𝑦 ∧ ( 𝑧𝑋𝑦 = ( 𝑧𝐴 ) ) ) ↔ ( 𝑧𝑋 ∧ ( 𝑥𝑦𝑦 = ( 𝑧𝐴 ) ) ) )
17 16 exbii ( ∃ 𝑦 ( 𝑥𝑦 ∧ ( 𝑧𝑋𝑦 = ( 𝑧𝐴 ) ) ) ↔ ∃ 𝑦 ( 𝑧𝑋 ∧ ( 𝑥𝑦𝑦 = ( 𝑧𝐴 ) ) ) )
18 19.42v ( ∃ 𝑦 ( 𝑧𝑋 ∧ ( 𝑥𝑦𝑦 = ( 𝑧𝐴 ) ) ) ↔ ( 𝑧𝑋 ∧ ∃ 𝑦 ( 𝑥𝑦𝑦 = ( 𝑧𝐴 ) ) ) )
19 eqimss ( 𝑦 = ( 𝑧𝐴 ) → 𝑦 ⊆ ( 𝑧𝐴 ) )
20 19 sseld ( 𝑦 = ( 𝑧𝐴 ) → ( 𝑥𝑦𝑥 ∈ ( 𝑧𝐴 ) ) )
21 20 imdistanri ( ( 𝑥𝑦𝑦 = ( 𝑧𝐴 ) ) → ( 𝑥 ∈ ( 𝑧𝐴 ) ∧ 𝑦 = ( 𝑧𝐴 ) ) )
22 eqimss2 ( 𝑦 = ( 𝑧𝐴 ) → ( 𝑧𝐴 ) ⊆ 𝑦 )
23 22 sseld ( 𝑦 = ( 𝑧𝐴 ) → ( 𝑥 ∈ ( 𝑧𝐴 ) → 𝑥𝑦 ) )
24 23 imdistanri ( ( 𝑥 ∈ ( 𝑧𝐴 ) ∧ 𝑦 = ( 𝑧𝐴 ) ) → ( 𝑥𝑦𝑦 = ( 𝑧𝐴 ) ) )
25 21 24 impbii ( ( 𝑥𝑦𝑦 = ( 𝑧𝐴 ) ) ↔ ( 𝑥 ∈ ( 𝑧𝐴 ) ∧ 𝑦 = ( 𝑧𝐴 ) ) )
26 25 exbii ( ∃ 𝑦 ( 𝑥𝑦𝑦 = ( 𝑧𝐴 ) ) ↔ ∃ 𝑦 ( 𝑥 ∈ ( 𝑧𝐴 ) ∧ 𝑦 = ( 𝑧𝐴 ) ) )
27 19.42v ( ∃ 𝑦 ( 𝑥 ∈ ( 𝑧𝐴 ) ∧ 𝑦 = ( 𝑧𝐴 ) ) ↔ ( 𝑥 ∈ ( 𝑧𝐴 ) ∧ ∃ 𝑦 𝑦 = ( 𝑧𝐴 ) ) )
28 vex 𝑧 ∈ V
29 28 inex1 ( 𝑧𝐴 ) ∈ V
30 29 isseti 𝑦 𝑦 = ( 𝑧𝐴 )
31 30 biantru ( 𝑥 ∈ ( 𝑧𝐴 ) ↔ ( 𝑥 ∈ ( 𝑧𝐴 ) ∧ ∃ 𝑦 𝑦 = ( 𝑧𝐴 ) ) )
32 31 bicomi ( ( 𝑥 ∈ ( 𝑧𝐴 ) ∧ ∃ 𝑦 𝑦 = ( 𝑧𝐴 ) ) ↔ 𝑥 ∈ ( 𝑧𝐴 ) )
33 elin ( 𝑥 ∈ ( 𝑧𝐴 ) ↔ ( 𝑥𝑧𝑥𝐴 ) )
34 32 33 bitri ( ( 𝑥 ∈ ( 𝑧𝐴 ) ∧ ∃ 𝑦 𝑦 = ( 𝑧𝐴 ) ) ↔ ( 𝑥𝑧𝑥𝐴 ) )
35 26 27 34 3bitri ( ∃ 𝑦 ( 𝑥𝑦𝑦 = ( 𝑧𝐴 ) ) ↔ ( 𝑥𝑧𝑥𝐴 ) )
36 35 bianassc ( ( 𝑧𝑋 ∧ ∃ 𝑦 ( 𝑥𝑦𝑦 = ( 𝑧𝐴 ) ) ) ↔ ( ( 𝑥𝑧𝑧𝑋 ) ∧ 𝑥𝐴 ) )
37 17 18 36 3bitri ( ∃ 𝑦 ( 𝑥𝑦 ∧ ( 𝑧𝑋𝑦 = ( 𝑧𝐴 ) ) ) ↔ ( ( 𝑥𝑧𝑧𝑋 ) ∧ 𝑥𝐴 ) )
38 37 exbii ( ∃ 𝑧𝑦 ( 𝑥𝑦 ∧ ( 𝑧𝑋𝑦 = ( 𝑧𝐴 ) ) ) ↔ ∃ 𝑧 ( ( 𝑥𝑧𝑧𝑋 ) ∧ 𝑥𝐴 ) )
39 19.41v ( ∃ 𝑧 ( ( 𝑥𝑧𝑧𝑋 ) ∧ 𝑥𝐴 ) ↔ ( ∃ 𝑧 ( 𝑥𝑧𝑧𝑋 ) ∧ 𝑥𝐴 ) )
40 38 39 bitri ( ∃ 𝑧𝑦 ( 𝑥𝑦 ∧ ( 𝑧𝑋𝑦 = ( 𝑧𝐴 ) ) ) ↔ ( ∃ 𝑧 ( 𝑥𝑧𝑧𝑋 ) ∧ 𝑥𝐴 ) )
41 14 15 40 3bitri ( ∃ 𝑦 ( 𝑥𝑦 ∧ ∃ 𝑧𝑋 𝑦 = ( 𝑧𝐴 ) ) ↔ ( ∃ 𝑧 ( 𝑥𝑧𝑧𝑋 ) ∧ 𝑥𝐴 ) )
42 elin ( 𝑥 ∈ ( 𝑋𝐴 ) ↔ ( 𝑥 𝑋𝑥𝐴 ) )
43 8 41 42 3bitr4g ( ( 𝑋𝑉𝐴𝑊 ) → ( ∃ 𝑦 ( 𝑥𝑦 ∧ ∃ 𝑧𝑋 𝑦 = ( 𝑧𝐴 ) ) ↔ 𝑥 ∈ ( 𝑋𝐴 ) ) )
44 4 43 bitrd ( ( 𝑋𝑉𝐴𝑊 ) → ( ∃ 𝑦 ( 𝑥𝑦𝑦 ∈ ( 𝑋t 𝐴 ) ) ↔ 𝑥 ∈ ( 𝑋𝐴 ) ) )
45 1 44 syl5bb ( ( 𝑋𝑉𝐴𝑊 ) → ( 𝑥 ( 𝑋t 𝐴 ) ↔ 𝑥 ∈ ( 𝑋𝐴 ) ) )
46 45 eqrdv ( ( 𝑋𝑉𝐴𝑊 ) → ( 𝑋t 𝐴 ) = ( 𝑋𝐴 ) )