Metamath Proof Explorer


Theorem fvmptrab

Description: Value of a function mapping a set to a class abstraction restricting a class depending on the argument of the function. More general version of fvmptrabfv , but relying on the fact that out-of-domain arguments evaluate to the empty set, which relies on set.mm's particular encoding. (Contributed by AV, 14-Feb-2022)

Ref Expression
Hypotheses fvmptrab.f 𝐹 = ( 𝑥𝑉 ↦ { 𝑦𝑀𝜑 } )
fvmptrab.r ( 𝑥 = 𝑋 → ( 𝜑𝜓 ) )
fvmptrab.s ( 𝑥 = 𝑋𝑀 = 𝑁 )
fvmptrab.v ( 𝑋𝑉𝑁 ∈ V )
fvmptrab.n ( 𝑋𝑉𝑁 = ∅ )
Assertion fvmptrab ( 𝐹𝑋 ) = { 𝑦𝑁𝜓 }

Proof

Step Hyp Ref Expression
1 fvmptrab.f 𝐹 = ( 𝑥𝑉 ↦ { 𝑦𝑀𝜑 } )
2 fvmptrab.r ( 𝑥 = 𝑋 → ( 𝜑𝜓 ) )
3 fvmptrab.s ( 𝑥 = 𝑋𝑀 = 𝑁 )
4 fvmptrab.v ( 𝑋𝑉𝑁 ∈ V )
5 fvmptrab.n ( 𝑋𝑉𝑁 = ∅ )
6 1 a1i ( 𝑋𝑉𝐹 = ( 𝑥𝑉 ↦ { 𝑦𝑀𝜑 } ) )
7 3 2 rabeqbidv ( 𝑥 = 𝑋 → { 𝑦𝑀𝜑 } = { 𝑦𝑁𝜓 } )
8 7 adantl ( ( 𝑋𝑉𝑥 = 𝑋 ) → { 𝑦𝑀𝜑 } = { 𝑦𝑁𝜓 } )
9 id ( 𝑋𝑉𝑋𝑉 )
10 eqid { 𝑦𝑁𝜓 } = { 𝑦𝑁𝜓 }
11 10 4 rabexd ( 𝑋𝑉 → { 𝑦𝑁𝜓 } ∈ V )
12 6 8 9 11 fvmptd ( 𝑋𝑉 → ( 𝐹𝑋 ) = { 𝑦𝑁𝜓 } )
13 1 fvmptndm ( ¬ 𝑋𝑉 → ( 𝐹𝑋 ) = ∅ )
14 df-nel ( 𝑋𝑉 ↔ ¬ 𝑋𝑉 )
15 rabeq ( 𝑁 = ∅ → { 𝑦𝑁𝜓 } = { 𝑦 ∈ ∅ ∣ 𝜓 } )
16 rab0 { 𝑦 ∈ ∅ ∣ 𝜓 } = ∅
17 15 16 eqtr2di ( 𝑁 = ∅ → ∅ = { 𝑦𝑁𝜓 } )
18 5 17 syl ( 𝑋𝑉 → ∅ = { 𝑦𝑁𝜓 } )
19 14 18 sylbir ( ¬ 𝑋𝑉 → ∅ = { 𝑦𝑁𝜓 } )
20 13 19 eqtrd ( ¬ 𝑋𝑉 → ( 𝐹𝑋 ) = { 𝑦𝑁𝜓 } )
21 12 20 pm2.61i ( 𝐹𝑋 ) = { 𝑦𝑁𝜓 }