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ωff:domf1-1 ontoAdomf=domf=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=:dom1-1 ontoA:1-1 onto
7 1 6 mpbiri A=:dom1-1 ontoA
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=:dom1-1 ontoAdom=dom=1..^A+1
20 0ex V
21 id f=f=
22 dmeq f=domf=dom
23 eqidd f=A=A
24 21 22 23 f1oeq123d f=f:domf1-1 ontoA:dom1-1 ontoA
25 22 eqeq1d f=domf=dom=
26 22 eqeq1d f=domf=1..^A+1dom=1..^A+1
27 25 26 orbi12d f=domf=domf=1..^A+1dom=dom=1..^A+1
28 24 27 anbi12d f=f:domf1-1 ontoAdomf=domf=1..^A+1:dom1-1 ontoAdom=dom=1..^A+1
29 20 28 spcev :dom1-1 ontoAdom=dom=1..^A+1ff:domf1-1 ontoAdomf=domf=1..^A+1
30 19 29 syl A=ff:domf1-1 ontoAdomf=domf=1..^A+1
31 30 adantl AωAFinA=ff:domf1-1 ontoAdomf=domf=1..^A+1
32 f1odm f:1A1-1 ontoAdomf=1A
33 32 f1oeq2d f:1A1-1 ontoAf:domf1-1 ontoAf:1A1-1 ontoA
34 33 ibir f:1A1-1 ontoAf:domf1-1 ontoA
35 34 adantl Af:1A1-1 ontoAf:domf1-1 ontoA
36 32 adantl Af:1A1-1 ontoAdomf=1A
37 simpl Af:1A1-1 ontoAA
38 37 nnzd Af:1A1-1 ontoAA
39 fzval3 A1A=1..^A+1
40 38 39 syl Af:1A1-1 ontoA1A=1..^A+1
41 36 40 eqtrd Af:1A1-1 ontoAdomf=1..^A+1
42 41 olcd Af:1A1-1 ontoAdomf=domf=1..^A+1
43 35 42 jca Af:1A1-1 ontoAf:domf1-1 ontoAdomf=domf=1..^A+1
44 43 ex Af:1A1-1 ontoAf:domf1-1 ontoAdomf=domf=1..^A+1
45 44 eximdv Aff:1A1-1 ontoAff:domf1-1 ontoAdomf=domf=1..^A+1
46 45 imp Aff:1A1-1 ontoAff:domf1-1 ontoAdomf=domf=1..^A+1
47 46 adantl AωAFinAff:1A1-1 ontoAff:domf1-1 ontoAdomf=domf=1..^A+1
48 fz1f1o AFinA=Aff:1A1-1 ontoA
49 48 adantl AωAFinA=Aff:1A1-1 ontoA
50 31 47 49 mpjaodan AωAFinff:domf1-1 ontoAdomf=domf=1..^A+1
51 isfinite AFinAω
52 51 notbii ¬AFin¬Aω
53 52 biimpi ¬AFin¬Aω
54 53 anim2i Aω¬AFinAω¬Aω
55 bren2 AωAω¬Aω
56 54 55 sylibr Aω¬AFinAω
57 nnenom ω
58 57 ensymi ω
59 entr AωωA
60 56 58 59 sylancl Aω¬AFinA
61 bren Agg:A1-1 onto
62 60 61 sylib Aω¬AFingg:A1-1 onto
63 f1oexbi gg:A1-1 ontoff:1-1 ontoA
64 62 63 sylib Aω¬AFinff:1-1 ontoA
65 f1odm f:1-1 ontoAdomf=
66 65 f1oeq2d f:1-1 ontoAf:domf1-1 ontoAf:1-1 ontoA
67 66 ibir f:1-1 ontoAf:domf1-1 ontoA
68 65 orcd f:1-1 ontoAdomf=domf=1..^A+1
69 67 68 jca f:1-1 ontoAf:domf1-1 ontoAdomf=domf=1..^A+1
70 69 eximi ff:1-1 ontoAff:domf1-1 ontoAdomf=domf=1..^A+1
71 64 70 syl Aω¬AFinff:domf1-1 ontoAdomf=domf=1..^A+1
72 50 71 pm2.61dan Aωff:domf1-1 ontoAdomf=domf=1..^A+1