Metamath Proof Explorer


Theorem ubmelm1fzo

Description: The result of subtracting 1 and an integer of a half-open range of nonnegative integers from the upper bound of this range is contained in this range. (Contributed by AV, 23-Mar-2018) (Revised by AV, 30-Oct-2018)

Ref Expression
Assertion ubmelm1fzo K0..^NN-K-10..^N

Proof

Step Hyp Ref Expression
1 elfzo0 K0..^NK0NK<N
2 nnz NN
3 2 adantr NK0N
4 nn0z K0K
5 4 adantl NK0K
6 3 5 zsubcld NK0NK
7 6 ancoms K0NNK
8 peano2zm NKN-K-1
9 7 8 syl K0NN-K-1
10 9 3adant3 K0NK<NN-K-1
11 simp3 K0NK<NK<N
12 4 2 anim12i K0NKN
13 12 3adant3 K0NK<NKN
14 znnsub KNK<NNK
15 13 14 syl K0NK<NK<NNK
16 11 15 mpbid K0NK<NNK
17 nnm1ge0 NK0N-K-1
18 16 17 syl K0NK<N0N-K-1
19 elnn0z N-K-10N-K-10N-K-1
20 10 18 19 sylanbrc K0NK<NN-K-10
21 simp2 K0NK<NN
22 nncn NN
23 22 adantl K0NN
24 nn0cn K0K
25 24 adantr K0NK
26 1cnd K0N1
27 23 25 26 subsub4d K0NN-K-1=NK+1
28 nn0p1gt0 K00<K+1
29 28 adantr K0N0<K+1
30 nn0re K0K
31 peano2re KK+1
32 30 31 syl K0K+1
33 nnre NN
34 ltsubpos K+1N0<K+1NK+1<N
35 32 33 34 syl2an K0N0<K+1NK+1<N
36 29 35 mpbid K0NNK+1<N
37 27 36 eqbrtrd K0NN-K-1<N
38 37 3adant3 K0NK<NN-K-1<N
39 elfzo0 N-K-10..^NN-K-10NN-K-1<N
40 20 21 38 39 syl3anbrc K0NK<NN-K-10..^N
41 1 40 sylbi K0..^NN-K-10..^N