Metamath Proof Explorer


Theorem fzm1

Description: Choices for an element of a finite interval of integers. (Contributed by Jeff Madsen, 2-Sep-2009)

Ref Expression
Assertion fzm1 N M K M N K M N 1 K = N

Proof

Step Hyp Ref Expression
1 oveq1 N = M N N = M N
2 1 eleq2d N = M K N N K M N
3 elfz1eq K N N K = N
4 2 3 syl6bir N = M K M N K = N
5 olc K = N K M N 1 K = N
6 4 5 syl6 N = M K M N K M N 1 K = N
7 6 adantl N M N = M K M N K M N 1 K = N
8 noel ¬ K
9 eluzelz N M N
10 9 adantr N M N = M N
11 10 zred N M N = M N
12 11 ltm1d N M N = M N 1 < N
13 breq2 N = M N 1 < N N 1 < M
14 13 adantl N M N = M N 1 < N N 1 < M
15 12 14 mpbid N M N = M N 1 < M
16 eluzel2 N M M
17 1zzd N M N = M 1
18 10 17 zsubcld N M N = M N 1
19 fzn M N 1 N 1 < M M N 1 =
20 16 18 19 syl2an2r N M N = M N 1 < M M N 1 =
21 15 20 mpbid N M N = M M N 1 =
22 21 eleq2d N M N = M K M N 1 K
23 8 22 mtbiri N M N = M ¬ K M N 1
24 23 pm2.21d N M N = M K M N 1 K M N
25 eluzfz2 N M N M N
26 25 ad2antrr N M N = M K = N N M N
27 eleq1 K = N K M N N M N
28 27 adantl N M N = M K = N K M N N M N
29 26 28 mpbird N M N = M K = N K M N
30 29 ex N M N = M K = N K M N
31 24 30 jaod N M N = M K M N 1 K = N K M N
32 7 31 impbid N M N = M K M N K M N 1 K = N
33 elfzp1 N 1 M K M N - 1 + 1 K M N 1 K = N - 1 + 1
34 33 adantl N M N 1 M K M N - 1 + 1 K M N 1 K = N - 1 + 1
35 9 adantr N M N 1 M N
36 35 zcnd N M N 1 M N
37 npcan1 N N - 1 + 1 = N
38 36 37 syl N M N 1 M N - 1 + 1 = N
39 38 oveq2d N M N 1 M M N - 1 + 1 = M N
40 39 eleq2d N M N 1 M K M N - 1 + 1 K M N
41 38 eqeq2d N M N 1 M K = N - 1 + 1 K = N
42 41 orbi2d N M N 1 M K M N 1 K = N - 1 + 1 K M N 1 K = N
43 34 40 42 3bitr3d N M N 1 M K M N K M N 1 K = N
44 uzm1 N M N = M N 1 M
45 32 43 44 mpjaodan N M K M N K M N 1 K = N