Metamath Proof Explorer


Theorem crctcshwlkn0lem3

Description: Lemma for crctcshwlkn0 . (Contributed by AV, 12-Mar-2021)

Ref Expression
Hypotheses crctcshwlkn0lem.s φ S 1 ..^ N
crctcshwlkn0lem.q Q = x 0 N if x N S P x + S P x + S - N
Assertion crctcshwlkn0lem3 φ J N - S + 1 N Q J = P J + S - N

Proof

Step Hyp Ref Expression
1 crctcshwlkn0lem.s φ S 1 ..^ N
2 crctcshwlkn0lem.q Q = x 0 N if x N S P x + S P x + S - N
3 breq1 x = J x N S J N S
4 fvoveq1 x = J P x + S = P J + S
5 oveq1 x = J x + S = J + S
6 5 fvoveq1d x = J P x + S - N = P J + S - N
7 3 4 6 ifbieq12d x = J if x N S P x + S P x + S - N = if J N S P J + S P J + S - N
8 0zd S 1 ..^ N 0
9 elfzoel2 S 1 ..^ N N
10 elfzoelz S 1 ..^ N S
11 9 10 zsubcld S 1 ..^ N N S
12 11 peano2zd S 1 ..^ N N - S + 1
13 elfzo1 S 1 ..^ N S N S < N
14 nnre S S
15 nnre N N
16 posdif S N S < N 0 < N S
17 0red S N 0
18 resubcl N S N S
19 18 ancoms S N N S
20 ltle 0 N S 0 < N S 0 N S
21 17 19 20 syl2anc S N 0 < N S 0 N S
22 19 lep1d S N N S N - S + 1
23 1red S N 1
24 19 23 readdcld S N N - S + 1
25 letr 0 N S N - S + 1 0 N S N S N - S + 1 0 N - S + 1
26 17 19 24 25 syl3anc S N 0 N S N S N - S + 1 0 N - S + 1
27 22 26 mpan2d S N 0 N S 0 N - S + 1
28 21 27 syld S N 0 < N S 0 N - S + 1
29 16 28 sylbid S N S < N 0 N - S + 1
30 14 15 29 syl2an S N S < N 0 N - S + 1
31 30 3impia S N S < N 0 N - S + 1
32 13 31 sylbi S 1 ..^ N 0 N - S + 1
33 eluz2 N - S + 1 0 0 N - S + 1 0 N - S + 1
34 8 12 32 33 syl3anbrc S 1 ..^ N N - S + 1 0
35 1 34 syl φ N - S + 1 0
36 fzss1 N - S + 1 0 N - S + 1 N 0 N
37 35 36 syl φ N - S + 1 N 0 N
38 37 sselda φ J N - S + 1 N J 0 N
39 fvex P J + S V
40 fvex P J + S - N V
41 39 40 ifex if J N S P J + S P J + S - N V
42 41 a1i φ J N - S + 1 N if J N S P J + S P J + S - N V
43 2 7 38 42 fvmptd3 φ J N - S + 1 N Q J = if J N S P J + S P J + S - N
44 elfz2 J N - S + 1 N N - S + 1 N J N - S + 1 J J N
45 zre S S
46 zre J J
47 zre N N
48 46 47 anim12i J N J N
49 simprr S J N N
50 simpl S J N S
51 49 50 resubcld S J N N S
52 51 ltp1d S J N N S < N - S + 1
53 1red S J N 1
54 51 53 readdcld S J N N - S + 1
55 simprl S J N J
56 ltletr N S N - S + 1 J N S < N - S + 1 N - S + 1 J N S < J
57 51 54 55 56 syl3anc S J N N S < N - S + 1 N - S + 1 J N S < J
58 52 57 mpand S J N N - S + 1 J N S < J
59 51 55 ltnled S J N N S < J ¬ J N S
60 58 59 sylibd S J N N - S + 1 J ¬ J N S
61 45 48 60 syl2an S J N N - S + 1 J ¬ J N S
62 61 expcom J N S N - S + 1 J ¬ J N S
63 62 ancoms N J S N - S + 1 J ¬ J N S
64 63 3adant1 N - S + 1 N J S N - S + 1 J ¬ J N S
65 10 64 syl5com S 1 ..^ N N - S + 1 N J N - S + 1 J ¬ J N S
66 65 com13 N - S + 1 J N - S + 1 N J S 1 ..^ N ¬ J N S
67 66 adantr N - S + 1 J J N N - S + 1 N J S 1 ..^ N ¬ J N S
68 67 impcom N - S + 1 N J N - S + 1 J J N S 1 ..^ N ¬ J N S
69 68 com12 S 1 ..^ N N - S + 1 N J N - S + 1 J J N ¬ J N S
70 44 69 syl5bi S 1 ..^ N J N - S + 1 N ¬ J N S
71 1 70 syl φ J N - S + 1 N ¬ J N S
72 71 imp φ J N - S + 1 N ¬ J N S
73 72 iffalsed φ J N - S + 1 N if J N S P J + S P J + S - N = P J + S - N
74 43 73 eqtrd φ J N - S + 1 N Q J = P J + S - N