Metamath Proof Explorer


Theorem hashnzfz

Description: Special case of hashdvds : the count of multiples in nℤ restricted to an interval. (Contributed by Steve Rodriguez, 20-Jan-2020)

Ref Expression
Hypotheses hashnzfz.n φ N
hashnzfz.j φ J
hashnzfz.k φ K J 1
Assertion hashnzfz φ N J K = K N J 1 N

Proof

Step Hyp Ref Expression
1 hashnzfz.n φ N
2 hashnzfz.j φ J
3 hashnzfz.k φ K J 1
4 0zd φ 0
5 1 2 3 4 hashdvds φ x J K | N x 0 = K 0 N J - 1 - 0 N
6 elfzelz x J K x
7 6 zcnd x J K x
8 7 subid1d x J K x 0 = x
9 8 breq2d x J K N x 0 N x
10 9 rabbiia x J K | N x 0 = x J K | N x
11 dfrab3 x J K | N x = J K x | N x
12 reldvds Rel
13 relimasn Rel N = x | N x
14 12 13 ax-mp N = x | N x
15 14 ineq2i J K N = J K x | N x
16 incom J K N = N J K
17 15 16 eqtr3i J K x | N x = N J K
18 10 11 17 3eqtri x J K | N x 0 = N J K
19 18 fveq2i x J K | N x 0 = N J K
20 19 a1i φ x J K | N x 0 = N J K
21 eluzelz K J 1 K
22 3 21 syl φ K
23 22 zcnd φ K
24 23 subid1d φ K 0 = K
25 24 fvoveq1d φ K 0 N = K N
26 peano2zm J J 1
27 2 26 syl φ J 1
28 27 zcnd φ J 1
29 28 subid1d φ J - 1 - 0 = J 1
30 29 fvoveq1d φ J - 1 - 0 N = J 1 N
31 25 30 oveq12d φ K 0 N J - 1 - 0 N = K N J 1 N
32 5 20 31 3eqtr3d φ N J K = K N J 1 N