Metamath Proof Explorer


Theorem crctcshwlkn0

Description: Cyclically shifting the indices of a circuit <. F , P >. results in a walk <. H , Q >. . (Contributed by AV, 10-Mar-2021)

Ref Expression
Hypotheses crctcsh.v V = Vtx G
crctcsh.i I = iEdg G
crctcsh.d φ F Circuits G P
crctcsh.n N = F
crctcsh.s φ S 0 ..^ N
crctcsh.h H = F cyclShift S
crctcsh.q Q = x 0 N if x N S P x + S P x + S - N
Assertion crctcshwlkn0 φ S 0 H Walks G Q

Proof

Step Hyp Ref Expression
1 crctcsh.v V = Vtx G
2 crctcsh.i I = iEdg G
3 crctcsh.d φ F Circuits G P
4 crctcsh.n N = F
5 crctcsh.s φ S 0 ..^ N
6 crctcsh.h H = F cyclShift S
7 crctcsh.q Q = x 0 N if x N S P x + S P x + S - N
8 crctiswlk F Circuits G P F Walks G P
9 2 wlkf F Walks G P F Word dom I
10 3 8 9 3syl φ F Word dom I
11 cshwcl F Word dom I F cyclShift S Word dom I
12 10 11 syl φ F cyclShift S Word dom I
13 6 12 eqeltrid φ H Word dom I
14 13 adantr φ S 0 H Word dom I
15 3 8 syl φ F Walks G P
16 1 wlkp F Walks G P P : 0 F V
17 simpll P : 0 F V φ x 0 N x N S P : 0 F V
18 elfznn0 x 0 N x 0
19 18 adantl S 0 ..^ N x 0 N x 0
20 elfzonn0 S 0 ..^ N S 0
21 20 adantr S 0 ..^ N x 0 N S 0
22 19 21 nn0addcld S 0 ..^ N x 0 N x + S 0
23 22 adantr S 0 ..^ N x 0 N x N S x + S 0
24 elfz3nn0 x 0 N N 0
25 4 24 eqeltrrid x 0 N F 0
26 25 ad2antlr S 0 ..^ N x 0 N x N S F 0
27 elfzelz x 0 N x
28 27 zred x 0 N x
29 28 adantl S 0 ..^ N x 0 N x
30 elfzoelz S 0 ..^ N S
31 30 zred S 0 ..^ N S
32 31 adantr S 0 ..^ N x 0 N S
33 elfzel2 x 0 N N
34 33 zred x 0 N N
35 34 adantl S 0 ..^ N x 0 N N
36 leaddsub x S N x + S N x N S
37 29 32 35 36 syl3anc S 0 ..^ N x 0 N x + S N x N S
38 37 biimpar S 0 ..^ N x 0 N x N S x + S N
39 38 4 breqtrdi S 0 ..^ N x 0 N x N S x + S F
40 23 26 39 3jca S 0 ..^ N x 0 N x N S x + S 0 F 0 x + S F
41 5 40 sylanl1 φ x 0 N x N S x + S 0 F 0 x + S F
42 elfz2nn0 x + S 0 F x + S 0 F 0 x + S F
43 41 42 sylibr φ x 0 N x N S x + S 0 F
44 43 adantll P : 0 F V φ x 0 N x N S x + S 0 F
45 17 44 ffvelrnd P : 0 F V φ x 0 N x N S P x + S V
46 simpll P : 0 F V φ x 0 N ¬ x N S P : 0 F V
47 elfzoel2 S 0 ..^ N N
48 zaddcl x S x + S
49 48 adantrr x S N x + S
50 simprr x S N N
51 49 50 zsubcld x S N x + S - N
52 51 adantr x S N ¬ x N S x + S - N
53 zsubcl N S N S
54 53 ancoms S N N S
55 54 zred S N N S
56 zre x x
57 ltnle N S x N S < x ¬ x N S
58 55 56 57 syl2anr x S N N S < x ¬ x N S
59 zre N N
60 59 adantl S N N
61 zre S S
62 61 adantr S N S
63 56 adantr x S N x
64 ltsubadd N S x N S < x N < x + S
65 60 62 63 64 syl2an23an x S N N S < x N < x + S
66 60 adantl x S N N
67 49 zred x S N x + S
68 66 67 posdifd x S N N < x + S 0 < x + S - N
69 0red x S N 0
70 51 zred x S N x + S - N
71 ltle 0 x + S - N 0 < x + S - N 0 x + S - N
72 69 70 71 syl2anc x S N 0 < x + S - N 0 x + S - N
73 68 72 sylbid x S N N < x + S 0 x + S - N
74 65 73 sylbid x S N N S < x 0 x + S - N
75 58 74 sylbird x S N ¬ x N S 0 x + S - N
76 75 imp x S N ¬ x N S 0 x + S - N
77 52 76 jca x S N ¬ x N S x + S - N 0 x + S - N
78 77 exp31 x S N ¬ x N S x + S - N 0 x + S - N
79 78 27 syl11 S N x 0 N ¬ x N S x + S - N 0 x + S - N
80 30 47 79 syl2anc S 0 ..^ N x 0 N ¬ x N S x + S - N 0 x + S - N
81 80 imp31 S 0 ..^ N x 0 N ¬ x N S x + S - N 0 x + S - N
82 elnn0z x + S - N 0 x + S - N 0 x + S - N
83 81 82 sylibr S 0 ..^ N x 0 N ¬ x N S x + S - N 0
84 25 ad2antlr S 0 ..^ N x 0 N ¬ x N S F 0
85 elfzo0 S 0 ..^ N S 0 N S < N
86 elfz2nn0 x 0 N x 0 N 0 x N
87 nn0re S 0 S
88 87 3ad2ant1 S 0 N S < N S
89 nn0re x 0 x
90 89 3ad2ant1 x 0 N 0 x N x
91 88 90 anim12ci S 0 N S < N x 0 N 0 x N x S
92 nnre N N
93 92 92 jca N N N
94 93 3ad2ant2 S 0 N S < N N N
95 94 adantr S 0 N S < N x 0 N 0 x N N N
96 91 95 jca S 0 N S < N x 0 N 0 x N x S N N
97 simpr3 S 0 N S < N x 0 N 0 x N x N
98 ltle S N S < N S N
99 87 92 98 syl2an S 0 N S < N S N
100 99 3impia S 0 N S < N S N
101 100 adantr S 0 N S < N x 0 N 0 x N S N
102 96 97 101 jca32 S 0 N S < N x 0 N 0 x N x S N N x N S N
103 85 86 102 syl2anb S 0 ..^ N x 0 N x S N N x N S N
104 le2add x S N N x N S N x + S N + N
105 104 imp x S N N x N S N x + S N + N
106 103 105 syl S 0 ..^ N x 0 N x + S N + N
107 67 66 66 3jca x S N x + S N N
108 107 ex x S N x + S N N
109 108 27 syl11 S N x 0 N x + S N N
110 30 47 109 syl2anc S 0 ..^ N x 0 N x + S N N
111 110 imp S 0 ..^ N x 0 N x + S N N
112 lesubadd x + S N N x + S - N N x + S N + N
113 111 112 syl S 0 ..^ N x 0 N x + S - N N x + S N + N
114 106 113 mpbird S 0 ..^ N x 0 N x + S - N N
115 114 adantr S 0 ..^ N x 0 N ¬ x N S x + S - N N
116 115 4 breqtrdi S 0 ..^ N x 0 N ¬ x N S x + S - N F
117 83 84 116 3jca S 0 ..^ N x 0 N ¬ x N S x + S - N 0 F 0 x + S - N F
118 5 117 sylanl1 φ x 0 N ¬ x N S x + S - N 0 F 0 x + S - N F
119 elfz2nn0 x + S - N 0 F x + S - N 0 F 0 x + S - N F
120 118 119 sylibr φ x 0 N ¬ x N S x + S - N 0 F
121 120 adantll P : 0 F V φ x 0 N ¬ x N S x + S - N 0 F
122 46 121 ffvelrnd P : 0 F V φ x 0 N ¬ x N S P x + S - N V
123 45 122 ifclda P : 0 F V φ x 0 N if x N S P x + S P x + S - N V
124 123 exp32 P : 0 F V φ x 0 N if x N S P x + S P x + S - N V
125 16 124 syl F Walks G P φ x 0 N if x N S P x + S P x + S - N V
126 15 125 mpcom φ x 0 N if x N S P x + S P x + S - N V
127 126 imp φ x 0 N if x N S P x + S P x + S - N V
128 127 7 fmptd φ Q : 0 N V
129 1 2 3 4 5 6 crctcshlem2 φ H = N
130 129 oveq2d φ 0 H = 0 N
131 130 feq2d φ Q : 0 H V Q : 0 N V
132 128 131 mpbird φ Q : 0 H V
133 132 adantr φ S 0 Q : 0 H V
134 1 2 wlkprop F Walks G P F Word dom I P : 0 F V i 0 ..^ F if- P i = P i + 1 I F i = P i P i P i + 1 I F i
135 3 8 134 3syl φ F Word dom I P : 0 F V i 0 ..^ F if- P i = P i + 1 I F i = P i P i P i + 1 I F i
136 135 adantr φ S 0 F Word dom I P : 0 F V i 0 ..^ F if- P i = P i + 1 I F i = P i P i P i + 1 I F i
137 4 eqcomi F = N
138 137 oveq2i 0 ..^ F = 0 ..^ N
139 138 raleqi i 0 ..^ F if- P i = P i + 1 I F i = P i P i P i + 1 I F i i 0 ..^ N if- P i = P i + 1 I F i = P i P i P i + 1 I F i
140 fzo1fzo0n0 S 1 ..^ N S 0 ..^ N S 0
141 140 simplbi2 S 0 ..^ N S 0 S 1 ..^ N
142 5 141 syl φ S 0 S 1 ..^ N
143 142 imp φ S 0 S 1 ..^ N
144 143 ad2antlr F Word dom I P : 0 F V φ S 0 i 0 ..^ N if- P i = P i + 1 I F i = P i P i P i + 1 I F i S 1 ..^ N
145 simplll F Word dom I P : 0 F V φ S 0 i 0 ..^ N if- P i = P i + 1 I F i = P i P i P i + 1 I F i F Word dom I
146 wkslem1 i = k if- P i = P i + 1 I F i = P i P i P i + 1 I F i if- P k = P k + 1 I F k = P k P k P k + 1 I F k
147 146 cbvralvw i 0 ..^ N if- P i = P i + 1 I F i = P i P i P i + 1 I F i k 0 ..^ N if- P k = P k + 1 I F k = P k P k P k + 1 I F k
148 147 biimpi i 0 ..^ N if- P i = P i + 1 I F i = P i P i P i + 1 I F i k 0 ..^ N if- P k = P k + 1 I F k = P k P k P k + 1 I F k
149 148 adantl F Word dom I P : 0 F V φ S 0 i 0 ..^ N if- P i = P i + 1 I F i = P i P i P i + 1 I F i k 0 ..^ N if- P k = P k + 1 I F k = P k P k P k + 1 I F k
150 crctprop F Circuits G P F Trails G P P 0 = P F
151 137 fveq2i P F = P N
152 151 eqeq2i P 0 = P F P 0 = P N
153 152 biimpi P 0 = P F P 0 = P N
154 153 eqcomd P 0 = P F P N = P 0
155 154 adantl F Trails G P P 0 = P F P N = P 0
156 3 150 155 3syl φ P N = P 0
157 156 ad2antrl F Word dom I P : 0 F V φ S 0 P N = P 0
158 157 adantr F Word dom I P : 0 F V φ S 0 i 0 ..^ N if- P i = P i + 1 I F i = P i P i P i + 1 I F i P N = P 0
159 144 7 6 4 145 149 158 crctcshwlkn0lem7 F Word dom I P : 0 F V φ S 0 i 0 ..^ N if- P i = P i + 1 I F i = P i P i P i + 1 I F i j 0 ..^ N if- Q j = Q j + 1 I H j = Q j Q j Q j + 1 I H j
160 129 oveq2d φ 0 ..^ H = 0 ..^ N
161 160 raleqdv φ j 0 ..^ H if- Q j = Q j + 1 I H j = Q j Q j Q j + 1 I H j j 0 ..^ N if- Q j = Q j + 1 I H j = Q j Q j Q j + 1 I H j
162 161 ad2antrl F Word dom I P : 0 F V φ S 0 j 0 ..^ H if- Q j = Q j + 1 I H j = Q j Q j Q j + 1 I H j j 0 ..^ N if- Q j = Q j + 1 I H j = Q j Q j Q j + 1 I H j
163 162 adantr F Word dom I P : 0 F V φ S 0 i 0 ..^ N if- P i = P i + 1 I F i = P i P i P i + 1 I F i j 0 ..^ H if- Q j = Q j + 1 I H j = Q j Q j Q j + 1 I H j j 0 ..^ N if- Q j = Q j + 1 I H j = Q j Q j Q j + 1 I H j
164 159 163 mpbird F Word dom I P : 0 F V φ S 0 i 0 ..^ N if- P i = P i + 1 I F i = P i P i P i + 1 I F i j 0 ..^ H if- Q j = Q j + 1 I H j = Q j Q j Q j + 1 I H j
165 164 ex F Word dom I P : 0 F V φ S 0 i 0 ..^ N if- P i = P i + 1 I F i = P i P i P i + 1 I F i j 0 ..^ H if- Q j = Q j + 1 I H j = Q j Q j Q j + 1 I H j
166 139 165 syl5bi F Word dom I P : 0 F V φ S 0 i 0 ..^ F if- P i = P i + 1 I F i = P i P i P i + 1 I F i j 0 ..^ H if- Q j = Q j + 1 I H j = Q j Q j Q j + 1 I H j
167 166 ex F Word dom I P : 0 F V φ S 0 i 0 ..^ F if- P i = P i + 1 I F i = P i P i P i + 1 I F i j 0 ..^ H if- Q j = Q j + 1 I H j = Q j Q j Q j + 1 I H j
168 167 com23 F Word dom I P : 0 F V i 0 ..^ F if- P i = P i + 1 I F i = P i P i P i + 1 I F i φ S 0 j 0 ..^ H if- Q j = Q j + 1 I H j = Q j Q j Q j + 1 I H j
169 168 3impia F Word dom I P : 0 F V i 0 ..^ F if- P i = P i + 1 I F i = P i P i P i + 1 I F i φ S 0 j 0 ..^ H if- Q j = Q j + 1 I H j = Q j Q j Q j + 1 I H j
170 136 169 mpcom φ S 0 j 0 ..^ H if- Q j = Q j + 1 I H j = Q j Q j Q j + 1 I H j
171 14 133 170 3jca φ S 0 H Word dom I Q : 0 H V j 0 ..^ H if- Q j = Q j + 1 I H j = Q j Q j Q j + 1 I H j
172 1 2 3 4 5 6 7 crctcshlem3 φ G V H V Q V
173 172 adantr φ S 0 G V H V Q V
174 1 2 iswlk G V H V Q V H Walks G Q H Word dom I Q : 0 H V j 0 ..^ H if- Q j = Q j + 1 I H j = Q j Q j Q j + 1 I H j
175 173 174 syl φ S 0 H Walks G Q H Word dom I Q : 0 H V j 0 ..^ H if- Q j = Q j + 1 I H j = Q j Q j Q j + 1 I H j
176 171 175 mpbird φ S 0 H Walks G Q