Metamath Proof Explorer


Theorem uzrdgfni

Description: The recursive definition generator on upper integers is a function. See comment in om2uzrdg . (Contributed by Mario Carneiro, 26-Jun-2013) (Revised by Mario Carneiro, 4-May-2015)

Ref Expression
Hypotheses om2uz.1 C
om2uz.2 G = rec x V x + 1 C ω
uzrdg.1 A V
uzrdg.2 R = rec x V , y V x + 1 x F y C A ω
uzrdg.3 S = ran R
Assertion uzrdgfni S Fn C

Proof

Step Hyp Ref Expression
1 om2uz.1 C
2 om2uz.2 G = rec x V x + 1 C ω
3 uzrdg.1 A V
4 uzrdg.2 R = rec x V , y V x + 1 x F y C A ω
5 uzrdg.3 S = ran R
6 5 eleq2i z S z ran R
7 frfnom rec x V , y V x + 1 x F y C A ω Fn ω
8 4 fneq1i R Fn ω rec x V , y V x + 1 x F y C A ω Fn ω
9 7 8 mpbir R Fn ω
10 fvelrnb R Fn ω z ran R w ω R w = z
11 9 10 ax-mp z ran R w ω R w = z
12 6 11 bitri z S w ω R w = z
13 1 2 3 4 om2uzrdg w ω R w = G w 2 nd R w
14 1 2 om2uzuzi w ω G w C
15 fvex 2 nd R w V
16 opelxpi G w C 2 nd R w V G w 2 nd R w C × V
17 14 15 16 sylancl w ω G w 2 nd R w C × V
18 13 17 eqeltrd w ω R w C × V
19 eleq1 R w = z R w C × V z C × V
20 18 19 syl5ibcom w ω R w = z z C × V
21 20 rexlimiv w ω R w = z z C × V
22 12 21 sylbi z S z C × V
23 22 ssriv S C × V
24 xpss C × V V × V
25 23 24 sstri S V × V
26 df-rel Rel S S V × V
27 25 26 mpbir Rel S
28 fvex 2 nd R G -1 v V
29 eqeq2 w = 2 nd R G -1 v z = w z = 2 nd R G -1 v
30 29 imbi2d w = 2 nd R G -1 v v z S z = w v z S z = 2 nd R G -1 v
31 30 albidv w = 2 nd R G -1 v z v z S z = w z v z S z = 2 nd R G -1 v
32 28 31 spcev z v z S z = 2 nd R G -1 v w z v z S z = w
33 5 eleq2i v z S v z ran R
34 fvelrnb R Fn ω v z ran R w ω R w = v z
35 9 34 ax-mp v z ran R w ω R w = v z
36 33 35 bitri v z S w ω R w = v z
37 13 eqeq1d w ω R w = v z G w 2 nd R w = v z
38 fvex G w V
39 38 15 opth1 G w 2 nd R w = v z G w = v
40 37 39 syl6bi w ω R w = v z G w = v
41 1 2 om2uzf1oi G : ω 1-1 onto C
42 f1ocnvfv G : ω 1-1 onto C w ω G w = v G -1 v = w
43 41 42 mpan w ω G w = v G -1 v = w
44 40 43 syld w ω R w = v z G -1 v = w
45 2fveq3 G -1 v = w 2 nd R G -1 v = 2 nd R w
46 44 45 syl6 w ω R w = v z 2 nd R G -1 v = 2 nd R w
47 46 imp w ω R w = v z 2 nd R G -1 v = 2 nd R w
48 vex v V
49 vex z V
50 48 49 op2ndd R w = v z 2 nd R w = z
51 50 adantl w ω R w = v z 2 nd R w = z
52 47 51 eqtr2d w ω R w = v z z = 2 nd R G -1 v
53 52 rexlimiva w ω R w = v z z = 2 nd R G -1 v
54 36 53 sylbi v z S z = 2 nd R G -1 v
55 32 54 mpg w z v z S z = w
56 55 ax-gen v w z v z S z = w
57 dffun5 Fun S Rel S v w z v z S z = w
58 27 56 57 mpbir2an Fun S
59 dmss S C × V dom S dom C × V
60 23 59 ax-mp dom S dom C × V
61 dmxpss dom C × V C
62 60 61 sstri dom S C
63 1 2 3 4 uzrdglem v C v 2 nd R G -1 v ran R
64 63 5 eleqtrrdi v C v 2 nd R G -1 v S
65 48 28 opeldm v 2 nd R G -1 v S v dom S
66 64 65 syl v C v dom S
67 66 ssriv C dom S
68 62 67 eqssi dom S = C
69 df-fn S Fn C Fun S dom S = C
70 58 68 69 mpbir2an S Fn C