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 φKJ1
Assertion hashnzfz φNJK=KNJ1N

Proof

Step Hyp Ref Expression
1 hashnzfz.n φN
2 hashnzfz.j φJ
3 hashnzfz.k φKJ1
4 0zd φ0
5 1 2 3 4 hashdvds φxJK|Nx0=K0NJ-1-0N
6 elfzelz xJKx
7 6 zcnd xJKx
8 7 subid1d xJKx0=x
9 8 breq2d xJKNx0Nx
10 9 rabbiia xJK|Nx0=xJK|Nx
11 dfrab3 xJK|Nx=JKx|Nx
12 reldvds Rel
13 relimasn RelN=x|Nx
14 12 13 ax-mp N=x|Nx
15 14 ineq2i JKN=JKx|Nx
16 incom JKN=NJK
17 15 16 eqtr3i JKx|Nx=NJK
18 10 11 17 3eqtri xJK|Nx0=NJK
19 18 fveq2i xJK|Nx0=NJK
20 19 a1i φxJK|Nx0=NJK
21 eluzelz KJ1K
22 3 21 syl φK
23 22 zcnd φK
24 23 subid1d φK0=K
25 24 fvoveq1d φK0N=KN
26 peano2zm JJ1
27 2 26 syl φJ1
28 27 zcnd φJ1
29 28 subid1d φJ-1-0=J1
30 29 fvoveq1d φJ-1-0N=J1N
31 25 30 oveq12d φK0NJ-1-0N=KNJ1N
32 5 20 31 3eqtr3d φNJK=KNJ1N