Proof of Theorem swrdwlk
Step | Hyp | Ref
| Expression |
1 | | pfxwlk 32985 |
. . . . . . 7
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐹 prefix 𝐿)(Walks‘𝐺)(𝑃 prefix (𝐿 + 1))) |
2 | 1 | 3adant2 1129 |
. . . . . 6
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐹 prefix 𝐿)(Walks‘𝐺)(𝑃 prefix (𝐿 + 1))) |
3 | | revwlk 32986 |
. . . . . 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 13292 |
. . . . . . 7
⊢ (𝐵 ∈ (0...𝐿) → (𝐿 − 𝐵) ∈ (0...𝐿)) |
6 | 5 | 3ad2ant2 1132 |
. . . . . 6
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐿 − 𝐵) ∈ (0...𝐿)) |
7 | | eqid 2738 |
. . . . . . . . . . 11
⊢
(iEdg‘𝐺) =
(iEdg‘𝐺) |
8 | 7 | wlkf 27884 |
. . . . . . . . . 10
⊢ (𝐹(Walks‘𝐺)𝑃 → 𝐹 ∈ Word dom (iEdg‘𝐺)) |
9 | 8 | 3ad2ant1 1131 |
. . . . . . . . 9
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → 𝐹 ∈ Word dom (iEdg‘𝐺)) |
10 | | pfxcl 14318 |
. . . . . . . . 9
⊢ (𝐹 ∈ Word dom
(iEdg‘𝐺) →
(𝐹 prefix 𝐿) ∈ Word dom (iEdg‘𝐺)) |
11 | | revlen 14403 |
. . . . . . . . 9
⊢ ((𝐹 prefix 𝐿) ∈ Word dom (iEdg‘𝐺) →
(♯‘(reverse‘(𝐹 prefix 𝐿))) = (♯‘(𝐹 prefix 𝐿))) |
12 | 9, 10, 11 | 3syl 18 |
. . . . . . . 8
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) →
(♯‘(reverse‘(𝐹 prefix 𝐿))) = (♯‘(𝐹 prefix 𝐿))) |
13 | | pfxlen 14324 |
. . . . . . . . . 10
⊢ ((𝐹 ∈ Word dom
(iEdg‘𝐺) ∧ 𝐿 ∈
(0...(♯‘𝐹)))
→ (♯‘(𝐹
prefix 𝐿)) = 𝐿) |
14 | 8, 13 | sylan 579 |
. . . . . . . . 9
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (♯‘(𝐹 prefix 𝐿)) = 𝐿) |
15 | 14 | 3adant2 1129 |
. . . . . . . 8
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (♯‘(𝐹 prefix 𝐿)) = 𝐿) |
16 | 12, 15 | eqtrd 2778 |
. . . . . . 7
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) →
(♯‘(reverse‘(𝐹 prefix 𝐿))) = 𝐿) |
17 | 16 | oveq2d 7271 |
. . . . . 6
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) →
(0...(♯‘(reverse‘(𝐹 prefix 𝐿)))) = (0...𝐿)) |
18 | 6, 17 | eleqtrrd 2842 |
. . . . 5
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐿 − 𝐵) ∈
(0...(♯‘(reverse‘(𝐹 prefix 𝐿))))) |
19 | | pfxwlk 32985 |
. . . . 5
⊢
(((reverse‘(𝐹
prefix 𝐿))(Walks‘𝐺)(reverse‘(𝑃 prefix (𝐿 + 1))) ∧ (𝐿 − 𝐵) ∈
(0...(♯‘(reverse‘(𝐹 prefix 𝐿))))) → ((reverse‘(𝐹 prefix 𝐿)) prefix (𝐿 − 𝐵))(Walks‘𝐺)((reverse‘(𝑃 prefix (𝐿 + 1))) prefix ((𝐿 − 𝐵) + 1))) |
20 | 4, 18, 19 | syl2anc 583 |
. . . 4
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) →
((reverse‘(𝐹 prefix
𝐿)) prefix (𝐿 − 𝐵))(Walks‘𝐺)((reverse‘(𝑃 prefix (𝐿 + 1))) prefix ((𝐿 − 𝐵) + 1))) |
21 | | elfzel2 13183 |
. . . . . . . 8
⊢ (𝐵 ∈ (0...𝐿) → 𝐿 ∈ ℤ) |
22 | 21 | 3ad2ant2 1132 |
. . . . . . 7
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → 𝐿 ∈ ℤ) |
23 | 22 | zcnd 12356 |
. . . . . 6
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → 𝐿 ∈ ℂ) |
24 | | 1cnd 10901 |
. . . . . 6
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → 1 ∈
ℂ) |
25 | | elfzelz 13185 |
. . . . . . . 8
⊢ (𝐵 ∈ (0...𝐿) → 𝐵 ∈ ℤ) |
26 | 25 | 3ad2ant2 1132 |
. . . . . . 7
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → 𝐵 ∈ ℤ) |
27 | 26 | zcnd 12356 |
. . . . . 6
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → 𝐵 ∈ ℂ) |
28 | 23, 24, 27 | addsubd 11283 |
. . . . 5
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → ((𝐿 + 1) − 𝐵) = ((𝐿 − 𝐵) + 1)) |
29 | 28 | oveq2d 7271 |
. . . 4
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) →
((reverse‘(𝑃 prefix
(𝐿 + 1))) prefix ((𝐿 + 1) − 𝐵)) = ((reverse‘(𝑃 prefix (𝐿 + 1))) prefix ((𝐿 − 𝐵) + 1))) |
30 | 20, 29 | breqtrrd 5098 |
. . 3
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) →
((reverse‘(𝐹 prefix
𝐿)) prefix (𝐿 − 𝐵))(Walks‘𝐺)((reverse‘(𝑃 prefix (𝐿 + 1))) prefix ((𝐿 + 1) − 𝐵))) |
31 | | revwlk 32986 |
. . 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 32978 |
. . 3
⊢ ((𝐹 ∈ Word dom
(iEdg‘𝐺) ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐹 substr 〈𝐵, 𝐿〉) =
(reverse‘((reverse‘(𝐹 prefix 𝐿)) prefix (𝐿 − 𝐵)))) |
34 | 8, 33 | syl3an1 1161 |
. 2
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐹 substr 〈𝐵, 𝐿〉) =
(reverse‘((reverse‘(𝐹 prefix 𝐿)) prefix (𝐿 − 𝐵)))) |
35 | | eqid 2738 |
. . . . 5
⊢
(Vtx‘𝐺) =
(Vtx‘𝐺) |
36 | 35 | wlkpwrd 27887 |
. . . 4
⊢ (𝐹(Walks‘𝐺)𝑃 → 𝑃 ∈ Word (Vtx‘𝐺)) |
37 | 36 | 3ad2ant1 1131 |
. . 3
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → 𝑃 ∈ Word (Vtx‘𝐺)) |
38 | | fzelp1 13237 |
. . . 4
⊢ (𝐵 ∈ (0...𝐿) → 𝐵 ∈ (0...(𝐿 + 1))) |
39 | 38 | 3ad2ant2 1132 |
. . 3
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → 𝐵 ∈ (0...(𝐿 + 1))) |
40 | | fzp1elp1 13238 |
. . . . 5
⊢ (𝐿 ∈
(0...(♯‘𝐹))
→ (𝐿 + 1) ∈
(0...((♯‘𝐹) +
1))) |
41 | 40 | 3ad2ant3 1133 |
. . . 4
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐿 + 1) ∈ (0...((♯‘𝐹) + 1))) |
42 | | wlklenvp1 27888 |
. . . . . 6
⊢ (𝐹(Walks‘𝐺)𝑃 → (♯‘𝑃) = ((♯‘𝐹) + 1)) |
43 | 42 | 3ad2ant1 1131 |
. . . . 5
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (♯‘𝑃) = ((♯‘𝐹) + 1)) |
44 | 43 | oveq2d 7271 |
. . . 4
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) →
(0...(♯‘𝑃)) =
(0...((♯‘𝐹) +
1))) |
45 | 41, 44 | eleqtrrd 2842 |
. . 3
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐿 + 1) ∈ (0...(♯‘𝑃))) |
46 | | swrdrevpfx 32978 |
. . 3
⊢ ((𝑃 ∈ Word (Vtx‘𝐺) ∧ 𝐵 ∈ (0...(𝐿 + 1)) ∧ (𝐿 + 1) ∈ (0...(♯‘𝑃))) → (𝑃 substr 〈𝐵, (𝐿 + 1)〉) =
(reverse‘((reverse‘(𝑃 prefix (𝐿 + 1))) prefix ((𝐿 + 1) − 𝐵)))) |
47 | 37, 39, 45, 46 | syl3anc 1369 |
. 2
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝑃 substr 〈𝐵, (𝐿 + 1)〉) =
(reverse‘((reverse‘(𝑃 prefix (𝐿 + 1))) prefix ((𝐿 + 1) − 𝐵)))) |
48 | 32, 34, 47 | 3brtr4d 5102 |
1
⊢ ((𝐹(Walks‘𝐺)𝑃 ∧ 𝐵 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝐹))) → (𝐹 substr 〈𝐵, 𝐿〉)(Walks‘𝐺)(𝑃 substr 〈𝐵, (𝐿 + 1)〉)) |