Metamath Proof Explorer


Theorem f1ocnt

Description: Given a countable set A , number its elements by providing a one-to-one mapping either with NN or an integer range starting from 1. The domain of the function can then be used with iundisjcnt or iundisj2cnt . (Contributed by Thierry Arnoux, 25-Jul-2020)

Ref Expression
Assertion f1ocnt A ω f f : dom f 1-1 onto A dom f = dom f = 1 ..^ A + 1

Proof

Step Hyp Ref Expression
1 f1o0 : 1-1 onto
2 eqidd A = =
3 dm0 dom =
4 3 a1i A = dom =
5 id A = A =
6 2 4 5 f1oeq123d A = : dom 1-1 onto A : 1-1 onto
7 1 6 mpbiri A = : dom 1-1 onto A
8 fveq2 A = A =
9 hash0 = 0
10 8 9 eqtrdi A = A = 0
11 10 oveq1d A = A + 1 = 0 + 1
12 0p1e1 0 + 1 = 1
13 11 12 eqtrdi A = A + 1 = 1
14 13 oveq2d A = 1 ..^ A + 1 = 1 ..^ 1
15 fzo0 1 ..^ 1 =
16 14 15 eqtrdi A = 1 ..^ A + 1 =
17 4 16 eqtr4d A = dom = 1 ..^ A + 1
18 17 olcd A = dom = dom = 1 ..^ A + 1
19 7 18 jca A = : dom 1-1 onto A dom = dom = 1 ..^ A + 1
20 0ex V
21 id f = f =
22 dmeq f = dom f = dom
23 eqidd f = A = A
24 21 22 23 f1oeq123d f = f : dom f 1-1 onto A : dom 1-1 onto A
25 22 eqeq1d f = dom f = dom =
26 22 eqeq1d f = dom f = 1 ..^ A + 1 dom = 1 ..^ A + 1
27 25 26 orbi12d f = dom f = dom f = 1 ..^ A + 1 dom = dom = 1 ..^ A + 1
28 24 27 anbi12d f = f : dom f 1-1 onto A dom f = dom f = 1 ..^ A + 1 : dom 1-1 onto A dom = dom = 1 ..^ A + 1
29 20 28 spcev : dom 1-1 onto A dom = dom = 1 ..^ A + 1 f f : dom f 1-1 onto A dom f = dom f = 1 ..^ A + 1
30 19 29 syl A = f f : dom f 1-1 onto A dom f = dom f = 1 ..^ A + 1
31 30 adantl A ω A Fin A = f f : dom f 1-1 onto A dom f = dom f = 1 ..^ A + 1
32 f1odm f : 1 A 1-1 onto A dom f = 1 A
33 32 f1oeq2d f : 1 A 1-1 onto A f : dom f 1-1 onto A f : 1 A 1-1 onto A
34 33 ibir f : 1 A 1-1 onto A f : dom f 1-1 onto A
35 34 adantl A f : 1 A 1-1 onto A f : dom f 1-1 onto A
36 32 adantl A f : 1 A 1-1 onto A dom f = 1 A
37 simpl A f : 1 A 1-1 onto A A
38 37 nnzd A f : 1 A 1-1 onto A A
39 fzval3 A 1 A = 1 ..^ A + 1
40 38 39 syl A f : 1 A 1-1 onto A 1 A = 1 ..^ A + 1
41 36 40 eqtrd A f : 1 A 1-1 onto A dom f = 1 ..^ A + 1
42 41 olcd A f : 1 A 1-1 onto A dom f = dom f = 1 ..^ A + 1
43 35 42 jca A f : 1 A 1-1 onto A f : dom f 1-1 onto A dom f = dom f = 1 ..^ A + 1
44 43 ex A f : 1 A 1-1 onto A f : dom f 1-1 onto A dom f = dom f = 1 ..^ A + 1
45 44 eximdv A f f : 1 A 1-1 onto A f f : dom f 1-1 onto A dom f = dom f = 1 ..^ A + 1
46 45 imp A f f : 1 A 1-1 onto A f f : dom f 1-1 onto A dom f = dom f = 1 ..^ A + 1
47 46 adantl A ω A Fin A f f : 1 A 1-1 onto A f f : dom f 1-1 onto A dom f = dom f = 1 ..^ A + 1
48 fz1f1o A Fin A = A f f : 1 A 1-1 onto A
49 48 adantl A ω A Fin A = A f f : 1 A 1-1 onto A
50 31 47 49 mpjaodan A ω A Fin f f : dom f 1-1 onto A dom f = dom f = 1 ..^ A + 1
51 isfinite A Fin A ω
52 51 notbii ¬ A Fin ¬ A ω
53 52 biimpi ¬ A Fin ¬ A ω
54 53 anim2i A ω ¬ A Fin A ω ¬ A ω
55 bren2 A ω A ω ¬ A ω
56 54 55 sylibr A ω ¬ A Fin A ω
57 nnenom ω
58 57 ensymi ω
59 entr A ω ω A
60 56 58 59 sylancl A ω ¬ A Fin A
61 bren A g g : A 1-1 onto
62 60 61 sylib A ω ¬ A Fin g g : A 1-1 onto
63 f1oexbi g g : A 1-1 onto f f : 1-1 onto A
64 62 63 sylib A ω ¬ A Fin f f : 1-1 onto A
65 f1odm f : 1-1 onto A dom f =
66 65 f1oeq2d f : 1-1 onto A f : dom f 1-1 onto A f : 1-1 onto A
67 66 ibir f : 1-1 onto A f : dom f 1-1 onto A
68 65 orcd f : 1-1 onto A dom f = dom f = 1 ..^ A + 1
69 67 68 jca f : 1-1 onto A f : dom f 1-1 onto A dom f = dom f = 1 ..^ A + 1
70 69 eximi f f : 1-1 onto A f f : dom f 1-1 onto A dom f = dom f = 1 ..^ A + 1
71 64 70 syl A ω ¬ A Fin f f : dom f 1-1 onto A dom f = dom f = 1 ..^ A + 1
72 50 71 pm2.61dan A ω f f : dom f 1-1 onto A dom f = dom f = 1 ..^ A + 1