Metamath Proof Explorer


Theorem fsetfocdm

Description: The class of functions with a given domain that is a set and a given codomain is mapped, through evaluation at a point of the domain, onto the codomain. (Contributed by AV, 15-Sep-2024)

Ref Expression
Hypotheses fsetfocdm.f 𝐹 = { 𝑓𝑓 : 𝐴𝐵 }
fsetfocdm.s 𝑆 = ( 𝑔𝐹 ↦ ( 𝑔𝑋 ) )
Assertion fsetfocdm ( ( 𝐴𝑉𝑋𝐴 ) → 𝑆 : 𝐹onto𝐵 )

Proof

Step Hyp Ref Expression
1 fsetfocdm.f 𝐹 = { 𝑓𝑓 : 𝐴𝐵 }
2 fsetfocdm.s 𝑆 = ( 𝑔𝐹 ↦ ( 𝑔𝑋 ) )
3 1 2 fsetfcdm ( 𝑋𝐴𝑆 : 𝐹𝐵 )
4 3 adantl ( ( 𝐴𝑉𝑋𝐴 ) → 𝑆 : 𝐹𝐵 )
5 simplr ( ( ( ( 𝐴𝑉𝑋𝐴 ) ∧ 𝑔𝐵 ) ∧ 𝑥𝐴 ) → 𝑔𝐵 )
6 eqid ( 𝑥𝐴𝑔 ) = ( 𝑥𝐴𝑔 )
7 5 6 fmptd ( ( ( 𝐴𝑉𝑋𝐴 ) ∧ 𝑔𝐵 ) → ( 𝑥𝐴𝑔 ) : 𝐴𝐵 )
8 simpll ( ( ( 𝐴𝑉𝑋𝐴 ) ∧ 𝑔𝐵 ) → 𝐴𝑉 )
9 8 mptexd ( ( ( 𝐴𝑉𝑋𝐴 ) ∧ 𝑔𝐵 ) → ( 𝑥𝐴𝑔 ) ∈ V )
10 feq1 ( 𝑓 = ( 𝑥𝐴𝑔 ) → ( 𝑓 : 𝐴𝐵 ↔ ( 𝑥𝐴𝑔 ) : 𝐴𝐵 ) )
11 10 1 elab2g ( ( 𝑥𝐴𝑔 ) ∈ V → ( ( 𝑥𝐴𝑔 ) ∈ 𝐹 ↔ ( 𝑥𝐴𝑔 ) : 𝐴𝐵 ) )
12 9 11 syl ( ( ( 𝐴𝑉𝑋𝐴 ) ∧ 𝑔𝐵 ) → ( ( 𝑥𝐴𝑔 ) ∈ 𝐹 ↔ ( 𝑥𝐴𝑔 ) : 𝐴𝐵 ) )
13 7 12 mpbird ( ( ( 𝐴𝑉𝑋𝐴 ) ∧ 𝑔𝐵 ) → ( 𝑥𝐴𝑔 ) ∈ 𝐹 )
14 fveq2 ( = ( 𝑥𝐴𝑔 ) → ( 𝑆 ) = ( 𝑆 ‘ ( 𝑥𝐴𝑔 ) ) )
15 14 eqeq2d ( = ( 𝑥𝐴𝑔 ) → ( 𝑔 = ( 𝑆 ) ↔ 𝑔 = ( 𝑆 ‘ ( 𝑥𝐴𝑔 ) ) ) )
16 15 adantl ( ( ( ( 𝐴𝑉𝑋𝐴 ) ∧ 𝑔𝐵 ) ∧ = ( 𝑥𝐴𝑔 ) ) → ( 𝑔 = ( 𝑆 ) ↔ 𝑔 = ( 𝑆 ‘ ( 𝑥𝐴𝑔 ) ) ) )
17 fveq1 ( 𝑔 = 𝑓 → ( 𝑔𝑋 ) = ( 𝑓𝑋 ) )
18 17 cbvmptv ( 𝑔𝐹 ↦ ( 𝑔𝑋 ) ) = ( 𝑓𝐹 ↦ ( 𝑓𝑋 ) )
19 2 18 eqtri 𝑆 = ( 𝑓𝐹 ↦ ( 𝑓𝑋 ) )
20 19 a1i ( ( ( 𝐴𝑉𝑋𝐴 ) ∧ 𝑔𝐵 ) → 𝑆 = ( 𝑓𝐹 ↦ ( 𝑓𝑋 ) ) )
21 fveq1 ( 𝑓 = ( 𝑥𝐴𝑔 ) → ( 𝑓𝑋 ) = ( ( 𝑥𝐴𝑔 ) ‘ 𝑋 ) )
22 21 adantl ( ( ( ( 𝐴𝑉𝑋𝐴 ) ∧ 𝑔𝐵 ) ∧ 𝑓 = ( 𝑥𝐴𝑔 ) ) → ( 𝑓𝑋 ) = ( ( 𝑥𝐴𝑔 ) ‘ 𝑋 ) )
23 fvexd ( ( ( 𝐴𝑉𝑋𝐴 ) ∧ 𝑔𝐵 ) → ( ( 𝑥𝐴𝑔 ) ‘ 𝑋 ) ∈ V )
24 20 22 13 23 fvmptd ( ( ( 𝐴𝑉𝑋𝐴 ) ∧ 𝑔𝐵 ) → ( 𝑆 ‘ ( 𝑥𝐴𝑔 ) ) = ( ( 𝑥𝐴𝑔 ) ‘ 𝑋 ) )
25 eqidd ( ( 𝐴𝑉𝑋𝐴 ) → ( 𝑥𝐴𝑔 ) = ( 𝑥𝐴𝑔 ) )
26 eqidd ( ( ( 𝐴𝑉𝑋𝐴 ) ∧ 𝑥 = 𝑋 ) → 𝑔 = 𝑔 )
27 simpr ( ( 𝐴𝑉𝑋𝐴 ) → 𝑋𝐴 )
28 vex 𝑔 ∈ V
29 28 a1i ( ( 𝐴𝑉𝑋𝐴 ) → 𝑔 ∈ V )
30 25 26 27 29 fvmptd ( ( 𝐴𝑉𝑋𝐴 ) → ( ( 𝑥𝐴𝑔 ) ‘ 𝑋 ) = 𝑔 )
31 30 adantr ( ( ( 𝐴𝑉𝑋𝐴 ) ∧ 𝑔𝐵 ) → ( ( 𝑥𝐴𝑔 ) ‘ 𝑋 ) = 𝑔 )
32 24 31 eqtr2d ( ( ( 𝐴𝑉𝑋𝐴 ) ∧ 𝑔𝐵 ) → 𝑔 = ( 𝑆 ‘ ( 𝑥𝐴𝑔 ) ) )
33 13 16 32 rspcedvd ( ( ( 𝐴𝑉𝑋𝐴 ) ∧ 𝑔𝐵 ) → ∃ 𝐹 𝑔 = ( 𝑆 ) )
34 33 ralrimiva ( ( 𝐴𝑉𝑋𝐴 ) → ∀ 𝑔𝐵𝐹 𝑔 = ( 𝑆 ) )
35 dffo3 ( 𝑆 : 𝐹onto𝐵 ↔ ( 𝑆 : 𝐹𝐵 ∧ ∀ 𝑔𝐵𝐹 𝑔 = ( 𝑆 ) ) )
36 4 34 35 sylanbrc ( ( 𝐴𝑉𝑋𝐴 ) → 𝑆 : 𝐹onto𝐵 )