Metamath Proof Explorer


Theorem iinabrex

Description: Rewriting an indexed intersection into an intersection of its image set. (Contributed by Thierry Arnoux, 15-Jun-2024)

Ref Expression
Assertion iinabrex ( ∀ 𝑥𝐴 𝐵𝑉 𝑥𝐴 𝐵 = { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } )

Proof

Step Hyp Ref Expression
1 nfra1 𝑥𝑥𝐴 𝑡𝐵
2 nfv 𝑥 𝑡𝑧
3 eleq2 ( 𝑧 = 𝐵 → ( 𝑡𝑧𝑡𝐵 ) )
4 vex 𝑧 ∈ V
5 4 a1i ( ∀ 𝑥𝐴 𝑡𝐵𝑧 ∈ V )
6 rspa ( ( ∀ 𝑥𝐴 𝑡𝐵𝑥𝐴 ) → 𝑡𝐵 )
7 1 2 3 5 6 elabreximd ( ( ∀ 𝑥𝐴 𝑡𝐵𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } ) → 𝑡𝑧 )
8 7 ex ( ∀ 𝑥𝐴 𝑡𝐵 → ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) )
9 8 alrimiv ( ∀ 𝑥𝐴 𝑡𝐵 → ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) )
10 9 adantl ( ( ∀ 𝑥𝐴 𝐵𝑉 ∧ ∀ 𝑥𝐴 𝑡𝐵 ) → ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) )
11 nfra1 𝑥𝑥𝐴 𝐵𝑉
12 2 nfci 𝑥 𝑧
13 nfre1 𝑥𝑥𝐴 𝑦 = 𝐵
14 13 nfab 𝑥 { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 }
15 12 14 nfel 𝑥 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 }
16 15 2 nfim 𝑥 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 )
17 16 nfal 𝑥𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 )
18 11 17 nfan 𝑥 ( ∀ 𝑥𝐴 𝐵𝑉 ∧ ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) )
19 rspa ( ( ∀ 𝑥𝐴 𝐵𝑉𝑥𝐴 ) → 𝐵𝑉 )
20 19 elexd ( ( ∀ 𝑥𝐴 𝐵𝑉𝑥𝐴 ) → 𝐵 ∈ V )
21 20 adantlr ( ( ( ∀ 𝑥𝐴 𝐵𝑉 ∧ ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) ) ∧ 𝑥𝐴 ) → 𝐵 ∈ V )
22 simplr ( ( ( ∀ 𝑥𝐴 𝐵𝑉 ∧ ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) ) ∧ 𝑥𝐴 ) → ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) )
23 rspe ( ( 𝑥𝐴𝑦 = 𝐵 ) → ∃ 𝑥𝐴 𝑦 = 𝐵 )
24 tbtru ( ∃ 𝑥𝐴 𝑦 = 𝐵 ↔ ( ∃ 𝑥𝐴 𝑦 = 𝐵 ↔ ⊤ ) )
25 23 24 sylib ( ( 𝑥𝐴𝑦 = 𝐵 ) → ( ∃ 𝑥𝐴 𝑦 = 𝐵 ↔ ⊤ ) )
26 25 ex ( 𝑥𝐴 → ( 𝑦 = 𝐵 → ( ∃ 𝑥𝐴 𝑦 = 𝐵 ↔ ⊤ ) ) )
27 26 alrimiv ( 𝑥𝐴 → ∀ 𝑦 ( 𝑦 = 𝐵 → ( ∃ 𝑥𝐴 𝑦 = 𝐵 ↔ ⊤ ) ) )
28 27 adantl ( ( ( ∀ 𝑥𝐴 𝐵𝑉 ∧ ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) ) ∧ 𝑥𝐴 ) → ∀ 𝑦 ( 𝑦 = 𝐵 → ( ∃ 𝑥𝐴 𝑦 = 𝐵 ↔ ⊤ ) ) )
29 elabgt ( ( 𝐵 ∈ V ∧ ∀ 𝑦 ( 𝑦 = 𝐵 → ( ∃ 𝑥𝐴 𝑦 = 𝐵 ↔ ⊤ ) ) ) → ( 𝐵 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } ↔ ⊤ ) )
30 tbtru ( 𝐵 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } ↔ ( 𝐵 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } ↔ ⊤ ) )
31 29 30 sylibr ( ( 𝐵 ∈ V ∧ ∀ 𝑦 ( 𝑦 = 𝐵 → ( ∃ 𝑥𝐴 𝑦 = 𝐵 ↔ ⊤ ) ) ) → 𝐵 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } )
32 21 28 31 syl2anc ( ( ( ∀ 𝑥𝐴 𝐵𝑉 ∧ ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) ) ∧ 𝑥𝐴 ) → 𝐵 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } )
33 eleq1 ( 𝑧 = 𝐵 → ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } ↔ 𝐵 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } ) )
34 33 3 imbi12d ( 𝑧 = 𝐵 → ( ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) ↔ ( 𝐵 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝐵 ) ) )
35 34 spcgv ( 𝐵 ∈ V → ( ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) → ( 𝐵 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝐵 ) ) )
36 35 imp ( ( 𝐵 ∈ V ∧ ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) ) → ( 𝐵 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝐵 ) )
37 36 imp ( ( ( 𝐵 ∈ V ∧ ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) ) ∧ 𝐵 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } ) → 𝑡𝐵 )
38 21 22 32 37 syl21anc ( ( ( ∀ 𝑥𝐴 𝐵𝑉 ∧ ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) ) ∧ 𝑥𝐴 ) → 𝑡𝐵 )
39 38 ex ( ( ∀ 𝑥𝐴 𝐵𝑉 ∧ ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) ) → ( 𝑥𝐴𝑡𝐵 ) )
40 18 39 ralrimi ( ( ∀ 𝑥𝐴 𝐵𝑉 ∧ ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) ) → ∀ 𝑥𝐴 𝑡𝐵 )
41 10 40 impbida ( ∀ 𝑥𝐴 𝐵𝑉 → ( ∀ 𝑥𝐴 𝑡𝐵 ↔ ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) ) )
42 41 abbidv ( ∀ 𝑥𝐴 𝐵𝑉 → { 𝑡 ∣ ∀ 𝑥𝐴 𝑡𝐵 } = { 𝑡 ∣ ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) } )
43 df-iin 𝑥𝐴 𝐵 = { 𝑡 ∣ ∀ 𝑥𝐴 𝑡𝐵 }
44 43 a1i ( ∀ 𝑥𝐴 𝐵𝑉 𝑥𝐴 𝐵 = { 𝑡 ∣ ∀ 𝑥𝐴 𝑡𝐵 } )
45 df-int { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } = { 𝑡 ∣ ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) }
46 45 a1i ( ∀ 𝑥𝐴 𝐵𝑉 { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } = { 𝑡 ∣ ∀ 𝑧 ( 𝑧 ∈ { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } → 𝑡𝑧 ) } )
47 42 44 46 3eqtr4d ( ∀ 𝑥𝐴 𝐵𝑉 𝑥𝐴 𝐵 = { 𝑦 ∣ ∃ 𝑥𝐴 𝑦 = 𝐵 } )