Metamath Proof Explorer


Theorem cfsetsnfsetf

Description: The mapping of the class of singleton functions into the class of constant functions is a function. (Contributed by AV, 14-Sep-2024)

Ref Expression
Hypotheses cfsetsnfsetfv.f 𝐹 = { 𝑓 ∣ ( 𝑓 : 𝐴𝐵 ∧ ∃ 𝑏𝐵𝑧𝐴 ( 𝑓𝑧 ) = 𝑏 ) }
cfsetsnfsetfv.g 𝐺 = { 𝑥𝑥 : { 𝑌 } ⟶ 𝐵 }
cfsetsnfsetfv.h 𝐻 = ( 𝑔𝐺 ↦ ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) )
Assertion cfsetsnfsetf ( ( 𝐴𝑉𝑌𝐴 ) → 𝐻 : 𝐺𝐹 )

Proof

Step Hyp Ref Expression
1 cfsetsnfsetfv.f 𝐹 = { 𝑓 ∣ ( 𝑓 : 𝐴𝐵 ∧ ∃ 𝑏𝐵𝑧𝐴 ( 𝑓𝑧 ) = 𝑏 ) }
2 cfsetsnfsetfv.g 𝐺 = { 𝑥𝑥 : { 𝑌 } ⟶ 𝐵 }
3 cfsetsnfsetfv.h 𝐻 = ( 𝑔𝐺 ↦ ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) )
4 simpl ( ( 𝐴𝑉𝑌𝐴 ) → 𝐴𝑉 )
5 4 adantr ( ( ( 𝐴𝑉𝑌𝐴 ) ∧ 𝑔𝐺 ) → 𝐴𝑉 )
6 5 mptexd ( ( ( 𝐴𝑉𝑌𝐴 ) ∧ 𝑔𝐺 ) → ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) ∈ V )
7 vex 𝑔 ∈ V
8 feq1 ( 𝑥 = 𝑔 → ( 𝑥 : { 𝑌 } ⟶ 𝐵𝑔 : { 𝑌 } ⟶ 𝐵 ) )
9 7 8 2 elab2 ( 𝑔𝐺𝑔 : { 𝑌 } ⟶ 𝐵 )
10 9 biimpi ( 𝑔𝐺𝑔 : { 𝑌 } ⟶ 𝐵 )
11 10 adantl ( ( ( 𝐴𝑉𝑌𝐴 ) ∧ 𝑔𝐺 ) → 𝑔 : { 𝑌 } ⟶ 𝐵 )
12 snidg ( 𝑌𝐴𝑌 ∈ { 𝑌 } )
13 12 adantl ( ( 𝐴𝑉𝑌𝐴 ) → 𝑌 ∈ { 𝑌 } )
14 13 adantr ( ( ( 𝐴𝑉𝑌𝐴 ) ∧ 𝑔𝐺 ) → 𝑌 ∈ { 𝑌 } )
15 11 14 ffvelrnd ( ( ( 𝐴𝑉𝑌𝐴 ) ∧ 𝑔𝐺 ) → ( 𝑔𝑌 ) ∈ 𝐵 )
16 15 adantr ( ( ( ( 𝐴𝑉𝑌𝐴 ) ∧ 𝑔𝐺 ) ∧ 𝑎𝐴 ) → ( 𝑔𝑌 ) ∈ 𝐵 )
17 16 fmpttd ( ( ( 𝐴𝑉𝑌𝐴 ) ∧ 𝑔𝐺 ) → ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) : 𝐴𝐵 )
18 eqeq2 ( 𝑏 = ( 𝑔𝑌 ) → ( ( 𝑔𝑌 ) = 𝑏 ↔ ( 𝑔𝑌 ) = ( 𝑔𝑌 ) ) )
19 18 ralbidv ( 𝑏 = ( 𝑔𝑌 ) → ( ∀ 𝑧𝐴 ( 𝑔𝑌 ) = 𝑏 ↔ ∀ 𝑧𝐴 ( 𝑔𝑌 ) = ( 𝑔𝑌 ) ) )
20 19 adantl ( ( ( ( 𝐴𝑉𝑌𝐴 ) ∧ 𝑔𝐺 ) ∧ 𝑏 = ( 𝑔𝑌 ) ) → ( ∀ 𝑧𝐴 ( 𝑔𝑌 ) = 𝑏 ↔ ∀ 𝑧𝐴 ( 𝑔𝑌 ) = ( 𝑔𝑌 ) ) )
21 eqidd ( ( ( ( 𝐴𝑉𝑌𝐴 ) ∧ 𝑔𝐺 ) ∧ 𝑧𝐴 ) → ( 𝑔𝑌 ) = ( 𝑔𝑌 ) )
22 21 ralrimiva ( ( ( 𝐴𝑉𝑌𝐴 ) ∧ 𝑔𝐺 ) → ∀ 𝑧𝐴 ( 𝑔𝑌 ) = ( 𝑔𝑌 ) )
23 15 20 22 rspcedvd ( ( ( 𝐴𝑉𝑌𝐴 ) ∧ 𝑔𝐺 ) → ∃ 𝑏𝐵𝑧𝐴 ( 𝑔𝑌 ) = 𝑏 )
24 17 23 jca ( ( ( 𝐴𝑉𝑌𝐴 ) ∧ 𝑔𝐺 ) → ( ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) : 𝐴𝐵 ∧ ∃ 𝑏𝐵𝑧𝐴 ( 𝑔𝑌 ) = 𝑏 ) )
25 feq1 ( 𝑓 = ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) → ( 𝑓 : 𝐴𝐵 ↔ ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) : 𝐴𝐵 ) )
26 simpl ( ( 𝑓 = ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) ∧ 𝑧𝐴 ) → 𝑓 = ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) )
27 eqidd ( ( ( 𝑓 = ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) ∧ 𝑧𝐴 ) ∧ 𝑎 = 𝑧 ) → ( 𝑔𝑌 ) = ( 𝑔𝑌 ) )
28 simpr ( ( 𝑓 = ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) ∧ 𝑧𝐴 ) → 𝑧𝐴 )
29 fvexd ( ( 𝑓 = ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) ∧ 𝑧𝐴 ) → ( 𝑔𝑌 ) ∈ V )
30 nfcv 𝑎 𝑓
31 nfmpt1 𝑎 ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) )
32 30 31 nfeq 𝑎 𝑓 = ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) )
33 nfv 𝑎 𝑧𝐴
34 32 33 nfan 𝑎 ( 𝑓 = ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) ∧ 𝑧𝐴 )
35 nfcv 𝑎 𝑧
36 nfcv 𝑎 ( 𝑔𝑌 )
37 26 27 28 29 34 35 36 fvmptdf ( ( 𝑓 = ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) ∧ 𝑧𝐴 ) → ( 𝑓𝑧 ) = ( 𝑔𝑌 ) )
38 37 eqeq1d ( ( 𝑓 = ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) ∧ 𝑧𝐴 ) → ( ( 𝑓𝑧 ) = 𝑏 ↔ ( 𝑔𝑌 ) = 𝑏 ) )
39 38 ralbidva ( 𝑓 = ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) → ( ∀ 𝑧𝐴 ( 𝑓𝑧 ) = 𝑏 ↔ ∀ 𝑧𝐴 ( 𝑔𝑌 ) = 𝑏 ) )
40 39 rexbidv ( 𝑓 = ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) → ( ∃ 𝑏𝐵𝑧𝐴 ( 𝑓𝑧 ) = 𝑏 ↔ ∃ 𝑏𝐵𝑧𝐴 ( 𝑔𝑌 ) = 𝑏 ) )
41 25 40 anbi12d ( 𝑓 = ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) → ( ( 𝑓 : 𝐴𝐵 ∧ ∃ 𝑏𝐵𝑧𝐴 ( 𝑓𝑧 ) = 𝑏 ) ↔ ( ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) : 𝐴𝐵 ∧ ∃ 𝑏𝐵𝑧𝐴 ( 𝑔𝑌 ) = 𝑏 ) ) )
42 6 24 41 elabd ( ( ( 𝐴𝑉𝑌𝐴 ) ∧ 𝑔𝐺 ) → ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) ∈ { 𝑓 ∣ ( 𝑓 : 𝐴𝐵 ∧ ∃ 𝑏𝐵𝑧𝐴 ( 𝑓𝑧 ) = 𝑏 ) } )
43 42 1 eleqtrrdi ( ( ( 𝐴𝑉𝑌𝐴 ) ∧ 𝑔𝐺 ) → ( 𝑎𝐴 ↦ ( 𝑔𝑌 ) ) ∈ 𝐹 )
44 43 3 fmptd ( ( 𝐴𝑉𝑌𝐴 ) → 𝐻 : 𝐺𝐹 )