Metamath Proof Explorer


Theorem fgraphxp

Description: Express a function as a subset of the Cartesian product. (Contributed by Stefan O'Rear, 25-Jan-2015)

Ref Expression
Assertion fgraphxp ( 𝐹 : 𝐴𝐵𝐹 = { 𝑥 ∈ ( 𝐴 × 𝐵 ) ∣ ( 𝐹 ‘ ( 1st𝑥 ) ) = ( 2nd𝑥 ) } )

Proof

Step Hyp Ref Expression
1 fgraphopab ( 𝐹 : 𝐴𝐵𝐹 = { ⟨ 𝑎 , 𝑏 ⟩ ∣ ( ( 𝑎𝐴𝑏𝐵 ) ∧ ( 𝐹𝑎 ) = 𝑏 ) } )
2 vex 𝑎 ∈ V
3 vex 𝑏 ∈ V
4 2 3 op1std ( 𝑥 = ⟨ 𝑎 , 𝑏 ⟩ → ( 1st𝑥 ) = 𝑎 )
5 4 fveq2d ( 𝑥 = ⟨ 𝑎 , 𝑏 ⟩ → ( 𝐹 ‘ ( 1st𝑥 ) ) = ( 𝐹𝑎 ) )
6 2 3 op2ndd ( 𝑥 = ⟨ 𝑎 , 𝑏 ⟩ → ( 2nd𝑥 ) = 𝑏 )
7 5 6 eqeq12d ( 𝑥 = ⟨ 𝑎 , 𝑏 ⟩ → ( ( 𝐹 ‘ ( 1st𝑥 ) ) = ( 2nd𝑥 ) ↔ ( 𝐹𝑎 ) = 𝑏 ) )
8 7 rabxp { 𝑥 ∈ ( 𝐴 × 𝐵 ) ∣ ( 𝐹 ‘ ( 1st𝑥 ) ) = ( 2nd𝑥 ) } = { ⟨ 𝑎 , 𝑏 ⟩ ∣ ( 𝑎𝐴𝑏𝐵 ∧ ( 𝐹𝑎 ) = 𝑏 ) }
9 df-3an ( ( 𝑎𝐴𝑏𝐵 ∧ ( 𝐹𝑎 ) = 𝑏 ) ↔ ( ( 𝑎𝐴𝑏𝐵 ) ∧ ( 𝐹𝑎 ) = 𝑏 ) )
10 9 opabbii { ⟨ 𝑎 , 𝑏 ⟩ ∣ ( 𝑎𝐴𝑏𝐵 ∧ ( 𝐹𝑎 ) = 𝑏 ) } = { ⟨ 𝑎 , 𝑏 ⟩ ∣ ( ( 𝑎𝐴𝑏𝐵 ) ∧ ( 𝐹𝑎 ) = 𝑏 ) }
11 8 10 eqtri { 𝑥 ∈ ( 𝐴 × 𝐵 ) ∣ ( 𝐹 ‘ ( 1st𝑥 ) ) = ( 2nd𝑥 ) } = { ⟨ 𝑎 , 𝑏 ⟩ ∣ ( ( 𝑎𝐴𝑏𝐵 ) ∧ ( 𝐹𝑎 ) = 𝑏 ) }
12 1 11 eqtr4di ( 𝐹 : 𝐴𝐵𝐹 = { 𝑥 ∈ ( 𝐴 × 𝐵 ) ∣ ( 𝐹 ‘ ( 1st𝑥 ) ) = ( 2nd𝑥 ) } )