Metamath Proof Explorer


Theorem elrab2w

Description: Membership in a restricted class abstraction. This is to elrab2 what elab2gw is to elab2g . (Contributed by SN, 2-Sep-2024)

Ref Expression
Hypotheses elrab2w.1 ( 𝑥 = 𝑦 → ( 𝜑𝜓 ) )
elrab2w.2 ( 𝑦 = 𝐴 → ( 𝜓𝜒 ) )
elrab2w.3 𝐶 = { 𝑥𝐵𝜑 }
Assertion elrab2w ( 𝐴𝐶 ↔ ( 𝐴𝐵𝜒 ) )

Proof

Step Hyp Ref Expression
1 elrab2w.1 ( 𝑥 = 𝑦 → ( 𝜑𝜓 ) )
2 elrab2w.2 ( 𝑦 = 𝐴 → ( 𝜓𝜒 ) )
3 elrab2w.3 𝐶 = { 𝑥𝐵𝜑 }
4 elex ( 𝐴𝐶𝐴 ∈ V )
5 elex ( 𝐴𝐵𝐴 ∈ V )
6 5 adantr ( ( 𝐴𝐵𝜒 ) → 𝐴 ∈ V )
7 eleq1w ( 𝑥 = 𝑦 → ( 𝑥𝐵𝑦𝐵 ) )
8 7 1 anbi12d ( 𝑥 = 𝑦 → ( ( 𝑥𝐵𝜑 ) ↔ ( 𝑦𝐵𝜓 ) ) )
9 eleq1 ( 𝑦 = 𝐴 → ( 𝑦𝐵𝐴𝐵 ) )
10 9 2 anbi12d ( 𝑦 = 𝐴 → ( ( 𝑦𝐵𝜓 ) ↔ ( 𝐴𝐵𝜒 ) ) )
11 df-rab { 𝑥𝐵𝜑 } = { 𝑥 ∣ ( 𝑥𝐵𝜑 ) }
12 3 11 eqtri 𝐶 = { 𝑥 ∣ ( 𝑥𝐵𝜑 ) }
13 8 10 12 elab2gw ( 𝐴 ∈ V → ( 𝐴𝐶 ↔ ( 𝐴𝐵𝜒 ) ) )
14 4 6 13 pm5.21nii ( 𝐴𝐶 ↔ ( 𝐴𝐵𝜒 ) )