Metamath Proof Explorer


Theorem fpr2g

Description: A function that maps a pair to a class is a pair of ordered pairs. (Contributed by Thierry Arnoux, 12-Jul-2020)

Ref Expression
Assertion fpr2g ( ( 𝐴𝑉𝐵𝑊 ) → ( 𝐹 : { 𝐴 , 𝐵 } ⟶ 𝐶 ↔ ( ( 𝐹𝐴 ) ∈ 𝐶 ∧ ( 𝐹𝐵 ) ∈ 𝐶𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ) ) )

Proof

Step Hyp Ref Expression
1 simpr ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ 𝐹 : { 𝐴 , 𝐵 } ⟶ 𝐶 ) → 𝐹 : { 𝐴 , 𝐵 } ⟶ 𝐶 )
2 prid1g ( 𝐴𝑉𝐴 ∈ { 𝐴 , 𝐵 } )
3 2 ad2antrr ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ 𝐹 : { 𝐴 , 𝐵 } ⟶ 𝐶 ) → 𝐴 ∈ { 𝐴 , 𝐵 } )
4 1 3 ffvelrnd ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ 𝐹 : { 𝐴 , 𝐵 } ⟶ 𝐶 ) → ( 𝐹𝐴 ) ∈ 𝐶 )
5 prid2g ( 𝐵𝑊𝐵 ∈ { 𝐴 , 𝐵 } )
6 5 ad2antlr ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ 𝐹 : { 𝐴 , 𝐵 } ⟶ 𝐶 ) → 𝐵 ∈ { 𝐴 , 𝐵 } )
7 1 6 ffvelrnd ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ 𝐹 : { 𝐴 , 𝐵 } ⟶ 𝐶 ) → ( 𝐹𝐵 ) ∈ 𝐶 )
8 ffn ( 𝐹 : { 𝐴 , 𝐵 } ⟶ 𝐶𝐹 Fn { 𝐴 , 𝐵 } )
9 8 adantl ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ 𝐹 : { 𝐴 , 𝐵 } ⟶ 𝐶 ) → 𝐹 Fn { 𝐴 , 𝐵 } )
10 fnpr2g ( ( 𝐴𝑉𝐵𝑊 ) → ( 𝐹 Fn { 𝐴 , 𝐵 } ↔ 𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ) )
11 10 adantr ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ 𝐹 : { 𝐴 , 𝐵 } ⟶ 𝐶 ) → ( 𝐹 Fn { 𝐴 , 𝐵 } ↔ 𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ) )
12 9 11 mpbid ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ 𝐹 : { 𝐴 , 𝐵 } ⟶ 𝐶 ) → 𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } )
13 4 7 12 3jca ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ 𝐹 : { 𝐴 , 𝐵 } ⟶ 𝐶 ) → ( ( 𝐹𝐴 ) ∈ 𝐶 ∧ ( 𝐹𝐵 ) ∈ 𝐶𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ) )
14 10 biimpar ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ 𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ) → 𝐹 Fn { 𝐴 , 𝐵 } )
15 14 3ad2antr3 ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ ( ( 𝐹𝐴 ) ∈ 𝐶 ∧ ( 𝐹𝐵 ) ∈ 𝐶𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ) ) → 𝐹 Fn { 𝐴 , 𝐵 } )
16 simpr3 ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ ( ( 𝐹𝐴 ) ∈ 𝐶 ∧ ( 𝐹𝐵 ) ∈ 𝐶𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ) ) → 𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } )
17 2 ad2antrr ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ ( ( 𝐹𝐴 ) ∈ 𝐶 ∧ ( 𝐹𝐵 ) ∈ 𝐶𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ) ) → 𝐴 ∈ { 𝐴 , 𝐵 } )
18 simpr1 ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ ( ( 𝐹𝐴 ) ∈ 𝐶 ∧ ( 𝐹𝐵 ) ∈ 𝐶𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ) ) → ( 𝐹𝐴 ) ∈ 𝐶 )
19 17 18 opelxpd ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ ( ( 𝐹𝐴 ) ∈ 𝐶 ∧ ( 𝐹𝐵 ) ∈ 𝐶𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ) ) → ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ ∈ ( { 𝐴 , 𝐵 } × 𝐶 ) )
20 5 ad2antlr ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ ( ( 𝐹𝐴 ) ∈ 𝐶 ∧ ( 𝐹𝐵 ) ∈ 𝐶𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ) ) → 𝐵 ∈ { 𝐴 , 𝐵 } )
21 simpr2 ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ ( ( 𝐹𝐴 ) ∈ 𝐶 ∧ ( 𝐹𝐵 ) ∈ 𝐶𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ) ) → ( 𝐹𝐵 ) ∈ 𝐶 )
22 20 21 opelxpd ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ ( ( 𝐹𝐴 ) ∈ 𝐶 ∧ ( 𝐹𝐵 ) ∈ 𝐶𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ) ) → ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ ∈ ( { 𝐴 , 𝐵 } × 𝐶 ) )
23 19 22 prssd ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ ( ( 𝐹𝐴 ) ∈ 𝐶 ∧ ( 𝐹𝐵 ) ∈ 𝐶𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ) ) → { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ⊆ ( { 𝐴 , 𝐵 } × 𝐶 ) )
24 16 23 eqsstrd ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ ( ( 𝐹𝐴 ) ∈ 𝐶 ∧ ( 𝐹𝐵 ) ∈ 𝐶𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ) ) → 𝐹 ⊆ ( { 𝐴 , 𝐵 } × 𝐶 ) )
25 dff2 ( 𝐹 : { 𝐴 , 𝐵 } ⟶ 𝐶 ↔ ( 𝐹 Fn { 𝐴 , 𝐵 } ∧ 𝐹 ⊆ ( { 𝐴 , 𝐵 } × 𝐶 ) ) )
26 15 24 25 sylanbrc ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ ( ( 𝐹𝐴 ) ∈ 𝐶 ∧ ( 𝐹𝐵 ) ∈ 𝐶𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ) ) → 𝐹 : { 𝐴 , 𝐵 } ⟶ 𝐶 )
27 13 26 impbida ( ( 𝐴𝑉𝐵𝑊 ) → ( 𝐹 : { 𝐴 , 𝐵 } ⟶ 𝐶 ↔ ( ( 𝐹𝐴 ) ∈ 𝐶 ∧ ( 𝐹𝐵 ) ∈ 𝐶𝐹 = { ⟨ 𝐴 , ( 𝐹𝐴 ) ⟩ , ⟨ 𝐵 , ( 𝐹𝐵 ) ⟩ } ) ) )