Metamath Proof Explorer


Theorem crctcsh

Description: Cyclically shifting the indices of a circuit <. F , P >. results in a circuit <. H , Q >. . (Contributed by AV, 10-Mar-2021) (Proof shortened by AV, 31-Oct-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 crctcsh φ H Circuits 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 1 2 3 4 5 6 7 crctcshlem4 φ S = 0 H = F Q = P
9 breq12 H = F Q = P H Circuits G Q F Circuits G P
10 3 9 syl5ibrcom φ H = F Q = P H Circuits G Q
11 10 adantr φ S = 0 H = F Q = P H Circuits G Q
12 8 11 mpd φ S = 0 H Circuits G Q
13 1 2 3 4 5 6 7 crctcshtrl φ H Trails G Q
14 13 adantr φ S 0 H Trails G Q
15 breq1 x = 0 x N S 0 N S
16 oveq1 x = 0 x + S = 0 + S
17 16 fveq2d x = 0 P x + S = P 0 + S
18 16 fvoveq1d x = 0 P x + S - N = P 0 + S - N
19 15 17 18 ifbieq12d x = 0 if x N S P x + S P x + S - N = if 0 N S P 0 + S P 0 + S - N
20 elfzo0le S 0 ..^ N S N
21 5 20 syl φ S N
22 1 2 3 4 crctcshlem1 φ N 0
23 22 nn0red φ N
24 elfzoelz S 0 ..^ N S
25 5 24 syl φ S
26 25 zred φ S
27 23 26 subge0d φ 0 N S S N
28 21 27 mpbird φ 0 N S
29 28 adantr φ S 0 0 N S
30 29 iftrued φ S 0 if 0 N S P 0 + S P 0 + S - N = P 0 + S
31 19 30 sylan9eqr φ S 0 x = 0 if x N S P x + S P x + S - N = P 0 + S
32 3 adantr φ S 0 F Circuits G P
33 1 2 32 4 crctcshlem1 φ S 0 N 0
34 0elfz N 0 0 0 N
35 33 34 syl φ S 0 0 0 N
36 fvexd φ S 0 P 0 + S V
37 7 31 35 36 fvmptd2 φ S 0 Q 0 = P 0 + S
38 breq1 x = H x N S H N S
39 oveq1 x = H x + S = H + S
40 39 fveq2d x = H P x + S = P H + S
41 39 fvoveq1d x = H P x + S - N = P H + S - N
42 38 40 41 ifbieq12d x = H if x N S P x + S P x + S - N = if H N S P H + S P H + S - N
43 elfzoel2 S 0 ..^ N N
44 elfzonn0 S 0 ..^ N S 0
45 simpr N S 0 S 0
46 45 anim1i N S 0 S 0 S 0 S 0
47 elnnne0 S S 0 S 0
48 46 47 sylibr N S 0 S 0 S
49 48 nngt0d N S 0 S 0 0 < S
50 zre N N
51 nn0re S 0 S
52 50 51 anim12ci N S 0 S N
53 52 adantr N S 0 S 0 S N
54 ltsubpos S N 0 < S N S < N
55 54 bicomd S N N S < N 0 < S
56 53 55 syl N S 0 S 0 N S < N 0 < S
57 49 56 mpbird N S 0 S 0 N S < N
58 57 ex N S 0 S 0 N S < N
59 43 44 58 syl2anc S 0 ..^ N S 0 N S < N
60 5 59 syl φ S 0 N S < N
61 60 imp φ S 0 N S < N
62 5 adantr φ S 0 S 0 ..^ N
63 1 2 32 4 62 6 crctcshlem2 φ S 0 H = N
64 63 breq1d φ S 0 H N S N N S
65 64 notbid φ S 0 ¬ H N S ¬ N N S
66 23 26 resubcld φ N S
67 66 23 jca φ N S N
68 67 adantr φ S 0 N S N
69 ltnle N S N N S < N ¬ N N S
70 68 69 syl φ S 0 N S < N ¬ N N S
71 65 70 bitr4d φ S 0 ¬ H N S N S < N
72 61 71 mpbird φ S 0 ¬ H N S
73 72 iffalsed φ S 0 if H N S P H + S P H + S - N = P H + S - N
74 42 73 sylan9eqr φ S 0 x = H if x N S P x + S P x + S - N = P H + S - N
75 1 2 3 4 5 6 crctcshlem2 φ H = N
76 75 22 eqeltrd φ H 0
77 76 nn0cnd φ H
78 25 zcnd φ S
79 22 nn0cnd φ N
80 77 78 79 addsubd φ H + S - N = H - N + S
81 75 oveq1d φ H N = N N
82 79 subidd φ N N = 0
83 81 82 eqtrd φ H N = 0
84 83 oveq1d φ H - N + S = 0 + S
85 80 84 eqtrd φ H + S - N = 0 + S
86 85 fveq2d φ P H + S - N = P 0 + S
87 86 adantr φ S 0 P H + S - N = P 0 + S
88 87 adantr φ S 0 x = H P H + S - N = P 0 + S
89 74 88 eqtrd φ S 0 x = H if x N S P x + S P x + S - N = P 0 + S
90 75 adantr φ S 0 H = N
91 nn0fz0 N 0 N 0 N
92 22 91 sylib φ N 0 N
93 92 adantr φ S 0 N 0 N
94 90 93 eqeltrd φ S 0 H 0 N
95 7 89 94 36 fvmptd2 φ S 0 Q H = P 0 + S
96 37 95 eqtr4d φ S 0 Q 0 = Q H
97 iscrct H Circuits G Q H Trails G Q Q 0 = Q H
98 14 96 97 sylanbrc φ S 0 H Circuits G Q
99 12 98 pm2.61dane φ H Circuits G Q