Proof of Theorem swrdwlk
Step | Hyp | Ref
| Expression |
1 | | pfxwlk 33085 |
. . . . . . 7
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐹 prefix 𝐿)(Walks‘𝐺)(𝑃 prefix (𝐿 + 1))) |
2 | 1 | 3adant2 1130 |
. . . . . 6
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐹 prefix 𝐿)(Walks‘𝐺)(𝑃 prefix (𝐿 + 1))) |
3 | | revwlk 33086 |
. . . . . 6
⊢ ((𝐹 prefix 𝐿)(Walks‘𝐺)(𝑃 prefix (𝐿 + 1)) → (reverse‘(𝐹 prefix 𝐿))(Walks‘𝐺)(reverse‘(𝑃 prefix (𝐿 + 1)))) |
4 | 2, 3 | syl 17 |
. . . . 5
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (reverse‘(𝐹 prefix 𝐿))(Walks‘𝐺)(reverse‘(𝑃 prefix (𝐿 + 1)))) |
5 | | fznn0sub2 13363 |
. . . . . . 7
⊢ (𝐵 ∈ (0...𝐿) → (𝐿 − 𝐵) ∈ (0...𝐿)) |
6 | 5 | 3ad2ant2 1133 |
. . . . . 6
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐿 − 𝐵) ∈ (0...𝐿)) |
7 | | eqid 2738 |
. . . . . . . . . . 11
⊢
(iEdg‘𝐺) =
(iEdg‘𝐺) |
8 | 7 | wlkf 27981 |
. . . . . . . . . 10
⊢ (𝐹(Walks‘𝐺)𝑃 → 𝐹 ∈ Word dom (iEdg‘𝐺)) |
9 | 8 | 3ad2ant1 1132 |
. . . . . . . . 9
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → 𝐹 ∈ Word dom (iEdg‘𝐺)) |
10 | | pfxcl 14390 |
. . . . . . . . 9
⊢ (𝐹 ∈ Word dom
(iEdg‘𝐺) →
(𝐹 prefix 𝐿) ∈ Word dom (iEdg‘𝐺)) |
11 | | revlen 14475 |
. . . . . . . . 9
⊢ ((𝐹 prefix 𝐿) ∈ Word dom (iEdg‘𝐺) →
(♯‘(reverse‘(𝐹 prefix 𝐿))) = (♯‘(𝐹 prefix 𝐿))) |
12 | 9, 10, 11 | 3syl 18 |
. . . . . . . 8
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) →
(♯‘(reverse‘(𝐹 prefix 𝐿))) = (♯‘(𝐹 prefix 𝐿))) |
13 | | pfxlen 14396 |
. . . . . . . . . 10
⊢ ((𝐹 ∈ Word dom
(iEdg‘𝐺) ∧ 𝐿 ∈
(0...(♯‘𝐹)))
→ (♯‘(𝐹
prefix 𝐿)) = 𝐿) |
14 | 8, 13 | sylan 580 |
. . . . . . . . 9
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (♯‘(𝐹 prefix 𝐿)) = 𝐿) |
15 | 14 | 3adant2 1130 |
. . . . . . . 8
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (♯‘(𝐹 prefix 𝐿)) = 𝐿) |
16 | 12, 15 | eqtrd 2778 |
. . . . . . 7
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) →
(♯‘(reverse‘(𝐹 prefix 𝐿))) = 𝐿) |
17 | 16 | oveq2d 7291 |
. . . . . 6
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) →
(0...(♯‘(reverse‘(𝐹 prefix 𝐿)))) = (0...𝐿)) |
18 | 6, 17 | eleqtrrd 2842 |
. . . . 5
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐿 − 𝐵) ∈
(0...(♯‘(reverse‘(𝐹 prefix 𝐿))))) |
19 | | pfxwlk 33085 |
. . . . 5
⊢
(((reverse‘(𝐹
prefix 𝐿))(Walks‘𝐺)(reverse‘(𝑃 prefix (𝐿 + 1))) ∧ (𝐿 − 𝐵) ∈
(0...(♯‘(reverse‘(𝐹 prefix 𝐿))))) → ((reverse‘(𝐹 prefix 𝐿)) prefix (𝐿 − 𝐵))(Walks‘𝐺)((reverse‘(𝑃 prefix (𝐿 + 1))) prefix ((𝐿 − 𝐵) + 1))) |
20 | 4, 18, 19 | syl2anc 584 |
. . . 4
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) →
((reverse‘(𝐹 prefix
𝐿)) prefix (𝐿 − 𝐵))(Walks‘𝐺)((reverse‘(𝑃 prefix (𝐿 + 1))) prefix ((𝐿 − 𝐵) + 1))) |
21 | | elfzel2 13254 |
. . . . . . . 8
⊢ (𝐵 ∈ (0...𝐿) → 𝐿 ∈ ℤ) |
22 | 21 | 3ad2ant2 1133 |
. . . . . . 7
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → 𝐿 ∈ ℤ) |
23 | 22 | zcnd 12427 |
. . . . . 6
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → 𝐿 ∈ ℂ) |
24 | | 1cnd 10970 |
. . . . . 6
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → 1 ∈
ℂ) |
25 | | elfzelz 13256 |
. . . . . . . 8
⊢ (𝐵 ∈ (0...𝐿) → 𝐵 ∈ ℤ) |
26 | 25 | 3ad2ant2 1133 |
. . . . . . 7
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → 𝐵 ∈ ℤ) |
27 | 26 | zcnd 12427 |
. . . . . 6
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → 𝐵 ∈ ℂ) |
28 | 23, 24, 27 | addsubd 11353 |
. . . . 5
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → ((𝐿 + 1) − 𝐵) = ((𝐿 − 𝐵) + 1)) |
29 | 28 | oveq2d 7291 |
. . . 4
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) →
((reverse‘(𝑃 prefix
(𝐿 + 1))) prefix ((𝐿 + 1) − 𝐵)) = ((reverse‘(𝑃 prefix (𝐿 + 1))) prefix ((𝐿 − 𝐵) + 1))) |
30 | 20, 29 | breqtrrd 5102 |
. . 3
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) →
((reverse‘(𝐹 prefix
𝐿)) prefix (𝐿 − 𝐵))(Walks‘𝐺)((reverse‘(𝑃 prefix (𝐿 + 1))) prefix ((𝐿 + 1) − 𝐵))) |
31 | | revwlk 33086 |
. . 3
⊢
(((reverse‘(𝐹
prefix 𝐿)) prefix (𝐿 − 𝐵))(Walks‘𝐺)((reverse‘(𝑃 prefix (𝐿 + 1))) prefix ((𝐿 + 1) − 𝐵)) →
(reverse‘((reverse‘(𝐹 prefix 𝐿)) prefix (𝐿 − 𝐵)))(Walks‘𝐺)(reverse‘((reverse‘(𝑃 prefix (𝐿 + 1))) prefix ((𝐿 + 1) − 𝐵)))) |
32 | 30, 31 | syl 17 |
. 2
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) →
(reverse‘((reverse‘(𝐹 prefix 𝐿)) prefix (𝐿 − 𝐵)))(Walks‘𝐺)(reverse‘((reverse‘(𝑃 prefix (𝐿 + 1))) prefix ((𝐿 + 1) − 𝐵)))) |
33 | | swrdrevpfx 33078 |
. . 3
⊢ ((𝐹 ∈ Word dom
(iEdg‘𝐺) ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐹 substr 〈𝐵, 𝐿〉) =
(reverse‘((reverse‘(𝐹 prefix 𝐿)) prefix (𝐿 − 𝐵)))) |
34 | 8, 33 | syl3an1 1162 |
. 2
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐹 substr 〈𝐵, 𝐿〉) =
(reverse‘((reverse‘(𝐹 prefix 𝐿)) prefix (𝐿 − 𝐵)))) |
35 | | eqid 2738 |
. . . . 5
⊢
(Vtx‘𝐺) =
(Vtx‘𝐺) |
36 | 35 | wlkpwrd 27984 |
. . . 4
⊢ (𝐹(Walks‘𝐺)𝑃 → 𝑃 ∈ Word (Vtx‘𝐺)) |
37 | 36 | 3ad2ant1 1132 |
. . 3
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → 𝑃 ∈ Word (Vtx‘𝐺)) |
38 | | fzelp1 13308 |
. . . 4
⊢ (𝐵 ∈ (0...𝐿) → 𝐵 ∈ (0...(𝐿 + 1))) |
39 | 38 | 3ad2ant2 1133 |
. . 3
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → 𝐵 ∈ (0...(𝐿 + 1))) |
40 | | fzp1elp1 13309 |
. . . . 5
⊢ (𝐿 ∈
(0...(♯‘𝐹))
→ (𝐿 + 1) ∈
(0...((♯‘𝐹) +
1))) |
41 | 40 | 3ad2ant3 1134 |
. . . 4
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐿 + 1) ∈ (0...((♯‘𝐹) + 1))) |
42 | | wlklenvp1 27985 |
. . . . . 6
⊢ (𝐹(Walks‘𝐺)𝑃 → (♯‘𝑃) = ((♯‘𝐹) + 1)) |
43 | 42 | 3ad2ant1 1132 |
. . . . 5
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (♯‘𝑃) = ((♯‘𝐹) + 1)) |
44 | 43 | oveq2d 7291 |
. . . 4
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) →
(0...(♯‘𝑃)) =
(0...((♯‘𝐹) +
1))) |
45 | 41, 44 | eleqtrrd 2842 |
. . 3
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐿 + 1) ∈ (0...(♯‘𝑃))) |
46 | | swrdrevpfx 33078 |
. . 3
⊢ ((𝑃 ∈ Word (Vtx‘𝐺) ∧ 𝐵 ∈ (0...(𝐿 + 1)) ∧ (𝐿 + 1) ∈ (0...(♯‘𝑃))) → (𝑃 substr 〈𝐵, (𝐿 + 1)〉) =
(reverse‘((reverse‘(𝑃 prefix (𝐿 + 1))) prefix ((𝐿 + 1) − 𝐵)))) |
47 | 37, 39, 45, 46 | syl3anc 1370 |
. 2
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝑃 substr 〈𝐵, (𝐿 + 1)〉) =
(reverse‘((reverse‘(𝑃 prefix (𝐿 + 1))) prefix ((𝐿 + 1) − 𝐵)))) |
48 | 32, 34, 47 | 3brtr4d 5106 |
1
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐹 substr 〈𝐵, 𝐿〉)(Walks‘𝐺)(𝑃 substr 〈𝐵, (𝐿 + 1)〉)) |