Metamath Proof Explorer


Theorem f1o2ndf1

Description: The 2nd (second component of an ordered pair) function restricted to a one-to-one function F is a one-to-one function from F onto the range of F . (Contributed by Alexander van der Vekens, 4-Feb-2018)

Ref Expression
Assertion f1o2ndf1
|- ( F : A -1-1-> B -> ( 2nd |` F ) : F -1-1-onto-> ran F )

Proof

Step Hyp Ref Expression
1 f1f
 |-  ( F : A -1-1-> B -> F : A --> B )
2 fo2ndf
 |-  ( F : A --> B -> ( 2nd |` F ) : F -onto-> ran F )
3 1 2 syl
 |-  ( F : A -1-1-> B -> ( 2nd |` F ) : F -onto-> ran F )
4 f2ndf
 |-  ( F : A --> B -> ( 2nd |` F ) : F --> B )
5 1 4 syl
 |-  ( F : A -1-1-> B -> ( 2nd |` F ) : F --> B )
6 fssxp
 |-  ( F : A --> B -> F C_ ( A X. B ) )
7 1 6 syl
 |-  ( F : A -1-1-> B -> F C_ ( A X. B ) )
8 ssel2
 |-  ( ( F C_ ( A X. B ) /\ x e. F ) -> x e. ( A X. B ) )
9 elxp2
 |-  ( x e. ( A X. B ) <-> E. a e. A E. v e. B x = <. a , v >. )
10 8 9 sylib
 |-  ( ( F C_ ( A X. B ) /\ x e. F ) -> E. a e. A E. v e. B x = <. a , v >. )
11 ssel2
 |-  ( ( F C_ ( A X. B ) /\ y e. F ) -> y e. ( A X. B ) )
12 elxp2
 |-  ( y e. ( A X. B ) <-> E. b e. A E. w e. B y = <. b , w >. )
13 11 12 sylib
 |-  ( ( F C_ ( A X. B ) /\ y e. F ) -> E. b e. A E. w e. B y = <. b , w >. )
14 10 13 anim12dan
 |-  ( ( F C_ ( A X. B ) /\ ( x e. F /\ y e. F ) ) -> ( E. a e. A E. v e. B x = <. a , v >. /\ E. b e. A E. w e. B y = <. b , w >. ) )
15 fvres
 |-  ( <. a , v >. e. F -> ( ( 2nd |` F ) ` <. a , v >. ) = ( 2nd ` <. a , v >. ) )
16 15 ad2antrr
 |-  ( ( ( <. a , v >. e. F /\ <. b , w >. e. F ) /\ ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) ) -> ( ( 2nd |` F ) ` <. a , v >. ) = ( 2nd ` <. a , v >. ) )
17 fvres
 |-  ( <. b , w >. e. F -> ( ( 2nd |` F ) ` <. b , w >. ) = ( 2nd ` <. b , w >. ) )
18 17 ad2antlr
 |-  ( ( ( <. a , v >. e. F /\ <. b , w >. e. F ) /\ ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) ) -> ( ( 2nd |` F ) ` <. b , w >. ) = ( 2nd ` <. b , w >. ) )
19 16 18 eqeq12d
 |-  ( ( ( <. a , v >. e. F /\ <. b , w >. e. F ) /\ ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) ) -> ( ( ( 2nd |` F ) ` <. a , v >. ) = ( ( 2nd |` F ) ` <. b , w >. ) <-> ( 2nd ` <. a , v >. ) = ( 2nd ` <. b , w >. ) ) )
20 vex
 |-  a e. _V
21 vex
 |-  v e. _V
22 20 21 op2nd
 |-  ( 2nd ` <. a , v >. ) = v
23 vex
 |-  b e. _V
24 vex
 |-  w e. _V
25 23 24 op2nd
 |-  ( 2nd ` <. b , w >. ) = w
26 22 25 eqeq12i
 |-  ( ( 2nd ` <. a , v >. ) = ( 2nd ` <. b , w >. ) <-> v = w )
27 f1fun
 |-  ( F : A -1-1-> B -> Fun F )
28 funopfv
 |-  ( Fun F -> ( <. a , v >. e. F -> ( F ` a ) = v ) )
29 funopfv
 |-  ( Fun F -> ( <. b , w >. e. F -> ( F ` b ) = w ) )
30 28 29 anim12d
 |-  ( Fun F -> ( ( <. a , v >. e. F /\ <. b , w >. e. F ) -> ( ( F ` a ) = v /\ ( F ` b ) = w ) ) )
31 27 30 syl
 |-  ( F : A -1-1-> B -> ( ( <. a , v >. e. F /\ <. b , w >. e. F ) -> ( ( F ` a ) = v /\ ( F ` b ) = w ) ) )
32 eqcom
 |-  ( ( F ` a ) = v <-> v = ( F ` a ) )
33 32 biimpi
 |-  ( ( F ` a ) = v -> v = ( F ` a ) )
34 eqcom
 |-  ( ( F ` b ) = w <-> w = ( F ` b ) )
35 34 biimpi
 |-  ( ( F ` b ) = w -> w = ( F ` b ) )
36 33 35 eqeqan12d
 |-  ( ( ( F ` a ) = v /\ ( F ` b ) = w ) -> ( v = w <-> ( F ` a ) = ( F ` b ) ) )
37 simpl
 |-  ( ( a e. A /\ v e. B ) -> a e. A )
38 simpl
 |-  ( ( b e. A /\ w e. B ) -> b e. A )
39 37 38 anim12i
 |-  ( ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) -> ( a e. A /\ b e. A ) )
40 f1veqaeq
 |-  ( ( F : A -1-1-> B /\ ( a e. A /\ b e. A ) ) -> ( ( F ` a ) = ( F ` b ) -> a = b ) )
41 39 40 sylan2
 |-  ( ( F : A -1-1-> B /\ ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) ) -> ( ( F ` a ) = ( F ` b ) -> a = b ) )
42 opeq12
 |-  ( ( a = b /\ v = w ) -> <. a , v >. = <. b , w >. )
43 42 ex
 |-  ( a = b -> ( v = w -> <. a , v >. = <. b , w >. ) )
44 41 43 syl6
 |-  ( ( F : A -1-1-> B /\ ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) ) -> ( ( F ` a ) = ( F ` b ) -> ( v = w -> <. a , v >. = <. b , w >. ) ) )
45 44 com23
 |-  ( ( F : A -1-1-> B /\ ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) ) -> ( v = w -> ( ( F ` a ) = ( F ` b ) -> <. a , v >. = <. b , w >. ) ) )
46 45 ex
 |-  ( F : A -1-1-> B -> ( ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) -> ( v = w -> ( ( F ` a ) = ( F ` b ) -> <. a , v >. = <. b , w >. ) ) ) )
47 46 com14
 |-  ( ( F ` a ) = ( F ` b ) -> ( ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) -> ( v = w -> ( F : A -1-1-> B -> <. a , v >. = <. b , w >. ) ) ) )
48 36 47 syl6bi
 |-  ( ( ( F ` a ) = v /\ ( F ` b ) = w ) -> ( v = w -> ( ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) -> ( v = w -> ( F : A -1-1-> B -> <. a , v >. = <. b , w >. ) ) ) ) )
49 48 com14
 |-  ( v = w -> ( v = w -> ( ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) -> ( ( ( F ` a ) = v /\ ( F ` b ) = w ) -> ( F : A -1-1-> B -> <. a , v >. = <. b , w >. ) ) ) ) )
50 49 pm2.43i
 |-  ( v = w -> ( ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) -> ( ( ( F ` a ) = v /\ ( F ` b ) = w ) -> ( F : A -1-1-> B -> <. a , v >. = <. b , w >. ) ) ) )
51 50 com14
 |-  ( F : A -1-1-> B -> ( ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) -> ( ( ( F ` a ) = v /\ ( F ` b ) = w ) -> ( v = w -> <. a , v >. = <. b , w >. ) ) ) )
52 51 com23
 |-  ( F : A -1-1-> B -> ( ( ( F ` a ) = v /\ ( F ` b ) = w ) -> ( ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) -> ( v = w -> <. a , v >. = <. b , w >. ) ) ) )
53 31 52 syld
 |-  ( F : A -1-1-> B -> ( ( <. a , v >. e. F /\ <. b , w >. e. F ) -> ( ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) -> ( v = w -> <. a , v >. = <. b , w >. ) ) ) )
54 53 com13
 |-  ( ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) -> ( ( <. a , v >. e. F /\ <. b , w >. e. F ) -> ( F : A -1-1-> B -> ( v = w -> <. a , v >. = <. b , w >. ) ) ) )
55 54 impcom
 |-  ( ( ( <. a , v >. e. F /\ <. b , w >. e. F ) /\ ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) ) -> ( F : A -1-1-> B -> ( v = w -> <. a , v >. = <. b , w >. ) ) )
56 55 com23
 |-  ( ( ( <. a , v >. e. F /\ <. b , w >. e. F ) /\ ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) ) -> ( v = w -> ( F : A -1-1-> B -> <. a , v >. = <. b , w >. ) ) )
57 26 56 syl5bi
 |-  ( ( ( <. a , v >. e. F /\ <. b , w >. e. F ) /\ ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) ) -> ( ( 2nd ` <. a , v >. ) = ( 2nd ` <. b , w >. ) -> ( F : A -1-1-> B -> <. a , v >. = <. b , w >. ) ) )
58 19 57 sylbid
 |-  ( ( ( <. a , v >. e. F /\ <. b , w >. e. F ) /\ ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) ) -> ( ( ( 2nd |` F ) ` <. a , v >. ) = ( ( 2nd |` F ) ` <. b , w >. ) -> ( F : A -1-1-> B -> <. a , v >. = <. b , w >. ) ) )
59 58 com23
 |-  ( ( ( <. a , v >. e. F /\ <. b , w >. e. F ) /\ ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) ) -> ( F : A -1-1-> B -> ( ( ( 2nd |` F ) ` <. a , v >. ) = ( ( 2nd |` F ) ` <. b , w >. ) -> <. a , v >. = <. b , w >. ) ) )
60 59 ex
 |-  ( ( <. a , v >. e. F /\ <. b , w >. e. F ) -> ( ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) -> ( F : A -1-1-> B -> ( ( ( 2nd |` F ) ` <. a , v >. ) = ( ( 2nd |` F ) ` <. b , w >. ) -> <. a , v >. = <. b , w >. ) ) ) )
61 60 adantl
 |-  ( ( F C_ ( A X. B ) /\ ( <. a , v >. e. F /\ <. b , w >. e. F ) ) -> ( ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) -> ( F : A -1-1-> B -> ( ( ( 2nd |` F ) ` <. a , v >. ) = ( ( 2nd |` F ) ` <. b , w >. ) -> <. a , v >. = <. b , w >. ) ) ) )
62 61 com12
 |-  ( ( ( a e. A /\ v e. B ) /\ ( b e. A /\ w e. B ) ) -> ( ( F C_ ( A X. B ) /\ ( <. a , v >. e. F /\ <. b , w >. e. F ) ) -> ( F : A -1-1-> B -> ( ( ( 2nd |` F ) ` <. a , v >. ) = ( ( 2nd |` F ) ` <. b , w >. ) -> <. a , v >. = <. b , w >. ) ) ) )
63 62 ad4ant13
 |-  ( ( ( ( ( a e. A /\ v e. B ) /\ x = <. a , v >. ) /\ ( b e. A /\ w e. B ) ) /\ y = <. b , w >. ) -> ( ( F C_ ( A X. B ) /\ ( <. a , v >. e. F /\ <. b , w >. e. F ) ) -> ( F : A -1-1-> B -> ( ( ( 2nd |` F ) ` <. a , v >. ) = ( ( 2nd |` F ) ` <. b , w >. ) -> <. a , v >. = <. b , w >. ) ) ) )
64 eleq1
 |-  ( x = <. a , v >. -> ( x e. F <-> <. a , v >. e. F ) )
65 64 ad2antlr
 |-  ( ( ( ( a e. A /\ v e. B ) /\ x = <. a , v >. ) /\ ( b e. A /\ w e. B ) ) -> ( x e. F <-> <. a , v >. e. F ) )
66 eleq1
 |-  ( y = <. b , w >. -> ( y e. F <-> <. b , w >. e. F ) )
67 65 66 bi2anan9
 |-  ( ( ( ( ( a e. A /\ v e. B ) /\ x = <. a , v >. ) /\ ( b e. A /\ w e. B ) ) /\ y = <. b , w >. ) -> ( ( x e. F /\ y e. F ) <-> ( <. a , v >. e. F /\ <. b , w >. e. F ) ) )
68 67 anbi2d
 |-  ( ( ( ( ( a e. A /\ v e. B ) /\ x = <. a , v >. ) /\ ( b e. A /\ w e. B ) ) /\ y = <. b , w >. ) -> ( ( F C_ ( A X. B ) /\ ( x e. F /\ y e. F ) ) <-> ( F C_ ( A X. B ) /\ ( <. a , v >. e. F /\ <. b , w >. e. F ) ) ) )
69 fveq2
 |-  ( x = <. a , v >. -> ( ( 2nd |` F ) ` x ) = ( ( 2nd |` F ) ` <. a , v >. ) )
70 69 ad2antlr
 |-  ( ( ( ( a e. A /\ v e. B ) /\ x = <. a , v >. ) /\ ( b e. A /\ w e. B ) ) -> ( ( 2nd |` F ) ` x ) = ( ( 2nd |` F ) ` <. a , v >. ) )
71 fveq2
 |-  ( y = <. b , w >. -> ( ( 2nd |` F ) ` y ) = ( ( 2nd |` F ) ` <. b , w >. ) )
72 70 71 eqeqan12d
 |-  ( ( ( ( ( a e. A /\ v e. B ) /\ x = <. a , v >. ) /\ ( b e. A /\ w e. B ) ) /\ y = <. b , w >. ) -> ( ( ( 2nd |` F ) ` x ) = ( ( 2nd |` F ) ` y ) <-> ( ( 2nd |` F ) ` <. a , v >. ) = ( ( 2nd |` F ) ` <. b , w >. ) ) )
73 simpllr
 |-  ( ( ( ( ( a e. A /\ v e. B ) /\ x = <. a , v >. ) /\ ( b e. A /\ w e. B ) ) /\ y = <. b , w >. ) -> x = <. a , v >. )
74 simpr
 |-  ( ( ( ( ( a e. A /\ v e. B ) /\ x = <. a , v >. ) /\ ( b e. A /\ w e. B ) ) /\ y = <. b , w >. ) -> y = <. b , w >. )
75 73 74 eqeq12d
 |-  ( ( ( ( ( a e. A /\ v e. B ) /\ x = <. a , v >. ) /\ ( b e. A /\ w e. B ) ) /\ y = <. b , w >. ) -> ( x = y <-> <. a , v >. = <. b , w >. ) )
76 72 75 imbi12d
 |-  ( ( ( ( ( a e. A /\ v e. B ) /\ x = <. a , v >. ) /\ ( b e. A /\ w e. B ) ) /\ y = <. b , w >. ) -> ( ( ( ( 2nd |` F ) ` x ) = ( ( 2nd |` F ) ` y ) -> x = y ) <-> ( ( ( 2nd |` F ) ` <. a , v >. ) = ( ( 2nd |` F ) ` <. b , w >. ) -> <. a , v >. = <. b , w >. ) ) )
77 76 imbi2d
 |-  ( ( ( ( ( a e. A /\ v e. B ) /\ x = <. a , v >. ) /\ ( b e. A /\ w e. B ) ) /\ y = <. b , w >. ) -> ( ( F : A -1-1-> B -> ( ( ( 2nd |` F ) ` x ) = ( ( 2nd |` F ) ` y ) -> x = y ) ) <-> ( F : A -1-1-> B -> ( ( ( 2nd |` F ) ` <. a , v >. ) = ( ( 2nd |` F ) ` <. b , w >. ) -> <. a , v >. = <. b , w >. ) ) ) )
78 63 68 77 3imtr4d
 |-  ( ( ( ( ( a e. A /\ v e. B ) /\ x = <. a , v >. ) /\ ( b e. A /\ w e. B ) ) /\ y = <. b , w >. ) -> ( ( F C_ ( A X. B ) /\ ( x e. F /\ y e. F ) ) -> ( F : A -1-1-> B -> ( ( ( 2nd |` F ) ` x ) = ( ( 2nd |` F ) ` y ) -> x = y ) ) ) )
79 78 ex
 |-  ( ( ( ( a e. A /\ v e. B ) /\ x = <. a , v >. ) /\ ( b e. A /\ w e. B ) ) -> ( y = <. b , w >. -> ( ( F C_ ( A X. B ) /\ ( x e. F /\ y e. F ) ) -> ( F : A -1-1-> B -> ( ( ( 2nd |` F ) ` x ) = ( ( 2nd |` F ) ` y ) -> x = y ) ) ) ) )
80 79 rexlimdvva
 |-  ( ( ( a e. A /\ v e. B ) /\ x = <. a , v >. ) -> ( E. b e. A E. w e. B y = <. b , w >. -> ( ( F C_ ( A X. B ) /\ ( x e. F /\ y e. F ) ) -> ( F : A -1-1-> B -> ( ( ( 2nd |` F ) ` x ) = ( ( 2nd |` F ) ` y ) -> x = y ) ) ) ) )
81 80 ex
 |-  ( ( a e. A /\ v e. B ) -> ( x = <. a , v >. -> ( E. b e. A E. w e. B y = <. b , w >. -> ( ( F C_ ( A X. B ) /\ ( x e. F /\ y e. F ) ) -> ( F : A -1-1-> B -> ( ( ( 2nd |` F ) ` x ) = ( ( 2nd |` F ) ` y ) -> x = y ) ) ) ) ) )
82 81 rexlimivv
 |-  ( E. a e. A E. v e. B x = <. a , v >. -> ( E. b e. A E. w e. B y = <. b , w >. -> ( ( F C_ ( A X. B ) /\ ( x e. F /\ y e. F ) ) -> ( F : A -1-1-> B -> ( ( ( 2nd |` F ) ` x ) = ( ( 2nd |` F ) ` y ) -> x = y ) ) ) ) )
83 82 imp
 |-  ( ( E. a e. A E. v e. B x = <. a , v >. /\ E. b e. A E. w e. B y = <. b , w >. ) -> ( ( F C_ ( A X. B ) /\ ( x e. F /\ y e. F ) ) -> ( F : A -1-1-> B -> ( ( ( 2nd |` F ) ` x ) = ( ( 2nd |` F ) ` y ) -> x = y ) ) ) )
84 14 83 mpcom
 |-  ( ( F C_ ( A X. B ) /\ ( x e. F /\ y e. F ) ) -> ( F : A -1-1-> B -> ( ( ( 2nd |` F ) ` x ) = ( ( 2nd |` F ) ` y ) -> x = y ) ) )
85 84 ex
 |-  ( F C_ ( A X. B ) -> ( ( x e. F /\ y e. F ) -> ( F : A -1-1-> B -> ( ( ( 2nd |` F ) ` x ) = ( ( 2nd |` F ) ` y ) -> x = y ) ) ) )
86 85 com23
 |-  ( F C_ ( A X. B ) -> ( F : A -1-1-> B -> ( ( x e. F /\ y e. F ) -> ( ( ( 2nd |` F ) ` x ) = ( ( 2nd |` F ) ` y ) -> x = y ) ) ) )
87 7 86 mpcom
 |-  ( F : A -1-1-> B -> ( ( x e. F /\ y e. F ) -> ( ( ( 2nd |` F ) ` x ) = ( ( 2nd |` F ) ` y ) -> x = y ) ) )
88 87 ralrimivv
 |-  ( F : A -1-1-> B -> A. x e. F A. y e. F ( ( ( 2nd |` F ) ` x ) = ( ( 2nd |` F ) ` y ) -> x = y ) )
89 dff13
 |-  ( ( 2nd |` F ) : F -1-1-> B <-> ( ( 2nd |` F ) : F --> B /\ A. x e. F A. y e. F ( ( ( 2nd |` F ) ` x ) = ( ( 2nd |` F ) ` y ) -> x = y ) ) )
90 5 88 89 sylanbrc
 |-  ( F : A -1-1-> B -> ( 2nd |` F ) : F -1-1-> B )
91 df-f1
 |-  ( ( 2nd |` F ) : F -1-1-> B <-> ( ( 2nd |` F ) : F --> B /\ Fun `' ( 2nd |` F ) ) )
92 91 simprbi
 |-  ( ( 2nd |` F ) : F -1-1-> B -> Fun `' ( 2nd |` F ) )
93 90 92 syl
 |-  ( F : A -1-1-> B -> Fun `' ( 2nd |` F ) )
94 dff1o3
 |-  ( ( 2nd |` F ) : F -1-1-onto-> ran F <-> ( ( 2nd |` F ) : F -onto-> ran F /\ Fun `' ( 2nd |` F ) ) )
95 3 93 94 sylanbrc
 |-  ( F : A -1-1-> B -> ( 2nd |` F ) : F -1-1-onto-> ran F )