Metamath Proof Explorer


Theorem 2arymaptf

Description: The mapping of binary (endo)functions is a function into the set of binary operations. (Contributed by AV, 21-May-2024)

Ref Expression
Hypothesis 2arymaptf.h 𝐻 = ( ∈ ( 2 -aryF 𝑋 ) ↦ ( 𝑥𝑋 , 𝑦𝑋 ↦ ( ‘ { ⟨ 0 , 𝑥 ⟩ , ⟨ 1 , 𝑦 ⟩ } ) ) )
Assertion 2arymaptf ( 𝑋𝑉𝐻 : ( 2 -aryF 𝑋 ) ⟶ ( 𝑋m ( 𝑋 × 𝑋 ) ) )

Proof

Step Hyp Ref Expression
1 2arymaptf.h 𝐻 = ( ∈ ( 2 -aryF 𝑋 ) ↦ ( 𝑥𝑋 , 𝑦𝑋 ↦ ( ‘ { ⟨ 0 , 𝑥 ⟩ , ⟨ 1 , 𝑦 ⟩ } ) ) )
2 simplr ( ( ( 𝑋𝑉 ∈ ( 2 -aryF 𝑋 ) ) ∧ 𝑧 ∈ ( 𝑋 × 𝑋 ) ) → ∈ ( 2 -aryF 𝑋 ) )
3 xp1st ( 𝑧 ∈ ( 𝑋 × 𝑋 ) → ( 1st𝑧 ) ∈ 𝑋 )
4 3 adantl ( ( ( 𝑋𝑉 ∈ ( 2 -aryF 𝑋 ) ) ∧ 𝑧 ∈ ( 𝑋 × 𝑋 ) ) → ( 1st𝑧 ) ∈ 𝑋 )
5 xp2nd ( 𝑧 ∈ ( 𝑋 × 𝑋 ) → ( 2nd𝑧 ) ∈ 𝑋 )
6 5 adantl ( ( ( 𝑋𝑉 ∈ ( 2 -aryF 𝑋 ) ) ∧ 𝑧 ∈ ( 𝑋 × 𝑋 ) ) → ( 2nd𝑧 ) ∈ 𝑋 )
7 fv2arycl ( ( ∈ ( 2 -aryF 𝑋 ) ∧ ( 1st𝑧 ) ∈ 𝑋 ∧ ( 2nd𝑧 ) ∈ 𝑋 ) → ( ‘ { ⟨ 0 , ( 1st𝑧 ) ⟩ , ⟨ 1 , ( 2nd𝑧 ) ⟩ } ) ∈ 𝑋 )
8 2 4 6 7 syl3anc ( ( ( 𝑋𝑉 ∈ ( 2 -aryF 𝑋 ) ) ∧ 𝑧 ∈ ( 𝑋 × 𝑋 ) ) → ( ‘ { ⟨ 0 , ( 1st𝑧 ) ⟩ , ⟨ 1 , ( 2nd𝑧 ) ⟩ } ) ∈ 𝑋 )
9 vex 𝑥 ∈ V
10 vex 𝑦 ∈ V
11 9 10 op1std ( 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ( 1st𝑧 ) = 𝑥 )
12 11 opeq2d ( 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ⟨ 0 , ( 1st𝑧 ) ⟩ = ⟨ 0 , 𝑥 ⟩ )
13 9 10 op2ndd ( 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ( 2nd𝑧 ) = 𝑦 )
14 13 opeq2d ( 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ⟨ 1 , ( 2nd𝑧 ) ⟩ = ⟨ 1 , 𝑦 ⟩ )
15 12 14 preq12d ( 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → { ⟨ 0 , ( 1st𝑧 ) ⟩ , ⟨ 1 , ( 2nd𝑧 ) ⟩ } = { ⟨ 0 , 𝑥 ⟩ , ⟨ 1 , 𝑦 ⟩ } )
16 15 fveq2d ( 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ( ‘ { ⟨ 0 , ( 1st𝑧 ) ⟩ , ⟨ 1 , ( 2nd𝑧 ) ⟩ } ) = ( ‘ { ⟨ 0 , 𝑥 ⟩ , ⟨ 1 , 𝑦 ⟩ } ) )
17 16 mpompt ( 𝑧 ∈ ( 𝑋 × 𝑋 ) ↦ ( ‘ { ⟨ 0 , ( 1st𝑧 ) ⟩ , ⟨ 1 , ( 2nd𝑧 ) ⟩ } ) ) = ( 𝑥𝑋 , 𝑦𝑋 ↦ ( ‘ { ⟨ 0 , 𝑥 ⟩ , ⟨ 1 , 𝑦 ⟩ } ) )
18 17 eqcomi ( 𝑥𝑋 , 𝑦𝑋 ↦ ( ‘ { ⟨ 0 , 𝑥 ⟩ , ⟨ 1 , 𝑦 ⟩ } ) ) = ( 𝑧 ∈ ( 𝑋 × 𝑋 ) ↦ ( ‘ { ⟨ 0 , ( 1st𝑧 ) ⟩ , ⟨ 1 , ( 2nd𝑧 ) ⟩ } ) )
19 8 18 fmptd ( ( 𝑋𝑉 ∈ ( 2 -aryF 𝑋 ) ) → ( 𝑥𝑋 , 𝑦𝑋 ↦ ( ‘ { ⟨ 0 , 𝑥 ⟩ , ⟨ 1 , 𝑦 ⟩ } ) ) : ( 𝑋 × 𝑋 ) ⟶ 𝑋 )
20 sqxpexg ( 𝑋𝑉 → ( 𝑋 × 𝑋 ) ∈ V )
21 elmapg ( ( 𝑋𝑉 ∧ ( 𝑋 × 𝑋 ) ∈ V ) → ( ( 𝑥𝑋 , 𝑦𝑋 ↦ ( ‘ { ⟨ 0 , 𝑥 ⟩ , ⟨ 1 , 𝑦 ⟩ } ) ) ∈ ( 𝑋m ( 𝑋 × 𝑋 ) ) ↔ ( 𝑥𝑋 , 𝑦𝑋 ↦ ( ‘ { ⟨ 0 , 𝑥 ⟩ , ⟨ 1 , 𝑦 ⟩ } ) ) : ( 𝑋 × 𝑋 ) ⟶ 𝑋 ) )
22 20 21 mpdan ( 𝑋𝑉 → ( ( 𝑥𝑋 , 𝑦𝑋 ↦ ( ‘ { ⟨ 0 , 𝑥 ⟩ , ⟨ 1 , 𝑦 ⟩ } ) ) ∈ ( 𝑋m ( 𝑋 × 𝑋 ) ) ↔ ( 𝑥𝑋 , 𝑦𝑋 ↦ ( ‘ { ⟨ 0 , 𝑥 ⟩ , ⟨ 1 , 𝑦 ⟩ } ) ) : ( 𝑋 × 𝑋 ) ⟶ 𝑋 ) )
23 22 adantr ( ( 𝑋𝑉 ∈ ( 2 -aryF 𝑋 ) ) → ( ( 𝑥𝑋 , 𝑦𝑋 ↦ ( ‘ { ⟨ 0 , 𝑥 ⟩ , ⟨ 1 , 𝑦 ⟩ } ) ) ∈ ( 𝑋m ( 𝑋 × 𝑋 ) ) ↔ ( 𝑥𝑋 , 𝑦𝑋 ↦ ( ‘ { ⟨ 0 , 𝑥 ⟩ , ⟨ 1 , 𝑦 ⟩ } ) ) : ( 𝑋 × 𝑋 ) ⟶ 𝑋 ) )
24 19 23 mpbird ( ( 𝑋𝑉 ∈ ( 2 -aryF 𝑋 ) ) → ( 𝑥𝑋 , 𝑦𝑋 ↦ ( ‘ { ⟨ 0 , 𝑥 ⟩ , ⟨ 1 , 𝑦 ⟩ } ) ) ∈ ( 𝑋m ( 𝑋 × 𝑋 ) ) )
25 24 1 fmptd ( 𝑋𝑉𝐻 : ( 2 -aryF 𝑋 ) ⟶ ( 𝑋m ( 𝑋 × 𝑋 ) ) )