Metamath Proof Explorer


Theorem hashf1lem1

Description: Lemma for hashf1 . (Contributed by Mario Carneiro, 17-Apr-2015) (Proof shortened by AV, 14-Aug-2024)

Ref Expression
Hypotheses hashf1lem2.1 φ A Fin
hashf1lem2.2 φ B Fin
hashf1lem2.3 φ ¬ z A
hashf1lem2.4 φ A + 1 B
hashf1lem1.5 φ F : A 1-1 B
Assertion hashf1lem1 φ f | f A = F f : A z 1-1 B B ran F

Proof

Step Hyp Ref Expression
1 hashf1lem2.1 φ A Fin
2 hashf1lem2.2 φ B Fin
3 hashf1lem2.3 φ ¬ z A
4 hashf1lem2.4 φ A + 1 B
5 hashf1lem1.5 φ F : A 1-1 B
6 f1setex B Fin f | f : A z 1-1 B V
7 2 6 syl φ f | f : A z 1-1 B V
8 abanssr f | f A = F f : A z 1-1 B f | f : A z 1-1 B
9 8 a1i φ f | f A = F f : A z 1-1 B f | f : A z 1-1 B
10 7 9 ssexd φ f | f A = F f : A z 1-1 B V
11 2 difexd φ B ran F V
12 vex g V
13 reseq1 f = g f A = g A
14 13 eqeq1d f = g f A = F g A = F
15 f1eq1 f = g f : A z 1-1 B g : A z 1-1 B
16 14 15 anbi12d f = g f A = F f : A z 1-1 B g A = F g : A z 1-1 B
17 12 16 elab g f | f A = F f : A z 1-1 B g A = F g : A z 1-1 B
18 f1f g : A z 1-1 B g : A z B
19 18 ad2antll φ g A = F g : A z 1-1 B g : A z B
20 ssun2 z A z
21 vex z V
22 21 snss z A z z A z
23 20 22 mpbir z A z
24 ffvelrn g : A z B z A z g z B
25 19 23 24 sylancl φ g A = F g : A z 1-1 B g z B
26 3 adantr φ g A = F g : A z 1-1 B ¬ z A
27 df-ima g A = ran g A
28 simprl φ g A = F g : A z 1-1 B g A = F
29 28 rneqd φ g A = F g : A z 1-1 B ran g A = ran F
30 27 29 eqtrid φ g A = F g : A z 1-1 B g A = ran F
31 30 eleq2d φ g A = F g : A z 1-1 B g z g A g z ran F
32 simprr φ g A = F g : A z 1-1 B g : A z 1-1 B
33 23 a1i φ g A = F g : A z 1-1 B z A z
34 ssun1 A A z
35 34 a1i φ g A = F g : A z 1-1 B A A z
36 f1elima g : A z 1-1 B z A z A A z g z g A z A
37 32 33 35 36 syl3anc φ g A = F g : A z 1-1 B g z g A z A
38 31 37 bitr3d φ g A = F g : A z 1-1 B g z ran F z A
39 26 38 mtbird φ g A = F g : A z 1-1 B ¬ g z ran F
40 25 39 eldifd φ g A = F g : A z 1-1 B g z B ran F
41 40 ex φ g A = F g : A z 1-1 B g z B ran F
42 17 41 syl5bi φ g f | f A = F f : A z 1-1 B g z B ran F
43 f1f F : A 1-1 B F : A B
44 5 43 syl φ F : A B
45 44 adantr φ x B ran F F : A B
46 vex x V
47 21 46 f1osn z x : z 1-1 onto x
48 f1of z x : z 1-1 onto x z x : z x
49 47 48 ax-mp z x : z x
50 eldifi x B ran F x B
51 50 adantl φ x B ran F x B
52 51 snssd φ x B ran F x B
53 fss z x : z x x B z x : z B
54 49 52 53 sylancr φ x B ran F z x : z B
55 res0 F =
56 res0 z x =
57 55 56 eqtr4i F = z x
58 disjsn A z = ¬ z A
59 3 58 sylibr φ A z =
60 59 adantr φ x B ran F A z =
61 60 reseq2d φ x B ran F F A z = F
62 60 reseq2d φ x B ran F z x A z = z x
63 57 61 62 3eqtr4a φ x B ran F F A z = z x A z
64 fresaunres1 F : A B z x : z B F A z = z x A z F z x A = F
65 45 54 63 64 syl3anc φ x B ran F F z x A = F
66 f1f1orn F : A 1-1 B F : A 1-1 onto ran F
67 5 66 syl φ F : A 1-1 onto ran F
68 67 adantr φ x B ran F F : A 1-1 onto ran F
69 47 a1i φ x B ran F z x : z 1-1 onto x
70 eldifn x B ran F ¬ x ran F
71 70 adantl φ x B ran F ¬ x ran F
72 disjsn ran F x = ¬ x ran F
73 71 72 sylibr φ x B ran F ran F x =
74 f1oun F : A 1-1 onto ran F z x : z 1-1 onto x A z = ran F x = F z x : A z 1-1 onto ran F x
75 68 69 60 73 74 syl22anc φ x B ran F F z x : A z 1-1 onto ran F x
76 f1of1 F z x : A z 1-1 onto ran F x F z x : A z 1-1 ran F x
77 75 76 syl φ x B ran F F z x : A z 1-1 ran F x
78 45 frnd φ x B ran F ran F B
79 78 52 unssd φ x B ran F ran F x B
80 f1ss F z x : A z 1-1 ran F x ran F x B F z x : A z 1-1 B
81 77 79 80 syl2anc φ x B ran F F z x : A z 1-1 B
82 44 1 fexd φ F V
83 82 adantr φ x B ran F F V
84 snex z x V
85 unexg F V z x V F z x V
86 83 84 85 sylancl φ x B ran F F z x V
87 reseq1 f = F z x f A = F z x A
88 87 eqeq1d f = F z x f A = F F z x A = F
89 f1eq1 f = F z x f : A z 1-1 B F z x : A z 1-1 B
90 88 89 anbi12d f = F z x f A = F f : A z 1-1 B F z x A = F F z x : A z 1-1 B
91 90 elabg F z x V F z x f | f A = F f : A z 1-1 B F z x A = F F z x : A z 1-1 B
92 86 91 syl φ x B ran F F z x f | f A = F f : A z 1-1 B F z x A = F F z x : A z 1-1 B
93 65 81 92 mpbir2and φ x B ran F F z x f | f A = F f : A z 1-1 B
94 93 ex φ x B ran F F z x f | f A = F f : A z 1-1 B
95 17 anbi1i g f | f A = F f : A z 1-1 B x B ran F g A = F g : A z 1-1 B x B ran F
96 simprlr φ g A = F g : A z 1-1 B x B ran F g : A z 1-1 B
97 f1fn g : A z 1-1 B g Fn A z
98 96 97 syl φ g A = F g : A z 1-1 B x B ran F g Fn A z
99 75 adantrl φ g A = F g : A z 1-1 B x B ran F F z x : A z 1-1 onto ran F x
100 f1ofn F z x : A z 1-1 onto ran F x F z x Fn A z
101 99 100 syl φ g A = F g : A z 1-1 B x B ran F F z x Fn A z
102 eqfnfv g Fn A z F z x Fn A z g = F z x y A z g y = F z x y
103 98 101 102 syl2anc φ g A = F g : A z 1-1 B x B ran F g = F z x y A z g y = F z x y
104 fvres y A g A y = g y
105 104 eqcomd y A g y = g A y
106 simprll φ g A = F g : A z 1-1 B x B ran F g A = F
107 106 fveq1d φ g A = F g : A z 1-1 B x B ran F g A y = F y
108 105 107 sylan9eqr φ g A = F g : A z 1-1 B x B ran F y A g y = F y
109 5 ad2antrr φ g A = F g : A z 1-1 B x B ran F y A F : A 1-1 B
110 f1fn F : A 1-1 B F Fn A
111 109 110 syl φ g A = F g : A z 1-1 B x B ran F y A F Fn A
112 21 46 fnsn z x Fn z
113 112 a1i φ g A = F g : A z 1-1 B x B ran F y A z x Fn z
114 59 ad2antrr φ g A = F g : A z 1-1 B x B ran F y A A z =
115 simpr φ g A = F g : A z 1-1 B x B ran F y A y A
116 111 113 114 115 fvun1d φ g A = F g : A z 1-1 B x B ran F y A F z x y = F y
117 108 116 eqtr4d φ g A = F g : A z 1-1 B x B ran F y A g y = F z x y
118 117 ralrimiva φ g A = F g : A z 1-1 B x B ran F y A g y = F z x y
119 118 biantrurd φ g A = F g : A z 1-1 B x B ran F y z g y = F z x y y A g y = F z x y y z g y = F z x y
120 ralunb y A z g y = F z x y y A g y = F z x y y z g y = F z x y
121 119 120 bitr4di φ g A = F g : A z 1-1 B x B ran F y z g y = F z x y y A z g y = F z x y
122 44 fdmd φ dom F = A
123 122 eleq2d φ z dom F z A
124 3 123 mtbird φ ¬ z dom F
125 124 adantr φ g A = F g : A z 1-1 B x B ran F ¬ z dom F
126 fsnunfv z V x V ¬ z dom F F z x z = x
127 21 46 125 126 mp3an12i φ g A = F g : A z 1-1 B x B ran F F z x z = x
128 127 eqeq2d φ g A = F g : A z 1-1 B x B ran F g z = F z x z g z = x
129 fveq2 y = z g y = g z
130 fveq2 y = z F z x y = F z x z
131 129 130 eqeq12d y = z g y = F z x y g z = F z x z
132 21 131 ralsn y z g y = F z x y g z = F z x z
133 eqcom x = g z g z = x
134 128 132 133 3bitr4g φ g A = F g : A z 1-1 B x B ran F y z g y = F z x y x = g z
135 103 121 134 3bitr2d φ g A = F g : A z 1-1 B x B ran F g = F z x x = g z
136 135 ex φ g A = F g : A z 1-1 B x B ran F g = F z x x = g z
137 95 136 syl5bi φ g f | f A = F f : A z 1-1 B x B ran F g = F z x x = g z
138 10 11 42 94 137 en3d φ f | f A = F f : A z 1-1 B B ran F