Metamath Proof Explorer


Theorem dvdsflf1o

Description: A bijection from the numbers less than N / A to the multiples of A less than N . Useful for some sum manipulations. (Contributed by Mario Carneiro, 3-May-2016)

Ref Expression
Hypotheses dvdsflf1o.1 φ A
dvdsflf1o.2 φ N
dvdsflf1o.f F = n 1 A N N n
Assertion dvdsflf1o φ F : 1 A N 1-1 onto x 1 A | N x

Proof

Step Hyp Ref Expression
1 dvdsflf1o.1 φ A
2 dvdsflf1o.2 φ N
3 dvdsflf1o.f F = n 1 A N N n
4 breq2 x = N n N x N N n
5 elfznn n 1 A N n
6 nnmulcl N n N n
7 2 5 6 syl2an φ n 1 A N N n
8 1 2 nndivred φ A N
9 fznnfl A N n 1 A N n n A N
10 8 9 syl φ n 1 A N n n A N
11 10 simplbda φ n 1 A N n A N
12 5 adantl φ n 1 A N n
13 12 nnred φ n 1 A N n
14 1 adantr φ n 1 A N A
15 2 nnred φ N
16 15 adantr φ n 1 A N N
17 2 nngt0d φ 0 < N
18 17 adantr φ n 1 A N 0 < N
19 lemuldiv2 n A N 0 < N N n A n A N
20 13 14 16 18 19 syl112anc φ n 1 A N N n A n A N
21 11 20 mpbird φ n 1 A N N n A
22 2 nnzd φ N
23 elfzelz n 1 A N n
24 zmulcl N n N n
25 22 23 24 syl2an φ n 1 A N N n
26 flge A N n N n A N n A
27 14 25 26 syl2anc φ n 1 A N N n A N n A
28 21 27 mpbid φ n 1 A N N n A
29 1 flcld φ A
30 29 adantr φ n 1 A N A
31 fznn A N n 1 A N n N n A
32 30 31 syl φ n 1 A N N n 1 A N n N n A
33 7 28 32 mpbir2and φ n 1 A N N n 1 A
34 dvdsmul1 N n N N n
35 22 23 34 syl2an φ n 1 A N N N n
36 4 33 35 elrabd φ n 1 A N N n x 1 A | N x
37 breq2 x = m N x N m
38 37 elrab m x 1 A | N x m 1 A N m
39 38 simprbi m x 1 A | N x N m
40 39 adantl φ m x 1 A | N x N m
41 elrabi m x 1 A | N x m 1 A
42 41 adantl φ m x 1 A | N x m 1 A
43 elfznn m 1 A m
44 42 43 syl φ m x 1 A | N x m
45 2 adantr φ m x 1 A | N x N
46 nndivdvds m N N m m N
47 44 45 46 syl2anc φ m x 1 A | N x N m m N
48 40 47 mpbid φ m x 1 A | N x m N
49 fznnfl A m 1 A m m A
50 1 49 syl φ m 1 A m m A
51 50 simplbda φ m 1 A m A
52 41 51 sylan2 φ m x 1 A | N x m A
53 44 nnred φ m x 1 A | N x m
54 1 adantr φ m x 1 A | N x A
55 15 adantr φ m x 1 A | N x N
56 17 adantr φ m x 1 A | N x 0 < N
57 lediv1 m A N 0 < N m A m N A N
58 53 54 55 56 57 syl112anc φ m x 1 A | N x m A m N A N
59 52 58 mpbid φ m x 1 A | N x m N A N
60 8 adantr φ m x 1 A | N x A N
61 fznnfl A N m N 1 A N m N m N A N
62 60 61 syl φ m x 1 A | N x m N 1 A N m N m N A N
63 48 59 62 mpbir2and φ m x 1 A | N x m N 1 A N
64 44 nncnd φ m x 1 A | N x m
65 64 adantrl φ n 1 A N m x 1 A | N x m
66 2 nncnd φ N
67 66 adantr φ n 1 A N m x 1 A | N x N
68 12 nncnd φ n 1 A N n
69 68 adantrr φ n 1 A N m x 1 A | N x n
70 2 nnne0d φ N 0
71 70 adantr φ n 1 A N m x 1 A | N x N 0
72 65 67 69 71 divmuld φ n 1 A N m x 1 A | N x m N = n N n = m
73 eqcom n = m N m N = n
74 eqcom m = N n N n = m
75 72 73 74 3bitr4g φ n 1 A N m x 1 A | N x n = m N m = N n
76 3 36 63 75 f1o2d φ F : 1 A N 1-1 onto x 1 A | N x